public class DirectoryTools extends Object implements IDirConstants
Modifier and Type | Field and Description |
---|---|
protected static String |
EDIT_GROUP_PAGE |
protected static String |
EDIT_GROUP_PAGE_PORTLET |
protected static String |
EDIT_ROLE_PAGE |
protected static String |
EDIT_ROLE_PAGE_PORTLET |
protected static String |
EDIT_USER_PAGE |
protected static String |
EDIT_USER_PAGE_PORTLET |
protected static String |
FABRIC_EDIT_GROUP_PAGE |
protected static String |
FABRIC_EDIT_GROUP_PAGE_PORTLET |
protected static String |
FABRIC_EDIT_ROLE_PAGE |
protected static String |
FABRIC_EDIT_ROLE_PAGE_PORTLET |
protected static String |
FABRIC_EDIT_USER_PAGE |
protected static String |
FABRIC_EDIT_USER_PAGE_PORTLET |
protected static Map<String,Integer> |
s_typeMap |
protected static String |
UUID_CONFIG |
static Boolean |
UUIDUserResolution |
ADMIN_ROLE_ALIAS, ADMIN_USER_ALIAS, ATTR_DISABLED, ATTR_DN, ATTR_EMAIL, ATTR_NAME, ATTR_PASSWORD, CATEGORY_DIRECTORY, CHANGE_PASS, CHANGE_PASS_SUCCESS_ATTR, CONFIRM_PASSWORD_PARAM, DELETED_THINGS_USER, DIR_SVC_CONTAINER, DIR_SVC_TYPE_CONTAINER, DIRECTORY_ROOT, DISPLAY_URI_SEGMENT, DOMAIN_PREFIX_SEPARATOR, EVERYONE_GROUP_ALIAS, FIRST_NAME, FULL_NAME, GROUP_DN_SEGMENT, GROUP_NAME, GUEST_USER_ALIAS, IS_SYSADMIN_ATTR, LAST_NAME, NEW_PASSWORD_PARAM, PAP_GROUP_TYPE_CONTAINER, PAP_PORTAL_ATTRIBUTES, PAP_ROLE_TYPE_CONTAINER, PAP_USER_TYPE_CONTAINER, PROPERTY_PASSWORDVALIDUNTIL, ROLE_CURRENT_ROLES, ROLE_DN_PREFIX, ROLE_DN_SEGMENT, ROLE_PROVIDER_CONTAINER, ROLE_RELATION, ROLE_STORAGE_CONTAINER, SECURITY_SVC_CONTAINER, SKIP_CHECK_AUTH_ATTR, SYSADMIN, SYSTEM_DIRECTORY_SERVICE_ALIAS, TOTP_ADMIN_ALIAS, TOTP_AUTH, TOTP_CATEGORY, TOTP_CREDENTIALS, TOTP_PREFIX, TOTP_SERVICE_TOKEN, TOTP_TOKEN_NAME, TYPE_GROUP, TYPE_NAME_DIRECTORY_ROOT, TYPE_NAME_GROUP, TYPE_NAME_PRINCIPAL, TYPE_NAME_ROLE, TYPE_NAME_SERVICE, TYPE_NAME_USER, TYPE_ROLE, TYPE_USER, USER_DN_SEGMENT, USER_UUID
Constructor and Description |
---|
DirectoryTools() |
Modifier and Type | Method and Description |
---|---|
static IURI |
constructDirectoryURI(IThingID dirServiceID,
IThingID objectID,
int type)
Constructs directory URI in the form of: /directory/
|
static IURI |
constructDirectoryURI(IThingID dirServiceID,
String dn,
int type) |
static IDirService |
getDirectoryService(IURI principalURI) |
static IDirSystemBizPolicy |
getDirSystemBizPolicy() |
static String |
getDisplayName(IURI principalURI) |
static String |
getDisplayURI(IURI directoryURI,
int type) |
static String |
getDN(IURI directoryURI)
Retrieve the DN from a directory URI
|
static List<String> |
getEmptyUUIDUsers() |
static String |
getEscapedRDN(String rdn)
Returns the RDN after escaping the characters requiring escaping.
|
static IMechanicsManager |
getMechanicsManager() |
static IURI |
getPrincipalDirectoryURI(IURI principalURI) |
static String |
getRDN(String dn)
Retrieves the most significant attribute set in the DN.
|
static int |
getType(IURI principalURI) |
static int |
getTypeID(String type)
Examines the given type and returns the corresponding type ID
|
static String |
getUID(String dn)
Returns value of the most significant attribute in the DN.
|
static String |
getUserDNFromUserUUID(String uuid,
IUserService us) |
static Boolean |
getUUIDResolution() |
static void |
invalidateGroupRoleCache(IThingID thingID) |
static String |
normalizeDN(String dn)
Removes the spaces and captialization from an LDAP distinguished-name
|
static IThingID |
resolveUserByUUID(IInitializableUser initializableUser)
Resolve the user by UUID, If user exist update the DN and return the userThingID
|
static List<String> |
updatePrincipalUUID() |
protected static final String EDIT_USER_PAGE
protected static final String EDIT_USER_PAGE_PORTLET
protected static final String EDIT_GROUP_PAGE
protected static final String EDIT_GROUP_PAGE_PORTLET
protected static final String EDIT_ROLE_PAGE
protected static final String EDIT_ROLE_PAGE_PORTLET
protected static final String FABRIC_EDIT_USER_PAGE
protected static final String FABRIC_EDIT_USER_PAGE_PORTLET
protected static final String FABRIC_EDIT_GROUP_PAGE
protected static final String FABRIC_EDIT_GROUP_PAGE_PORTLET
protected static final String FABRIC_EDIT_ROLE_PAGE
protected static final String FABRIC_EDIT_ROLE_PAGE_PORTLET
protected static final String UUID_CONFIG
public static final Boolean UUIDUserResolution
public static String getRDN(String dn)
uid=Administrator,ou=People,o=datachannel.com --> uid=Administrator cn=Guests,ou=People,o=datachannel.com --> cn=Guests
public static String getEscapedRDN(String rdn)
rdn
- public static String getUID(String dn)
dn
- public static int getType(IURI principalURI)
public static int getTypeID(String type)
public static String getDN(IURI directoryURI) throws PortalException
directoryURI
- the uri to the directory resourcePortalException
public static IURI constructDirectoryURI(IThingID dirServiceID, IThingID objectID, int type) throws PortalException
dirServiceID
- objectID
- type
- PortalException
public static IURI constructDirectoryURI(IThingID dirServiceID, String dn, int type) throws PortalException
PortalException
public static String normalizeDN(String dn) throws PortalException
dn
- PortalException
public static IDirSystemBizPolicy getDirSystemBizPolicy() throws PortalException
PortalException
public static IMechanicsManager getMechanicsManager()
public static String getDisplayName(IURI principalURI) throws PortalException
PortalException
public static IURI getPrincipalDirectoryURI(IURI principalURI) throws PortalException
PortalException
public static String getUserDNFromUserUUID(String uuid, IUserService us) throws PortalException
PortalException
public static List<String> updatePrincipalUUID() throws PortalException
PortalException
public static List<String> getEmptyUUIDUsers() throws PortalException
PortalException
public static IThingID resolveUserByUUID(IInitializableUser initializableUser) throws PortalException
initializableUser
- PortalException
public static IDirService getDirectoryService(IURI principalURI) throws PortalException
PortalException
public static void invalidateGroupRoleCache(IThingID thingID)
public static Boolean getUUIDResolution()