|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.bc.user.DefaultUserService
public class DefaultUserService
Default implementation of UserService
interface. Contains metohods to create/delete users hiding UserUtil internals.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.jira.bc.user.UserService |
---|
UserService.CreateUsernameValidationResult, UserService.CreateUserValidationResult, UserService.DeleteUserValidationResult, UserService.FieldName, UserService.UpdateUserValidationResult |
Constructor Summary | |
---|---|
DefaultUserService(UserUtil userUtil,
PermissionManager permissionManager,
UserManager userManager,
JiraContactHelper jiraContactHelper,
I18nHelper.BeanFactory i18nFactory,
JiraAuthenticationContext jiraAuthenticationContext)
|
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(com.atlassian.crowd.embedded.api.User loggedInUser,
UserService.DeleteUserValidationResult result)
Given a valid validation result, this will remove the user and removes the user from all the groups. |
void |
updateUser(UserService.UpdateUserValidationResult updateUserValidationResult)
Execute the update using the validation result from UserService.validateUpdateUser(User) . |
UserService.CreateUserValidationResult |
validateCreateUserForAdmin(com.atlassian.crowd.embedded.api.User user,
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 user,
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 user,
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 loggedInUser,
String username,
String password,
String confirmPassword,
String email,
String fullname)
Validates creating a user during setup of JIRA or during public signup. |
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(com.atlassian.crowd.embedded.api.User loggedInUser,
String username)
Validates removing a user for the admin section. |
UserService.UpdateUserValidationResult |
validateUpdateUser(com.atlassian.crowd.embedded.api.User user)
Validates updating a user's details. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultUserService(UserUtil userUtil, PermissionManager permissionManager, UserManager userManager, JiraContactHelper jiraContactHelper, I18nHelper.BeanFactory i18nFactory, JiraAuthenticationContext jiraAuthenticationContext)
Method Detail |
---|
public UserService.CreateUserValidationResult validateCreateUserForSignup(com.atlassian.crowd.embedded.api.User loggedInUser, String username, String password, String confirmPassword, String email, String fullname)
UserService
validateCreateUserForSignup
in interface UserService
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
public UserService.CreateUserValidationResult validateCreateUserForSetup(com.atlassian.crowd.embedded.api.User loggedInUser, String username, String password, String confirmPassword, String email, String fullname)
UserService
validateCreateUserForSetup
in interface UserService
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
public UserService.CreateUserValidationResult validateCreateUserForSignupOrSetup(com.atlassian.crowd.embedded.api.User loggedInUser, String username, String password, String confirmPassword, String email, String fullname)
UserService
validateCreateUserForSignupOrSetup
in interface UserService
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
public UserService.CreateUserValidationResult validateCreateUserForAdminPasswordRequired(com.atlassian.crowd.embedded.api.User user, String username, String password, String confirmPassword, String email, String fullname)
UserService
validateCreateUserForAdminPasswordRequired
in interface UserService
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
public UserService.CreateUserValidationResult validateCreateUserForAdmin(com.atlassian.crowd.embedded.api.User user, String username, String password, String confirmPassword, String email, String fullname)
UserService
validateCreateUserForAdmin
in interface UserService
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
public UserService.CreateUserValidationResult validateCreateUserForAdmin(com.atlassian.crowd.embedded.api.User user, String username, String password, String confirmPassword, String email, String fullname, @Nullable Long directoryId)
UserService
validateCreateUserForAdmin
in interface UserService
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 userdirectoryId
- The User Directory
public UserService.CreateUsernameValidationResult validateCreateUsername(com.atlassian.crowd.embedded.api.User loggedInUser, String username)
UserService
validateCreateUsername
in interface UserService
loggedInUser
- The remote user trying to add a new userusername
- The username of the new user. Needs to be lowercase and unique.
public UserService.CreateUsernameValidationResult validateCreateUsername(com.atlassian.crowd.embedded.api.User loggedInUser, String username, Long directoryId)
UserService
validateCreateUsername
in interface UserService
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.
public com.atlassian.crowd.embedded.api.User createUserNoNotification(UserService.CreateUserValidationResult result) throws PermissionException, CreateException
UserService
createUserNoNotification
in interface UserService
result
- The validation result
PermissionException
- If you cannot create users in this directory (it is read-only).
CreateException
- if the user could not be created, eg username already existspublic com.atlassian.crowd.embedded.api.User createUserFromSignup(UserService.CreateUserValidationResult result) throws PermissionException, CreateException
UserService
createUserFromSignup
in interface UserService
result
- The validation result
PermissionException
- If you cannot create users in this directory (it is read-only).
CreateException
- if the user could not be created, eg username already existspublic com.atlassian.crowd.embedded.api.User createUserWithNotification(UserService.CreateUserValidationResult result) throws PermissionException, CreateException
UserService
createUserWithNotification
in interface UserService
result
- The validation result
PermissionException
- If you cannot create users in this directory (it is read-only).
CreateException
- if the user could not be created, eg username already existspublic UserService.UpdateUserValidationResult validateUpdateUser(com.atlassian.crowd.embedded.api.User user)
UserService
validateUpdateUser
in interface UserService
user
- The user details to update
public void updateUser(UserService.UpdateUserValidationResult updateUserValidationResult)
UserService
UserService.validateUpdateUser(User)
.
updateUser
in interface UserService
updateUserValidationResult
- Result from the validation, which also contains all the user's details.public UserService.DeleteUserValidationResult validateDeleteUser(com.atlassian.crowd.embedded.api.User loggedInUser, String username)
UserService
Removing the user is not allowed if:
validateDeleteUser
in interface UserService
loggedInUser
- The remote user trying to remove a userusername
- The username of the user to remove. Needs to be valid
public void removeUser(com.atlassian.crowd.embedded.api.User loggedInUser, UserService.DeleteUserValidationResult result)
UserService
removeUser
in interface UserService
loggedInUser
- the user performing operationresult
- The validation result
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |