@PublicApi
public interface UserService
Modifier and Type | Interface and Description |
---|---|
static class |
UserService.CreateUsernameValidationResult |
static class |
UserService.CreateUserValidationResult |
static class |
UserService.DeleteUserValidationResult |
static class |
UserService.FieldName |
static class |
UserService.UpdateUserValidationResult |
Modifier and Type | Method and Description |
---|---|
com.atlassian.crowd.embedded.api.User |
createUserFromSignup(UserService.CreateUserValidationResult result)
Given a valid validation result, this will create the user using the details provided in the validation result.
|
com.atlassian.crowd.embedded.api.User |
createUserNoNotification(UserService.CreateUserValidationResult result)
Given a valid validation result, this will create the user using the details provided in the validation result.
|
com.atlassian.crowd.embedded.api.User |
createUserWithNotification(UserService.CreateUserValidationResult result)
Given a valid validation result, this will create the user using the details provided in the validation result.
|
void |
removeUser(ApplicationUser loggedInUser,
UserService.DeleteUserValidationResult result)
Given a valid validation result, this will remove the user and removes the user from all the groups.
|
void |
removeUser(com.atlassian.crowd.embedded.api.User loggedInUser,
UserService.DeleteUserValidationResult result)
Deprecated.
Use
removeUser(ApplicationUser, DeleteUserValidationResult) instead. Since v6.0. |
void |
updateUser(UserService.UpdateUserValidationResult updateUserValidationResult)
Execute the update using the validation result from
validateUpdateUser(User) . |
UserService.CreateUserValidationResult |
validateCreateUserForAdmin(com.atlassian.crowd.embedded.api.User loggedInUser,
String username,
String password,
String confirmPassword,
String email,
String fullname)
Validates creating a user for the admin section.
|
UserService.CreateUserValidationResult |
validateCreateUserForAdmin(com.atlassian.crowd.embedded.api.User loggedInUser,
String username,
String password,
String confirmPassword,
String email,
String fullname,
Long directoryId)
Validates creating a user for the admin section.
|
UserService.CreateUserValidationResult |
validateCreateUserForAdminPasswordRequired(com.atlassian.crowd.embedded.api.User loggedInUser,
String username,
String password,
String confirmPassword,
String email,
String fullname)
Validates creating a user for RPC calls.
|
UserService.CreateUserValidationResult |
validateCreateUserForSetup(com.atlassian.crowd.embedded.api.User loggedInUser,
String username,
String password,
String confirmPassword,
String email,
String fullname)
Validates creating a user during setup of JIRA.
|
UserService.CreateUserValidationResult |
validateCreateUserForSignup(com.atlassian.crowd.embedded.api.User loggedInUser,
String username,
String password,
String confirmPassword,
String email,
String fullname)
Validates creating a user during public signup.
|
UserService.CreateUserValidationResult |
validateCreateUserForSignupOrSetup(com.atlassian.crowd.embedded.api.User user,
String username,
String password,
String confirmPassword,
String email,
String fullname)
|
UserService.CreateUsernameValidationResult |
validateCreateUsername(com.atlassian.crowd.embedded.api.User loggedInUser,
String username)
Validates the username for a new user.
|
UserService.CreateUsernameValidationResult |
validateCreateUsername(com.atlassian.crowd.embedded.api.User loggedInUser,
String username,
Long directoryId)
Validates the username for a new user.
|
UserService.DeleteUserValidationResult |
validateDeleteUser(ApplicationUser loggedInUser,
ApplicationUser userForDelete)
Validates removing a user for the admin section.
|
UserService.DeleteUserValidationResult |
validateDeleteUser(ApplicationUser loggedInUser,
String username)
Validates removing a user for the admin section.
|
UserService.DeleteUserValidationResult |
validateDeleteUser(com.atlassian.crowd.embedded.api.User loggedInUser,
String username)
Deprecated.
Use
validateDeleteUser(ApplicationUser, String) or
validateDeleteUser(ApplicationUser, ApplicationUser) instead. Since v6.0. |
UserService.UpdateUserValidationResult |
validateUpdateUser(ApplicationUser user)
Validates updating a user's details.
|
UserService.UpdateUserValidationResult |
validateUpdateUser(com.atlassian.crowd.embedded.api.User user)
Deprecated.
Use
validateUpdateUser(com.atlassian.jira.user.ApplicationUser) instead. Since v6.0. |
UserService.CreateUserValidationResult validateCreateUserForSignup(com.atlassian.crowd.embedded.api.User loggedInUser, String username, String password, String confirmPassword, String email, String fullname)
loggedInUser
- The remote user trying to add a new userusername
- The username of the new user. Needs to be lowercase and unique.password
- The password for the new user.confirmPassword
- The password confirmation. Needs to match password.email
- The email for the new user. Needs to be a valid email address.fullname
- The full name for the new userUserService.CreateUserValidationResult validateCreateUserForSetup(com.atlassian.crowd.embedded.api.User loggedInUser, String username, String password, String confirmPassword, String email, String fullname)
loggedInUser
- The remote user trying to add a new userusername
- The username of the new user. Needs to be lowercase and unique.password
- The password for the new user.confirmPassword
- The password confirmation. Needs to match password.email
- The email for the new user. Needs to be a valid email address.fullname
- The full name for the new userUserService.CreateUserValidationResult validateCreateUserForSignupOrSetup(com.atlassian.crowd.embedded.api.User user, String username, String password, String confirmPassword, String email, String fullname)
validateCreateUserForSignup(com.atlassian.crowd.embedded.api.User, String, String, String, String, String)
or
validateCreateUserForSetup(com.atlassian.crowd.embedded.api.User, String, String, String, String, String)
instead. Since v5.0.user
- The remote user trying to add a new userusername
- The username of the new user. Needs to be lowercase and unique.password
- The password for the new user.confirmPassword
- The password confirmation. Needs to match password.email
- The email for the new user. Needs to be a valid email address.fullname
- The full name for the new userUserService.CreateUserValidationResult validateCreateUserForAdminPasswordRequired(com.atlassian.crowd.embedded.api.User loggedInUser, String username, String password, String confirmPassword, String email, String fullname)
loggedInUser
- The remote user trying to add a new userusername
- The username of the new user. Needs to be lowercase and unique.password
- The password for the new user.confirmPassword
- The password confirmation. Needs to match password.email
- The email for the new user. Needs to be a valid email address.fullname
- The full name for the new userUserService.CreateUserValidationResult validateCreateUserForAdmin(com.atlassian.crowd.embedded.api.User loggedInUser, String username, String password, String confirmPassword, String email, String fullname)
loggedInUser
- The remote user trying to add a new userusername
- The username of the new user. Needs to be lowercase and unique.password
- The password for the new user.confirmPassword
- The password confirmation. Needs to match password.email
- The email for the new user. Needs to be a valid email address.fullname
- The full name for the new userUserService.CreateUserValidationResult validateCreateUserForAdmin(com.atlassian.crowd.embedded.api.User loggedInUser, String username, String password, String confirmPassword, String email, String fullname, @Nullable Long directoryId)
loggedInUser
- The remote user trying to add a new userusername
- The username of the new user. Needs to be lowercase and unique.password
- The password for the new user.confirmPassword
- The password confirmation. Needs to match password.email
- The email for the new user. Needs to be a valid email address.fullname
- The full name for the new userdirectoryId
- The User DirectoryUserService.CreateUsernameValidationResult validateCreateUsername(com.atlassian.crowd.embedded.api.User loggedInUser, String username)
loggedInUser
- The remote user trying to add a new userusername
- The username of the new user. Needs to be lowercase and unique.UserService.CreateUsernameValidationResult validateCreateUsername(com.atlassian.crowd.embedded.api.User loggedInUser, String username, Long directoryId)
loggedInUser
- The remote user trying to add a new userusername
- The username of the new user. Needs to be lowercase and unique.directoryId
- The directory which the new user is intended to be created in.com.atlassian.crowd.embedded.api.User createUserFromSignup(UserService.CreateUserValidationResult result) throws PermissionException, CreateException
result
- The validation resultCreateException
- if the user could not be created, eg username already existsPermissionException
- If you cannot create users in this directory (it is read-only).com.atlassian.crowd.embedded.api.User createUserWithNotification(UserService.CreateUserValidationResult result) throws PermissionException, CreateException
result
- The validation resultCreateException
- if the user could not be created, eg username already existsPermissionException
- If you cannot create users in this directory (it is read-only).com.atlassian.crowd.embedded.api.User createUserNoNotification(UserService.CreateUserValidationResult result) throws PermissionException, CreateException
result
- The validation resultCreateException
- if the user could not be created, eg username already existsPermissionException
- If you cannot create users in this directory (it is read-only).UserService.UpdateUserValidationResult validateUpdateUser(com.atlassian.crowd.embedded.api.User user)
validateUpdateUser(com.atlassian.jira.user.ApplicationUser)
instead. Since v6.0.user
- The user details to updateUserService.UpdateUserValidationResult validateUpdateUser(ApplicationUser user)
user
- The user details to updatevoid updateUser(UserService.UpdateUserValidationResult updateUserValidationResult)
validateUpdateUser(User)
.updateUserValidationResult
- Result from the validation, which also contains all the user's details.IllegalStateException
- if the validation result contains any errors.UserService.DeleteUserValidationResult validateDeleteUser(com.atlassian.crowd.embedded.api.User loggedInUser, String username)
validateDeleteUser(ApplicationUser, String)
or
validateDeleteUser(ApplicationUser, ApplicationUser)
instead. Since v6.0.validateDeleteUser(ApplicationUser, ApplicationUser)
for restrictions.loggedInUser
- The remote user trying to remove a userusername
- The username of the user to remove. Needs to be validUserService.DeleteUserValidationResult validateDeleteUser(ApplicationUser loggedInUser, String username)
validateDeleteUser(ApplicationUser, ApplicationUser)
for restrictions.loggedInUser
- The remote user trying to remove a userusername
- The username of the user to remove. Needs to be validUserService.DeleteUserValidationResult validateDeleteUser(ApplicationUser loggedInUser, ApplicationUser userForDelete)
PreDeleteUserErrors
rejects the requestloggedInUser
- The remote user trying to remove a useruserForDelete
- The user to remove. Needs to be validvoid removeUser(com.atlassian.crowd.embedded.api.User loggedInUser, UserService.DeleteUserValidationResult result)
removeUser(ApplicationUser, DeleteUserValidationResult)
instead. Since v6.0.loggedInUser
- the user performing operationresult
- The validation resultvoid removeUser(ApplicationUser loggedInUser, UserService.DeleteUserValidationResult result)
loggedInUser
- the user performing operationresult
- The validation resultCopyright © 2002-2015 Atlassian. All Rights Reserved.