com.avaya.ccs.api

## Interface MonitoredUserI

-     public interface MonitoredUserI

  The `MonitoredUserI` object represents a user that is being monitored by a supervisor in the Contact Center (from the supervisors point of view). The `MonitoredUserI` object shares a subset of properties with the `UserI` object and only provides properties and methods that are appropriate for a supervisor who is monitoring their assigned users. The `MonitoredUserI` objects methods allow the supervisor to invoke supervisor operations on the users that they are monitoring.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canForceLogout()`
    `boolean` | `canForceNotReady()`
    `boolean` | `canForceReady()`
    `void` | `forceLogout()` Allows the supervisor to force logout the user from the Contact Center.
    `void` | `forceNotReady()` Allows the supervisor to force the user into `UserState.NotReady` (if not already in `UserState#NotReady`) with an optional Not Ready Reason code.
    `void` | `forceReady()` Allows the supervisor to force the user into `UserState.Ready`.
    `ContactCenterCodeI` | `getCode()` This property provides the `ContactCenterCodeI` currently associated with the user that this `MonitoredUserI` represents.
    `java.util.List<ContactType>` | `getContactTypes()`
    `java.lang.String` | `getFirstName()`
    `java.lang.String` | `getFullName()`
    `java.lang.String` | `getId()` A unique identifier for the `MonitoredUserI` object.
    `java.lang.String` | `getLastName()`
    `java.lang.String` | `getLoginId()`
    `java.util.List<MonitoredInteractionI>` | `getMonitoredInteractions()` If the supervisor is currently monitoring the interactions of this `MonitoredUserI` via `monitorInteractions(com.avaya.ccs.api.MonitoredInteractionListenerI)` then this method will return a list of the current `MonitoredInteractionI` objects associated with this `MonitoredUserI`.
    `UserState` | `getState()` The current `UserState` of the `UserI` object that this `MonitoredUserI` object represents.
    `java.lang.String` | `getSupervisorId()`
    `UserI` | `getSupervisorUser()`
    `boolean` | `hasContactType(ContactType contactType)` Determines if a particular `ContactType` is assigned to the user in Contact Center administration
    `void` | `monitorInteractions(MonitoredInteractionListenerI listener)` This method starts monitoring the interactions of this `MonitoredUserI`.
    `void` | `unmonitorInteractions()` This method stops monitoring interactions at this `MonitoredUserI`.

- - ### Method Detail

    - #### canForceLogout

          boolean canForceLogout()
                          throws ObjectInvalidException

      Returns:
        `true` if the `MonitoredUserI` can be logged out of the Contact Center by the supervisor invoking the `forceLogout()` method.
      Throws:
        `ObjectInvalidException` - if the `MonitoredUserI` object has been deleted

    - #### canForceNotReady

          boolean canForceNotReady()
                            throws ObjectInvalidException

      Returns:
        `true` if the `MonitoredUserI` can be forced into `UserState.NotReady` by the supervisor invoking `forceNotReady()`.
      Throws:
        `ObjectInvalidException` - if the `MonitoredUserI` object has been deleted

    - #### canForceReady

          boolean canForceReady()
                         throws ObjectInvalidException

      Returns:
        `true` if the `MonitoredUserI` can be forced into `UserState.Ready` by the supervisor invoking `forceReady()`.
      Throws:
        `ObjectInvalidException` - if the `MonitoredUserI` object has been deleted

    - #### getContactTypes

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

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

    - #### getFirstName

          java.lang.String getFirstName()
                                 throws ObjectInvalidException

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

    - #### getLastName

          java.lang.String getLastName()
                                throws ObjectInvalidException

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

    - #### getFullName

          java.lang.String getFullName()
                                throws ObjectInvalidException

      Returns:
        first name and last name properties appended together
      Throws:
        `ObjectInvalidException` - if the `MonitoredUserI` 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 `MonitoredUserI` has been deleted

    - #### getId

          java.lang.String getId()

      A unique identifier for the `MonitoredUserI` 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 `MonitoredUserI` object

    - #### getSupervisorId

          java.lang.String getSupervisorId()
                                    throws ObjectInvalidException

      Returns:
        the user id of the monitored users supervisor
      Throws:
        `ObjectInvalidException` - if the `MonitoredUserI` has been deleted

    - #### getSupervisorUser

          UserI getSupervisorUser()
                           throws ObjectInvalidException

      Returns:
        the `UserI` object of the supervisor that is monitoring this `MonitoredUserI`
      Throws:
        `ObjectInvalidException` - if the `MonitoredUserI` has been deleted

    - #### getState

          UserState getState()

      The current `UserState` of the `UserI` object that this `MonitoredUserI` object represents.

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

      Returns:
        the current state of the user

    - #### getCode

          ContactCenterCodeI getCode()
                              throws ObjectInvalidException

      This property provides the `ContactCenterCodeI` currently associated with the user that this `MonitoredUserI` represents.

      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 `MonitoredUserI`
      Throws:
        `ObjectInvalidException` - if the `MonitoredUserI` 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 `MonitoredUserI`, `false` if not
      Throws:
        `ObjectInvalidException` - if the `MonitoredUserI` has been deleted
        `InvalidArgumentException` - if the supplied `ContactType` argument is null

    - #### forceLogout

          void forceLogout()
                    throws ObjectInvalidException

      Allows the supervisor to force logout the user from the Contact Center. This method is useful for allowing supervisors to logout a user that has left for the day and has forgotten to log out.

      Possible errors for this method are listed below. Most errors can be prevented by querying the `canForceLogout()` 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 user that is represented by the `MonitoredUserI` is not logged in

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

    - #### forceNotReady

          void forceNotReady()
                      throws ObjectInvalidException

      Allows the supervisor to force the user into `UserState.NotReady` (if not already in `UserState#NotReady`) with an optional Not Ready Reason code.

      The list of valid Not Ready Reason codes can be obtained by invoking `SessionI.getNotReadyReasonCodes()`. Possible errors for this method are listed below. Most errors can be prevented by querying the `canForceNotReady()` method to determine when it is possible to invoke this method and by obtaining the list of valid Not Ready Reason codes. 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 user represented by this `MonitoredUserI` 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.

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

    - #### forceReady

          void forceReady()
                   throws ObjectInvalidException

      Allows the supervisor to force the user into `UserState.Ready`.

      Possible errors for this method are listed below. Most errors can be prevented by querying the `canForceReady()` 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 user represented by this `MonitoredUserI` is not logged in

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

    - #### getMonitoredInteractions

          java.util.List<MonitoredInteractionI> getMonitoredInteractions()
                                                                  throws ObjectInvalidException

      If the supervisor is currently monitoring the interactions of this `MonitoredUserI` via `monitorInteractions(com.avaya.ccs.api.MonitoredInteractionListenerI)` then this method will return a list of the current `MonitoredInteractionI` objects associated with this `MonitoredUserI`.
      Returns:
        a list of {MonitoredInteractionI} objects or an empty list if there are no interactions at the monitored user.
      Throws:
        `ObjectInvalidException` - if the `MonitoredUserI` has been deleted

    - #### monitorInteractions

          void monitorInteractions(MonitoredInteractionListenerI listener)
                            throws ObjectInvalidException,
                                   InvalidArgumentException

      This method starts monitoring the interactions of this `MonitoredUserI`.

      On invocation of the `MonitoredUserI#monitorInteractions` method, the application will be sent a `NotificationEventI` for each interaction at the `MonitoredUserI` that the supervisor is monitoring as well as any subsequent interactions at this `MonitoredUserI` (while the supervisor is monitoring their interactions). These `NotificationEventI` objects are delivered to the application via the `MonitoredInteractionListenerI.onMonitoredInteractionEvent(com.avaya.ccs.api.NotificationEventI<com.avaya.ccs.api.MonitoredInteractionI>)` listener method. To stop monitoring this users interactions, `unmonitorInteractions()` should be invoked.

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

    - #### unmonitorInteractions

          void unmonitorInteractions()
                              throws ObjectInvalidException

      This method stops monitoring interactions at this `MonitoredUserI`.

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

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