|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.it.usermanagement.LdapUserManagementHelper
public final class LdapUserManagementHelper
Implementation of UserManagementHelper
that talks directly to the configured LDAP server.
The underlying LDAP operations are handled by LdapServer
.
Constructor Summary | |
---|---|
LdapUserManagementHelper(ConfluenceRpc rpc)
Creates an instance which delegates to LdapServer . |
|
LdapUserManagementHelper(ConfluenceRpc rpc,
org.springframework.ldap.core.LdapTemplate ldapTemplate,
Set<User> initialUsers,
Set<Group> initialGroups)
Creates an instance which delegates to LdapServer using the LDAP connections
provided by the ldapTemplate . |
Method Summary | |
---|---|
void |
addGroupToGroup(Group childGroup,
Group parentGroup)
Add childGroup to parentGroup. |
void |
addUserToGroup(String userName,
String groupName)
|
void |
addUserToGroup(User user,
Group group)
|
void |
changePassword(String username,
String newPassword)
Change a user's password. |
void |
createGroup(Group group)
|
void |
createGroup(String groupName)
|
void |
createUser(User user)
Creates the user, adds it to the default confluence-users group, and ensures the user profile is created (to work around CONF-6404). |
void |
fixUser(User user)
Ensure that the user's details in the system match those in user . |
boolean |
groupExists(String groupName)
|
void |
removeExternalUsersAndGroups()
Clean up any users and groups created by this user management helper or otherwise. |
void |
removeGroup(Group group)
|
void |
removeGroup(String groupName)
|
void |
removeUser(String username)
|
void |
removeUser(User user)
|
void |
removeUserFromGroup(String userName,
String groupName)
|
void |
removeUserFromGroup(User user,
Group group)
|
void |
removeUserUncleanly(String username)
Removes a user with the given username but do not remove their dependent permissions or pages. |
void |
setAutoSync(boolean autoSync)
|
void |
synchronise()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LdapUserManagementHelper(ConfluenceRpc rpc)
LdapServer
.
rpc
- The rpc helperpublic LdapUserManagementHelper(ConfluenceRpc rpc, org.springframework.ldap.core.LdapTemplate ldapTemplate, Set<User> initialUsers, Set<Group> initialGroups)
LdapServer
using the LDAP connections
provided by the ldapTemplate
.
rpc
- Confluence RPC interfaceldapTemplate
- used to connect to the LDAP serverinitialUsers
- the users which already exist in the LDAP serverinitialGroups
- the groups which already exist in the LDAP serverMethod Detail |
---|
public void synchronise()
public void addUserToGroup(String userName, String groupName)
addUserToGroup
in interface UserManagementHelper
public void addUserToGroup(User user, Group group)
addUserToGroup
in interface UserManagementHelper
public void addGroupToGroup(Group childGroup, Group parentGroup)
UserManagementHelper
addGroupToGroup
in interface UserManagementHelper
public void createUser(User user)
UserManagementHelper
createUser
in interface UserManagementHelper
public void removeExternalUsersAndGroups()
UserManagementHelper
removeExternalUsersAndGroups
in interface UserManagementHelper
public void removeUser(String username)
removeUser
in interface UserManagementHelper
public void removeUser(User user)
public void createGroup(String groupName)
createGroup
in interface UserManagementHelper
public void createGroup(Group group)
public boolean groupExists(String groupName)
public void removeUserFromGroup(User user, Group group)
public void removeUserFromGroup(String userName, String groupName)
removeUserFromGroup
in interface UserManagementHelper
public void removeGroup(String groupName)
removeGroup
in interface UserManagementHelper
public void removeGroup(Group group)
public void removeUserUncleanly(String username)
UserManagementHelper
removeUserUncleanly
in interface UserManagementHelper
username
- the username of the user to removepublic void fixUser(User user)
UserManagementHelper
user
. That is,
it finds the user in the system by its username, and sets the full name and email address.
fixUser
in interface UserManagementHelper
user
- a user to set the details ofpublic void changePassword(String username, String newPassword)
UserManagementHelper
changePassword
in interface UserManagementHelper
username
- Username of the user whose password to changenewPassword
- Passwordpublic void setAutoSync(boolean autoSync)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |