com.sas.drugdev.remote.repository.security
Interface AccessControlList


public interface AccessControlList

List of AccessControlEntry objects for a given path. If this list is associated with a Container object, then the AccessControlEntry objects reffered to in the list can be cast to ContainerAccessControlEntry objects.
Any modifications made to this list will not be made on the server until RepositoryService.updateContainerAccessControlList(AccessControlList, AclRecurseBehavior) or RepositoryService.updateFileAccessControlList(AccessControlList) is called. If an entry is retrieved from this object and modified, these changes will be reflected when the updateAccessControlList method is called.


Method Summary
 void addEntry(AccessControlEntry ace)
          Set the given AccessControlEntry in this list.
 AccessControlEntry createGroupEntry(java.lang.String groupName)
          Create an AccessControlEntry associated with the given group name.
 AccessControlEntry createUserEntry(java.lang.String userid)
          Create an AccessControlEntry associated with the given user id.
 java.util.List getEntries()
          Get a list of all the AccessControlEntry objects in ths ACL.
 java.util.Map getGroupEntries()
          Get all the AccessControlEntrys that are associated with a group.
 AccessControlEntry getGroupEntry(java.lang.String groupName)
          Get the AccessControlEntry associated with the given group name.
 RemoteNode getNode()
          Get the full path of the node to which this ACL applies.
 java.util.Map getUserEntries()
          Get all the AccessControlEntrys that are associated with a userid.
 AccessControlEntry getUserEntry(java.lang.String userid)
          Get the AccessControlEntry associated with the given user id.
 boolean isContainerAcl()
          Return whether this ACL points to a container.
 AccessControlEntry removeGroupEntry(java.lang.String groupName)
          Remove the AccessControlEntry associated with the given groupname from this list.
 AccessControlEntry removeUserEntry(java.lang.String userid)
          Remove the AccessControlEntry associated with the given userid from this list.
 

Method Detail

getNode

RemoteNode getNode()
Get the full path of the node to which this ACL applies.

Returns:
Full path

isContainerAcl

boolean isContainerAcl()
Return whether this ACL points to a container.

Returns:
whether this ACL points to a container

addEntry

void addEntry(AccessControlEntry ace)
              throws EntryExistsException
Set the given AccessControlEntry in this list. If an entry with the associated principal id already exists in the list, it is replaced. If this list is associated with a container, then this parameter must be a ContainerAccessControlEntry.
This operation isn't completed on the server until RepositoryService.updateContainerAccessControlList(AccessControlList, AclRecurseBehavior) or RepositoryService.updateFileAccessControlList(AccessControlList) is called.

Parameters:
ace - AccessControlEntry to set on this ACL
Throws:
EntryExistsException

getEntries

java.util.List getEntries()
Get a list of all the AccessControlEntry objects in ths ACL. If this list is associated with a container, a list of ContainerAccessControlEntry objects is returned.
This operation isn't completed on the server until RepositoryService.updateContainerAccessControlList(AccessControlList, AclRecurseBehavior) or RepositoryService.updateFileAccessControlList(AccessControlList) is called.

Returns:
an unmodifiable list of AccessControlEntry objects

getGroupEntries

java.util.Map getGroupEntries()
Get all the AccessControlEntrys that are associated with a group. Any changes made to the AccessControlEntry objects in this map are updated on the server when either RepositoryService.updateContainerAccessControlList(AccessControlList, AclRecurseBehavior) or RepositoryService.updateFileAccessControlList(AccessControlList) is called.

Returns:
an unmodifiableMap of AccessControlEntry objects keyed by the group name

getUserEntries

java.util.Map getUserEntries()
Get all the AccessControlEntrys that are associated with a userid. Any changes made to the AccessControlEntry objects in this map are updated on the server when either RepositoryService.updateContainerAccessControlList(AccessControlList, AclRecurseBehavior) or RepositoryService.updateFileAccessControlList(AccessControlList) is called.

Returns:
an unmodifiable Map of AccessControlEntry objects keyed by the userid

getUserEntry

AccessControlEntry getUserEntry(java.lang.String userid)
Get the AccessControlEntry associated with the given user id. Any changes made to the AccessControlEntry object returned from this method are updated on the server when either RepositoryService.updateContainerAccessControlList(AccessControlList, AclRecurseBehavior) or RepositoryService.updateFileAccessControlList(AccessControlList) is called.

Parameters:
userid - userid of the AccessControlEntry you are retrieving.
Returns:
the AccessControlEntry associated with the given user id

getGroupEntry

AccessControlEntry getGroupEntry(java.lang.String groupName)
Get the AccessControlEntry associated with the given group name. Any changes made to the AccessControlEntry object returned from this method are updated on the server when either RepositoryService.updateContainerAccessControlList(AccessControlList, AclRecurseBehavior) or RepositoryService.updateFileAccessControlList(AccessControlList) is called.

Parameters:
groupName - groupName of the AccessControlEntry you are retrieving.
Returns:
the AccessControlEntry associated with the given user id

removeUserEntry

AccessControlEntry removeUserEntry(java.lang.String userid)
                                   throws UndeleteableEntryException
Remove the AccessControlEntry associated with the given userid from this list. The AccessControlEntry.USER_OWNER entry is undeleteable and will result in an exception.

Parameters:
userid - userid of the AccessControlEntry you wish to remove
Returns:
the AccessControlEntry that was removed
Throws:
UndeleteableEntryException - if userid is AccessControlEntry.USER_OWNER

removeGroupEntry

AccessControlEntry removeGroupEntry(java.lang.String groupName)
                                    throws UndeleteableEntryException
Remove the AccessControlEntry associated with the given groupname from this list. The AccessControlEntry.GROUP_ALL_USERS entry is undeleteable and will result in an exception.

Parameters:
groupName - groupName of the AccessControlEntry you wish to remove
Returns:
the AccessControlEntry that was removed
Throws:
UndeleteableEntryException - if groupname is AccessControlEntry.GROUP_ALL_USERS

createUserEntry

AccessControlEntry createUserEntry(java.lang.String userid)
                                   throws EntryExistsException
Create an AccessControlEntry associated with the given user id. This entry isn't added to the list until addEntry(com.sas.drugdev.remote.repository.security.AccessControlEntry) is called with returned object. The existence of the userid isn't checked until RepositoryService.updateContainerAccessControlList(AccessControlList, AclRecurseBehavior) or RepositoryService.updateFileAccessControlList(AccessControlList) is called.

Parameters:
userid - user id with which to create this AccessControlEntry
Returns:
AccessControlEntry with the default values set
Throws:
EntryExistsException - if there is already a user entry with this userid in the list

createGroupEntry

AccessControlEntry createGroupEntry(java.lang.String groupName)
                                    throws EntryExistsException
Create an AccessControlEntry associated with the given group name. This entry isn't added to the list until addEntry(com.sas.drugdev.remote.repository.security.AccessControlEntry) is called with a returned object. The existence of the group isn't checked until RepositoryService.updateContainerAccessControlList(AccessControlList, AclRecurseBehavior) or RepositoryService.updateFileAccessControlList(AccessControlList) is called.

Parameters:
groupName - group with which to create this AccessControlEntry
Returns:
AccessControlEntry with the default values set
Throws:
EntryExistsException - if there is already a user entry with this userid in the list