com.atlassian.confluence.it.usermanagement
Interface UserManagementHelper

All Known Implementing Classes:
DefaultUserManagementHelper, LdapUserManagementHelper

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(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.
 void removeExternalUsersAndGroups()
          Clean up any users and groups created by this user management helper or otherwise.
 void removeGroup(String groupName)
           
 void removeGroupUncleanly(Group group)
          Removes a group but do not remove their dependent permissions.
 void removeUser(String username)
           
 void removeUserFromGroup(String userName, String 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.
 

Method Detail

createUser

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).


addUserToGroup

void addUserToGroup(String userName,
                    String groupName)

addUserToGroup

void addUserToGroup(User user,
                    Group group)

addGroupToGroup

void addGroupToGroup(Group childGroup,
                     Group parentGroup)
Add childGroup to parentGroup. Does nothing if the membership already exists.


removeExternalUsersAndGroups

void removeExternalUsersAndGroups()
Clean up any users and groups created by this user management helper or otherwise.


removeUser

void removeUser(String username)

createGroup

void createGroup(String groupName)

removeUserFromGroup

void removeUserFromGroup(String userName,
                         String groupName)

removeGroup

void removeGroup(String groupName)

removeUserUncleanly

void removeUserUncleanly(String username)
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)
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)
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)
Ensure that the user's details in the system match those in user. 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)
Change a user's password.

Parameters:
username - Username of the user whose password to change
newPassword - Password


Copyright © 2003-2011 Atlassian. All Rights Reserved.