atg.userdirectory
Interface OrganizationalEntity

All Superinterfaces:
DirectoryPrincipal, java.security.Principal
All Known Subinterfaces:
Organization, User

public interface OrganizationalEntity
extends DirectoryPrincipal

An OrganizationalEntity is a Principal that can belong to an organization, in other words an Organization or a User.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Method Summary
 boolean assignRole(Role pRole)
          Assign an existing assignable role to this OrganizationalEntity.
 java.util.List getAncestorOrganizations()
          Get all the ancestor organizations that ultimately contain this OrganizationalEntity in a recursive sense.
 java.util.Collection getAssignedRoles()
          Get the set of assignable roles which are explicitly assigned to this principal.
 Organization getParentOrganization()
          Get the immediate parent organization which contains this OrganizationalEntity.
 boolean hasAssignedRole(Role pRole)
          Determine whether a given assignable role is explicitly assigned to this principal.
 boolean removeRole(Role pRole)
          Remove an existing assignable role from this OrganizationalEntity.
 
Methods inherited from interface atg.userdirectory.DirectoryPrincipal
createRelativeRole, getAccessRights, 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

getParentOrganization

Organization getParentOrganization()
Get the immediate parent organization which contains this OrganizationalEntity.

Returns:
the parent Organization.

getAncestorOrganizations

java.util.List getAncestorOrganizations()
Get all the ancestor organizations that ultimately contain this OrganizationalEntity in a recursive sense. Note that this is a subset of the result of getEffectivePrincipals().

Returns:
a collection of Organizations representing the parent organizations. The collection is sorted in order of increasing organizational distance.

getAssignedRoles

java.util.Collection getAssignedRoles()
Get the set of assignable roles which are explicitly assigned to this principal.

Both global and relative roles are returned by this method.

Returns:
a collection of Roles representing the assignable roles explicitly assigned to this OrganizationalEntity

hasAssignedRole

boolean hasAssignedRole(Role pRole)
Determine whether a given assignable role is explicitly assigned to this principal. To determine whether a role is implicitly assigned to this principal (e.g. a dynamic role whose definition matches), call hasMember() on the role, passing the principal as a parameter.

Parameters:
pRole - a assignable role.
Returns:
true if this principal is explicitly assigned the given role

assignRole

boolean assignRole(Role pRole)
                   throws DirectoryModificationException
Assign an existing assignable role to this OrganizationalEntity.

Parameters:
pRole - a role to be assigned to this principal
Returns:
true if the operation succeeds; false if the role is already assigned to this principal.
Throws:
DirectoryModificationException - if the role is not assignable or if the operation fails unexpectedly; a nested exception provides details.
RoleNotAssignableException - if the role is not assignable.

removeRole

boolean removeRole(Role pRole)
                   throws DirectoryModificationException
Remove an existing assignable role from this OrganizationalEntity.

Parameters:
pRole - a role to be removed
Returns:
true if the operation succeeds; false if the role was not assigned to this principal.
Throws:
DirectoryModificationException - occurs if the operation fails unexpectedly; a nested exception provides details.