Package com.atlassian.crowd.directory
Interface LDAPDirectory
- All Superinterfaces:
Attributes
,RemoteDirectory
- All Known Implementing Classes:
ApacheDS
,ApacheDS15
,AppleOpenDirectory
,FedoraDS
,GenericLDAP
,MicrosoftActiveDirectory
,NovelleDirectory
,OpenDS
,OpenLDAP
,OpenLDAPRfc2307
,Rfc2307
,RFC2307Directory
,RFC4519Directory
,SpringLDAPConnector
,SunONE
Contains methods specific to LDAP directories.
-
Method Summary
Modifier and TypeMethodDescription<T extends LDAPDirectoryEntity>
TfindEntityByDN
(CrowdLdapName dn, Class<T> entityClass) Finds a directory entity (principal, group or role) by their distinguished name.Methods inherited from interface com.atlassian.crowd.embedded.api.Attributes
getKeys, getValue, getValues, isEmpty
Methods inherited from interface com.atlassian.crowd.directory.RemoteDirectory
addGroup, addGroupToGroup, addUser, addUser, addUserToGroup, authenticate, countDirectMembersOfGroup, expireAllPasswords, findGroupByName, findGroupWithAttributesByName, findUserByExternalId, findUserByName, findUserWithAttributesByName, getAuthoritativeDirectory, getDescriptiveName, getDirectoryId, getLocallyFilteredGroupNames, getMemberships, getUserAvatarByName, isGroupDirectGroupMember, isRolesDisabled, isUserDirectGroupMember, removeGroup, removeGroupAttributes, removeGroupFromGroup, removeUser, removeUserAttributes, removeUserFromGroup, renameGroup, renameUser, searchGroupRelationships, searchGroups, searchUsers, setAttributes, setDirectoryId, storeGroupAttributes, storeUserAttributes, supportsInactiveAccounts, supportsNestedGroups, supportsPasswordExpiration, supportsSettingEncryptedCredential, testConnection, updateGroup, updateUser, updateUserCredential, updateUserFromRemoteDirectory, userAuthenticated
-
Method Details
-
findEntityByDN
<T extends LDAPDirectoryEntity> T findEntityByDN(CrowdLdapName dn, Class<T> entityClass) throws UserNotFoundException, GroupNotFoundException, OperationFailedException Finds a directory entity (principal, group or role) by their distinguished name.The object class of an entity is used to determine the entity type.
If an object represents both a group and role, then the object is mapped to a group.
- Parameters:
dn
- standardised distinguished name.entityClass
- class of the entity to find (eitherLDAPUserWithAttributes
orLDAPGroupWithAttributes
).- Returns:
- directory entity corresponding to DN.
- Throws:
UserNotFoundException
- if a user does not exist at the specified DN or the DN does not exist in the directory. This will also be thrown if the entity DOES exist but does not match the base DN or object filter for the entity type.GroupNotFoundException
- if a user does not exist at the specified DN or the DN does not exist in the directory. This will also be thrown if the entity DOES exist but does not match the base DN or object filter for the entity type.IllegalArgumentException
- if entityClass is not assignable from User or Group.OperationFailedException
- if underlying directory implementation failed to execute the operation.
-