Class 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 specified AccessControlList with minimum required permissions.
    • Method Detail

      • newInstance

        public static AclValidator newInstance​(AccessControlList accessControlList,
                                               Permissions minRequiredPermissions)
        Deprecated.
        Creates a new AclValidator instance.
        Parameters:
        accessControlList - the ACL to be validated.
        minRequiredPermissions - the minimum required permissions.
        Returns:
        a new AclValidator object.
        Throws:
        NullPointerException - if any argument is null.
      • isValid

        public boolean isValid()
        Deprecated.
        Validates the AccessControlList 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 permissions Permission.READ , Permission.WRITE and Permission.ADMINISTRATE.
        Specified by:
        isValid in interface org.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.
      • getReason

        public Optional<String> getReason()
        Deprecated.
        Specified by:
        getReason in interface org.eclipse.ditto.model.base.common.Validator