| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.userdirectory.UserDirectoryTools
public class UserDirectoryTools
A set of useful methods that act upon a set user directory instance. These methods perform userdirectory operations based on primary keys of objects rather than the objects themselves, which saves the user a few extra steps, as well as error handling.
| Field Summary | |
|---|---|
static java.lang.String | 
CLASS_VERSION
Class version string  | 
| Fields inherited from class atg.nucleus.GenericService | 
|---|
SERVICE_INFO_KEY | 
| Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging | 
|---|
DEFAULT_LOG_TRACE_STATUS | 
| Fields inherited from interface atg.nucleus.logging.ApplicationLogging | 
|---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS | 
| Constructor Summary | |
|---|---|
UserDirectoryTools()
 | 
|
| Method Summary | |
|---|---|
 boolean | 
addUserToOrganization(java.lang.Object pUserId,
                      java.lang.Object pOrganizationId)
This method adds a user specified by a given user id to an organization specified by a given organization id  | 
 boolean | 
assignRolesToUser(java.util.Collection pRoleIds,
                  java.lang.Object pUserId)
This method looks for a collection of roles using the passed in pRoleIds parameter and assigns them to the user
 associated with the pUserId
 | 
 boolean | 
assignRolesToUser(java.lang.Object[] pRoleIds,
                  java.lang.Object pUserId)
This method looks for an array of roles using the passed in pRoleIds parameter and assigns them to the user
 associated with the pUserId
 | 
 void | 
doStartService()
This method ensures that the userDirectory property
 is set before any method calls are made | 
 java.util.Collection | 
getAllRolesForUser(java.lang.Object pUserId)
Given a UserId, this method returns a collection containing all assigned roles, relative roles, and roles inherited from ancestor organizations.  | 
 UserDirectory | 
getUserDirectory()
Gets the userDirectory property  | 
 boolean | 
removeAllRolesFromUser(java.lang.Object pUserId)
This method removes all assigned roles from a user specified by a given user id.  | 
 boolean | 
removeRolesFromUser(java.util.Collection pRoleIds,
                    java.lang.Object pUserId)
This method removes roles associated with the given role ids from a user specified by a given user id.  | 
 boolean | 
removeRolesFromUser(java.lang.Object[] pRoleIds,
                    java.lang.Object pUserId)
This method removes roles associated with the given role ids from a user specified by a given user id.  | 
 boolean | 
removeUserFromOrganization(java.lang.Object pUserId,
                           java.lang.Object pOrganizationId)
This method removes a user specified by a given user id from an organization specified by a given organization id  | 
 boolean | 
removeUserFromParentOrganization(java.lang.Object pUserId)
This method removes a user from its associated parent organization  | 
 void | 
setUserDirectory(UserDirectory pUserDirectory)
Sets the userDirectory property  | 
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl | 
|---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static java.lang.String CLASS_VERSION
| Constructor Detail | 
|---|
public UserDirectoryTools()
| Method Detail | 
|---|
public void setUserDirectory(UserDirectory pUserDirectory)
pUserDirectory - the user directory used to perform
 operationspublic UserDirectory getUserDirectory()
public boolean assignRolesToUser(java.lang.Object[] pRoleIds,
                                 java.lang.Object pUserId)
pRoleIds parameter and assigns them to the user
 associated with the pUserId
pRoleIds - the primary keys of the roles that will be
 assigned to the userpUserId - the primary key of the user that will have roles
 assigned to it
public java.util.Collection getAllRolesForUser(java.lang.Object pUserId)
pUserId - the primary key of the user for which to get roles.
public boolean assignRolesToUser(java.util.Collection pRoleIds,
                                 java.lang.Object pUserId)
pRoleIds parameter and assigns them to the user
 associated with the pUserId
pRoleIds - the primary keys of the roles that will be
 assigned to the userpUserId - the primary key of the user that will have roles
 assigned to it
public boolean addUserToOrganization(java.lang.Object pUserId,
                                     java.lang.Object pOrganizationId)
pOrganizationId - the primary key of the organization to
 which the user is to be addedpUserId - the primary key of the user to add to the
 organization
public boolean removeRolesFromUser(java.lang.Object[] pRoleIds,
                                   java.lang.Object pUserId)
pRoleIds - the primary keys of the roles that are to be
 removed from the userpUserId - the primary key of the user
public boolean removeRolesFromUser(java.util.Collection pRoleIds,
                                   java.lang.Object pUserId)
pRoleIds - the primary keys of the roles that are to be
 removed from the userpUserId - the primary key of the user
public boolean removeUserFromOrganization(java.lang.Object pUserId,
                                          java.lang.Object pOrganizationId)
pUserId - the primary key of the user to removepOrganizationId - the primary key of the organization
 the user is to be removed from
public boolean removeUserFromParentOrganization(java.lang.Object pUserId)
pUserId - the id of the user who will be removed from
 its current parent organization
public boolean removeAllRolesFromUser(java.lang.Object pUserId)
pUserId - the primary key of the user whose roles will be
 removed
public void doStartService()
                    throws ServiceException
userDirectory property
 is set before any method calls are made
doStartService in class GenericServiceServiceException - if the userDirectory property
 is not set
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||