|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicApi public interface UserService
UserService provides User manipulation methods exposed for remote API and actions.
Nested Class Summary | |
---|---|
static class |
UserService.CreateUsernameValidationResult
|
static class |
UserService.CreateUserValidationResult
|
static class |
UserService.DeleteUserValidationResult
|
static class |
UserService.FieldName
|
static class |
UserService.UpdateUserValidationResult
|
Method Summary | |
---|---|
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)
Deprecated. Use 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. |
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. |
Method Detail |
---|
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 user
UserService.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 user
UserService.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 user
UserService.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 user
UserService.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 user
UserService.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 Directory
UserService.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 result
CreateException
- if the user could not be created, eg username already exists
PermissionException
- 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 result
CreateException
- if the user could not be created, eg username already exists
PermissionException
- 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 result
CreateException
- if the user could not be created, eg username already exists
PermissionException
- 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 update
UserService.UpdateUserValidationResult validateUpdateUser(ApplicationUser user)
user
- The user details to update
void 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 valid
UserService.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 valid
UserService.DeleteUserValidationResult validateDeleteUser(ApplicationUser loggedInUser, ApplicationUser userForDelete)
PreDeleteUserErrors
rejects the request
loggedInUser
- The remote user trying to remove a useruserForDelete
- The user to remove. Needs to be valid
void 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 result
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |