com.sas.hls.security.acl
Class Acl

java.lang.Object
  extended by com.sas.hls.security.acl.Acl
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AclContainer

public class Acl
extends Object
implements Serializable

An Acl contains owner and access permission information for a given object. Objects for which access permissions can be set need to implement the AclSecurable interface. Each acl has an owner which is a User. The acl also contains a set of AclEntry objects. When a securable object is added to the repository, it will, by default, have an acl with 2 entries defined. One is the AclOwner entry which defines permissions the owner can have. Note that read and admin permissions can not be removed from the AclOwner entry The other entry added by default is the AclMembers entry. This entry defines which permissions members of the parent context will have. Additional entries may be defined to set permissions for other Users and Groups.

See Also:
Serialized Form

Constructor Summary
Acl()
          Zero-arg Acl constructor
 
Method Summary
 Set<AclEntry> getEntries()
          Get the acl entries for this acl
 UserDescriptor getOwner()
          Get the user who is the owner of this acl
 ObjectIdentity getOwningObjectIdentity()
          Get the object for which this acl is defined
 void setAce(AclPrincipal p, AclEntry.PermissionValue admin, AclEntry.PermissionValue read, AclEntry.PermissionValue writeProperties, AclEntry.PermissionValue writeContent, AclEntry.PermissionValue delete)
          Convenience method in which to add an acl entry to the set of entries defined for this acl.
 void setEntries(Set<AclEntry> entries)
          Set the acl entries for this acl
 void setOwner(UserDescriptor owner)
          Sets the user who will be the owner of this acl
 void setOwningObjectIdentity(ObjectIdentity owningObjectIdentity)
          Set the object for which this acl is defined
 String toString()
          Return a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Acl

public Acl()
Zero-arg Acl constructor

Method Detail

getEntries

public Set<AclEntry> getEntries()
Get the acl entries for this acl

Returns:
Set set of acl entries

setEntries

public void setEntries(Set<AclEntry> entries)
Set the acl entries for this acl

Parameters:
entries - acl entries in which to set

getOwningObjectIdentity

public ObjectIdentity getOwningObjectIdentity()
Get the object for which this acl is defined

Returns:
ObjectIdentity object for which this acl is defined

setOwningObjectIdentity

public void setOwningObjectIdentity(ObjectIdentity owningObjectIdentity)
Set the object for which this acl is defined

Parameters:
owningObjectIdentity - object for which to associate with this acl

getOwner

public UserDescriptor getOwner()
Get the user who is the owner of this acl

Returns:
User user who owns this acl

setOwner

public void setOwner(UserDescriptor owner)
Sets the user who will be the owner of this acl

Parameters:
owner - user to own this acl

setAce

public void setAce(AclPrincipal p,
                   AclEntry.PermissionValue admin,
                   AclEntry.PermissionValue read,
                   AclEntry.PermissionValue writeProperties,
                   AclEntry.PermissionValue writeContent,
                   AclEntry.PermissionValue delete)
Convenience method in which to add an acl entry to the set of entries defined for this acl. If the entry already exists for that principal, it will be replaced with the permission values specified. Otherwise, a new entry will be added.

Parameters:
p -
admin -
read -
writeProperties -
writeContent -
delete -

toString

public String toString()
Return a string representation of the object.

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright (c) 2013, SAS Institute Inc., Cary, NC, USA