com.avaya.ccs.api

## Interface UserI

-     public interface UserI

  The `UserI` object represents a user in the Contact Center. A user can be an Agent, a Supervisor, or both. Once received from the server, the `UserI` object provides the client application with all information pertinent to the Contact Center user and allows full control of the user.

  If the `UserI` object represents a user with a `Role.Supervisor` role within the Contact Center, the client application may obtain access to the users that the supervisor is assigned, each of which is represented by a `MonitoredUserI` object.

  Invoking the `SessionI.openUsers(com.avaya.ccs.api.UserListenerI)` method requests the server to begin sending notifications for `UserI` objects within the `SessionI` to the application. Invoking the `monitorUsers(com.avaya.ccs.api.MonitoredUserListenerI)` method requests the server to begin sending notifications for `MonitoredInteractionI` objects to the application.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterCallWork(java.lang.String acwCode)` Requests that the `UserI` be put into an After Call Work (ACW) state (if not already in that state) with the specified ACW code.
    `boolean` | `canAfterCallWork()`
    `boolean` | `canLogin()`
    `boolean` | `canLoginOffsite()`
    `boolean` | `canLogout()`
    `boolean` | `canMonitorUsers()`
    `boolean` | `canNotReady()`
    `boolean` | `canOriginateEmail()`
    `boolean` | `canReady()`
    `boolean` | `canRecoverOffsite()`
    `boolean` | `canSetLanguage()`
    `boolean` | `canUnmonitorUsers()`
    `void` | `clearNotification()` Clears any `NotificationI` currently set on the `UserI` (see `NotificationI`).
    `ContactCenterCodeI` | `getCode()` This property provides the `ContactCenterCodeI` currently associated with the user.
    `java.util.List<ContactType>` | `getContactTypes()`
    `java.lang.String` | `getFirstName()`
    `java.lang.String` | `getFullName()`
    `java.lang.String` | `getId()` A unique identifier for the `UserI` object.
    `java.lang.String` | `getLanguage()` The language of the `UserI` client
    `java.lang.String` | `getLastName()`
    `java.lang.String` | `getLoginId()`
    `java.util.List<MonitoredUserI>` | `getMonitoredUsers()` A list of the users that the supervisor is monitoring.
    `NotificationI` | `getNotification()` This property provides the last `NotificationI` sent to this user.
    `void` | `getOffsiteSettings()` Requests the `OffsiteSettingsI` for the user from the Contact Center server.
    `OffsiteStatusI` | `getOffsiteStatus()` Provides the offsite agent status of the Contact Center user.
    `java.util.List<java.lang.String>` | `getPomZones()` Provides an array of strings representing the POM zones administered on the experience portal server.
    `java.util.List<Role>` | `getRoles()`
    `SessionI` | `getSession()`
    `void` | `getSkillsetsForContactType(ContactType type)` Retrieve the list of skillsets that this `UserI` is enrolled in for a given `ContactType`
    `UserState` | `getState()` This property provides the current `UserState` of the `UserI` object.
    `java.lang.String` | `getSupervisorName()`
    `java.lang.String` | `getUserSyncMessage()`
    `UserSyncStatus` | `getUserSyncStatus()` Returns the current synchronised status of the `UserI`.
    `java.lang.String` | `getVoiceResource()`
    `boolean` | `hasContactType(ContactType contactType)` Determines if a particular `ContactType` is assigned to the user in Contact Center administration
    `void` | `initiateAdhocEmail()` An agent can initiate an ad-hoc (agent-initiated) email using this command.
    `boolean` | `isMultimedia()`
    `boolean` | `isPomNailedUp()`
    `void` | `login(java.lang.String password, java.lang.String zone)` Request that the `UserI` be logged into the Contact Center.
    `void` | `loginOffsite(java.lang.String offsitePhone, java.lang.String password)` Requests that the `UserI` be logged into the Contact Center in offsite mode.
    `void` | `logout()` Requests that the `UserI` be logged out of the Contact Center.
    `void` | `monitorUsers(MonitoredUserListenerI listener)` For `UserI` objects that have `Role.Supervisor`, this method starts monitoring users that are assigned to this supervisor and opens the stream of events that will notify the supervisor of updates to these `MonitoredUserI` objects.
    `void` | `notReady(java.lang.String notReadyCode)` Requests that the `UserI` be put into `UserState.NotReady` with an optional not ready reason code.
    `void` | `ready()` Requests that the `UserI` be put into `UserState.Ready`.
    `void` | `recoverOffsite()` Requests recovery of the users permanent offsite call when it has been inadvertently dropped or transferred away.
    `void` | `retrieve(java.lang.String contactId)` Allows the application to pull the contact of the `UserI`
    `void` | `setLanguage(java.lang.String language)` Allows the application to change the language of the `UserI`
    `void` | `unmonitorUsers()` For `UserI` objects that have `Role.Supervisor` and are currently monitoring users, this method stops the monitoring of users that are assigned to this supervisor.

- - ### Method Detail

    - #### canAfterCallWork

          boolean canAfterCallWork()
                            throws ObjectInvalidException

      Returns:
        `true` if the user is logged in to the Contact Center and is either currently handling a Contact Center contact or has just completed one. In these circumstances the user can be put into an After Call Work (ACW) state by invoking `afterCallWork(java.lang.String)`.
      Throws:
        `ObjectInvalidException` - if the `UserI` object has been deleted

    - #### canLogin

          boolean canLogin()
                    throws ObjectInvalidException

      Returns:
        `true` if the user can be logged in to the Contact Center by invoking `login(java.lang.String, java.lang.String)`.
      Throws:
        `ObjectInvalidException` - if the `UserI` object has been deleted

    - #### canLoginOffsite

          boolean canLoginOffsite()
                           throws ObjectInvalidException

      Returns:
        `true` if the user can be logged in to the Contact Center in offsite agent mode by invoking `loginOffsite(java.lang.String, java.lang.String)`.
      Throws:
        `ObjectInvalidException` - if the `UserI` object has been deleted

    - #### canLogout

          boolean canLogout()
                     throws ObjectInvalidException

      Returns:
        `true` if the user can be logged out of the Contact Center by invoking `logout()`.
      Throws:
        `ObjectInvalidException` - if the `UserI` object has been deleted

    - #### canReady

          boolean canReady()
                    throws ObjectInvalidException

      Returns:
        `true` if the user is logged in to the Contact Center and can be set to a Ready state by invoking `ready()`.
      Throws:
        `ObjectInvalidException` - if the `UserI` object has been deleted

    - #### canNotReady

          boolean canNotReady()
                       throws ObjectInvalidException

      Returns:
        `true` if the user is logged in to the Contact Center and can be set to a Not Ready state by invoking `notReady(java.lang.String)`. This property will also be `true` if the user is already in the Not Ready state as it then indicates that the Not Ready Reason code currently set by the user can be changed.
      Throws:
        `ObjectInvalidException` - if the `UserI` object has been deleted

    - #### canRecoverOffsite

          boolean canRecoverOffsite()
                             throws ObjectInvalidException

      Returns:
        `true` if the user is currently in offsite mode and the application can attempt recovery of the offsite call by invoking `recoverOffsite()`.
      Throws:
        `ObjectInvalidException` - if the `UserI` object has been deleted

    - #### canMonitorUsers

          boolean canMonitorUsers()
                           throws ObjectInvalidException

      Returns:
        `true` if the user has a `Role.Supervisor` role and is allowed to monitor their agents by invoking `monitorUsers(com.avaya.ccs.api.MonitoredUserListenerI)`.
      Throws:
        `ObjectInvalidException` - if the `UserI` object has been deleted

    - #### canUnmonitorUsers

          boolean canUnmonitorUsers()
                             throws ObjectInvalidException

      Returns:
        `true` if the user has a `Role.Supervisor` role and is allowed to unmonitor their agents by invoking `unmonitorUsers()`.
      Throws:
        `ObjectInvalidException` - if the `UserI` object has been deleted

    - #### canOriginateEmail

          boolean canOriginateEmail()
                             throws ObjectInvalidException

      Returns:
        `true` if the user can originate an EMail.
      Throws:
        `ObjectInvalidException` - if the `UserI` object has been deleted

    - #### canSetLanguage

          boolean canSetLanguage()
                          throws ObjectInvalidException

      Returns:
        `true` if the user language can be set by invoking `setLanguage(java.lang.String)`.
      Throws:
        `ObjectInvalidException` - if the `UserI` object has been deleted

    - #### getLanguage

          java.lang.String getLanguage()
                                throws ObjectInvalidException

      The language of the `UserI` client
      Returns:
        the language associated with the current agent
      Throws:
        `ObjectInvalidException` - if the `InteractionI` object has been deleted

    - #### getCode

          ContactCenterCodeI getCode()
                              throws ObjectInvalidException

      This property provides the `ContactCenterCodeI` currently associated with the user.

      This will be either a Not Ready Reason or After Call Work code depending upon the current state of the user. These `ContactCenterCodeI` are used to provide fine-grained accounting of how the user's time was spent throughout the day.

      Returns:
        a `ContactCenterCodeI` object or `null` if no code is set on this `UserI`
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getContactTypes

          java.util.List<ContactType> getContactTypes()
                                               throws ObjectInvalidException

      Returns:
        a list of `ContactType` objects that this `UserI` is capable of handling
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getFirstName

          java.lang.String getFirstName()
                                 throws ObjectInvalidException

      Returns:
        the first name of this `UserI` as provisioned in Contact Center administration
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getLastName

          java.lang.String getLastName()
                                throws ObjectInvalidException

      Returns:
        the last name of this `UserI` as provisioned in Contact Center administration
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getFullName

          java.lang.String getFullName()
                                throws ObjectInvalidException

      Returns:
        first name and last name properties appended together
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getId

          java.lang.String getId()

      A unique identifier for the `UserI` object.

      Identifier values are only guaranteed to be unique among objects of the same type. Client applications should not rely on the value of the ID property for anything other than uniquely identifying an instance of a particular object type, as the actual value of the ID property may be changed in future releases. The id property is the only property that can be accessed after the object is deleted.

      Returns:
        id of the `UserI` object

    - #### getState

          UserState getState()

      This property provides the current `UserState` of the `UserI` object.

      This property is available for access after the application has received a `NotificationType.DELETE` notification for this `UserI` object and will return `UserState.Invalid`.

      Returns:
        the `UserState` that the user is currently in

    - #### isMultimedia

          boolean isMultimedia()
                        throws ObjectInvalidException

      Returns:
        `true` if the user can handle multimedia contact types
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getLoginId

          java.lang.String getLoginId()
                               throws ObjectInvalidException

      Returns:
        the ID used to log in to the Contact Center.
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getRoles

          java.util.List<Role> getRoles()
                                 throws ObjectInvalidException

      Returns:
        list of `Role` that the user has in the Contact Center
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getVoiceResource

          java.lang.String getVoiceResource()
                                     throws ObjectInvalidException

      Returns:
        the id of the voice `ResourceI` object
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getSession

          SessionI getSession()
                       throws ObjectInvalidException

      Returns:
        the `SessionI` that this user is associated with
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getSupervisorName

          java.lang.String getSupervisorName()
                                      throws ObjectInvalidException

      Returns:
        the name of the Supervisor that this user is assigned to
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getNotification

          NotificationI getNotification()
                                 throws ObjectInvalidException

      This property provides the last `NotificationI` sent to this user.

      The Notification property only contains the latest notification sent to the user. No history of prior notifications is retained by the system. To acknowledge the notification and clear it from the `UserI` object, the `clearNotification()` method should be invoked.

      For a `NotificationCode.ForceLogOff` notification, the name of the supervisor that performed the operation is supplied in the first token string.

      For a `NotificationCode.ForceReady` notification, the name of the supervisor that performed the operation is supplied in the first token string.

      For a `NotificationCode.ForceNotReady` notification, the name of the supervisor that performed the operation is supplied in the first token string.

      Returns:
        the latest `NotificationI` sent to the user, `null` if no notifications have been received or the user cleared the notification
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getOffsiteStatus

          OffsiteStatusI getOffsiteStatus()
                                   throws ObjectInvalidException

      Provides the offsite agent status of the Contact Center user. The `OffsiteStatusI` object contains an `OffsiteState` enum as a property which defines the current state
      Returns:
        the `OffsiteStatusI` for the user or `null` if the offsite feature is not supported
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getOffsiteSettings

          void getOffsiteSettings()
                           throws ObjectInvalidException

      Requests the `OffsiteSettingsI` for the user from the Contact Center server.

      This is an asynchronous request. The `OffsiteSettingsI` are delivered to the application in a `NotificationType.RESPONSE` notification. For this notification the `ResponseData` object enclosed in the `NotificationEventI` is an instance of `OffsiteSettingsI`. To retrieve the `OffsiteSettingsI`, check the types via the `instanceof` keyword and cast the `ResponseData` to an `OffsiteSettingsI` object. If the offsite settings request fails, an `NotificationType.ERROR` notification will be received detailing the cause of the request failure.

      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### hasContactType

          boolean hasContactType(ContactType contactType)
                          throws ObjectInvalidException,
                                 InvalidArgumentException

      Determines if a particular `ContactType` is assigned to the user in Contact Center administration
      Parameters:
        `contactType` - the `ContactType` to check
      Returns:
        `true` if the `ContactType` is found on the user, `false` if not
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted
        `InvalidArgumentException` - if the supplied `ContactType` argument is null

    - #### getMonitoredUsers

          java.util.List<MonitoredUserI> getMonitoredUsers()
                                                    throws ObjectInvalidException

      A list of the users that the supervisor is monitoring.

      This list is populated if this `UserI` has the `Role#Supervisor`. Invoking `monitorUsers(com.avaya.ccs.api.MonitoredUserListenerI)`, will begin the transmission of notification events for monitored users from the server to the SDK. These notification events will maintain the list of `MonitoredUserI` objects on the `UserI` object. The application can retrieve the `MonitoredUserI` objects that this `UserI` is monitoring by using this method.

      Returns:
        a list of `MonitoredUserI` objects or an empty list if the `UserI` does not have the `Role#Supervisor`, the `UserI` does not have any monitored users assigned to them or the `UserI` is not monitoring users
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getUserSyncStatus

          UserSyncStatus getUserSyncStatus()
                                    throws ObjectInvalidException

      Returns the current synchronised status of the `UserI`.

      This identifies if the `UserState` of the `UserI` is out of sync in the case where multiple providers are servicing the user. Multiple providers can be required if a user is administered with multiple contact types. For example, if the user is administered with `ContactType.POM_Outbound` and `ContactType.Voice`, the state of the user needs to be synchronised between POM and the Contact Center. If a state mismatch occurs between the two providers the users state is deemed out of sync. The value returned by this API can be used to identify what actions need to be taken to resynchronise the users state. See `UserSyncStatus` for further details.

      If the sync status is anything other than `UserSyncStatus.Synchronised` or `UserSyncStatus.NotApplicable`, `getUserSyncMessage()` will return a non-localized message explaining the current `UserSyncStatus`.

      Returns:
        the current `UserSyncStatus` of the `UserI`
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getUserSyncMessage

          java.lang.String getUserSyncMessage()
                                       throws ObjectInvalidException

      Returns:
        a non localized message associated with the current `UserSyncStatus` or `null` if there is no message associated with the synchronised status
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### isPomNailedUp

          boolean isPomNailedUp()
                         throws ObjectInvalidException

      Returns:
        `true` if the nail up call from the outbound server is active on the user endpoint, `false` otherwise.
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getPomZones

          java.util.List<java.lang.String> getPomZones()
                                                throws ObjectInvalidException

      Provides an array of strings representing the POM zones administered on the experience portal server.

      A zone is selected is passed as an argument to the `login(java.lang.String, java.lang.String)` method. Its purpose is to ensure that the closest MPP server to the agents' location is used by a campaign

      Returns:
        list of strings representing POM zones or an empty list if POM is not provisioned
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### login

          void login(java.lang.String password,
                     java.lang.String zone)
              throws ObjectInvalidException

      Request that the `UserI` be logged into the Contact Center.

      This method may be invoked when the user is not logged in to the Contact Center. If login is successful, the user will transition to `UserState.NotReady` and a `NotificationType.UPDATE` notification for this user object will be received. If a failure occurs a `NotificationType.ERROR` notification will be received. These notifications are sent to the `UserListenerI` implementation that is supplied by the application as an argument to the `SessionI.openUsers(com.avaya.ccs.api.UserListenerI)` method.

      Most errors can be prevented by querying the `canLogin()` method to determine when the user is capable of logging in. If the meaning of the error code in the context of this method differs significantly from the generic description given for that error code, then a context-specific meaning is given.

      Possible Errors
      Error Codes | Context Specific Meaning / Notes
      --- | ---
      `ErrorCode.ActiveAgentLimitExceeded`
      `ErrorCode.AgentAlreadyLoggedIn`
      `ErrorCode.AgentConfigurationIncomplete`
      `ErrorCode.AgentLicenseRequestDenied`
      `ErrorCode.AgentLoginFailed`
      `ErrorCode.InvalidAgentState` | The Agent is already logged in
      `ErrorCode.LicenseLimitExceeded`
      `ErrorCode.MultimediaAgentLimitExceeded`
      `ErrorCode.MultimediaOperationDisabled`
      `ErrorCode.VoiceResourceHasActiveCall`

      Parameters:
        `password` - if the user is multimedia enabled the password is required as it is used to log the user into the Contact Center Multimedia server. otherwise password is an optional argument.
        `zone` - if the user is provisioned with `ContactType.POM_Outbound`, they can optionally choose the pom zone for login. the argument can be `null` if the user is not provisioned with the `ContactType#POM_Outbound` or if they want to use the default zone
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### logout

          void logout()
               throws ObjectInvalidException

      Requests that the `UserI` be logged out of the Contact Center.

      This method may be invoked when the user is logged in to the Contact Center. If successful, the user will transition to `UserState.LoggedOut` and a `NotificationType.UPDATE` notification will be received for this `UserI` object. If the agent is active on an interaction, the transition to `UserState#LoggedOut` will be delayed until the contact ends. If a failure occurs, a `NotificationType.ERROR` notification will be received. These notifications are sent to the `UserListenerI` implementation that is supplied by the application as an argument to the `SessionI.openUsers(com.avaya.ccs.api.UserListenerI)` method.

      Possible errors for this method are listed below. Most errors can be prevented by querying the `canLogout()` method to determine when it is possible to invoke this method. If the meaning of the `ErrorCode` in the context of this method differs significantly from the generic description given for that `ErrorCode`, then a context-specific meaning is given.

      Possible Errors
      Error Codes | Context Specific Meaning / Notes
      --- | ---
      `ErrorCode.InvalidAgentState` | The agent is not logged in.

      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### ready

          void ready()
              throws ObjectInvalidException

      Requests that the `UserI` be put into `UserState.Ready`.

      This method may be invoked when the user is logged in to the Contact Center and in a non-ready state. If successful, the user will transition to `UserState#Ready` and a `NotificationType.UPDATE` notification will be received for this `UserI` object. If a failure occurs, a `NotificationType.ERROR` notification will be received. These notifications are sent to the `UserListenerI` implementation that is supplied by the application as an argument to the `SessionI.openUsers(com.avaya.ccs.api.UserListenerI)` method.

      Possible errors for this method are listed below. Most errors can be prevented by querying the `canReady()` method to determine when it is possible to invoke this method. If the meaning of the error code in the context of this method differs significantly from the generic description given for that error code, then a context-specific meaning is given.

      Possible Errors
      Error Codes | Context Specific Meaning / Notes
      --- | ---
      `ErrorCode.InvalidAgentState` | The agent is not logged in.

      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### notReady

          void notReady(java.lang.String notReadyCode)
                 throws ObjectInvalidException

      Requests that the `UserI` be put into `UserState.NotReady` with an optional not ready reason code.

      This method may be invoked when the user is logged in to the Contact Center. If successful, the user will transition to `UserState#NotReady` or `UserState.NotReadyPending` and a `NotificationType.UPDATE` notification will be received for this `UserI` object. If a failure occurs, a `NotificationType.ERROR` notification will be received. These notifications are sent to the `UserListenerI` implementation that is supplied by the application as an argument to the `SessionI.openUsers(com.avaya.ccs.api.UserListenerI)` method.

      Possible errors for this method are listed below. Most errors can be prevented by querying the `canNotReady()` method to determine when it is possible to invoke this method and by obtaining the list of valid not ready reason codes by invoking `SessionI.getNotReadyReasonCodes()`. If the meaning of the error code in the context of this method differs significantly from the generic description given for that error code, then a context-specific meaning is given.

      Possible Errors
      Error Codes | Context Specific Meaning / Notes
      --- | ---
      `ErrorCode.InvalidAgentState` | The `UserI` is not logged in
      `ErrorCode.InvalidParameter` | The not ready code parameter specifies an invalid not ready reason code (e.g. contains non-numeric characters).
      `ErrorCode.ParameterOutOfRange` | The not ready code parameter specifies a not ready reason code that is too long.

      Parameters:
        `notReadyCode` - the not ready reason code to assign to the `UserI`
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### afterCallWork

          void afterCallWork(java.lang.String acwCode)
                      throws ObjectInvalidException,
                             InvalidArgumentException

      Requests that the `UserI` be put into an After Call Work (ACW) state (if not already in that state) with the specified ACW code.

      This method may be invoked when the `UserI` is logged in to the Contact Center and is either active on, or has just completed a Contact Center call. If successful, the `UserI` will transition to `UserState.ACW` or `UserState.ACWPending` and a `NotificationType.UPDATE` notification will be received for this `UserI` object. If a failure occurs, a `NotificationType.ERROR` notification will be received. These notifications are sent to the `UserListenerI` implementation that is supplied by the application as an argument to the `SessionI.openUsers(com.avaya.ccs.api.UserListenerI)` method.

      Possible errors for this method are listed below. Most errors can be prevented by querying `canAfterCallWork()` method to determine when it is possible to invoke `UserI#afterCallWork` and by obtaining the list of valid ACW codes by invoking `SessionI.getAfterCallWorkCodes()`. If the meaning of the error code in the context of this method differs significantly from the generic description given for that error code, then a context-specific meaning is given.

      Possible Errors
      Error Codes | Context Specific Meaning / Notes
      --- | ---
      `ErrorCode.InvalidAgentState` | The `UserI` is not logged in
      `ErrorCode.InvalidParameter` | The acw code parameter specifies an invalid ACW code (e.g. contains non-numeric characters).
      `ErrorCode.ParameterOutOfRange` | The acw code parameter specifies an acw code that is too long.

      Parameters:
        `acwCode` - specifies the ACW code to assign to the `UserI`
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted
        `InvalidArgumentException` - if an empty string or `null` is passed as the acw code argument

    - #### clearNotification

          void clearNotification()
                          throws ObjectInvalidException

      Clears any `NotificationI` currently set on the `UserI` (see `NotificationI`).
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### loginOffsite

          void loginOffsite(java.lang.String offsitePhone,
                            java.lang.String password)
                     throws ObjectInvalidException

      Requests that the `UserI` be logged into the Contact Center in offsite mode.

      This method attempts to login the `UserI` in offsite mode. Offsite mode is where the `UserI` media for calls targetted at their normal voice phone number is redirected to the phone specified by the `offsitePhone` argument. This redirection is performed by nailing up a permanent call to the users offsite device for the duration of the users login session. The phone number used is controlled by the user's offsite administration and details of the current configuration can be found by invoking `getOffsiteSettings()` and querying the `OffsiteSettingsI` object. Also see `OffsiteMode` for different modes of operation for offsite.

      This method may be invoked when the user is not logged in to the Contact Center. If successful, the user will transition to `UserState.NotReady` and a `NotificationType.UPDATE` notification will be received for this `UserI` object. If a failure occurs, a `NotificationType.ERROR` notification will be received. These notifications are sent to the `UserListenerI` implementation that is supplied by the application as an argument to the `SessionI.openUsers(com.avaya.ccs.api.UserListenerI)` method.

      Possible errors for this method are listed below. Most errors can be prevented by querying the `canLoginOffsite()` method to determine when it is possible to invoke this method. If the meaning of the error code in the context of this method differs significantly from the generic description given for that error code, then a context-specific meaning is given.

      Possible Errors
      Error Codes | Context Specific Meaning / Notes
      --- | ---
      `ErrorCode.ActiveAgentLimitExceeded`
      `ErrorCode.AgentConfigurationIncomplete`
      `ErrorCode.AgentLicenseRequestDenied`
      `ErrorCode.AgentLoginFailed`
      `ErrorCode.InvalidAgentState` | The Agent is already logged in
      `ErrorCode.LicenseLimitExceeded`
      `ErrorCode.MultimediaAgentLimitExceeded`
      `ErrorCode.MultimediaOperationDisabled`
      `ErrorCode.OffsiteCallSetupFailed`
      `ErrorCode.OperationNotSupported` | The ability to login in offsite mode is not supported by the back-end service provider.
      `ErrorCode.ParameterOutOfRange` | The `offsitePhone` argument specified a phone number that is not pre-configured for the user and `OffsiteSettingsI.isAlternatePhoneAllowed()` is `false` for the `UserI`.
      `ErrorCode.VoiceResourceHasActiveCall`

      Parameters:
        `offsitePhone` - the offsite phone number selected for the user
        `password` - optional argument specifying the users password for logging into the Contact Center. If the user can handle multimedia interactions, the password argument should be provided as this password is used to log the user into the Contact Center Multimedia server.
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### recoverOffsite

          void recoverOffsite()
                       throws ObjectInvalidException

      Requests recovery of the users permanent offsite call when it has been inadvertently dropped or transferred away.

      This method may be invoked when the user is logged in to the Contact Center in offsite mode. If successful, this method immediately puts the user into `UserState.NotReady` if not currently not ready. It then attempts to re-establish the offsite call from the Contact Center's call server to the user offsite phone set. If successful a `NotificationType.UPDATE` notification will be received for this `UserI` object. The `OffsiteStatusI` will be updated to reflect the current state of the offsite call. If a failure occurs, a `NotificationType.ERROR` notification will be received. These notifications are sent to the `UserListenerI` implementation that is supplied by the application as an argument to the `SessionI.openUsers(com.avaya.ccs.api.UserListenerI)` method.

      Possible errors for this method are listed below. Most errors can be prevented by querying the `canRecoverOffsite()` method to determine when it is possible to invoke this method. If the meaning of the error code in the context of this method differs significantly from the generic description given for that error code, then a context-specific meaning is given.

      Possible Errors
      Error Codes | Context Specific Meaning / Notes
      --- | ---
      `ErrorCode.InvalidAgentState` | The `UserI` is not logged in
      `ErrorCode.DeviceStateError` | The ability to recover the offsite call is not allowed at the current time.
      `ErrorCode.OperationNotSupported` | Either the user is not associated with a voice resource, or the offsite feature is not supported by the underlying switching platform or the voice resource itself.

      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### monitorUsers

          void monitorUsers(MonitoredUserListenerI listener)
                     throws ObjectInvalidException,
                            InvalidArgumentException

      For `UserI` objects that have `Role.Supervisor`, this method starts monitoring users that are assigned to this supervisor and opens the stream of events that will notify the supervisor of updates to these `MonitoredUserI` objects.

      On invocation of the `UserI#monitorUsers` method, the application will be sent a `NotificationEventI` for each user that the supervisor is currently assigned as well as any users that are subsequently assigned to the supervisor (while the supervisor is monitoring users). These `NotificationEventI` objects are delivered to the application via the `MonitoredUserListenerI.onMonitoredUserEvent(com.avaya.ccs.api.NotificationEventI<com.avaya.ccs.api.MonitoredUserI>)` listener method. To stop monitoring their users, `unmonitorUsers()` should be invoked for the supervisor.

      Parameters:
        `listener` - notifies the application of monitored user level events for this user
      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted
        `InvalidArgumentException` - if the mandatory `MonitoredUserListenerI` argument is `null`

    - #### unmonitorUsers

          void unmonitorUsers()
                       throws ObjectInvalidException

      For `UserI` objects that have `Role.Supervisor` and are currently monitoring users, this method stops the monitoring of users that are assigned to this supervisor.

      All `MonitoredUserI` objects associated with this supervisor `UserI` are deleted and a `NotificationType.DELETE` notification is received for each `MonitoredUserI` object. No further events will be received for `MonitoredUserI` objects for this `UserI`. The `getMonitoredUsers()` list will also be cleared.

      Throws:
        `ObjectInvalidException` - if the `UserI` has been deleted

    - #### getSkillsetsForContactType

          void getSkillsetsForContactType(ContactType type)

      Retrieve the list of skillsets that this `UserI` is enrolled in for a given `ContactType`
      Parameters:
        `type` - contact type

    - #### initiateAdhocEmail

          void initiateAdhocEmail()

      An agent can initiate an ad-hoc (agent-initiated) email using this command. Sending this will result in a NEW Interaction response being sent by CCS. The email is then sent by calling `EmailMediaI.create(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.Integer, boolean)`

    - #### setLanguage

          void setLanguage(java.lang.String language)
                    throws ObjectInvalidException,
                           InvalidArgumentException

      Allows the application to change the language of the `UserI`
      Parameters:
        `language` - the user language provided by the client
      Throws:
        `ObjectInvalidException` - if the `UserI` object has been deleted
        `InvalidArgumentException`

    - #### retrieve

          void retrieve(java.lang.String contactId)
                 throws ObjectInvalidException,
                        InvalidArgumentException

      Allows the application to pull the contact of the `UserI`
      Parameters:
        `contactId` -
      Throws:
        `ObjectInvalidException` - if the `UserI` object has been deleted
        `InvalidArgumentException`