Class AccessControlListModelFactory


  • @Deprecated
    @Immutable
    public final class AccessControlListModelFactory
    extends Object
    Deprecated.
    AccessControlLists belong to deprecated API version 1. Use API version 2 with policies instead.
    Factory that creates new org.eclipse.ditto.model.things.AccessControlList objects.
    • Method Detail

      • noPermissions

        public static Permissions noPermissions()
        Deprecated.
        Returns a new empty mutable Permissions.
        Returns:
        the new Permissions.
      • allPermissions

        public static Permissions allPermissions()
        Deprecated.
        Returns a new mutable Permissions containing all available permissions.
        Returns:
        the new Permissions.
        See Also:
        Permission.values()
      • newPermissions

        public static Permissions newPermissions​(Collection<Permission> permissions)
        Deprecated.
        Returns a new mutable Permissions containing the given permissions.
        Parameters:
        permissions - the permissions to initialise the result with.
        Returns:
        the new Permissions.
        Throws:
        NullPointerException - if permissions is null;
      • newPermissions

        public static Permissions newPermissions​(Permission permission,
                                                 Permission... furtherPermissions)
        Deprecated.
        Returns a new mutable Permissions containing the given permissions.
        Parameters:
        permission - the mandatory permission to be contained in the result.
        furtherPermissions - additional permissions to be contained in the result.
        Returns:
        the new Permissions.
        Throws:
        NullPointerException - if any argument is null.
      • newUnmodifiablePermissions

        public static Permissions newUnmodifiablePermissions​(Permission permission,
                                                             Permission... furtherPermissions)
        Deprecated.
        Returns a new unmodifiable Permissions containing the given permissions.
        Parameters:
        permission - the mandatory permission to be contained in the result.
        furtherPermissions - additional permissions to be contained in the result.
        Returns:
        the new Permissions.
        Throws:
        NullPointerException - if any argument is null.
      • newAclEntry

        public static AclEntry newAclEntry​(org.eclipse.ditto.model.base.auth.AuthorizationSubject authorizationSubject,
                                           Permission permission,
                                           Permission... furtherPermissions)
        Deprecated.
        Returns a new immutable AclEntry with the given authorization subject and permissions.
        Parameters:
        authorizationSubject - the authorization subject of the new ACL entry.
        permission - the permission of the new ACL entry.
        furtherPermissions - additional permission of the new ACL entry.
        Returns:
        the new ACL entry.
        Throws:
        NullPointerException - if any argument is null.
      • newAclEntry

        public static AclEntry newAclEntry​(org.eclipse.ditto.model.base.auth.AuthorizationSubject authorizationSubject,
                                           Iterable<Permission> permissions)
        Deprecated.
        Returns a new immutable AclEntry with the given authorization subject and permissions.
        Parameters:
        authorizationSubject - the authorization subject of the new ACL entry.
        permissions - the permissions of the new ACL entry.
        Returns:
        the new ACL entry.
        Throws:
        NullPointerException - if any argument is null.
      • newAclEntry

        public static AclEntry newAclEntry​(org.eclipse.ditto.json.JsonObject jsonObject)
        Deprecated.
        Returns a new immutable AclEntry based on the given JSON object.
        Parameters:
        jsonObject - provides the initial values for the result.
        Returns:
        the new ACL entry.
        Throws:
        NullPointerException - if jsonObject is null.
        org.eclipse.ditto.model.base.exceptions.DittoJsonException - if jsonObject cannot be parsed.
      • newAclEntry

        public static AclEntry newAclEntry​(CharSequence authorizationSubjectId,
                                           org.eclipse.ditto.json.JsonValue permissionsValue)
        Deprecated.
        Returns a new immutable AclEntry with the given authorization subject identifier and the given JSON value which provides the permissions.
        Parameters:
        authorizationSubjectId - the identifier of the authorization subject of the new ACL entry.
        permissionsValue - a JSON value which represents the permissions of the authorization subject of the new ACL entry. This value is supposed to be a JSON object.
        Returns:
        the new ACL entry.
        Throws:
        NullPointerException - if any argument is null.
        org.eclipse.ditto.model.base.exceptions.DittoJsonException - if permissionsValue is not a JSON object.
        AclEntryInvalidException - if permissionsValue does not contain a boolean value for the required permissions.
      • newAclBuilder

        public static AccessControlListBuilder newAclBuilder​(Iterable<AclEntry> aclEntries)
        Deprecated.
        Returns a mutable builder with a fluent API for an immutable AccessControlList. The builder is initialised with the given ACL entries.
        Parameters:
        aclEntries - the initial entries of the new builder.
        Returns:
        the new builder.
        Throws:
        NullPointerException - if aclEntries is null.
      • newAcl

        public static AccessControlList newAcl​(AclEntry entry,
                                               AclEntry... furtherEntries)
        Deprecated.
        Returns a new immutable Access Control List (ACL) which is initialised with the specified entries.
        Parameters:
        entry - the mandatory entry of the ACL.
        furtherEntries - additional entries of the ACL.
        Returns:
        the new initialised Access Control List.
        Throws:
        NullPointerException - if any argument is null.
      • newAcl

        public static AccessControlList newAcl​(Iterable<AclEntry> entries)
        Deprecated.
        Returns a new immutable Access Control List (ACL) which is initialised with the specified entries.
        Parameters:
        entries - the entries of the ACL.
        Returns:
        the new initialised Access Control List.
        Throws:
        NullPointerException - if any argument is null.
      • newAcl

        public static AccessControlList newAcl​(org.eclipse.ditto.json.JsonObject jsonObject)
        Deprecated.
        Returns a new immutable Access Control List (ACL) based on the given JSON object.
        Parameters:
        jsonObject - the JSON object representation of an ACL.
        Returns:
        the new initialised AccessControlList.
        Throws:
        NullPointerException - if jsonObject is null.
        org.eclipse.ditto.model.base.exceptions.DittoJsonException - if jsonObject cannot be parsed to AccessControlList.
      • newAcl

        public static AccessControlList newAcl​(String jsonString)
        Deprecated.
        Returns a new immutable Access Control List (ACL) based on the given JSON string.
        Parameters:
        jsonString - the JSON object representation of an ACL.
        Returns:
        the new initialised AccessControlList.
        Throws:
        org.eclipse.ditto.model.base.exceptions.DittoJsonException - if jsonString cannot be parsed to AccessControlList.