de.starface.integration.uci.java.v30.ucp.messages.requests
Interface UcpUserStateRequests


@RpcInterface(value="ucp.v30.requests.userState")
@UciService(value="ucp.v30.requests.userState")
public interface UcpUserStateRequests

This interface defines the requests used to alter the user's state provided by the UCI server.


Nested Class Summary
static interface UcpUserStateRequests.AvatarImageFileUpload
          This interface defines the RPC methods that can be used to upload the image files
 
Field Summary
static String SERVICE_NAME
          The UCI service name used for this interface
 
Method Summary
 Map<String,Object> getAvatarImage()
          This request can be used by the UCI client to retrieve the user's avatar image.
 String getUserName()
          This request can be used by the UCI client to get the name of the current user.
 Map<String,Object> getUserState()
          This request can be used by the UCI client to obtain the current user's state with information about his DND, telefony, chat and avatar state.
 void setAvatarImage(Map<String,Object> image)
          This request can be used by the UCI client to set a new avatar image for the user.
 void setAvatarImageFile(String fileId)
          This request can be used by the UCI client to set a new avatar image for the user.
 void setChatPresenceMessage(String message)
          This request can be used by the UCI client to set the chat presence message of the user.
 void setDoNotDisturbSetting(boolean active)
          This request can be used by the UCI client to set the user do not disturb setting.
 

Field Detail

SERVICE_NAME

static final String SERVICE_NAME
The UCI service name used for this interface

See Also:
Constant Field Values
Method Detail

getUserState

Map<String,Object> getUserState()
                                throws UciException
This request can be used by the UCI client to obtain the current user's state with information about his DND, telefony, chat and avatar state.

Returns:
the user's current state information as Map with the values defined in UserState
Throws:
UciException - if the request is not valid as defined by the UCI specification. This may be the case if the request with the given parameters is not allowed to the user ( UciIllegalAccessException) or if the request is placed while the UCI client is not connected (UcpNotConnectedException).

setDoNotDisturbSetting

void setDoNotDisturbSetting(boolean active)
                            throws UciException
This request can be used by the UCI client to set the user do not disturb setting. If DND is active all phone calls to that user are denied by the server.

Parameters:
active - the new state for the do not disturb setting
Throws:
UciException - if the request is not valid as defined by the UCI specification. This may be the case if the request with the given parameters is not allowed to the user ( UciIllegalAccessException) or if the request is placed while the UCI client is not connected (UcpNotConnectedException).

setChatPresenceMessage

void setChatPresenceMessage(String message)
                            throws UciException
This request can be used by the UCI client to set the chat presence message of the user. The presence status itself cannot be set. It is determined from the presence states of the user's jabber/XMPP clients.

Parameters:
message - the new presence message to be set
Throws:
UciException - if the request is not valid as defined by the UCI specification. This may be the case if one of the request's arguments has an illegal value ( UciIllegalArgumentException) or if the request with the given parameters is not allowed to the user (UciIllegalAccessException) or if the request is placed while the UCI client is not connected (UcpNotConnectedException).

getAvatarImage

Map<String,Object> getAvatarImage()
                                  throws UciException
This request can be used by the UCI client to retrieve the user's avatar image. If the user has an avatar image set the UserStateProperties.avatarHash property holds an non empty hash of the image.

Returns:
the avatar image of the user as Map with values as defined in ImageProperties.
Throws:
UciException - if the request is not valid as defined by the UCI specification. This may be the case if the request with the given parameters is not allowed to the user ( UciIllegalAccessException) or if the request is placed while the UCI client is not connected (UcpNotConnectedException).

setAvatarImage

void setAvatarImage(Map<String,Object> image)
                    throws UciException
This request can be used by the UCI client to set a new avatar image for the user.

Parameters:
image - the new image to be set as Map with values as defined in ImageProperties.
Throws:
UciException - if the request is not valid as defined by the UCI specification. This may be the case if one of the request's arguments has an illegal value ( UciIllegalArgumentException) or if the request with the given parameters is not allowed to the user (UciIllegalAccessException) or if the request is placed while the UCI client is not connected (UcpNotConnectedException).

setAvatarImageFile

void setAvatarImageFile(String fileId)
                        throws UciException
This request can be used by the UCI client to set a new avatar image for the user. Before this can be done an image file to be set as avatar must be uploaded to the server using the UcpUserStateRequests.AvatarImageFileUpload RPC interface.

Parameters:
fileId - the id of the file transfer used to upload the new image file.
Throws:
UciException - if the request is not valid as defined by the UCI specification. This may be the case if one of the request's arguments has an illegal value ( UciIllegalArgumentException) or if the request with the given parameters is not allowed to the user (UciIllegalAccessException) or if the request is placed while the UCI client is not connected (UcpNotConnectedException).

getUserName

String getUserName()
                   throws UciException
This request can be used by the UCI client to get the name of the current user.

Returns:
the current name
Throws:
UciException - if the request is not valid as defined by the UCI specification. This may be the case if one of the request's arguments has an illegal value ( UciIllegalArgumentException) or if the request with the given parameters is not allowed to the user (UciIllegalAccessException) or if the request is placed while the UCI client is not connected (UcpNotConnectedException).


Copyright © 2012 STARFACE GmbH. All rights reserved.