atg.userdirectory
Interface Role

All Superinterfaces:
DirectoryPrincipal, java.security.Principal
All Known Subinterfaces:
RelativeRole

public interface Role
extends DirectoryPrincipal

A Role is a DirectoryPrincipal representing a role that may be played by one or more OrganizationalEntity.

Roles may be assignable, which means that they can be explicitly assigned to users or organizations using the OrganizationalEntity.assignRole() method. The membership of an assignable role is the set of users and organizations to whom the role has been explicitly assigned.

Non-assignable roles, in contrast, have a membership that is determined dynamically based on the attributes of each User. The membership criteria are not accessible via this interface, and depend on the UserDirectory implementation.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Method Summary
 java.util.Collection getAccessRights()
          Get all AccessRights that are associated with this role
 java.util.Collection getAssigneeOrganizations()
          Get all Organizations to which this assignable role is explicitly assigned.
 java.util.Collection getAssigneeOrganizationsSortOnName(int pStartIndex, int pEndIndex, int pSortOrder)
          Get all Organizations to which this assignable role is explicitly assigned, sorted on the name of the organization, with index control of the result set returned as a collection.
 java.util.Collection getAssignees()
          Get all OrganizationalEntities to which this assignable role is explicitly assigned.
 java.util.Collection getAssigneeUsers()
          Get all Users to which this assignable role is explicitly assigned.
 java.util.Collection getAssigneeUsersSortOnEmailAddress(int pStartIndex, int pEndIndex, int pSortOrder)
          Get all Users to which this assignable role is explicitly assigned, sorted on the emailAddress of the user, with index control of the result set returned as a collection.
 java.util.Collection getAssigneeUsersSortOnFirstName(int pStartIndex, int pEndIndex, int pSortOrder)
          Get all Users to which this assignable role is explicitly assigned, sorted on the firstName of the user, with index control of the result set returned as a collection.
 java.util.Collection getAssigneeUsersSortOnLastName(int pStartIndex, int pEndIndex, int pSortOrder)
          Get all Users to which this assignable role is explicitly assigned, sorted on the lastName of the user, with index control of the result set returned as a collection.
 java.util.Collection getAssigneeUsersSortOnLogin(int pStartIndex, int pEndIndex, int pSortOrder)
          Get all Users to which this assignable role is explicitly assigned, sorted on the login of the user, with index control of the result set returned as a collection.
 RoleFolder getParentFolder()
          Get the parent RoleFolder of this Role, if it belongs to one.
 java.util.Collection getTemplateRoles()
          Get all template roles associated with this role.
 boolean isAssignable()
          Determine whether this Role may be explicitly assigned to a User using assignRole().
 boolean isAssignedTo(OrganizationalEntity pChild)
          Determine whether an role is explicitly assigned to some OrganizationalEntity.
 void remove()
          Remove this role from the user directory, from its parent RoleFolder if any, and from any principals to which it is assigned.
 
Methods inherited from interface atg.userdirectory.DirectoryPrincipal
createRelativeRole, getDescription, getEffectivePrincipals, getMembers, getOrganizationMembersSortOnName, getPrimaryKey, getRelativeRole, getRelativeRoles, getUserDirectory, getUserMembersSortOnEmailAddress, getUserMembersSortOnFirstName, getUserMembersSortOnLastName, getUserMembersSortOnLogin, hasMember
 
Methods inherited from interface java.security.Principal
equals, getName, hashCode, toString
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Method Detail

isAssignable

boolean isAssignable()
Determine whether this Role may be explicitly assigned to a User using assignRole().

Returns:
true if this role is explicitly assignable to individual Users.
See Also:
OrganizationalEntity.assignRole(atg.userdirectory.Role)

getParentFolder

RoleFolder getParentFolder()
Get the parent RoleFolder of this Role, if it belongs to one.

Returns:
a parent RoleFolder, or null if the role does not belong to any folder.

getAssignees

java.util.Collection getAssignees()
Get all OrganizationalEntities to which this assignable role is explicitly assigned. Invoking this method on a non-assignable role will return an empty collection.

Returns:
a collection of OrganizationalEntities

getAssigneeOrganizations

java.util.Collection getAssigneeOrganizations()
Get all Organizations to which this assignable role is explicitly assigned. Invoking this method on a non-assignable role will return an empty collection.

Returns:
a collection of Organizations

getAssigneeOrganizationsSortOnName

java.util.Collection getAssigneeOrganizationsSortOnName(int pStartIndex,
                                                        int pEndIndex,
                                                        int pSortOrder)
Get all Organizations to which this assignable role is explicitly assigned, sorted on the name of the organization, with index control of the result set returned as a collection. Invoking this method on a non-assignable role will return an empty collection.

Parameters:
pStartIndex - starting index of the sorted result set.
pEndEndex - end index of the sorted result set. a value of -1 sets the end index to infinite.
pSortOrder - sort order of the return set. valid values = { UserDirectory.ASCENDING, UserDirectory.DESCENDING }
Returns:
a collection of atg.userdirectory.Organizations which are assigned explicitly to this Role.

getAssigneeUsersSortOnLogin

java.util.Collection getAssigneeUsersSortOnLogin(int pStartIndex,
                                                 int pEndIndex,
                                                 int pSortOrder)
Get all Users to which this assignable role is explicitly assigned, sorted on the login of the user, with index control of the result set returned as a collection. Invoking this method on a non-assignable role will return an empty collection.

Parameters:
pStartIndex - starting index of the sorted result set.
pEndEndex - end index of the sorted result set. a value of -1 sets the end index to infinite.
pSortOrder - sort order of the return set. valid values = { UserDirectory.ASCENDING, UserDirectory.DESCENDING }
Returns:
a collection of atg.userdirectory.Users which are assigned explicitly to this Role.

getAssigneeUsersSortOnFirstName

java.util.Collection getAssigneeUsersSortOnFirstName(int pStartIndex,
                                                     int pEndIndex,
                                                     int pSortOrder)
Get all Users to which this assignable role is explicitly assigned, sorted on the firstName of the user, with index control of the result set returned as a collection. Invoking this method on a non-assignable role will return an empty collection.

Parameters:
pStartIndex - starting index of the sorted result set.
pEndEndex - end index of the sorted result set. a value of -1 sets the end index to infinite.
pSortOrder - sort order of the return set. valid values = { UserDirectory.ASCENDING, UserDirectory.DESCENDING }
Returns:
a collection of atg.userdirectory.Users which are assigned explicitly to this Role.

getAssigneeUsersSortOnLastName

java.util.Collection getAssigneeUsersSortOnLastName(int pStartIndex,
                                                    int pEndIndex,
                                                    int pSortOrder)
Get all Users to which this assignable role is explicitly assigned, sorted on the lastName of the user, with index control of the result set returned as a collection. Invoking this method on a non-assignable role will return an empty collection.

Parameters:
pStartIndex - starting index of the sorted result set.
pEndEndex - end index of the sorted result set. a value of -1 sets the end index to infinite.
pSortOrder - sort order of the return set. valid values = { UserDirectory.ASCENDING, UserDirectory.DESCENDING }
Returns:
a collection of atg.userdirectory.Users which are assigned explicitly to this Role.

getAssigneeUsersSortOnEmailAddress

java.util.Collection getAssigneeUsersSortOnEmailAddress(int pStartIndex,
                                                        int pEndIndex,
                                                        int pSortOrder)
Get all Users to which this assignable role is explicitly assigned, sorted on the emailAddress of the user, with index control of the result set returned as a collection. Invoking this method on a non-assignable role will return an empty collection.

Parameters:
pStartIndex - starting index of the sorted result set.
pEndEndex - end index of the sorted result set. a value of -1 sets the end index to infinite.
pSortOrder - sort order of the return set. valid values = { UserDirectory.ASCENDING, UserDirectory.DESCENDING }
Returns:
a collection of atg.userdirectory.Users which are assigned explicitly to this Role.

getAssigneeUsers

java.util.Collection getAssigneeUsers()
Get all Users to which this assignable role is explicitly assigned. Invoking this method on a non-assignable role will return an empty collection.

Returns:
a collection of Users

isAssignedTo

boolean isAssignedTo(OrganizationalEntity pChild)
Determine whether an role is explicitly assigned to some OrganizationalEntity. Invoking this method on a non-assignable role will always return false, even if the entity is a member of that role; this behavior is in contrast to DirectoryPrincipal.hasMember().

Parameters:
pChild - a principal representing a potential assignee of this role
Returns:
true if the principal is explicitly assigned this role.

getAccessRights

java.util.Collection getAccessRights()
Get all AccessRights that are associated with this role

Specified by:
getAccessRights in interface DirectoryPrincipal
Returns:
a collection of AccessRights

getTemplateRoles

java.util.Collection getTemplateRoles()
Get all template roles associated with this role.

Returns:
a collection of Roles

remove

void remove()
            throws DirectoryModificationException
Remove this role from the user directory, from its parent RoleFolder if any, and from any principals to which it is assigned.

Throws:
DirectoryModificationException - occurs if the operation fails unexpectedly; a nested exception provides details.