public class DirectCrowdUserManager extends AbstractCrowdUserManager
Modifier and Type | Field and Description |
---|---|
protected com.atlassian.crowd.service.client.CrowdClient |
crowdClient |
Constructor and Description |
---|
DirectCrowdUserManager(com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier) |
DirectCrowdUserManager(com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier,
com.atlassian.crowd.service.client.CrowdClient crowdClient) |
Modifier and Type | Method and Description |
---|---|
void |
alterPassword(com.atlassian.user.User user,
String password)
Alters the password on the Crowd security server.
|
com.atlassian.user.User |
createUser(String name)
Creates a user through the Crowd security server.
|
com.atlassian.user.User |
createUser(com.atlassian.user.User userTemplate,
com.atlassian.user.security.password.Credential credential) |
com.atlassian.user.User |
getUser(String name)
Gets a user from the Crowd security server.
|
com.atlassian.user.search.page.Pager |
getUserNames()
Gets the username for the integrated application.
|
com.atlassian.user.search.page.Pager |
getUsers()
Gets the users for the integrated application.
|
com.atlassian.user.User |
onExternalUserRename(String oldName,
String newName) |
void |
removeUser(com.atlassian.user.User user)
Removes a user from the Crowd security server.
|
com.atlassian.user.User |
renameUser(com.atlassian.user.User userToRename,
String newName) |
com.atlassian.user.User |
saveUser(com.atlassian.user.User user)
Updates the Principal.
|
getIdentifier, getRepository, isCreative, isReadOnly
public DirectCrowdUserManager(com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier, com.atlassian.crowd.service.client.CrowdClient crowdClient)
public DirectCrowdUserManager(com.atlassian.user.repository.RepositoryIdentifier repositoryIdentifier)
public void alterPassword(com.atlassian.user.User user, String password) throws com.atlassian.user.EntityException
user
- The user.password
- The new password.com.atlassian.user.EntityException
- - representing a system error.UnsupportedOperationException
- - if EntityManager.isCreative()
returns false
.public com.atlassian.user.search.page.Pager getUsers() throws com.atlassian.user.EntityException
Pager
holding all users being managed.com.atlassian.user.EntityException
public com.atlassian.user.search.page.Pager getUserNames() throws com.atlassian.user.EntityException
Pager
holding the names of all users being managed.com.atlassian.user.EntityException
public com.atlassian.user.User getUser(String name) throws com.atlassian.user.EntityException
name
- The username to lookup.null
or a User
if one could be found.com.atlassian.user.EntityException
- - representing a system error.public com.atlassian.user.User createUser(String name) throws com.atlassian.user.EntityException
name
- The username.User
object.com.atlassian.user.EntityException
- - representing a system errorUnsupportedOperationException
- - if EntityManager.isCreative()
returns false
.public com.atlassian.user.User createUser(com.atlassian.user.User userTemplate, com.atlassian.user.security.password.Credential credential) throws com.atlassian.user.EntityException, UnsupportedOperationException, IllegalArgumentException
com.atlassian.user.EntityException
UnsupportedOperationException
IllegalArgumentException
public com.atlassian.user.User renameUser(@NotNull com.atlassian.user.User userToRename, @NotNull String newName) throws com.atlassian.user.EntityException
com.atlassian.user.EntityException
public com.atlassian.user.User onExternalUserRename(@Nullable String oldName, @NotNull String newName) throws com.atlassian.user.EntityException
com.atlassian.user.EntityException
public com.atlassian.user.User saveUser(@NotNull com.atlassian.user.User user) throws com.atlassian.user.EntityException
user
- The user to update.com.atlassian.user.EntityException
- - representing a system error.UnsupportedOperationException
- - if EntityManager.isCreative()
returns false
.public void removeUser(com.atlassian.user.User user) throws com.atlassian.user.EntityException
user
- The user to remove.com.atlassian.user.EntityException
- - representing a system error.UnsupportedOperationException
- - if UserManager.isReadOnly(User)
returns true
.Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.