Package org.eclipse.ditto.model.things
Class AclValidator
- java.lang.Object
-
- org.eclipse.ditto.model.things.AclValidator
-
- All Implemented Interfaces:
org.eclipse.ditto.model.base.common.Validator
@Deprecated @Immutable public final class AclValidator extends Object implements org.eclipse.ditto.model.base.common.Validator
Deprecated.AccessControlLists belong to deprecated API version 1. Use API version 2 with policies instead.Instances of this class can be used to validate a specifiedAccessControlList
with minimum required permissions.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Optional<String>
getReason()
Deprecated.boolean
isValid()
Deprecated.Validates theAccessControlList
which was provided to the static factory method of this class.static AclValidator
newInstance(AccessControlList accessControlList, Permissions minRequiredPermissions)
Deprecated.Creates a newAclValidator
instance.
-
-
-
Method Detail
-
newInstance
public static AclValidator newInstance(AccessControlList accessControlList, Permissions minRequiredPermissions)
Deprecated.Creates a newAclValidator
instance.- Parameters:
accessControlList
- the ACL to be validated.minRequiredPermissions
- the minimum required permissions.- Returns:
- a new
AclValidator
object. - Throws:
NullPointerException
- if any argument isnull
.
-
isValid
public boolean isValid()
Deprecated.Validates theAccessControlList
which was provided to the static factory method of this class. Validation ensures that the ACL contains at least one Authorization Subject which has the permissionsPermission.READ
,Permission.WRITE
andPermission.ADMINISTRATE
.- Specified by:
isValid
in interfaceorg.eclipse.ditto.model.base.common.Validator
- Returns:
- false if the validated ACL does not contain at least one Authorization Subject with the minimum required permissions or else true.
-
-