com.adobe.livecycle.usermanager.client
Class DirectoryManagerServiceClient

java.lang.Object
  extended by ManagerServiceClient
      extended by com.adobe.livecycle.usermanager.client.DirectoryManagerServiceClient
All Implemented Interfaces:
DirectoryManager

public class DirectoryManagerServiceClient
extends ManagerServiceClient
implements DirectoryManager

This is the client implementation of the DirectoryManager class.

See Also:
DirectoryManager

Constructor Summary
DirectoryManagerServiceClient(ServiceClientFactory serviceClientFactory)
          Directory manager service client constructor.
 
Method Summary
 void addPrincipalToLocalGroup(java.lang.String principalOid, java.lang.String localGroupOid)
          Adds a principal to an existing local group.
 java.lang.String createDirectoryPrincipal(Principal principal)
          Creates a new directory principal.
 void createDomain(Domain d)
          Creates a domain in the system.
 java.lang.String createLocalGroup(Group localGroup)
          Creates a new local group.
 java.lang.String createLocalSystemUser(User p)
          Creates a new local system user.
 java.lang.String createLocalUser(User localUser, java.lang.String password)
          Creates a new local user.
 java.lang.String createLocalUser(User localUser, java.lang.String hashedPassword, java.lang.String salt)
          Creates a new local user.
 java.util.Map createLocalUsers(java.util.Set userInfo)
          Creates a set of new local users.
 void deleteDomain(java.lang.String domainName)
          Deletes the domain and all associated principals from the system.
 void deleteLocalGroup(java.lang.String groupOid)
          Deletes the specified local group.
 void deleteLocalUser(java.lang.String userOid)
          Deletes a local user from the system.
 Domain findDomain(java.lang.String domainName)
          Retrieves the domain with the specified name.
 java.util.List findDomains()
          Enumerates all domains in the system.
 java.util.List findGroupMembers(GroupMembershipSearchFilter gsf)
          Finds user and group members contained with a group.
 java.util.List findGroups(PrincipalSearchFilter searchFilter)
          Deprecated.  
 Principal findPrincipal(java.lang.String oid)
          Retrieves a principal according to the specified identifier.
 Principal findPrincipal(java.lang.String domainName, java.lang.String canonicalName)
          Retrieves a principal according to the specified domain name and canonical name.
 java.util.Map findPrincipalReference(java.util.List principalOids)
          Retrieves principal references according to the specified identifiers.
 PrincipalReference findPrincipalReference(java.lang.String oid)
          Retrieves a principal reference according to the specified identifier.
 PrincipalReference findPrincipalReference(java.lang.String domainName, java.lang.String canonicalName)
          Retrieves a principal reference according to the specified domain name and canonical name.
 java.util.List findPrincipalReferences(PrincipalSearchFilter searchFilter)
          Finds the principals according to the specified search filter and the specified principal type.
 java.util.List findPrincipalReferences(PrincipalSearchFilter searchFilter, java.lang.String principalType)
          Deprecated.  
 java.util.Map findPrincipals(java.util.List principalOids)
          Retrieves principals according to the specified identifiers.
 java.util.List findPrincipals(PrincipalSearchFilter searchFilter)
          Finds the principals according to the specified search filter
 java.util.List findPrincipals(PrincipalSearchFilter searchFilter, java.util.List principalOids)
          Deprecated.  
 java.util.List findPrincipals(PrincipalSearchFilter searchFilter, java.lang.String principalType)
          Deprecated.  
 java.util.Map findPrincipals(java.util.Set principalReferences)
          Returns a Map with principalReference type as the key and the corresponding Principal as the value.
 java.util.Map findPrincipalsByEmailId(java.util.Set emailIds)
          Finds the principals having the specified email identifiers.
 java.util.Map findPrincipalStatus(java.util.Set principalReferences)
          Retrieves the status for the specified principals.
 java.util.List findUsers(PrincipalSearchFilter searchFilter)
          Deprecated.  
 java.util.Map getDirectorySyncStatus(java.util.Set domainNames)
          Retrieves the synchronization status for the java.util.Set of domains.
 Group getDomainAsGroup(java.lang.String domainName)
          Retrieves the associated group with the specified domain.
 void removePrincipalFromLocalGroup(java.lang.String principalOid, java.lang.String localGroupOid)
          Removes a principal from an existing local group.
 void updateDomain(Domain updatedDom)
          Updates the mutable fields in a domain.
 void updateLocalGroup(Group updatedGroup)
          Updates information in the group.
 void updateLocalUser(User updatedUser, java.lang.String password)
          Updates a local user.
 void updateLocalUser(User updatedUser, java.lang.String oldPassword, java.lang.String newPassword)
          Updates a local user.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.adobe.idp.um.api.DirectoryManager
addAllowedRefererExceptions, createAllowedURIsList, deleteAllowedRefererExceptions, deleteAllowedURIsList, getAllBusinessCalendarKeys, getAllowedRefererExceptions, getAllowedReferers, getAllowedURIsList, getBusinessCalendarKeyforUser, getDynamicGroupCriteriaAttributes, getDynamicGroupMembershipCriteria, updateAllowedRefererExceptions, updateAllowedURIsList, updateDynamicGroupMembershipCriteria
 

Constructor Detail

DirectoryManagerServiceClient

public DirectoryManagerServiceClient(ServiceClientFactory serviceClientFactory)
Directory manager service client constructor.

Parameters:
serviceClientFactory - The service client factory.
Method Detail

createDomain

public void createDomain(Domain d)
                  throws UMException
Creates a domain in the system.

Specified by:
createDomain in interface DirectoryManager
Parameters:
d - The domain to be created.
Throws:
UMException

deleteDomain

public void deleteDomain(java.lang.String domainName)
                  throws UMException
Deletes the domain and all associated principals from the system.

Specified by:
deleteDomain in interface DirectoryManager
Parameters:
domainName - The domain to be deleted.
Throws:
UMException

updateDomain

public void updateDomain(Domain updatedDom)
                  throws UMException
Updates the mutable fields in a domain. Call DirectoryManagerServiceClient.findDomains() to retrieve the Domain object to be updated.

Specified by:
updateDomain in interface DirectoryManager
Parameters:
updatedDom - The updated domain.
Throws:
UMException
See Also:
DirectoryManagerServiceClient.findDomains()

findDomain

public Domain findDomain(java.lang.String domainName)
                  throws UMException
Retrieves the domain with the specified name.

Specified by:
findDomain in interface DirectoryManager
Parameters:
domainName - The name of the domain to be found.
Returns:
The domain with the specified name.
Throws:
UMException

getDirectorySyncStatus

public java.util.Map getDirectorySyncStatus(java.util.Set domainNames)
                                     throws UMException
Retrieves the synchronization status for the java.util.Set of domains.

Specified by:
getDirectorySyncStatus in interface DirectoryManager
Parameters:
domainNames - The set of domains whose synchronization status is to be retrieved.
Returns:
A java.util.Map whose keys are the domain names and whose values are the corresponding synchronization status (DirectorySyncInfo) objects.
Throws:
UMException
See Also:
DirectorySyncInfo

getDomainAsGroup

public Group getDomainAsGroup(java.lang.String domainName)
                       throws UMException
Retrieves the associated group with the specified domain.

Specified by:
getDomainAsGroup in interface DirectoryManager
Parameters:
domainName - The domain associated with the group.
Returns:
The associated group with the domain.
Throws:
UMException

createDirectoryPrincipal

public java.lang.String createDirectoryPrincipal(Principal principal)
                                          throws UMException
Creates a new directory principal.

Specified by:
createDirectoryPrincipal in interface DirectoryManager
Parameters:
principal - The directory principal to be created in the system.
Returns:
The directory principal identifier.
Throws:
UMException

createLocalGroup

public java.lang.String createLocalGroup(Group localGroup)
                                  throws UMException
Creates a new local group.

Specified by:
createLocalGroup in interface DirectoryManager
Parameters:
localGroup - The local group to be created in the system.
Returns:
The local group identifier.
Throws:
UMException

deleteLocalGroup

public void deleteLocalGroup(java.lang.String groupOid)
                      throws UMException
Deletes the specified local group.

Specified by:
deleteLocalGroup in interface DirectoryManager
Parameters:
groupOid - The local group identifier.
Throws:
UMException

updateLocalGroup

public void updateLocalGroup(Group updatedGroup)
                      throws UMException
Updates information in the group. For example, if you would like to change the description of the group, retrieve the group via the findPrincipal() method (cast the result to a Group), and invoke the object's setDescription() method.

Specified by:
updateLocalGroup in interface DirectoryManager
Parameters:
updatedGroup - The group to be updated.
Throws:
UMException

createLocalUser

public java.lang.String createLocalUser(User localUser,
                                        java.lang.String password)
                                 throws UMException
Creates a new local user.

Specified by:
createLocalUser in interface DirectoryManager
Parameters:
localUser - The local user to be created in the system.
password - The local user's password.
Returns:
The local user identifier.
Throws:
UMException

createLocalUser

public java.lang.String createLocalUser(User localUser,
                                        java.lang.String hashedPassword,
                                        java.lang.String salt)
                                 throws UMException
Creates a new local user.

Specified by:
createLocalUser in interface DirectoryManager
Parameters:
localUser - The local user to be created in the system.
hashedPassword - The local user's hashed password.
salt - The salt used with the local user's hashed password.
Returns:
The local user identifier.
Throws:
UMException

createLocalUsers

public java.util.Map createLocalUsers(java.util.Set userInfo)
                               throws UMException
Creates a set of new local users. It creates either all or none of the specified local users.

Specified by:
createLocalUsers in interface DirectoryManager
Parameters:
userInfo - A java.util.Set containing UserInfo instances that represent each user's object and password.
Returns:
A java.util.Map whose keys are the UserInfo instances and whose values are the automatically generated corresponding local user identifiers.
Throws:
UMException

createLocalSystemUser

public java.lang.String createLocalSystemUser(User p)
                                       throws UMException
Creates a new local system user.

Specified by:
createLocalSystemUser in interface DirectoryManager
Parameters:
p - The new local system user.
Returns:
The local system user identifier.
Throws:
UMException

deleteLocalUser

public void deleteLocalUser(java.lang.String userOid)
                     throws UMException
Deletes a local user from the system.

Specified by:
deleteLocalUser in interface DirectoryManager
Parameters:
userOid - The local user's identifier.
Throws:
UMException

updateLocalUser

public void updateLocalUser(User updatedUser,
                            java.lang.String password)
                     throws UMException
Updates a local user. For example, you could use this method to change the Administrator's password.

Specified by:
updateLocalUser in interface DirectoryManager
Parameters:
updatedUser - The updated user information.
password - The user's new password. Use null if you do not want to change the password.
Throws:
UMException

addPrincipalToLocalGroup

public void addPrincipalToLocalGroup(java.lang.String principalOid,
                                     java.lang.String localGroupOid)
                              throws UMException
Adds a principal to an existing local group.

Specified by:
addPrincipalToLocalGroup in interface DirectoryManager
Parameters:
principalOid - The principal identifier.
localGroupOid - The local group identifier.
Throws:
UMException

removePrincipalFromLocalGroup

public void removePrincipalFromLocalGroup(java.lang.String principalOid,
                                          java.lang.String localGroupOid)
                                   throws UMException
Removes a principal from an existing local group.

Specified by:
removePrincipalFromLocalGroup in interface DirectoryManager
Parameters:
principalOid - The principal identifier.
localGroupOid - The local group identifier.
Throws:
UMException

findDomains

public java.util.List findDomains()
                           throws UMException
Enumerates all domains in the system.

Specified by:
findDomains in interface DirectoryManager
Returns:
A java.util.List containing all the Domain objects in the system.
Throws:
UMException

findGroups

public java.util.List findGroups(PrincipalSearchFilter searchFilter)
                          throws UMException
Deprecated. 

Finds the groups according to the specified search filter.

Specified by:
findGroups in interface DirectoryManager
Parameters:
searchFilter - The search filter specifying the groups to be returned.
Returns:
A java.util.List containing all the Group objects found according to the specified search criteria.
Throws:
UMException

findUsers

public java.util.List findUsers(PrincipalSearchFilter searchFilter)
                         throws UMException
Deprecated. 

Finds the users according to the specified search filter.

Specified by:
findUsers in interface DirectoryManager
Parameters:
searchFilter - The search filter specifying the users to be returned.
Returns:
A java.util.List containing all the User objects found according to the specified search criteria.
Throws:
UMException

findPrincipal

public Principal findPrincipal(java.lang.String oid)
                        throws UMException
Retrieves a principal according to the specified identifier.

Specified by:
findPrincipal in interface DirectoryManager
Parameters:
oid - The principal identifier.
Returns:
The principal to be retrieved.
Throws:
UMException

findPrincipalReference

public PrincipalReference findPrincipalReference(java.lang.String oid)
                                          throws UMException
Retrieves a principal reference according to the specified identifier.

Specified by:
findPrincipalReference in interface DirectoryManager
Parameters:
oid - The principal identifier.
Returns:
A reference PrincipalReference for the principal to be retrieved.
Throws:
UMException

findPrincipalReference

public java.util.Map findPrincipalReference(java.util.List principalOids)
                                     throws UMException
Retrieves principal references according to the specified identifiers.

Specified by:
findPrincipalReference in interface DirectoryManager
Parameters:
principalOids - A java.util.List containing the principal identifiers.
Returns:
A Map whose keys are the principal identifiers and whose values are references PrincipalReference for the principals.
Throws:
UMException

findPrincipal

public Principal findPrincipal(java.lang.String domainName,
                               java.lang.String canonicalName)
                        throws UMException
Retrieves a principal according to the specified domain name and canonical name.

Specified by:
findPrincipal in interface DirectoryManager
Parameters:
domainName - The domain name of the principal.
canonicalName - The canonical name of the principal.
Returns:
The principal to be retrieved.
Throws:
UMException

findPrincipalReference

public PrincipalReference findPrincipalReference(java.lang.String domainName,
                                                 java.lang.String canonicalName)
                                          throws UMException
Retrieves a principal reference according to the specified domain name and canonical name.

Specified by:
findPrincipalReference in interface DirectoryManager
Parameters:
domainName - The domain name of the principal.
canonicalName - The canonical name of the principal.
Returns:
A reference PrincipalReference for the principal to be retrieved.
Throws:
UMException

findPrincipals

public java.util.Map findPrincipals(java.util.List principalOids)
                             throws UMException
Retrieves principals according to the specified identifiers.

Specified by:
findPrincipals in interface DirectoryManager
Parameters:
principalOids - A java.util.List of principal identifiers.
Returns:
A java.util.Map whose keys are the principal identifiers and whose values are the principals.
Throws:
UMException

findGroupMembers

public java.util.List findGroupMembers(GroupMembershipSearchFilter gsf)
                                throws UMException
Description copied from interface: DirectoryManager
Finds user and group members contained with a group.

Specified by:
findGroupMembers in interface DirectoryManager
Parameters:
gsf - The group membership search filter used for the search.
Returns:
The user and group members contained with the group.
Throws:
UMException

findPrincipals

public java.util.List findPrincipals(PrincipalSearchFilter searchFilter,
                                     java.util.List principalOids)
                              throws UMException
Deprecated. 

Finds the principals according to the specified search filter. The search is limited to the principals represented by the identifiers in the java.util.List.

Specified by:
findPrincipals in interface DirectoryManager
Parameters:
searchFilter - The search filter specifying the principals to be returned.
principalOids - A java.util.List of principal identifiers used to limit the search.
Returns:
A java.util.List containing all the Principal objects found.
Throws:
UMException

findPrincipalStatus

public java.util.Map findPrincipalStatus(java.util.Set principalReferences)
                                  throws UMException
Retrieves the status for the specified principals. In each case, the status will indicate wither the principal is active, has been deleted, or does not refer to any existing principal.

Specified by:
findPrincipalStatus in interface DirectoryManager
Parameters:
principalReferences - A java.util.List of principal references PrincipalReference.
Returns:
A java.util.Map whose keys are principal references and whose values are the corresponding status in each case.
Throws:
UMException
See Also:
UMConstants

findPrincipalsByEmailId

public java.util.Map findPrincipalsByEmailId(java.util.Set emailIds)
                                      throws UMException
Finds the principals having the specified email identifiers.

Specified by:
findPrincipalsByEmailId in interface DirectoryManager
Parameters:
emailIds - A java.util.Set of email identifiers for the principals.
Returns:
A java.util.Map with key as the email identifier and value as in instance of java.util.Set containing the corresponding principals.
Throws:
UMException

findPrincipalReferences

public java.util.List findPrincipalReferences(PrincipalSearchFilter searchFilter,
                                              java.lang.String principalType)
                                       throws UMException
Deprecated. 

Finds the principals according to the specified search filter and the specified principal type.

Specified by:
findPrincipalReferences in interface DirectoryManager
Parameters:
searchFilter - The search filter specifying the principals to be returned.
principalType - The type of the principals to be retrieved.
Returns:
A java.util.List containing all references PrincipalReference for the principals found according to the specified search criteria and principal type.
Throws:
UMException

findPrincipalReferences

public java.util.List findPrincipalReferences(PrincipalSearchFilter searchFilter)
                                       throws UMException
Finds the principals according to the specified search filter and the specified principal type.

Specified by:
findPrincipalReferences in interface DirectoryManager
Parameters:
searchFilter - The search filter specifying the principals to be returned.
Returns:
A java.util.List containing all references PrincipalReference for the principals found according to the specified search criteria and principal type.
Throws:
UMException

findPrincipals

public java.util.List findPrincipals(PrincipalSearchFilter searchFilter,
                                     java.lang.String principalType)
                              throws UMException
Deprecated. 

Finds the principals according to the specified search filter and the specified principal type.

Specified by:
findPrincipals in interface DirectoryManager
Parameters:
searchFilter - The search filter specifying the principals to be returned.
principalType - The type of the principals to be retrieved.
Returns:
A java.util.List containing all the Principal objects found according to the specified search criteria and principal type.
Throws:
UMException

findPrincipals

public java.util.List findPrincipals(PrincipalSearchFilter searchFilter)
                              throws UMException
Finds the principals according to the specified search filter

Specified by:
findPrincipals in interface DirectoryManager
Parameters:
searchFilter - The search filter specifying the principals to be returned.
Returns:
A java.util.List containing all the Principal objects found according to the specified search criteria and principal type.
Throws:
UMException

findPrincipals

public java.util.Map findPrincipals(java.util.Set principalReferences)
                             throws UMException
Returns a Map with principalReference type as the key and the corresponding Principal as the value.

Specified by:
findPrincipals in interface DirectoryManager
Parameters:
principalReferences - : A set sonatinUse this to specify what should be returned
Returns:
Throws:
UMException

updateLocalUser

public void updateLocalUser(User updatedUser,
                            java.lang.String oldPassword,
                            java.lang.String newPassword)
                     throws UMException
Updates a local user. For example, you could use this method to change the Administrator's password.

Specified by:
updateLocalUser in interface DirectoryManager
Parameters:
updatedUser - The updated user information.
oldPassword - The user's old password.
newPassword - The user's new password. Use null if you do not want to change the password.
Throws:
UMException


[an error occurred while processing this directive] [an error occurred while processing this directive]