Class DirectoryTools
java.lang.Object
com.webmethods.portal.service.dir.DirectoryTools
- All Implemented Interfaces:
IDirConstants
Static helper functions
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
static final Boolean
Fields inherited from interface com.webmethods.portal.service.dir.IDirConstants
ADMIN_ROLE_ALIAS, ADMIN_USER_ALIAS, ADMINISTRATOR, 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
static String
getDisplayName
(IURI principalURI) static String
getDisplayURI
(IURI directoryURI, int type) static String
Retrieve the DN from a directory URIstatic String
getEscapedRDN
(String rdn) Returns the RDN after escaping the characters requiring escaping.static IMechanicsManager
static IURI
getPrincipalDirectoryURI
(IURI principalURI) static String
Retrieves the most significant attribute set in the DN.static int
static int
Examines the given type and returns the corresponding type IDstatic String
Returns value of the most significant attribute in the DN.static Boolean
static void
invalidateGroupRoleCache
(IThingID thingID) static String
normalizeDN
(String dn) Removes the spaces and captialization from an LDAP distinguished-namestatic IThingID
resolveUserByUUID
(IInitializableUser initializableUser) Resolve the user by UUID, If user exist update the DN and return the userThingID
-
Field Details
-
EDIT_USER_PAGE
- See Also:
-
EDIT_USER_PAGE_PORTLET
- See Also:
-
EDIT_GROUP_PAGE
- See Also:
-
EDIT_GROUP_PAGE_PORTLET
- See Also:
-
EDIT_ROLE_PAGE
- See Also:
-
EDIT_ROLE_PAGE_PORTLET
- See Also:
-
FABRIC_EDIT_USER_PAGE
- See Also:
-
FABRIC_EDIT_USER_PAGE_PORTLET
- See Also:
-
FABRIC_EDIT_GROUP_PAGE
- See Also:
-
FABRIC_EDIT_GROUP_PAGE_PORTLET
- See Also:
-
FABRIC_EDIT_ROLE_PAGE
- See Also:
-
FABRIC_EDIT_ROLE_PAGE_PORTLET
- See Also:
-
s_typeMap
-
UUID_CONFIG
- See Also:
-
UUIDUserResolution
-
-
Constructor Details
-
DirectoryTools
public DirectoryTools()
-
-
Method Details
-
getRDN
Retrieves the most significant attribute set in the DN. For example, given the dn:
uid=Administrator,ou=People,o=datachannel.com --> uid=Administrator cn=Guests,ou=People,o=datachannel.com --> cn=Guests
-
getEscapedRDN
Returns the RDN after escaping the characters requiring escaping.- Parameters:
rdn
-- Returns:
-
getUID
Returns value of the most significant attribute in the DN. We assume that this is principal UID value. For example given dn: uid=portal admin,ou=People,o=webmethods.com. Result would be 'portal admin'- Parameters:
dn
-- Returns:
-
getType
-
getTypeID
Examines the given type and returns the corresponding type ID -
getDN
Retrieve the DN from a directory URI- Parameters:
directoryURI
- the uri to the directory resource- Returns:
- the DN from the URI, or null if no DN found
- Throws:
PortalException
-
constructDirectoryURI
public static IURI constructDirectoryURI(IThingID dirServiceID, IThingID objectID, int type) throws PortalException Constructs directory URI in the form of: /directory// / . For example: /directory/system/user/meta/default/user/0000000001 for portal admin - Parameters:
dirServiceID
-objectID
-type
-- Throws:
PortalException
-
constructDirectoryURI
public static IURI constructDirectoryURI(IThingID dirServiceID, String dn, int type) throws PortalException - Throws:
PortalException
-
getDisplayURI
-
normalizeDN
Removes the spaces and captialization from an LDAP distinguished-name- Parameters:
dn
-
-
getDirSystemBizPolicy
- Throws:
PortalException
-
getMechanicsManager
-
getDisplayName
- Throws:
PortalException
-
getPrincipalDirectoryURI
- Throws:
PortalException
-
resolveUserByUUID
public static IThingID resolveUserByUUID(IInitializableUser initializableUser) throws PortalException Resolve the user by UUID, If user exist update the DN and return the userThingID- Parameters:
initializableUser
-- Returns:
- thingId
- Throws:
PortalException
-
getDirectoryService
- Throws:
PortalException
-
invalidateGroupRoleCache
-
getUUIDResolution
-