cisco.uc.cuae
Class ImplmessagingServer

java.lang.Object
  extended by cisco.uc.cuae.BasemessagingServer
      extended by cisco.uc.cuae.ImplmessagingServer
All Implemented Interfaces:
EtchBridge, EtchBridgeServer, messaging, messagingServer, etch.bindings.java.support.ObjSession

public class ImplmessagingServer
extends BasemessagingServer
implements messagingServer, etch.bindings.java.support.ObjSession

Call to message translator for messagingServer. This is the Main file whose new instance will be created as soon as a new client connects to the ETCH server It will containg the state of the user that is if the user is Logged in or not .


Nested Class Summary
 
Nested classes/interfaces inherited from interface cisco.uc.cuae.messaging
messaging.AuthenticationException, messaging.InvalidArgumentException, messaging.InvalidMessageStateException, messaging.Mailbox, messaging.MailboxAlreadyOpenException, messaging.Message, messaging.MessageState, messaging.MessageType, messaging.MessagingException, messaging.NoSuchFileIdException, messaging.NoSuchFolderException, messaging.NoSuchMailboxException, messaging.NoSuchMessageException, messaging.NoSuchUserException, messaging.OperationNotPermittedException, messaging.SearchOptions, messaging.SessionExpiredException, messaging.UnderlyingProtocolException, messaging.UserType
 
Nested classes/interfaces inherited from interface cisco.uc.cuae.EtchBridge
EtchBridge.BridgeException, EtchBridge.ConfigEntry, EtchBridge.EventMessage, EtchBridge.LogLevel
 
Field Summary
static int usersLoggedIn
           
 
Fields inherited from interface cisco.uc.cuae.messaging
E_CODE_ALREADY_LOGGED_IN, E_CODE_AUTHORIZATION_FAILURE, E_CODE_COMM_FAILURE, E_CODE_INTERNAL_ERROR, E_CODE_INVALID_ARGUMENT, E_CODE_MAILBOX_ALREADY_OPEN, E_CODE_NO_PERMISSION, E_CODE_NO_SUCH_MAILBOX, E_CODE_NO_SUCH_MESSAGE, E_CODE_NOT_SUPPORTED_ERROR, E_CODE_PASSWORD_EXPIRED, E_CODE_PROTOCOL, E_CODE_SESSION_EXPIRED, E_CODE_USER_LOCKED, E_NAME_ALREADY_LOGGED_IN, E_NAME_AUTHORIZATION_FAILURE, E_NAME_COMM_FAILURE, E_NAME_INTERNAL_ERROR, E_NAME_INVALID_ARGUMENT, E_NAME_MAILBOX_ALREADY_OPEN, E_NAME_NO_PERMISSION, E_NAME_NO_SUCH_MAILBOX, E_NAME_NO_SUCH_MESSAGE, E_NAME_NOT_SUPPORTED_ERROR, E_NAME_PASSWORD_EXPIRED, E_NAME_PROTOCOL, E_NAME_SESSION_EXPIRED, E_NAME_USER_LOCKED
 
Constructor Summary
ImplmessagingServer(RemotemessagingClient client)
           
 
Method Summary
 void _sessionControl(java.lang.Object arg0, java.lang.Object arg1)
           
 void _sessionNotify(java.lang.Object event)
           
 java.lang.Object _sessionQuery(java.lang.Object arg0)
           
 void closeMailbox(java.lang.String sessionId, java.lang.String userName)
          Begins the call to closeMailbox.
 void copyMessage(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String messageId, java.lang.String destinationFolder)
          Begins the call to copyMessage.
 void createFolder(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String folderName)
          Begins the call to createFolder.
 void deleteFolder(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String folderName, java.lang.String destFolderName)
          Begins the call to deleteFolder.
 void deleteMessage(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String messageId)
          Begins the call to deleteMessage.
 messaging.Message[] findMessages(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String constraint, java.util.Map substitutions, java.lang.Integer offset, java.lang.Integer length, messaging.SearchOptions options)
          Finds messages filtering on the specified search criteria
 java.lang.Integer forwardMessage(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String messageId, java.lang.String destinationUser, java.lang.String from)
          Begins the call to forwardMessage.
 messaging.Message getMessage(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String messageId, java.lang.String[] fields)
          Begins the call to getMessage.
 java.lang.Integer getMessageCount(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String constraint, java.util.Map substitutions)
           
 java.lang.Integer getMessageSize(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String messageId)
          Begins the call to getMessageSize.
 byte[] getVoiceData(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String messageId)
          Begins the call to getVoiceData.
 java.lang.Boolean isLoggedIn(java.lang.String sessionId)
          Used by @Authorize throughout the API.
 java.lang.Boolean isLoggedInAndOpen(java.lang.String sessionId, java.lang.String mailboxId)
           
 void login(java.lang.String sessionId, java.lang.String name, java.lang.String password, messaging.UserType userType)
          This method will be used to forcefully disconnect the user , This will be used when a client connects more than once so as so save any hacking attempts etc.
 void logout(java.lang.String sessionId)
          Begins the call to Logout.
 void moveFolder(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String srcFolderName, java.lang.String destFolderName)
          Begins the call to moveFolder.
 void moveMessage(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String messageId, java.lang.String destinationFolder)
          Begins the call to moveMessage.
 void onNotHandled(EtchBridge.EventMessage originalEvent, java.lang.String reason)
          If a message is sent from this plugin to an application, then a no handler is a possibility, indicating that the application has either exited or is configured to not handle a particular event
 messaging.Mailbox openMailbox(java.lang.String sessionId, java.lang.String userName)
          Begins the call to openMailbox.
 java.lang.Integer sendMessage(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String destUser, java.lang.String fromUser, java.lang.String fileID)
           
 void sessionControl(java.lang.Object arg0, java.lang.Object arg1)
           
 void sessionNotify(java.lang.Object arg0)
           
 java.lang.Object sessionQuery(java.lang.Object arg0)
           
 void undeleteMessage(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String messageId)
          Begins the call to undeleteMessage.
 void updateState(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String messageId, messaging.MessageState state)
          Begins the call to updateState.
 void updateUrgency(java.lang.String sessionId, java.lang.String mailboxId, java.lang.String messageId, java.lang.Boolean urgent)
          Begins the call to updateUrgency.
 java.lang.String uploadData(java.lang.String sessionId, byte[] data, java.lang.String fileId)
           
 
Methods inherited from class cisco.uc.cuae.BasemessagingServer
addCuaeSession, getConfig, getPartitions, logWrite, registerApplication, registerPlugin, removeCuaeSession, unregisterApplication, unregisterPlugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cisco.uc.cuae.EtchBridgeServer
addCuaeSession, getConfig, getPartitions, logWrite, registerApplication, registerPlugin, removeCuaeSession, unregisterApplication, unregisterPlugin
 

Field Detail

usersLoggedIn

public static volatile int usersLoggedIn
Constructor Detail

ImplmessagingServer

public ImplmessagingServer(RemotemessagingClient client)
Method Detail

login

public void login(java.lang.String sessionId,
                  java.lang.String name,
                  java.lang.String password,
                  messaging.UserType userType)
           throws messaging.InvalidArgumentException,
                  messaging.MessagingException,
                  messaging.AuthenticationException,
                  messaging.UnderlyingProtocolException
This method will be used to forcefully disconnect the user , This will be used when a client connects more than once so as so save any hacking attempts etc.

Specified by:
login in interface messagingServer
Overrides:
login in class BasemessagingServer
Throws:
messaging.InvalidArgumentException
messaging.MessagingException
messaging.AuthenticationException
messaging.UnderlyingProtocolException

logout

public void logout(java.lang.String sessionId)
            throws messaging.InvalidArgumentException,
                   messaging.MessagingException,
                   messaging.UnderlyingProtocolException
Begins the call to Logout.

Specified by:
logout in interface messagingServer
Overrides:
logout in class BasemessagingServer
Throws:
messagingException
messaging.InvalidArgumentException
messaging.MessagingException
messaging.UnderlyingProtocolException

isLoggedIn

public java.lang.Boolean isLoggedIn(java.lang.String sessionId)
Used by @Authorize throughout the API.

Specified by:
isLoggedIn in interface messagingServer
Overrides:
isLoggedIn in class BasemessagingServer

isLoggedInAndOpen

public java.lang.Boolean isLoggedInAndOpen(java.lang.String sessionId,
                                           java.lang.String mailboxId)
Specified by:
isLoggedInAndOpen in interface messagingServer
Overrides:
isLoggedInAndOpen in class BasemessagingServer

openMailbox

public messaging.Mailbox openMailbox(java.lang.String sessionId,
                                     java.lang.String userName)
                              throws messaging.MessagingException,
                                     messaging.NoSuchMailboxException,
                                     messaging.OperationNotPermittedException,
                                     messaging.SessionExpiredException
Begins the call to openMailbox. It opens the mailbox of the user . It is assumed that there will be only one mailbox (folder) named INBOX for the user and it will contain all the messages , So If the us

Specified by:
openMailbox in interface messagingServer
Overrides:
openMailbox in class BasemessagingServer
Throws:
messaging.MessagingException
messaging.NoSuchMailboxException
messaging.OperationNotPermittedException
messaging.SessionExpiredException

closeMailbox

public void closeMailbox(java.lang.String sessionId,
                         java.lang.String userName)
                  throws messaging.MessagingException,
                         messaging.NoSuchMailboxException,
                         messaging.SessionExpiredException
Begins the call to closeMailbox.

Specified by:
closeMailbox in interface messagingServer
Overrides:
closeMailbox in class BasemessagingServer
Throws:
messaging.MessagingException
messaging.NoSuchMailboxException
messaging.SessionExpiredException

getMessage

public messaging.Message getMessage(java.lang.String sessionId,
                                    java.lang.String mailboxId,
                                    java.lang.String messageId,
                                    java.lang.String[] fields)
                             throws messaging.MessagingException,
                                    messaging.InvalidArgumentException,
                                    messaging.NoSuchMessageException,
                                    messaging.NoSuchMailboxException,
                                    messaging.SessionExpiredException,
                                    messaging.UnderlyingProtocolException
Begins the call to getMessage.

Specified by:
getMessage in interface messagingServer
Overrides:
getMessage in class BasemessagingServer
Throws:
messaging.NoSuchMessageException
messaging.SessionExpiredException
SearchQueryParseException
messaging.MessagingException
messaging.InvalidArgumentException
messaging.NoSuchMailboxException
messaging.UnderlyingProtocolException

deleteMessage

public void deleteMessage(java.lang.String sessionId,
                          java.lang.String mailboxId,
                          java.lang.String messageId)
                   throws messaging.MessagingException
Begins the call to deleteMessage.

Specified by:
deleteMessage in interface messagingServer
Overrides:
deleteMessage in class BasemessagingServer
mailboxId - The ID for the mailbox.
messageId - The ID of a message in the mailbox.
Throws:
messaging.MessagingException

undeleteMessage

public void undeleteMessage(java.lang.String sessionId,
                            java.lang.String mailboxId,
                            java.lang.String messageId)
                     throws messaging.MessagingException
Begins the call to undeleteMessage.

Specified by:
undeleteMessage in interface messagingServer
Overrides:
undeleteMessage in class BasemessagingServer
mailboxId - The ID for the mailbox.
messageId - The ID of a message in the mailbox.
Throws:
messaging.MessagingException

updateState

public void updateState(java.lang.String sessionId,
                        java.lang.String mailboxId,
                        java.lang.String messageId,
                        messaging.MessageState state)
Begins the call to updateState.

Specified by:
updateState in interface messagingServer
Overrides:
updateState in class BasemessagingServer
mailboxId - The ID for the mailbox.
messageId - The ID of a message in the mailbox.
state - The new state of the message.

updateUrgency

public void updateUrgency(java.lang.String sessionId,
                          java.lang.String mailboxId,
                          java.lang.String messageId,
                          java.lang.Boolean urgent)
Begins the call to updateUrgency.

Specified by:
updateUrgency in interface messagingServer
Overrides:
updateUrgency in class BasemessagingServer
mailboxId - The ID for the mailbox.
urgent - The new urgency of the message.

moveMessage

public void moveMessage(java.lang.String sessionId,
                        java.lang.String mailboxId,
                        java.lang.String messageId,
                        java.lang.String destinationFolder)
Begins the call to moveMessage.

Specified by:
moveMessage in interface messagingServer
Overrides:
moveMessage in class BasemessagingServer
mailboxId - The ID for the mailbox.
destinationFolder - A folder destined within the specified Mailbox.

copyMessage

public void copyMessage(java.lang.String sessionId,
                        java.lang.String mailboxId,
                        java.lang.String messageId,
                        java.lang.String destinationFolder)
Begins the call to copyMessage.

Specified by:
copyMessage in interface messagingServer
Overrides:
copyMessage in class BasemessagingServer
mailboxId - The ID for the mailbox.
destinationFolder - A folder defined within the specified Mailbox

findMessages

public messaging.Message[] findMessages(java.lang.String sessionId,
                                        java.lang.String mailboxId,
                                        java.lang.String constraint,
                                        java.util.Map substitutions,
                                        java.lang.Integer offset,
                                        java.lang.Integer length,
                                        messaging.SearchOptions options)
                                 throws messaging.MessagingException,
                                        messaging.NoSuchMailboxException,
                                        messaging.SessionExpiredException,
                                        messaging.InvalidArgumentException,
                                        messaging.UnderlyingProtocolException
Description copied from interface: messagingServer
Finds messages filtering on the specified search criteria

Specified by:
findMessages in interface messagingServer
Overrides:
findMessages in class BasemessagingServer
constraint - the valid field names that one can search on messages is dependent on the backend (Unity or Unity Connection). For Unity, the following field names can be used to form a constraint. Note that one can only use the == and != operater between these fields and their respective values; also, one can only logically AND ('&&') multiple constraints: msgState: only NEW and READ can be specified. DELETED and FLAGGED have no meaning, and should not be specified. If not specified, both NEW and READ messages are returned messageType: only VOICE can be specified, but all messages returned are inherently voice with Unity as the backend, so specifying it is redundant currently urgent: can be set to true to only return urgent messages, and false to return only non-urgent messages. If not set, then urgent and non-urgent messages will be returned
offset - The start index of messages to return
length - The number of messages to fetch, starting at the 'offset'. For Unity, limit must be between 0 and 100
options - Sortable options are also dependent on the backend (Unity or Unity Connection) For Unity, one can only sort on 'receivedOn'. ASC in this case means the results are sorted from oldest to newest; DESC is newest to oldest. If not specified, sorting defaults to ASC.
Throws:
messaging.MessagingException
messaging.NoSuchMailboxException
messaging.SessionExpiredException
messaging.InvalidArgumentException
messaging.UnderlyingProtocolException

getVoiceData

public byte[] getVoiceData(java.lang.String sessionId,
                           java.lang.String mailboxId,
                           java.lang.String messageId)
                    throws messaging.InvalidArgumentException,
                           messaging.MessagingException,
                           messaging.NoSuchMailboxException,
                           messaging.NoSuchMessageException,
                           messaging.SessionExpiredException,
                           messaging.UnderlyingProtocolException
Begins the call to getVoiceData.

Specified by:
getVoiceData in interface messagingServer
Overrides:
getVoiceData in class BasemessagingServer
Throws:
messaging.UnderlyingProtocolException
messaging.SessionExpiredException
messaging.NoSuchMessageException
messaging.NoSuchMailboxException
messaging.InvalidArgumentException
messaging.MessagingException

getMessageCount

public java.lang.Integer getMessageCount(java.lang.String sessionId,
                                         java.lang.String mailboxId,
                                         java.lang.String constraint,
                                         java.util.Map substitutions)
                                  throws messaging.MessagingException,
                                         messaging.NoSuchMailboxException,
                                         messaging.SessionExpiredException,
                                         messaging.InvalidArgumentException,
                                         messaging.UnderlyingProtocolException,
                                         messaging.NoSuchMessageException
Specified by:
getMessageCount in interface messagingServer
Overrides:
getMessageCount in class BasemessagingServer
Parameters:
mailboxId -
constrad -
Returns:
Throws:
messaging.SessionExpiredException
messaging.NoSuchMailboxException
SearchQueryParseException
messaging.UnderlyingProtocolException
messaging.NoSuchMessageException
BadSearchQueryException
messaging.MessagingException
messaging.InvalidArgumentException

getMessageSize

public java.lang.Integer getMessageSize(java.lang.String sessionId,
                                        java.lang.String mailboxId,
                                        java.lang.String messageId)
                                 throws messaging.MessagingException,
                                        messaging.SessionExpiredException,
                                        messaging.UnderlyingProtocolException
Begins the call to getMessageSize.

Specified by:
getMessageSize in interface messagingServer
Overrides:
getMessageSize in class BasemessagingServer
Throws:
messaging.SessionExpiredException
messaging.MessagingException
messaging.UnderlyingProtocolException

createFolder

public void createFolder(java.lang.String sessionId,
                         java.lang.String mailboxId,
                         java.lang.String folderName)
Begins the call to createFolder.

Specified by:
createFolder in interface messagingServer
Overrides:
createFolder in class BasemessagingServer
mailboxId - The ID for the mailbox.
folderName - The fully qualified name of the new folder.

moveFolder

public void moveFolder(java.lang.String sessionId,
                       java.lang.String mailboxId,
                       java.lang.String srcFolderName,
                       java.lang.String destFolderName)
Begins the call to moveFolder.

Specified by:
moveFolder in interface messagingServer
Overrides:
moveFolder in class BasemessagingServer
mailboxId - The ID for the mailbox.
srcFolderName - The fully qualified name of the existing folder.
destFolderName - The fully qualified name of the new folder location.

deleteFolder

public void deleteFolder(java.lang.String sessionId,
                         java.lang.String mailboxId,
                         java.lang.String folderName,
                         java.lang.String destFolderName)
Begins the call to deleteFolder.

Specified by:
deleteFolder in interface messagingServer
Overrides:
deleteFolder in class BasemessagingServer
mailboxId - The ID for the mailbox.
folderName - The fully qualified name of the new folder.

sendMessage

public java.lang.Integer sendMessage(java.lang.String sessionId,
                                     java.lang.String mailboxId,
                                     java.lang.String destUser,
                                     java.lang.String fromUser,
                                     java.lang.String fileID)
                              throws messaging.MessagingException,
                                     messaging.NoSuchMailboxException,
                                     messaging.NoSuchFileIdException,
                                     messaging.NoSuchUserException,
                                     messaging.SessionExpiredException,
                                     messaging.UnderlyingProtocolException
Specified by:
sendMessage in interface messagingServer
Overrides:
sendMessage in class BasemessagingServer
Throws:
messaging.MessagingException
messaging.NoSuchMailboxException
messaging.NoSuchFileIdException
messaging.NoSuchUserException
messaging.SessionExpiredException
messaging.UnderlyingProtocolException

uploadData

public java.lang.String uploadData(java.lang.String sessionId,
                                   byte[] data,
                                   java.lang.String fileId)
                            throws messaging.MessagingException,
                                   messaging.NoSuchFileIdException,
                                   messaging.NoSuchMailboxException,
                                   messaging.NoSuchUserException,
                                   messaging.SessionExpiredException,
                                   messaging.UnderlyingProtocolException
Specified by:
uploadData in interface messagingServer
Overrides:
uploadData in class BasemessagingServer
Throws:
messaging.MessagingException
messaging.NoSuchFileIdException
messaging.NoSuchMailboxException
messaging.NoSuchUserException
messaging.SessionExpiredException
messaging.UnderlyingProtocolException

forwardMessage

public java.lang.Integer forwardMessage(java.lang.String sessionId,
                                        java.lang.String mailboxId,
                                        java.lang.String messageId,
                                        java.lang.String destinationUser,
                                        java.lang.String from)
                                 throws messaging.MessagingException,
                                        messaging.SessionExpiredException,
                                        messaging.NoSuchMessageException,
                                        messaging.UnderlyingProtocolException
Begins the call to forwardMessage.

Specified by:
forwardMessage in interface messagingServer
Overrides:
forwardMessage in class BasemessagingServer
Throws:
messaging.SessionExpiredException
messaging.UnderlyingProtocolException
messaging.NoSuchMessageException
messaging.MessagingException

sessionControl

public void sessionControl(java.lang.Object arg0,
                           java.lang.Object arg1)
                    throws java.lang.Exception
Throws:
java.lang.Exception

sessionNotify

public void sessionNotify(java.lang.Object arg0)
                   throws java.lang.Exception
Throws:
java.lang.Exception

sessionQuery

public java.lang.Object sessionQuery(java.lang.Object arg0)
                              throws java.lang.Exception
Throws:
java.lang.Exception

_sessionControl

public void _sessionControl(java.lang.Object arg0,
                            java.lang.Object arg1)
                     throws java.lang.Exception
Specified by:
_sessionControl in interface etch.bindings.java.support.ObjSession
Overrides:
_sessionControl in class BasemessagingServer
Throws:
java.lang.Exception

_sessionNotify

public void _sessionNotify(java.lang.Object event)
                    throws java.lang.Exception
Specified by:
_sessionNotify in interface etch.bindings.java.support.ObjSession
Overrides:
_sessionNotify in class BasemessagingServer
Throws:
java.lang.Exception

_sessionQuery

public java.lang.Object _sessionQuery(java.lang.Object arg0)
                               throws java.lang.Exception
Specified by:
_sessionQuery in interface etch.bindings.java.support.ObjSession
Overrides:
_sessionQuery in class BasemessagingServer
Throws:
java.lang.Exception

onNotHandled

public void onNotHandled(EtchBridge.EventMessage originalEvent,
                         java.lang.String reason)
If a message is sent from this plugin to an application, then a no handler is a possibility, indicating that the application has either exited or is configured to not handle a particular event

Specified by:
onNotHandled in interface messagingServer
Overrides:
onNotHandled in class BasemessagingServer


Copyright © 2008. All Rights Reserved.