|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserManagementHelper
Abstracts the process of creating/removing/updating users and groups so that we can use external user management in test cases.
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 |
endBatch()
Flag that the batch transactions are complete, that a sync should be performed immediately, and that syncing should be re-enabled for future requests. |
void |
fixUser(User user)
Ensure that the user's details in the system match those in user . |
boolean |
isExternal()
Return true if this helper modifies Users, Groups and Group Memberships via RPC. |
void |
removeGroup(String groupName)
|
void |
removeGroupUncleanly(Group group)
Removes a group but do not remove their dependent permissions. |
void |
removeUser(String username)
|
void |
removeUser(User user)
|
void |
removeUserFromGroup(User userName,
Group groupName)
|
void |
removeUserUncleanly(String username)
Removes a user with the given username but do not remove their dependent permissions or pages. |
void |
removeUserUncleanly(User user)
Removes a user but do not remove their dependent permissions or pages. |
void |
resetData(Set<User> usersToKeep,
Set<Group> groupsToKeep,
Map<Group,HashSet<User>> userGroupMembershipsToKeep)
Return the User/Group/Membership data to a clean state. |
void |
setAutoSync(boolean autoSync)
|
void |
startBatch()
Flag that a number of user/group transactions are about to be performed in a block, and any syncing should pause until the batch is finished. |
void |
synchronise()
Force a synchronisation with an external user directory. |
Method Detail |
---|
void createUser(User user)
void addUserToGroup(String userName, String groupName)
void addUserToGroup(User user, Group group)
void addGroupToGroup(Group childGroup, Group parentGroup)
void removeUser(String username)
void removeUser(User user)
void createGroup(String groupName)
void createGroup(Group group)
void removeUserFromGroup(User userName, Group groupName)
void removeGroup(String groupName)
void removeUserUncleanly(String username)
username
- the username of the user to remove
org.apache.xmlrpc.XmlRpcException
- if there were problems removing the uservoid removeUserUncleanly(User user)
user
- the user to remove
org.apache.xmlrpc.XmlRpcException
- if there were problems removing the uservoid removeGroupUncleanly(Group group)
group
- the group to remove
org.apache.xmlrpc.XmlRpcException
- if there were problems removing the groupvoid fixUser(User user)
user
. That is,
it finds the user in the system by its username, and sets the full name and email address.
user
- a user to set the details ofvoid changePassword(String username, String newPassword)
username
- Username of the user whose password to changenewPassword
- Passwordvoid setAutoSync(boolean autoSync)
void resetData(Set<User> usersToKeep, Set<Group> groupsToKeep, Map<Group,HashSet<User>> userGroupMembershipsToKeep)
usersToKeep
- groupsToKeep
- userGroupMembershipsToKeep
- boolean isExternal()
void synchronise()
void startBatch()
void endBatch()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |