Interface UserManagementHelper
-
- All Known Implementing Classes:
DefaultUserManagementHelper,LdapUserManagementHelper
@Deprecated public interface UserManagementHelper
Deprecated.Please use confluence-test-utils module instead. SeeUserManageralternativeAbstracts the process of creating/removing/updating users and groups so that we can use external user management in test cases.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidactivateUser(String username)Deprecated.voidaddGroupToGroup(Group childGroup, Group parentGroup)Deprecated.Add childGroup to parentGroup.voidaddUserToGroup(User user, Group group)Deprecated.voidaddUserToGroup(String userName, String groupName)Deprecated.voidchangePassword(String username, String newPassword)Deprecated.Change a user's password.voidcreateGroup(Group group)Deprecated.voidcreateGroup(String groupName)Deprecated.List<User>createMultipleUsers(int numUsers)Deprecated.Helper to create multiple users (callscreateUser(com.atlassian.confluence.it.User))UsercreateUser(User user)Deprecated.Creates the user, adds it to the default users group, and ensures the user profile is created (to work around CONF-6404).voiddeactivateUser(String username)Deprecated.voidendBatch()Deprecated.Flag that the batch transactions are complete, that a sync should be performed immediately, and that syncing should be re-enabled for future requests.voidfixUser(User user)Deprecated.Ensure that the user's details in the system match those inuser.Set<String>getUserGroups(User user)Deprecated.booleanisExternal()Deprecated.Return false if this helper modifies Users, Groups and Group Memberships via RPC (Confluence-managed directories).voidremoveFromDefaultLicenseGroup(User user)Deprecated.Remove user from the group that has licensed accessvoidremoveGroup(String groupName)Deprecated.voidremoveGroupUncleanly(Group group)Deprecated.Removes a group but do not remove their dependent permissions.voidremoveMultipleUsers(List<User> users)Deprecated.Removes the list of users (callsremoveUser(User))voidremoveUser(User user)Deprecated.voidremoveUser(String username)Deprecated.voidremoveUserFromGroup(User user, Group group)Deprecated.voidremoveUserUncleanly(User user)Deprecated.Removes a user but do not remove their dependent permissions or pages.voidremoveUserUncleanly(String username)Deprecated.Removes a user with the given username but do not remove their dependent permissions or pages.voidrenameUser(String oldUsername, String newUsername)Deprecated.voidresetData(Set<User> usersToKeep, Set<Group> groupsToKeep, Map<Group,HashSet<User>> userGroupMembershipsToKeep)Deprecated.Return the User/Group/Membership data to a clean state.voidsetAutoSync(boolean autoSync)Deprecated.voidstartBatch()Deprecated.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.voidsynchronise()Deprecated.Force a synchronisation with an external user directory.
-
-
-
Method Detail
-
createUser
User createUser(User user)
Deprecated.Creates the user, adds it to the default users group, and ensures the user profile is created (to work around CONF-6404).
-
getUserGroups
Set<String> getUserGroups(User user)
Deprecated.- Parameters:
user- the user who's group membership is to be checked.- Returns:
- the set of groups the user belongs to or an empty Set if none.
-
addGroupToGroup
void addGroupToGroup(Group childGroup, Group parentGroup)
Deprecated.Add childGroup to parentGroup. Does nothing if the membership already exists.
-
removeUser
void removeUser(String username)
Deprecated.
-
removeUser
void removeUser(User user)
Deprecated.
-
createGroup
void createGroup(String groupName)
Deprecated.
-
createGroup
void createGroup(Group group)
Deprecated.
-
removeGroup
void removeGroup(String groupName)
Deprecated.
-
createMultipleUsers
List<User> createMultipleUsers(int numUsers)
Deprecated.Helper to create multiple users (callscreateUser(com.atlassian.confluence.it.User))- Parameters:
numUsers- the number of users to create- Returns:
- the list of users created
-
removeMultipleUsers
void removeMultipleUsers(List<User> users)
Deprecated.Removes the list of users (callsremoveUser(User))- Parameters:
users- the list of users to remove
-
removeUserUncleanly
void removeUserUncleanly(String username)
Deprecated.Removes a user with the given username but do not remove their dependent permissions or pages.- Parameters:
username- the username of the user to remove- Throws:
org.apache.xmlrpc.XmlRpcException- if there were problems removing the user
-
removeUserUncleanly
void removeUserUncleanly(User user)
Deprecated.Removes a user but do not remove their dependent permissions or pages.- Parameters:
user- the user to remove- Throws:
org.apache.xmlrpc.XmlRpcException- if there were problems removing the user
-
removeGroupUncleanly
void removeGroupUncleanly(Group group)
Deprecated.Removes a group but do not remove their dependent permissions.- Parameters:
group- the group to remove- Throws:
org.apache.xmlrpc.XmlRpcException- if there were problems removing the group
-
fixUser
void fixUser(User user)
Deprecated.Ensure that the user's details in the system match those inuser. That is, it finds the user in the system by its username, and sets the full name and email address.- Parameters:
user- a user to set the details of
-
changePassword
void changePassword(String username, String newPassword)
Deprecated.Change a user's password.- Parameters:
username- Username of the user whose password to changenewPassword- Password
-
setAutoSync
void setAutoSync(boolean autoSync)
Deprecated.
-
resetData
void resetData(Set<User> usersToKeep, Set<Group> groupsToKeep, Map<Group,HashSet<User>> userGroupMembershipsToKeep)
Deprecated.Return the User/Group/Membership data to a clean state.- Parameters:
usersToKeep-groupsToKeep-userGroupMembershipsToKeep-
-
isExternal
boolean isExternal()
Deprecated.Return false if this helper modifies Users, Groups and Group Memberships via RPC (Confluence-managed directories). Return true if this helper makes calls to different server, e.g. LDAP or Crowd (externally-managed directories).
-
synchronise
void synchronise()
Deprecated.Force a synchronisation with an external user directory.
-
startBatch
void startBatch()
Deprecated.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.
-
endBatch
void endBatch()
Deprecated.Flag that the batch transactions are complete, that a sync should be performed immediately, and that syncing should be re-enabled for future requests.
-
deactivateUser
void deactivateUser(String username)
Deprecated.
-
activateUser
void activateUser(String username)
Deprecated.
-
removeFromDefaultLicenseGroup
void removeFromDefaultLicenseGroup(User user)
Deprecated.Remove user from the group that has licensed access
-
-