@PublicApi
public interface UserManager
Modifier and Type | Method and Description |
---|---|
void |
activateUser(String username) |
void |
addGroupToGroup(Group childGroup,
Group parentGroup)
Add childGroup to parentGroup.
|
void |
addUserToGroup(String userName,
String groupName) |
void |
changePassword(String username,
String newPassword)
Change a user's password.
|
void |
createGroup(String groupName) |
UserWithDetails |
createUser(UserWithDetails user)
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) |
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(UserWithDetails user)
Ensure that the user's details in the system match those in
user . |
Set<String> |
getUserGroups(User user) |
boolean |
isExternal()
Return true if this helper modifies Users, Groups and Group Memberships via RPC.
|
void |
removeGroup(String groupName) |
void |
removeGroupUncleanly(String group)
Removes a group but do not remove their dependent permissions.
|
void |
removeMultipleUsers(List<String> users)
Removes the list of users (calls
removeUser(String) ) |
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 |
renameUser(String oldUsername,
String newUsername) |
void |
resetData(Set<User> usersToKeep,
Set<Group> groupsToKeep,
Map<Group,HashSet<User>> userGroupMembershipsToKeep)
Return the User/Group/Membership data to a clean state.
|
List<String> |
searchGroupNames(com.atlassian.crowd.embedded.api.SearchRestriction searchRestriction,
int startIndex,
int maxResults)
Searches for group names matching the searchRestriction criteria.
|
List<Group> |
searchGroups(com.atlassian.crowd.embedded.api.SearchRestriction searchRestriction,
int startIndex,
int maxResults)
Searches for groups matching the following criteria.
|
List<String> |
searchUserNames(com.atlassian.crowd.embedded.api.SearchRestriction searchRestriction,
int startIndex,
int maxResults)
Searches for usernames matching the searchRestriction criteria.
|
List<UserWithDetails> |
searchUsers(com.atlassian.crowd.embedded.api.SearchRestriction searchRestriction,
int startIndex,
int maxResults)
Searches for users matching the following criteria.
|
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.
|
UserWithDetails createUser(UserWithDetails user)
Set<String> getUserGroups(User user)
user
- the user who's group membership is to be checked.void addGroupToGroup(Group childGroup, Group parentGroup)
void removeUser(String username)
void createGroup(String groupName)
void removeGroup(String groupName)
void removeMultipleUsers(List<String> users)
removeUser(String)
)users
- the list of users to removevoid removeUserUncleanly(String username)
username
- the username of the user to removevoid removeGroupUncleanly(String group)
group
- the group to removevoid fixUser(UserWithDetails 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(String username, String newPassword)
username
- Username of the user whose password to changenewPassword
- Passwordvoid setAutoSync(boolean autoSync)
void resetData(Set<User> usersToKeep, Set<Group> groupsToKeep, Map<Group,HashSet<User>> userGroupMembershipsToKeep)
usersToKeep
- the set of users to keep when resettinggroupsToKeep
- the set of groups to keep when resettinguserGroupMembershipsToKeep
- the memberships to keepboolean isExternal()
void synchronise()
void startBatch()
void endBatch()
void deactivateUser(String username)
void activateUser(String username)
List<UserWithDetails> searchUsers(com.atlassian.crowd.embedded.api.SearchRestriction searchRestriction, int startIndex, int maxResults)
searchRestriction
- restriction on the searchstartIndex
- starting index of the search resultsmaxResults
- maximum number of results returned from the searchList<String> searchUserNames(com.atlassian.crowd.embedded.api.SearchRestriction searchRestriction, int startIndex, int maxResults)
searchRestriction
- restriction on the searchstartIndex
- starting index of the search resultsmaxResults
- maximum number of results returned from the searchList<Group> searchGroups(com.atlassian.crowd.embedded.api.SearchRestriction searchRestriction, int startIndex, int maxResults)
searchRestriction
- restriction on the searchstartIndex
- starting index of the search resultsmaxResults
- maximum number of results returned from the searchList<String> searchGroupNames(com.atlassian.crowd.embedded.api.SearchRestriction searchRestriction, int startIndex, int maxResults)
searchRestriction
- restriction on the searchstartIndex
- starting index of the search resultsmaxResults
- maximum number of results returned from the searchCopyright © 2003–2017 Atlassian. All rights reserved.