Interface EffectedPermissions

  • All Superinterfaces:
    org.eclipse.ditto.model.base.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate<org.eclipse.ditto.json.JsonField>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPointer<org.eclipse.ditto.json.JsonObject>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,​org.eclipse.ditto.json.JsonField>

    public interface EffectedPermissions
    extends org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate<org.eclipse.ditto.json.JsonField>
    Holds Permissions for PermissionEffects (grant/revoke).
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  EffectedPermissions.JsonFields
      An enumeration of the known JsonFields of a EffectedPermissions.
      • Nested classes/interfaces inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable

        org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate<T extends Object>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,​T extends Object>
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default Permissions getGrantedPermissions()
      Returns the granted Permissions.
      Permissions getPermissions​(PermissionEffect effect)
      Returns the Permissions which are valid for the passed effect.
      default Permissions getRevokedPermissions()
      Returns the revoked Permissions.
      default org.eclipse.ditto.model.base.json.JsonSchemaVersion[] getSupportedSchemaVersions()
      EffectedPermissions is only available in JsonSchemaVersion V_2.
      static EffectedPermissions newInstance​(Iterable<String> grantedPermissions, Iterable<String> revokedPermissions)
      Returns a new EffectedPermissions containing the given grantedPermissions and revokedPermissions.
      default org.eclipse.ditto.json.JsonObject toJson()
      Returns all non hidden marked fields of this EffectedPermissions.
      default org.eclipse.ditto.json.JsonObject toJson​(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion, org.eclipse.ditto.json.JsonFieldSelector fieldSelector)  
      • Methods inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable

        getImplementedSchemaVersion, getLatestSchemaVersion, implementsSchemaVersion, implementsSchemaVersion, toJsonString
      • Methods inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector

        toJson, toJson, toJson, toJsonString, toJsonString
      • Methods inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate

        toJson, toJson, toJsonString, toJsonString
      • Methods inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable.WithPointer

        toJsonString, toJsonString
      • Methods inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate

        toJson, toJson, toJsonString, toJsonString
    • Method Detail

      • newInstance

        static EffectedPermissions newInstance​(@Nullable
                                               Iterable<String> grantedPermissions,
                                               @Nullable
                                               Iterable<String> revokedPermissions)
        Returns a new EffectedPermissions containing the given grantedPermissions and revokedPermissions.
        Parameters:
        grantedPermissions - the Permissions which should be granted, may be null.
        revokedPermissions - the Permissions which should be revoked, may be null.
        Returns:
        the new EffectedPermissions.
      • getSupportedSchemaVersions

        default org.eclipse.ditto.model.base.json.JsonSchemaVersion[] getSupportedSchemaVersions()
        EffectedPermissions is only available in JsonSchemaVersion V_2.
        Specified by:
        getSupportedSchemaVersions in interface org.eclipse.ditto.model.base.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>
        Returns:
        the supported JsonSchemaVersions of EffectedPermissions.
      • getGrantedPermissions

        default Permissions getGrantedPermissions()
        Returns the granted Permissions.
        Returns:
        the granted Permissions.
      • getRevokedPermissions

        default Permissions getRevokedPermissions()
        Returns the revoked Permissions.
        Returns:
        the revoked Permissions.
      • toJson

        default org.eclipse.ditto.json.JsonObject toJson()
        Returns all non hidden marked fields of this EffectedPermissions.
        Specified by:
        toJson in interface org.eclipse.ditto.model.base.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>
        Returns:
        a JSON object representation of this EffectedPermissions including only non hidden marked fields.
      • toJson

        default org.eclipse.ditto.json.JsonObject toJson​(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
                                                         org.eclipse.ditto.json.JsonFieldSelector fieldSelector)
        Specified by:
        toJson in interface org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector