@PublicApi public static final class UserService.CreateUserRequest extends Object
Modifier and Type | Method and Description |
---|---|
UserService.CreateUserRequest |
confirmPassword(String confirmPassword)
Confirm that the provided password matches the confirm password provided.
|
boolean |
defaultDirectory()
Determine whether the default user directory should be used for the new user.
|
Set<com.atlassian.application.api.ApplicationKey> |
getApplicationKeys()
Return the application keys that are used to specify what application access the new user requires.
|
String |
getConfirmPassword()
Return the confirmation password that should be compared against the
getPassword() . |
Long |
getDirectoryId()
Return the directory id (representing the user directory), that the new user should be created in.
|
String |
getDisplayName()
Return the display name (also known as full name) for the new user.
|
String |
getEmailAddress()
Return the email address for the new user.
|
ApplicationUser |
getLoggedInUser()
Return the logged in user that would be performing the user creation.
|
String |
getPassword()
Return the password for the new user.
|
String |
getUsername()
Return the user name that is used to identify the new user.
|
UserService.CreateUserRequest |
inDirectory(Long directoryId)
Specify what user directory should be used for new user.
|
UserService.CreateUserRequest |
passwordRequired()
Specify that the user password is required.
|
UserService.CreateUserRequest |
performPermissionCheck(boolean performPermissionCheck)
Indicate that the permission check should not be performed on the logged in user to determine whether the
logged in user has permission to create the new user.
|
boolean |
requireDefaultApplicationAccess()
Determine whether the new user requires default application access.
|
boolean |
requirePassword()
Determine whether the user password is required.
|
UserService.CreateUserRequest |
sendNotification(boolean sendNotification)
Specify whether a notification should be sent when the new user has successfully been created.
|
UserService.CreateUserRequest |
sendUserSignupEvent()
Specify that a user signup event should be sent after user creation.
|
boolean |
shouldConfirmPassword()
Determine whether the confirmation password should be validation or whether the confirmation password has
been set.
|
boolean |
shouldPerformPermissionCheck() |
boolean |
shouldSendNotification()
Determine whether a notification should be sent after user creation.
|
boolean |
shouldSendUserSignupEvent()
Determine whether a signup event should be sent after user has been created.
|
UserService.CreateUserRequest |
skipValidation()
Specify that all validations should be skipped.
|
UserService.CreateUserRequest |
withApplicationAccess(Set<com.atlassian.application.api.ApplicationKey> applicationKeys)
Specify the applications that this user required access to.
|
UserService.CreateUserRequest |
withEventUserEvent(int userEventType)
Deprecated.
Since v7.0.
|
UserService.CreateUserRequest |
withNoApplicationAccess()
Indicate that no application access is required for the new user.
|
static UserService.CreateUserRequest |
withUserDetails(ApplicationUser loggedInUser,
String username,
String password,
String emailAddress,
String displayName)
Create a new user creation request as the provided user for the specified user details.
|
public static UserService.CreateUserRequest withUserDetails(@Nullable ApplicationUser loggedInUser, String username, @Nullable String password, String emailAddress, String displayName)
loggedInUser
- application user performing the create. If null
the user creation is being
performed during setup or signup.username
- The username of the new user. Needs to be lowercase and unique. Required.password
- The password for the new user. If empty a random password will be generated.emailAddress
- The email address for the new user. Required.displayName
- The display name for the new user. Required.public UserService.CreateUserRequest confirmPassword(String confirmPassword)
confirmPassword
- the confirm password that should match the provided password.public UserService.CreateUserRequest withNoApplicationAccess()
public UserService.CreateUserRequest withApplicationAccess(@Nonnull Set<com.atlassian.application.api.ApplicationKey> applicationKeys)
applicationKeys
- applications that user should be granted access to, an empty Set indicates that the
user does not require access to any applications.withNoApplicationAccess()
public UserService.CreateUserRequest sendNotification(boolean sendNotification)
sendNotification
- true if notification should be sent after a new user has successfully been created.
false if no notification should be sent.public UserService.CreateUserRequest sendUserSignupEvent()
public UserService.CreateUserRequest passwordRequired()
public UserService.CreateUserRequest performPermissionCheck(boolean performPermissionCheck)
performPermissionCheck
- true if the permission check should be performed else false to skip the
permission check.public UserService.CreateUserRequest inDirectory(Long directoryId)
directoryId
- The directory which the new user is intended to be created in. null
indicates that
the default directory should be used.@Internal public UserService.CreateUserRequest skipValidation()
@Internal public UserService.CreateUserRequest withEventUserEvent(int userEventType)
userEventType
- the event type that should be sent after user has been created.UserEventType
public boolean requirePassword()
public String getUsername()
public String getPassword()
public String getDisplayName()
public String getEmailAddress()
public boolean defaultDirectory()
public Long getDirectoryId()
null
indicating default.public boolean shouldConfirmPassword()
confirmPassword(String)
should be compared against the getPassword()
.public String getConfirmPassword()
getPassword()
. This is
typically set by confirmPassword(String)
to indicate that the confirm password should be validated
against the getPassword()
.getPassword()
.public boolean requireDefaultApplicationAccess()
public Set<com.atlassian.application.api.ApplicationKey> getApplicationKeys()
requireDefaultApplicationAccess()
public boolean shouldSendNotification()
sendNotification(boolean)
public boolean shouldSendUserSignupEvent()
public ApplicationUser getLoggedInUser()
public boolean shouldPerformPermissionCheck()
Copyright © 2002-2015 Atlassian. All Rights Reserved.