atg.userdirectory
Interface Organization

All Superinterfaces:
DirectoryPrincipal, OrganizationalEntity, java.security.Principal

public interface Organization
extends OrganizationalEntity

An Organization is a Principal representing an organization in the organizational graph of a user directory.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Method Summary
 boolean addChild(OrganizationalEntity pChild)
          Add an organizational entity as a child of this organization.
 java.util.Collection getChildOrganizations()
          Get all sub-organizations that are immediately contained in this organization.
 java.util.Collection getChildOrganizationsSortOnName(int pStartIndex, int pEndIndex, int pSortOrder)
          Get all sub-organizations immediately contained in this organization, sorted on the name of the organization, with index control of the result set returned as a collection.
 java.util.Collection getChildren()
          Get all users and sub-organizations that are immediately contained in this organization.
 java.util.Collection getChildUsers()
          Get all users immediately contained in this organization.
 java.util.Collection getChildUsersSortOnEmailAddress(int pStartIndex, int pEndIndex, int pSortOrder)
          Get all users immediately contained in this organization, sorted on the emailAddress of the user, with index control of the result set returned as a collection.
 java.util.Collection getChildUsersSortOnFirstName(int pStartIndex, int pEndIndex, int pSortOrder)
          Get all users immediately contained in this organization, sorted on the firstName of the user, with index control of the result set returned as a collection.
 java.util.Collection getChildUsersSortOnLastName(int pStartIndex, int pEndIndex, int pSortOrder)
          Get all users immediately contained in this organization, sorted on the lastName of the user, with index control of the result set returned as a collection.
 java.util.Collection getChildUsersSortOnLogin(int pStartIndex, int pEndIndex, int pSortOrder)
          Get all users immediately contained in this organization, sorted on the login of the user, with index control of the result set returned as a collection.
 boolean hasChild(OrganizationalEntity pChild)
          Determine whether an organization has some entity as an immediate child.
 boolean removeChild(OrganizationalEntity pChild)
          Remove an organizational entity from this organization as a child.
 
Methods inherited from interface atg.userdirectory.OrganizationalEntity
assignRole, getAncestorOrganizations, getAssignedRoles, getParentOrganization, hasAssignedRole, removeRole
 
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

getChildren

java.util.Collection getChildren()
Get all users and sub-organizations that are immediately contained in this organization.

Returns:
a collection of the organization's child OrganizationalEntities or null if pOrganization is not valid

getChildOrganizations

java.util.Collection getChildOrganizations()
Get all sub-organizations that are immediately contained in this organization.

Returns:
a collection of Organizations representing the organization's child sub-organizations, or null if pOrganization is not valid

getChildOrganizationsSortOnName

java.util.Collection getChildOrganizationsSortOnName(int pStartIndex,
                                                     int pEndIndex,
                                                     int pSortOrder)
Get all sub-organizations immediately contained in this organization, sorted on the name of the organization, with index control of the result set returned as a 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, or null if the principal is not valid.

getChildUsers

java.util.Collection getChildUsers()
Get all users immediately contained in this organization.

Returns:
a collection of Users representing the organization's child users, or null if pOrganization is not valid

getChildUsersSortOnLogin

java.util.Collection getChildUsersSortOnLogin(int pStartIndex,
                                              int pEndIndex,
                                              int pSortOrder)
Get all users immediately contained in this organization, sorted on the login of the user, with index control of the result set returned as a 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, or null if the principal is not valid.

getChildUsersSortOnFirstName

java.util.Collection getChildUsersSortOnFirstName(int pStartIndex,
                                                  int pEndIndex,
                                                  int pSortOrder)
Get all users immediately contained in this organization, sorted on the firstName of the user, with index control of the result set returned as a 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, or null if the principal is not valid.

getChildUsersSortOnLastName

java.util.Collection getChildUsersSortOnLastName(int pStartIndex,
                                                 int pEndIndex,
                                                 int pSortOrder)
Get all users immediately contained in this organization, sorted on the lastName of the user, with index control of the result set returned as a 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, or null if the principal is not valid.

getChildUsersSortOnEmailAddress

java.util.Collection getChildUsersSortOnEmailAddress(int pStartIndex,
                                                     int pEndIndex,
                                                     int pSortOrder)
Get all users immediately contained in this organization, sorted on the emailAddress of the user, with index control of the result set returned as a 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, or null if the principal is not valid.

hasChild

boolean hasChild(OrganizationalEntity pChild)
Determine whether an organization has some entity as an immediate child.

Parameters:
pChild - a principal representing a potential child of that organization
Returns:
true if the child belongs directly to the organization

addChild

boolean addChild(OrganizationalEntity pChild)
                 throws DirectoryModificationException
Add an organizational entity as a child of this organization.

Parameters:
pChild - a principal representing a user or sub-organization to be added to the parent organization
Returns:
true if the operation succeeds; false if the child already belongs to the organization.
Throws:
DirectoryModificationException - occurs if the operation fails unexpectedly; a nested exception provides details.

removeChild

boolean removeChild(OrganizationalEntity pChild)
                    throws DirectoryModificationException
Remove an organizational entity from this organization as a child. This does not actually remove the entity from the directory; it merely disconnects the entity from its parent organization.

Parameters:
pChild - a principal representing a user or sub-organization to be removed from the parent organization
Returns:
true if the operation succeeds; false if the child did not belong to the organization.
Throws:
DirectoryModificationException - occurs if the operation fails unexpectedly; a nested exception provides details.