public class UsersClientImpl extends java.lang.Object implements UsersClient
Constructor and Description |
---|
UsersClientImpl(SymAuth symAuth,
SymphonyClientConfig config)
Init
|
UsersClientImpl(SymAuth symAuth,
SymphonyClientConfig config,
javax.ws.rs.client.Client httpClient)
If you need to override HttpClient.
|
Modifier and Type | Method and Description |
---|---|
SymUser |
createUser(org.symphonyoss.symphony.pod.model.UserCreate userCreate) |
java.util.Set<SymUser> |
getAllUsers()
Retrieve all users without any details
This method could require elevated privileges
|
java.util.Set<SymUser> |
getAllUsersWithDetails()
Retrieve all symphony users with details of features and roles
|
SymUser |
getUserBySession(SymAuth symAuth) |
SymUser |
getUserFromEmail(java.lang.String email) |
SymUser |
getUserFromId(java.lang.Long userId) |
SymUser |
getUserFromName(java.lang.String userName) |
java.util.Set<SymUser> |
getUsersFromStream(java.lang.String streamId) |
void |
setUserStatus(long userId,
org.symphonyoss.symphony.pod.model.UserStatus userStatus) |
SymUser |
updateUser(long userId,
SymUser symUser) |
void |
updateUserAvatar(long userId,
byte[] avatar)
Update the avatar of a particular user
|
public UsersClientImpl(SymAuth symAuth, SymphonyClientConfig config)
symAuth
- Authorization model containing session and key tokensconfig
- Symphony Client configpublic UsersClientImpl(SymAuth symAuth, SymphonyClientConfig config, javax.ws.rs.client.Client httpClient)
symAuth
- Authorization model containing session and key tokensconfig
- Symphony Client confighttpClient
- Custom HTTP clientpublic SymUser getUserFromEmail(java.lang.String email) throws UsersClientException
getUserFromEmail
in interface UsersClient
UsersClientException
public SymUser getUserFromId(java.lang.Long userId) throws UsersClientException
getUserFromId
in interface UsersClient
UsersClientException
public SymUser getUserFromName(java.lang.String userName) throws UsersClientException
getUserFromName
in interface UsersClient
UsersClientException
public java.util.Set<SymUser> getUsersFromStream(java.lang.String streamId) throws UsersClientException
getUsersFromStream
in interface UsersClient
UsersClientException
public java.util.Set<SymUser> getAllUsers() throws UsersClientException
getAllUsers
in interface UsersClient
UsersClientException
- Exceptions thrown from Symphony API'spublic java.util.Set<SymUser> getAllUsersWithDetails() throws UsersClientException
getAllUsersWithDetails
in interface UsersClient
UsersClientException
- Exceptions thrown from Symphony API'spublic void setUserStatus(long userId, org.symphonyoss.symphony.pod.model.UserStatus userStatus) throws UsersClientException
setUserStatus
in interface UsersClient
UsersClientException
public SymUser updateUser(long userId, SymUser symUser) throws UsersClientException
updateUser
in interface UsersClient
UsersClientException
public SymUser createUser(org.symphonyoss.symphony.pod.model.UserCreate userCreate) throws UsersClientException
createUser
in interface UsersClient
UsersClientException
public SymUser getUserBySession(SymAuth symAuth) throws UsersClientException
getUserBySession
in interface UsersClient
UsersClientException
public void updateUserAvatar(long userId, byte[] avatar) throws UsersClientException
updateUserAvatar
in interface UsersClient
userId
- User ID as a decimal integer (required)avatar
- user image. Should be less then 2MB.UsersClientException
- if fails to make the avatar update