com.atlassian.crowd.directory
Class RFC4519Directory
java.lang.Object
com.atlassian.crowd.directory.SpringLDAPConnector
com.atlassian.crowd.directory.RFC4519Directory
- All Implemented Interfaces:
- LDAPDirectory, RemoteDirectory, Attributes
- Direct Known Subclasses:
- ApacheDS, MicrosoftActiveDirectory, NovelleDirectory, OpenLDAP, SunONE
public abstract class RFC4519Directory
- extends SpringLDAPConnector
Read-write, nesting-aware implementation of RFC4519 user-group membership
interactions.
A user is a member of a group if either:
- the DN of user is present in the collection of member attribute values of the group
- the user has a memberOf attribute which contains the DN of the group (must be enabled via LDAPPropertiesMapper)
- See Also:
RFC2307GidNumberMapper,
RFC2307MemberUidMapper
| Methods inherited from class com.atlassian.crowd.directory.SpringLDAPConnector |
addDefaultSnToUserAttributes, addDefaultValueToUserAttributesForAttribute, addGroup, addUser, asLdapGroupName, asLdapName, asLdapUserName, authenticate, encodePassword, findEntityByDN, findEntityByDN, findGroupByName, findGroupByNameAndType, findGroupWithAttributesByName, findUserByName, findUserWithAttributesByName, getAttributeAsBoolean, getAttributeAsLong, getAuthoritativeDirectory, getBaseEnvironmentProperties, getContextSource, getDirectoryId, getEncoder, getGroupContextMapper, getInitialGroupMemberDN, getKeys, getLdapPropertiesMapper, getMemberships, getNewGroupAttributes, getNewGroupDirectorySpecificAttributes, getNewUserAttributes, getNewUserDirectorySpecificAttributes, getSearchDN, getStandardisedDN, getSubTreeSearchControl, getUserContextMapper, getValue, getValues, isEmpty, isRolesDisabled, pageSearchResults, postprocessGroups, removeGroup, removeGroupAttributes, removeUser, removeUserAttributes, renameGroup, renameUser, searchEntities, searchEntitiesWithRequestControls, searchGroupObjects, searchGroupObjectsOfSpecifiedGroupType, searchGroupRelationships, searchGroups, searchUserObjects, searchUsers, setAttributes, setDirectoryId, storeGroupAttributes, storeUserAttributes, supportsInactiveAccounts, supportsNestedGroups, testConnection, typedEntityNotFoundException, updateGroup, updateUser, updateUserCredential |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RFC4519Directory
public RFC4519Directory(LDAPQueryTranslater ldapQueryTranslater,
com.atlassian.event.api.EventPublisher eventPublisher,
InstanceFactory instanceFactory)
getCustomGroupAttributeMappers
protected java.util.List<AttributeMapper> getCustomGroupAttributeMappers()
- Description copied from class:
SpringLDAPConnector
- As a minimum, this SHOULD provide an attribute mapper that maps the group members attribute (if available).
- Overrides:
getCustomGroupAttributeMappers in class SpringLDAPConnector
- Returns:
- collection of custom attribute mappers (cannot be null but can be an empty list).
getMemberDnMappers
protected java.util.List<AttributeMapper> getMemberDnMappers()
getCustomUserAttributeMappers
protected java.util.List<AttributeMapper> getCustomUserAttributeMappers()
- Overrides:
getCustomUserAttributeMappers in class SpringLDAPConnector
- Returns:
- a collection of custom attribbute mappers. By default just return an empty list.
isUserDirectGroupMember
public boolean isUserDirectGroupMember(java.lang.String username,
java.lang.String groupName)
throws OperationFailedException
- Throws:
OperationFailedException
isGroupDirectGroupMember
public boolean isGroupDirectGroupMember(java.lang.String childGroup,
java.lang.String parentGroup)
throws OperationFailedException
- Throws:
OperationFailedException
addUserToGroup
public void addUserToGroup(java.lang.String username,
java.lang.String groupName)
throws GroupNotFoundException,
OperationFailedException,
UserNotFoundException
- Throws:
GroupNotFoundException
OperationFailedException
UserNotFoundException
addGroupToGroup
public void addGroupToGroup(java.lang.String childGroup,
java.lang.String parentGroup)
throws GroupNotFoundException,
InvalidMembershipException,
OperationFailedException
- Throws:
GroupNotFoundException
InvalidMembershipException
OperationFailedException
removeUserFromGroup
public void removeUserFromGroup(java.lang.String username,
java.lang.String groupName)
throws UserNotFoundException,
GroupNotFoundException,
MembershipNotFoundException,
OperationFailedException
- Throws:
UserNotFoundException
GroupNotFoundException
MembershipNotFoundException
OperationFailedException
removeGroupFromGroup
public void removeGroupFromGroup(java.lang.String childGroup,
java.lang.String parentGroup)
throws GroupNotFoundException,
MembershipNotFoundException,
InvalidMembershipException,
OperationFailedException
- Throws:
GroupNotFoundException
MembershipNotFoundException
InvalidMembershipException
OperationFailedException
searchGroupRelationshipsWithGroupTypeSpecified
protected <T> java.util.List<T> searchGroupRelationshipsWithGroupTypeSpecified(MembershipQuery<T> query)
throws OperationFailedException
- Description copied from class:
SpringLDAPConnector
- Execute the search for group relationships given that a group of type GROUP or LEGACY_ROLE has
been specified in the EntityDescriptor for the group(s).
- Specified by:
searchGroupRelationshipsWithGroupTypeSpecified in class SpringLDAPConnector
- Parameters:
query - membership query with all GroupType's not null.
- Returns:
- list of members or memberships depending on the query.
- Throws:
OperationFailedException - if the operation failed due to a communication error with the remote directory,
or if the query is invalid
Copyright © 2012 Atlassian. All Rights Reserved.