com.adobe.livecycle.rca.common.utils
Class UMUtils

java.lang.Object
  extended by com.adobe.livecycle.rca.common.utils.UMUtils

public class UMUtils
extends Object

utility wrapper over user manager apis


Field Summary
static String[] allUMPermissions
          Permissions required for creating and managing users.
 
Constructor Summary
UMUtils()
           
 
Method Summary
static Group getGroup(DirectoryManagerServiceClient directoryManagerService, String domainName, String groupName)
           
static List getGroupMembers(DirectoryManagerServiceClient directoryManagerService, String domainName, String groupName)
           
static Principal getPrincipalFromDomainAndCanNm(String domain, String canonicalName)
          Gets active principal identified by domain and canonical name
static Principal getPrincipalFromOid(String oid)
          Get Principal given the user's OID
static String getPrincipalName(String oid)
          Returns common name of the principal given the user's OID
static User getUser(DirectoryManagerServiceClient directoryManagerService, String domainName, String userId)
           
static User getUserFromDomainAndCanNm(String domain, String canonicalName)
          Finds a user given domain and canonical Name.
static User getUserFromOid(String oid)
          Get User given the user's OID
static boolean hasInviteUserPermission(com.adobe.idp.dsc.clientsdk.ServiceClientFactory scf, String principalOid)
          To check if the user has invite user permissions or not.
static boolean isAdministrator(com.adobe.idp.dsc.clientsdk.ServiceClientFactory scf, String principalOid)
          Deprecated. 
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allUMPermissions

public static final String[] allUMPermissions
Permissions required for creating and managing users.

Constructor Detail

UMUtils

public UMUtils()
Method Detail

isAdministrator

@Deprecated
public static boolean isAdministrator(com.adobe.idp.dsc.clientsdk.ServiceClientFactory scf,
                                                 String principalOid)
                               throws UMException
Deprecated. 

Throws:
UMException

hasInviteUserPermission

public static boolean hasInviteUserPermission(com.adobe.idp.dsc.clientsdk.ServiceClientFactory scf,
                                              String principalOid)
                                       throws UMException
To check if the user has invite user permissions or not. Required permissions are defined in allUMPermissions

Parameters:
scf - service client factory
principalOid - UM OID for the user
Returns:
true if the user all the required permissions, else return false.
Throws:
UMException - if there is any exception while testing for permissions

getPrincipalFromDomainAndCanNm

public static Principal getPrincipalFromDomainAndCanNm(String domain,
                                                       String canonicalName)
                                                throws UserNotFoundException
Gets active principal identified by domain and canonical name

Parameters:
domain -
canonicalName -
Returns:
Throws:
UserNotFoundException

getPrincipalFromOid

public static Principal getPrincipalFromOid(String oid)
                                     throws UserNotFoundException
Get Principal given the user's OID

Parameters:
oid - User's OID
Returns:
Principal
Throws:
UserNotFoundException - if there is no user with given OID

getUserFromDomainAndCanNm

public static User getUserFromDomainAndCanNm(String domain,
                                             String canonicalName)
                                      throws UserNotFoundException
Finds a user given domain and canonical Name.

Parameters:
domain - doamin name of the user
canonicalName - canonical name of the user
Returns:
User
Throws:
UserNotFoundException - if there is no user for given domain and canonical name

getUserFromOid

public static User getUserFromOid(String oid)
                           throws UserNotFoundException
Get User given the user's OID

Parameters:
oid - User's OID
Returns:
User
Throws:
UserNotFoundException - if there is no user with given OID

getPrincipalName

public static String getPrincipalName(String oid)
                               throws UserNotFoundException
Returns common name of the principal given the user's OID

Parameters:
oid - user's OID
Returns:
common name of the principal
Throws:
UserNotFoundException - if there is no user with given OID

getGroup

public static Group getGroup(DirectoryManagerServiceClient directoryManagerService,
                             String domainName,
                             String groupName)
                      throws UMException
Throws:
UMException

getUser

public static User getUser(DirectoryManagerServiceClient directoryManagerService,
                           String domainName,
                           String userId)
                    throws UMException
Throws:
UMException

getGroupMembers

public static List getGroupMembers(DirectoryManagerServiceClient directoryManagerService,
                                   String domainName,
                                   String groupName)
                            throws UMException
Throws:
UMException


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