public class UserService extends Object
Modifier and Type | Field and Description |
---|---|
private Credentials |
credentials |
private Transport |
transport |
private URL |
url |
Constructor and Description |
---|
UserService(URL url,
Credentials credentials,
Transport transport)
Constructs the service.
|
Modifier and Type | Method and Description |
---|---|
String |
create(UserRegistrationInfo userRegistrationInfo)
Creates an user.
|
UserInfo |
get(String id)
Returns an user.
|
Collection<UserShortInfo> |
list(Integer firstResult,
Integer maxResults,
String like)
Returns list of users.
|
void |
put(String id,
UserInfo userInfo)
Modifies an user.
|
private URL url
private Credentials credentials
private Transport transport
public UserService(URL url, Credentials credentials, Transport transport)
url
- of the servercredentials
- to work with the servertransport
- to know the method to reach the serverpublic void put(String id, UserInfo userInfo)
id
- identifies entityuserInfo
- the entity content to putNotFoundJsonException
- if user wasn't foundUnprocessableEntityJsonException
- see:
UnprocessableEntityErrorType.SOFTWARE_VENDOR_IS_MISSING
ForbiddenJsonException
- see:
ForbiddenErrorType.INSUFFICIENT_ACCESS_RIGHTS
public UserInfo get(String id)
id
- identifies entityNotFoundJsonException
- if user wasn't foundForbiddenJsonException
- see:
ForbiddenErrorType.INSUFFICIENT_ACCESS_RIGHTS
public String create(UserRegistrationInfo userRegistrationInfo)
userRegistrationInfo
- the entityUnprocessableEntityJsonException
- see:
UnprocessableEntityErrorType.SOFTWARE_VENDOR_IS_MISSING
ForbiddenJsonException
- see:
ForbiddenErrorType.INSUFFICIENT_ACCESS_RIGHTS
public Collection<UserShortInfo> list(Integer firstResult, Integer maxResults, String like)
firstResult
- when pagination starts or nullmaxResults
- amount of items per page or nulllike
- search string filter or nullCopyright © 2016. All rights reserved.