Package org.eclipse.ditto.model.things
Class ThingAclValidator
- java.lang.Object
-
- org.eclipse.ditto.model.things.ThingAclValidator
-
- All Implemented Interfaces:
org.eclipse.ditto.model.base.common.Validator
@Deprecated @Immutable public final class ThingAclValidator 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 regard to the rules of a validThing
.
-
-
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 ThingAclValidator
newInstance(AccessControlList accessControlList)
Deprecated.Creates a newThingAclValidator
instance.
-
-
-
Method Detail
-
newInstance
public static ThingAclValidator newInstance(AccessControlList accessControlList)
Deprecated.Creates a newThingAclValidator
instance.- Parameters:
accessControlList
- the ACL to be validated.- Returns:
- a new
ThingAclValidator
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.
-
-