Package com.sas.lsaf.security.acl
Class AbstractAcl
- java.lang.Object
-
- com.sas.lsaf.security.acl.AbstractAcl
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
Acl
,DefaultAcl
public abstract class AbstractAcl extends java.lang.Object implements java.io.Serializable
Represents an access control list for a specific object in the system. TheAcl
maintains the association with its owning object instance, the user that currently owns the object as well as the collection of individualAclEntry
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractAcl(ObjectIdentity owningObjectIdentity)
Constructs anAbstractAcl
with the specified object type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.Set<AclEntry>
getEntries()
Gets the ACL entries for this ACL.UserDescriptor
getOwner()
Gets the user who is the owner of this ACL.ObjectIdentity
getOwningObjectIdentity()
Gets the object for which this ACL is defined.int
hashCode()
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.void
setEntries(java.util.Set<AclEntry> entries)
Sets the ACL entries for this aclvoid
setOwner(UserDescriptor owner)
Sets the user who will be the owner of this ACL.java.lang.String
toString()
-
-
-
Constructor Detail
-
AbstractAcl
public AbstractAcl(ObjectIdentity owningObjectIdentity)
Constructs anAbstractAcl
with the specified object type.- Parameters:
owningObjectIdentity
- object identity for which this ACL is defined.
-
-
Method Detail
-
getEntries
public java.util.Set<AclEntry> getEntries()
Gets the ACL entries for this ACL.- Returns:
- Set set of ACL entries
-
setEntries
public void setEntries(java.util.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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-