com.avaya.ccs.api.enums

## Enum UserSyncStatus

- java.lang.Object
- - java.lang.Enum<UserSyncStatus>
  - - com.avaya.ccs.api.enums.UserSyncStatus

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<UserSyncStatus>

      public enum UserSyncStatus
      extends java.lang.Enum<UserSyncStatus>

  The `UserSyncStatus` enum defines the synchronised status of the `UserI` in the Contact Center and allows the application to resynchronise out of sync users by reacting to the synchronised status.

  Users (Agents or Supervisors) in the Contact Center can be administered with multiple `ContactType`. Each `ContactType` can be serviced by a different provider. For example, a user administered with both `ContactType#POM_Outbound` and `ContactType#Voice` must be logged into both POM server and the Contact Center. The state of the User must be synchronised between the two providers (POM and the Contact Center).

  If the state of the user is out of sync between the providers, the application can use the `UserSyncStatus` of the `UserI` to take the appropriately actions to resynchronise the state of the user.

  It is important to note that if a user operation is in progress (for example `UserI.login(java.lang.String, java.lang.String)`), the synchronised status of the user may reflect an out of sync value while the operation is in progress.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `LoginRequired` The logout status of the `UserI` is not synchronised.
    `LogoutRequired` The login status of the `UserI` is not synchronised.
    `NotApplicable` A single service provider is servicing the `UserI`, therefore no synchronisation is required.
    `ProviderUnavailable` If `UserI.getUserSyncStatus()` returns provider unavailable, one or more of the service providers that manages this users state are currently unavailable.
    `Synchronised` The status of `UserI` is synchronised between all required service providers.
    `ToggleReady` If `UserI.getUserSyncStatus()` returns toggle ready, the ready status of the `UserI` is not synchronised.
    `Unknown`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static UserSyncStatus` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static UserSyncStatus[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### NotApplicable

          public static final UserSyncStatus NotApplicable

      A single service provider is servicing the `UserI`, therefore no synchronisation is required.

    - #### Synchronised

          public static final UserSyncStatus Synchronised

      The status of `UserI` is synchronised between all required service providers.

    - #### LoginRequired

          public static final UserSyncStatus LoginRequired

      The logout status of the `UserI` is not synchronised. A logout request partially logged the user out (logged out of one service provider, logged into another service provider). To resynchronise the status of the user, a `UserI.login(java.lang.String, java.lang.String)` followed by a `UserI.logout()` is required to resynchronise the user.

      If the actions to resynchronise are successful, the `UserSyncStatus` will transition to `Synchronised`.

    - #### LogoutRequired

          public static final UserSyncStatus LogoutRequired

      The login status of the `UserI` is not synchronised. A login request partially logged the user in (logged in to one service provider, logged out of another service provider). To resynchronise the status of the user, a `UserI.logout()` followed by a `UserI.login(java.lang.String, java.lang.String)` is required to resynchronise the user.

      If the actions to resynchronise are successful, the `UserSyncStatus` will transition to `Synchronised`.

    - #### ToggleReady

          public static final UserSyncStatus ToggleReady

      If `UserI.getUserSyncStatus()` returns toggle ready, the ready status of the `UserI` is not synchronised. The following list defines the actions required in different cases to resynchronise;
      - If `UserI.getState()` returns `UserState.Ready` and the desired state is `UserState.Ready`, attempt a resynchronise of the states by invoking `UserI.notReady(java.lang.String)`. Once the user is in `UserState.NotReady` invoke `UserI.ready()`
      - If `UserI.getState()` returns `UserState.Ready` and the desired state is `UserState.NotReady`, attempt a resynchronise of the states by invoking `UserI.notReady(java.lang.String)`
      - If `UserI.getState()` returns `UserState.NotReady` and the desired state is `UserState.Ready`. Attempt a resynchronise of the states by invoking `UserI.ready()`.

      If the actions to resynchronise are successful, the `UserSyncStatus` will transition to `Synchronised`.

    - #### ProviderUnavailable

          public static final UserSyncStatus ProviderUnavailable

      If `UserI.getUserSyncStatus()` returns provider unavailable, one or more of the service providers that manages this users state are currently unavailable.

      An attempt could be made to resynchronise the status of the user by invoking a `UserI.logout()` followed by a `UserI.login(java.lang.String, java.lang.String)`. However if the user sync status still remains in `ProviderUnavailable`, administrator support would be required.

    - #### Unknown

          public static final UserSyncStatus Unknown

  - ### Method Detail

    - #### values

          public static UserSyncStatus[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (UserSyncStatus c : UserSyncStatus.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static UserSyncStatus valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null