Interface UserManagementHelper

All Known Implementing Classes:
DefaultUserManagementHelper, LdapUserManagementHelper

@Deprecated public interface UserManagementHelper
Deprecated.
Please use confluence-test-utils module instead. See UserManager alternative
Abstracts the process of creating/removing/updating users and groups so that we can use external user management in test cases.
  • Method Details

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

      void addUserToGroup(String userName, String groupName)
      Deprecated.
    • addUserToGroup

      void addUserToGroup(User user, Group group)
      Deprecated.
    • 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.
    • removeUserFromGroup

      void removeUserFromGroup(User user, Group group)
      Deprecated.
    • removeGroup

      void removeGroup(String groupName)
      Deprecated.
    • createMultipleUsers

      List<User> createMultipleUsers(int numUsers)
      Deprecated.
      Helper to create multiple users (calls createUser(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 (calls removeUser(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 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)
      Deprecated.
      Change a user's password.
      Parameters:
      username - Username of the user whose password to change
      newPassword - 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.
    • renameUser

      void renameUser(String oldUsername, String newUsername)
      Deprecated.
    • 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