Class AbstractAcl

java.lang.Object
com.sas.lsaf.security.acl.AbstractAcl
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Acl, DefaultAcl

public abstract class AbstractAcl extends Object implements Serializable
Represents an access control list for a specific object in the system. The Acl maintains the association with its owning object instance, the user that currently owns the object as well as the collection of individual AclEntry objects which maintain fine-grained permissions.

Abstract because this should not be constructed directly, rather, a more detailed subclass should be used.

Since:
2.1
See Also:
  • Constructor Details

    • AbstractAcl

      public AbstractAcl(ObjectIdentity owningObjectIdentity)
      Constructs an AbstractAcl with the specified object type.
      Parameters:
      owningObjectIdentity - object identity for which this ACL is defined.
  • Method Details

    • getEntries

      public Set<AclEntry> getEntries()
      Gets the ACL entries for this ACL.
      Returns:
      Set set of ACL entries
    • setEntries

      public void setEntries(Set<AclEntry> entries)
      Sets the ACL entries for this acl
      Parameters:
      entries - the ACL entries to set.
    • getOwningObjectIdentity

      public ObjectIdentity getOwningObjectIdentity()
      Gets the object for which this ACL is defined.
      Returns:
      ObjectIdentity object for which this ACL is defined.
    • getOwner

      public UserDescriptor getOwner()
      Gets the user who is the owner of this ACL.
      Returns:
      User user to owns this ACL.
    • setOwner

      public void setOwner(UserDescriptor owner)
      Sets the user who will be the owner of this ACL.
      Parameters:
      owner - the user to own this ACL.
    • setAce

      public void setAce(Principal principal, AclEntry.PermissionValue adminPermission, AclEntry.PermissionValue readPermission, AclEntry.PermissionValue writePropertiesPermission, AclEntry.PermissionValue writeContentPermission, AclEntry.PermissionValue deletePermission)
      Convenience method in which to add an ACL entry to the set of entries defined for this ACL. If the entry already exists for the principal, it is replaced with the specified permission values. Otherwise, a new entry is added.
      Parameters:
      principal -
      adminPermission -
      readPermission -
      writePropertiesPermission -
      writeContentPermission -
      deletePermission -
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object