Interface UserRestClient
public interface UserRestClient
The com.atlassian.jira.rest.client.api handling user resources.
- Since:
- v0.1
-
Method Summary
Modifier and TypeMethodDescriptionio.atlassian.util.concurrent.Promise<User> createUser(UserInput userInput) Create user.Returns a list of users that match the search string.findUsers(String username, Integer startAt, Integer maxResults, Boolean includeActive, Boolean includeInactive) Returns a list of users that match the search string.io.atlassian.util.concurrent.Promise<User> Retrieves detailed information about selected user.io.atlassian.util.concurrent.Promise<User> Retrieves detailed information about selected user.io.atlassian.util.concurrent.Promise<Void> removeUser(URI userUri) Removes user.io.atlassian.util.concurrent.Promise<User> updateUser(URI userUri, UserInput userInput) Modify user.
-
Method Details
-
getUser
Retrieves detailed information about selected user. Try to usegetUser(URI)instead as that method is more RESTful (well connected)- Parameters:
username- JIRA username/login- Returns:
- complete information about given user
- Throws:
RestClientException- in case of problems (connectivity, malformed messages, etc.)
-
getUser
Retrieves detailed information about selected user. This method is preferred overgetUser(String)as com.atlassian.jira.rest.it's more RESTful (well connected)- Parameters:
userUri- URI of user resource- Returns:
- complete information about given user
- Throws:
RestClientException- in case of problems (connectivity, malformed messages, etc.)
-
createUser
Create user. By default created user will not be notified with email. If password field is not set then password will be randomly generated.- Parameters:
userInput- UserInput with data to update- Returns:
- complete information about selected user
- Throws:
RestClientException- in case of problems (connectivity, malformed messages, etc.)- Since:
- v5.1.0
-
updateUser
Modify user. The "value" fields present will override the existing value. Fields skipped in request will not be changed.- Parameters:
userUri- URI to selected user resourceuserInput- UserInput with data to update- Returns:
- complete information about selected user
- Throws:
RestClientException- in case of problems (connectivity, malformed messages, etc.)- Since:
- v5.1.0
-
removeUser
Removes user.- Parameters:
userUri- URI to selected user resource- Returns:
- Void
- Throws:
RestClientException- in case of problems (connectivity, malformed messages, etc.)- Since:
- v5.1.0
-
findUsers
Returns a list of users that match the search string. This resource cannot be accessed anonymously.- Parameters:
username- A query string used to search username, name or e-mail address- Returns:
- list of users that match the search string
- Throws:
RestClientException- in case of problems (connectivity, malformed messages, etc.)- Since:
- v5.1.0
-
findUsers
io.atlassian.util.concurrent.Promise<Iterable<User>> findUsers(String username, @Nullable Integer startAt, @Nullable Integer maxResults, @Nullable Boolean includeActive, @Nullable Boolean includeInactive) Returns a list of users that match the search string. This resource cannot be accessed anonymously.- Parameters:
username- A query string used to search username, name or e-mail addressstartAt- The index of the first user to return (0-based)maxResults- The maximum number of users to return (defaults to 50). The maximum allowed value is 1000. If you specify a value that is higher than this number, your search results will be truncated.includeActive- If true, then active users are included in the results (default true)includeInactive- If true, then inactive users are included in the results (default false)- Returns:
- list of users that match the search string
- Throws:
RestClientException- in case of problems (connectivity, malformed messages, etc.)- Since:
- v5.1.0
-