|
||||||||||
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(java.lang.String userName,
java.lang.String groupName)
|
void |
addUserToGroup(User user,
Group group)
|
void |
changePassword(java.lang.String username,
java.lang.String newPassword)
Change a user's password. |
void |
createGroup(Group group)
|
void |
createGroup(java.lang.String groupName)
|
java.util.List<User> |
createMultipleUsers(int numUsers)
Helper to create multiple users (calls createUser(com.atlassian.confluence.it.User) ) |
User |
createUser(User user)
Creates the user, adds it to the default 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 . |
java.util.Set<java.lang.String> |
getUserGroups(User user)
|
boolean |
isExternal()
Return true if this helper modifies Users, Groups and Group Memberships via RPC. |
void |
removeGroup(java.lang.String groupName)
|
void |
removeGroupUncleanly(Group group)
Removes a group but do not remove their dependent permissions. |
void |
removeMultipleUsers(java.util.List<User> users)
Removes the list of users (calls removeUser(User) ) |
void |
removeUser(java.lang.String username)
|
void |
removeUser(User user)
|
void |
removeUserFromGroup(User userName,
Group groupName)
|
void |
removeUserUncleanly(java.lang.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 |
renameUser(java.lang.String oldUsername,
java.lang.String newUsername)
|
void |
resetData(java.util.Set<User> usersToKeep,
java.util.Set<Group> groupsToKeep,
java.util.Map<Group,java.util.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 |
---|
User createUser(User user)
void addUserToGroup(java.lang.String userName, java.lang.String groupName)
void addUserToGroup(User user, Group group)
java.util.Set<java.lang.String> getUserGroups(User user)
user
- the user who's group membership is to be checked.
void addGroupToGroup(Group childGroup, Group parentGroup)
void removeUser(java.lang.String username)
void removeUser(User user)
void createGroup(java.lang.String groupName)
void createGroup(Group group)
void removeUserFromGroup(User userName, Group groupName)
void removeGroup(java.lang.String groupName)
java.util.List<User> createMultipleUsers(int numUsers)
createUser(com.atlassian.confluence.it.User)
)
numUsers
- the number of users to create
void removeMultipleUsers(java.util.List<User> users)
removeUser(User)
)
users
- the list of users to removevoid removeUserUncleanly(java.lang.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(java.lang.String username, java.lang.String newPassword)
username
- Username of the user whose password to changenewPassword
- Passwordvoid setAutoSync(boolean autoSync)
void resetData(java.util.Set<User> usersToKeep, java.util.Set<Group> groupsToKeep, java.util.Map<Group,java.util.HashSet<User>> userGroupMembershipsToKeep)
usersToKeep
- groupsToKeep
- userGroupMembershipsToKeep
- boolean isExternal()
void synchronise()
void startBatch()
void endBatch()
void renameUser(java.lang.String oldUsername, java.lang.String newUsername)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |