Package org.eclipse.ditto.model.things
Class AccessControlListModelFactory
- java.lang.Object
-
- org.eclipse.ditto.model.things.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 neworg.eclipse.ditto.model.things.AccessControlList
objects.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Permissions
allPermissions()
Deprecated.Returns a new mutablePermissions
containing all available permissions.static AccessControlList
emptyAcl()
Deprecated.Returns a new empty immutableAccessControlList
.static AccessControlList
newAcl(Iterable<AclEntry> entries)
Deprecated.Returns a new immutable Access Control List (ACL) which is initialised with the specified entries.static AccessControlList
newAcl(String jsonString)
Deprecated.Returns a new immutable Access Control List (ACL) based on the given JSON string.static AccessControlList
newAcl(org.eclipse.ditto.json.JsonObject jsonObject)
Deprecated.Returns a new immutable Access Control List (ACL) based on the given JSON object.static AccessControlList
newAcl(AclEntry entry, AclEntry... furtherEntries)
Deprecated.Returns a new immutable Access Control List (ACL) which is initialised with the specified entries.static AccessControlListBuilder
newAclBuilder()
Deprecated.Returns a mutable builder with a fluent API for an immutableAccessControlList
.static AccessControlListBuilder
newAclBuilder(Iterable<AclEntry> aclEntries)
Deprecated.Returns a mutable builder with a fluent API for an immutableAccessControlList
.static AccessControlListBuilder
newAclBuilder(Optional<? extends Iterable<AclEntry>> aclEntries)
Deprecated.Returns a mutable builder with a fluent API for an immutableAccessControlList
.static AclEntry
newAclEntry(CharSequence authorizationSubjectId, org.eclipse.ditto.json.JsonValue permissionsValue)
Deprecated.Returns a new immutableAclEntry
with the given authorization subject identifier and the given JSON value which provides the permissions.static AclEntry
newAclEntry(org.eclipse.ditto.json.JsonObject jsonObject)
Deprecated.Returns a new immutableAclEntry
based on the given JSON object.static AclEntry
newAclEntry(org.eclipse.ditto.model.base.auth.AuthorizationSubject authorizationSubject, Iterable<Permission> permissions)
Deprecated.Returns a new immutableAclEntry
with the given authorization subject and permissions.static AclEntry
newAclEntry(org.eclipse.ditto.model.base.auth.AuthorizationSubject authorizationSubject, Permission permission, Permission... furtherPermissions)
Deprecated.Returns a new immutableAclEntry
with the given authorization subject and permissions.static Permissions
newPermissions(Collection<Permission> permissions)
Deprecated.Returns a new mutablePermissions
containing the given permissions.static Permissions
newPermissions(Permission permission, Permission... furtherPermissions)
Deprecated.Returns a new mutablePermissions
containing the given permissions.static Permissions
newUnmodifiablePermissions(Permission permission, Permission... furtherPermissions)
Deprecated.Returns a new unmodifiablePermissions
containing the given permissions.static Permissions
noPermissions()
Deprecated.Returns a new empty mutablePermissions
.
-
-
-
Method Detail
-
noPermissions
public static Permissions noPermissions()
Deprecated.Returns a new empty mutablePermissions
.- Returns:
- the new
Permissions
.
-
allPermissions
public static Permissions allPermissions()
Deprecated.Returns a new mutablePermissions
containing all available permissions.- Returns:
- the new
Permissions
. - See Also:
Permission.values()
-
newPermissions
public static Permissions newPermissions(Collection<Permission> permissions)
Deprecated.Returns a new mutablePermissions
containing the given permissions.- Parameters:
permissions
- the permissions to initialise the result with.- Returns:
- the new
Permissions
. - Throws:
NullPointerException
- ifpermissions
isnull
;
-
newPermissions
public static Permissions newPermissions(Permission permission, Permission... furtherPermissions)
Deprecated.Returns a new mutablePermissions
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 isnull
.
-
newUnmodifiablePermissions
public static Permissions newUnmodifiablePermissions(Permission permission, Permission... furtherPermissions)
Deprecated.Returns a new unmodifiablePermissions
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 isnull
.
-
newAclEntry
public static AclEntry newAclEntry(org.eclipse.ditto.model.base.auth.AuthorizationSubject authorizationSubject, Permission permission, Permission... furtherPermissions)
Deprecated.Returns a new immutableAclEntry
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 isnull
.
-
newAclEntry
public static AclEntry newAclEntry(org.eclipse.ditto.model.base.auth.AuthorizationSubject authorizationSubject, Iterable<Permission> permissions)
Deprecated.Returns a new immutableAclEntry
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 isnull
.
-
newAclEntry
public static AclEntry newAclEntry(org.eclipse.ditto.json.JsonObject jsonObject)
Deprecated.Returns a new immutableAclEntry
based on the given JSON object.- Parameters:
jsonObject
- provides the initial values for the result.- Returns:
- the new ACL entry.
- Throws:
NullPointerException
- ifjsonObject
isnull
.org.eclipse.ditto.model.base.exceptions.DittoJsonException
- ifjsonObject
cannot be parsed.
-
newAclEntry
public static AclEntry newAclEntry(CharSequence authorizationSubjectId, org.eclipse.ditto.json.JsonValue permissionsValue)
Deprecated.Returns a new immutableAclEntry
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 isnull
.org.eclipse.ditto.model.base.exceptions.DittoJsonException
- ifpermissionsValue
is not a JSON object.AclEntryInvalidException
- ifpermissionsValue
does not contain aboolean
value for the required permissions.
-
newAclBuilder
public static AccessControlListBuilder newAclBuilder()
Deprecated.Returns a mutable builder with a fluent API for an immutableAccessControlList
.- Returns:
- the new builder.
-
newAclBuilder
public static AccessControlListBuilder newAclBuilder(Iterable<AclEntry> aclEntries)
Deprecated.Returns a mutable builder with a fluent API for an immutableAccessControlList
. The builder is initialised with the given ACL entries.- Parameters:
aclEntries
- the initial entries of the new builder.- Returns:
- the new builder.
- Throws:
NullPointerException
- ifaclEntries
isnull
.
-
newAclBuilder
public static AccessControlListBuilder newAclBuilder(Optional<? extends Iterable<AclEntry>> aclEntries)
Deprecated.Returns a mutable builder with a fluent API for an immutableAccessControlList
. The builder is initialised with the given ACL entries.- Parameters:
aclEntries
- the initial entries of the new builder.- Returns:
- the new builder.
- Throws:
NullPointerException
- ifaclEntries
isnull
.
-
emptyAcl
public static AccessControlList emptyAcl()
Deprecated.Returns a new empty immutableAccessControlList
.- Returns:
- the new ACL.
-
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 isnull
.
-
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 isnull
.
-
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
- ifjsonObject
isnull
.org.eclipse.ditto.model.base.exceptions.DittoJsonException
- ifjsonObject
cannot be parsed toAccessControlList
.
-
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
- ifjsonString
cannot be parsed toAccessControlList
.
-
-