|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.directory.SpringLDAPConnector
com.atlassian.crowd.directory.RFC2307Directory
com.atlassian.crowd.directory.Rfc2307
public class Rfc2307
This class provides read-only support for the POSIX LDAP Schema (RFC2307)
| Field Summary |
|---|
| Fields inherited from class com.atlassian.crowd.directory.SpringLDAPConnector |
|---|
attributes, contextSource, contextSourceTransactionManager, DEFAULT_PAGE_SIZE, eventPublisher, ldapPropertiesMapper, ldapQueryTranslater, ldapTemplate, nameConverter, searchDN |
| Constructor Summary | |
|---|---|
Rfc2307(LDAPQueryTranslater ldapQueryTranslater,
com.atlassian.event.api.EventPublisher eventPublisher,
InstanceFactory instanceFactory,
PasswordEncoderFactory passwordEncoderFactory)
|
|
| Method Summary | |
|---|---|
Group |
addGroup(GroupTemplate group)
Adds a group to the directory store. |
void |
addGroupToGroup(java.lang.String childGroup,
java.lang.String parentGroup)
Adds a group as a member of a parent group. |
LDAPUserWithAttributes |
addUser(UserTemplate user,
PasswordCredential credential)
Adds a user to LDAP. |
void |
addUserToGroup(java.lang.String username,
java.lang.String groupName)
Adds a user as a member of a group. |
protected java.lang.String |
encodePassword(java.lang.String unencodedPassword)
Translates a clear-text password into an encrypted one, based on the directory settings. |
java.lang.String |
getDescriptiveName()
Returns a descriptive name for the type of directory. |
protected void |
getNewUserDirectorySpecificAttributes(User user,
javax.naming.directory.Attributes attributes)
Populates attributes object with directory-specific attributes. |
static java.lang.String |
getStaticDirectoryType()
|
void |
removeGroup(java.lang.String name)
Removes the group that matches the supplied name. |
void |
removeGroupFromGroup(java.lang.String childGroup,
java.lang.String parentGroup)
Removes a group as a member of a parent group. |
void |
removeUser(java.lang.String name)
Removes the user that matches the supplied name. |
void |
removeUserFromGroup(java.lang.String username,
java.lang.String groupName)
Removes a user as a member of a group. |
Group |
renameGroup(java.lang.String oldName,
java.lang.String newName)
Renames a group. |
User |
renameUser(java.lang.String oldName,
java.lang.String newName)
Renames a user. |
Group |
updateGroup(GroupTemplate group)
Updates the group. |
User |
updateUser(UserTemplate user)
Updates the user. |
| Methods inherited from class com.atlassian.crowd.directory.RFC2307Directory |
|---|
getCustomGroupAttributeMappers, getCustomUserAttributeMappers, isGroupDirectGroupMember, isUserDirectGroupMember, searchGroupRelationshipsWithGroupTypeSpecified, supportsNestedGroups |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Rfc2307(LDAPQueryTranslater ldapQueryTranslater,
com.atlassian.event.api.EventPublisher eventPublisher,
InstanceFactory instanceFactory,
PasswordEncoderFactory passwordEncoderFactory)
| Method Detail |
|---|
public static java.lang.String getStaticDirectoryType()
protected java.lang.String encodePassword(java.lang.String unencodedPassword)
encodePassword in class SpringLDAPConnectorunencodedPassword - password
protected void getNewUserDirectorySpecificAttributes(User user,
javax.naming.directory.Attributes attributes)
SpringLDAPConnector
getNewUserDirectorySpecificAttributes in class SpringLDAPConnectoruser - (potential) source of information that needs to be added.attributes - attributes to add directory-specific information to.public java.lang.String getDescriptiveName()
RemoteDirectory
public void addUserToGroup(java.lang.String username,
java.lang.String groupName)
throws UserNotFoundException,
GroupNotFoundException,
OperationFailedException
RemoteDirectorychildGroup will
appear as members of parentGroup to querying applications.
username - The user that will become a member of groupNamegroupName - The group that will gain a new member.
UserNotFoundException - If the user cannot be found.
GroupNotFoundException - If the group cannot be found.
OperationFailedException - underlying directory implementation failed to execute the operation.
public void addGroupToGroup(java.lang.String childGroup,
java.lang.String parentGroup)
throws GroupNotFoundException,
OperationFailedException
RemoteDirectory
childGroup - The group that will become a member of parentGroupparentGroup - The group that will gain a new member
GroupNotFoundException - One or both of the groups cannot be found.
OperationFailedException - underlying directory implementation failed to execute the operation.
public void removeUserFromGroup(java.lang.String username,
java.lang.String groupName)
throws UserNotFoundException,
GroupNotFoundException,
MembershipNotFoundException,
OperationFailedException
RemoteDirectory
username - The user that will be removed from parentGroupgroupName - The group that will lose the member.
UserNotFoundException - If the user cannot be found.
GroupNotFoundException - If the group cannot be found.
MembershipNotFoundException - if the user is not a direct member of the group.
OperationFailedException - underlying directory implementation failed to execute the operation.
public void removeGroupFromGroup(java.lang.String childGroup,
java.lang.String parentGroup)
throws GroupNotFoundException,
MembershipNotFoundException,
OperationFailedException
RemoteDirectory
childGroup - The group that will be removed from parentGroupparentGroup - The group that will lose the member.
GroupNotFoundException - One or both of the groups cannot be found.
MembershipNotFoundException - if the childGroup is not a direct member of the parentGroup.
OperationFailedException - underlying directory implementation failed to execute the operation.
public LDAPUserWithAttributes addUser(UserTemplate user,
PasswordCredential credential)
throws InvalidUserException,
InvalidCredentialException,
OperationFailedException
SpringLDAPConnector
addUser in interface RemoteDirectoryaddUser in class SpringLDAPConnectoruser - template of the user to add.credential - password.
InvalidUserException - if the user to create was deemed invalid by the LDAP server or already exists.
InvalidCredentialException - if the password credential was deemed invalid by the password encoder.
OperationFailedException - if we were unable to add the user to LDAP.
public Group addGroup(GroupTemplate group)
throws InvalidGroupException,
OperationFailedException
RemoteDirectorygroup to the directory store.
addGroup in interface RemoteDirectoryaddGroup in class SpringLDAPConnectorgroup - template of the group to add.
InvalidGroupException - The supplied group is invalid.
OperationFailedException - underlying directory implementation failed to execute the operation.
public Group renameGroup(java.lang.String oldName,
java.lang.String newName)
throws GroupNotFoundException,
InvalidGroupException,
OperationFailedException
RemoteDirectorygroup.
renameGroup in interface RemoteDirectoryrenameGroup in class SpringLDAPConnectoroldName - name of existing group.newName - desired name of group.
GroupNotFoundException - if the group with the existing name does not exist.
InvalidGroupException - if the new groupname is invalid or already exists in the directory.
OperationFailedException - if the underlying directory implementation failed to execute the operation.
public User renameUser(java.lang.String oldName,
java.lang.String newName)
throws UserNotFoundException,
InvalidUserException,
OperationFailedException
RemoteDirectoryuser.
renameUser in interface RemoteDirectoryrenameUser in class SpringLDAPConnectoroldName - name of existing user.newName - desired name of user.
UserNotFoundException - if the user with the existing name does not exist.
InvalidUserException - if the new username is invalid.
OperationFailedException - if the underlying directory implementation failed to execute the operation.
public Group updateGroup(GroupTemplate group)
throws GroupNotFoundException,
OperationFailedException
RemoteDirectorygroup.
updateGroup in interface RemoteDirectoryupdateGroup in class SpringLDAPConnectorgroup - The group to update.
GroupNotFoundException - the group does not exist in the directory store.
OperationFailedException - underlying directory implementation failed to execute the operation.
public User updateUser(UserTemplate user)
throws UserNotFoundException,
OperationFailedException
RemoteDirectoryuser.
updateUser in interface RemoteDirectoryupdateUser in class SpringLDAPConnectoruser - The user to update.
UserNotFoundException - the user does not exist in the directory store.
OperationFailedException - underlying directory implementation failed to execute the operation.
public void removeUser(java.lang.String name)
throws UserNotFoundException,
OperationFailedException
RemoteDirectoryuser that matches the supplied name.
removeUser in interface RemoteDirectoryremoveUser in class SpringLDAPConnectorname - The name of the user (username).
UserNotFoundException - The user does not exist.
OperationFailedException - underlying directory implementation failed to execute the operation.
public void removeGroup(java.lang.String name)
throws GroupNotFoundException,
OperationFailedException
RemoteDirectorygroup that matches the supplied name.
removeGroup in interface RemoteDirectoryremoveGroup in class SpringLDAPConnectorname - The name of the group.
GroupNotFoundException - The group does not exist.
OperationFailedException - underlying directory implementation failed to execute the operation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||