Interface UserManagementHelper
-
- All Known Implementing Classes:
DefaultUserManagementHelper
,LdapUserManagementHelper
@Deprecated public interface UserManagementHelper
Deprecated.Please use confluence-test-utils module instead. SeeUserManager
alternativeAbstracts 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 void
activateUser(String username)
Deprecated.void
addGroupToGroup(Group childGroup, Group parentGroup)
Deprecated.Add childGroup to parentGroup.void
addUserToGroup(User user, Group group)
Deprecated.void
addUserToGroup(String userName, String groupName)
Deprecated.void
changePassword(String username, String newPassword)
Deprecated.Change a user's password.void
createGroup(Group group)
Deprecated.void
createGroup(String groupName)
Deprecated.List<User>
createMultipleUsers(int numUsers)
Deprecated.Helper to create multiple users (callscreateUser(com.atlassian.confluence.it.User)
)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).void
deactivateUser(String username)
Deprecated.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.void
fixUser(User user)
Deprecated.Ensure that the user's details in the system match those inuser
.Set<String>
getUserGroups(User user)
Deprecated.boolean
isExternal()
Deprecated.Return false if this helper modifies Users, Groups and Group Memberships via RPC (Confluence-managed directories).void
removeFromDefaultLicenseGroup(User user)
Deprecated.Remove user from the group that has licensed accessvoid
removeGroup(String groupName)
Deprecated.void
removeGroupUncleanly(Group group)
Deprecated.Removes a group but do not remove their dependent permissions.void
removeMultipleUsers(List<User> users)
Deprecated.Removes the list of users (callsremoveUser(User)
)void
removeUser(User user)
Deprecated.void
removeUser(String username)
Deprecated.void
removeUserFromGroup(User user, Group group)
Deprecated.void
removeUserUncleanly(User user)
Deprecated.Removes a user but do not remove their dependent permissions or pages.void
removeUserUncleanly(String username)
Deprecated.Removes a user with the given username but do not remove their dependent permissions or pages.void
renameUser(String oldUsername, String newUsername)
Deprecated.void
resetData(Set<User> usersToKeep, Set<Group> groupsToKeep, Map<Group,HashSet<User>> userGroupMembershipsToKeep)
Deprecated.Return the User/Group/Membership data to a clean state.void
setAutoSync(boolean autoSync)
Deprecated.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.void
synchronise()
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
-
-