Package com.avaya.clientservices.calllog

## Interface CallLogService

-     public interface CallLogService

  Call Log Service provides history entries for calls that have been made or received on the client.

  The full path to the call log file should be provided by setting UserConfiguration.LocalCallLogFilePath to a platform dependent file path. The path should be unique for each user logging in on the client.

  Currently only local call logs are supported. This means that if call events happen when a user is logged off there will be no call logs captured.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addCallLogs​(java.util.List<CallLogItem> callLogItems, CallLogCompletionHandler completionHandler)` | Adds a specified set of call logs to the Call Log service.
    `void` | `addListener​(CallLogServiceListener listener)` | Attach an CallLogServiceListener to this object to be informed of added/removed/updated notification on call log items.
    `CallLogItem` | `createCallLogItem​(java.lang.String remoteNumber, java.lang.String localUserName, java.lang.String sessionSubject, java.util.Date startTime, java.util.Date endTime, CallLogSourceType sourceType, CallLogActionType actionType, boolean isConference, boolean isIgnored, boolean isCallerIdPrivate, java.util.List<CallLogParticipant> callLogParticipants, java.util.List<CallLogItem> callEvents, java.util.Map<java.lang.String,​java.lang.String> properties)` | Creates a CallLogItem from specified parameters.
    `CallLogParticipant` | `createCallLogRemoteParticipant​(java.lang.String displayName, java.lang.String remoteAddress, java.lang.String remoteNumber, java.util.Date enterTime, java.util.Date leaveTime, boolean isModerator, CallLogAddressSourceType addressSourceType)` | Creates a CallLogParticipant object from specified parameters.
    `Capability` | `getAddCallLogsCapability()` | Capability describing whether call logs can be added by client using `addCallLogs(List, CallLogCompletionHandler)`.
    `java.util.List<CallLogItem>` | `getCallLogs()` | Retrieve currently cached call log items.
    `Capability` | `getMarkCallLogsAsReadCapability()` | Capability describing whether call logs can be marked as read using `markAllCallLogsAsRead(CallLogCompletionHandler)`.
    `Capability` | `getNetworkCallLogsCapability()` | Capability describing whether 24x7 Call Journaling is enabled.
    `Capability` | `getRemoveCallLogsCapability()` | Capability describing whether call logs can be removed using `removeCallLogs(List, CallLogCompletionHandler)`.
    `void` | `markAllCallLogsAsRead​(CallLogCompletionHandler completionHandler)` | Marks all the existing call logs as read.
    `void` | `removeAllCallLogs​(CallLogCompletionHandler completionHandler)` | Removes all existing call logs.
    `void` | `removeCallLogs​(java.util.List<CallLogItem> callLogItems, CallLogCompletionHandler completionHandler)` | The client can select specific call log objects and request the call log service to remove them permanently.
    `void` | `removeListener​(CallLogServiceListener listener)` | Remove an CallLogServiceListener instance that was previously added.
    `void` | `resynchronizeCallLogs​(CallLogCompletionHandler completionHandler)` | This operation reloads all call log items from the persistent storage.

- - ### Method Detail

    - #### addListener

          void addListener​(CallLogServiceListener listener)

      Attach an CallLogServiceListener to this object to be informed of added/removed/updated notification on call log items.
      Parameters:
        `listener` - The new listener to be notified of changes in the Call Log service.

    - #### removeListener

          void removeListener​(CallLogServiceListener listener)

      Remove an CallLogServiceListener instance that was previously added.
      Parameters:
        `listener` - The listener to be removed.

    - #### resynchronizeCallLogs

          void resynchronizeCallLogs​(CallLogCompletionHandler completionHandler)

      This operation reloads all call log items from the persistent storage. `getCallLogs()` contains all call log items loaded from the storage.
      Parameters:
        `completionHandler` - points to the method to be called when the operation completes.

    - #### removeCallLogs

          void removeCallLogs​(java.util.List<CallLogItem> callLogItems,
                              CallLogCompletionHandler completionHandler)

      The client can select specific call log objects and request the call log service to remove them permanently.
      Parameters:
        `callLogItems` - CallLogItem type objects to be deleted from the CallLogService. The CallLogItem objects which are added will be returned in the completion handler.
        `completionHandler` - points to the method to be called when the operation completes.

    - #### removeAllCallLogs

          void removeAllCallLogs​(CallLogCompletionHandler completionHandler)

      Removes all existing call logs. This method will permanently remove all call log items from both runtime and persistent storage. Both completion handler and the data set update notification will provide a full or subset of those call log items objects managed by the client. Both "equals" and "==" operation on those returned objects should provide correct results against those objects managed by the client.
      Parameters:
        `completionHandler` - points to the method to be called when the operation completes.

    - #### markAllCallLogsAsRead

          void markAllCallLogsAsRead​(CallLogCompletionHandler completionHandler)

      Marks all the existing call logs as read. Completes action with completion handler.
      Parameters:
        `completionHandler` - Callback invoked when operation has completed, either success or failure.

    - #### addCallLogs

          void addCallLogs​(java.util.List<CallLogItem> callLogItems,
                           CallLogCompletionHandler completionHandler)

      Adds a specified set of call logs to the Call Log service.
      Parameters:
        `callLogItems` - CallLogItem type objects to be added to the CallLogService. The CallLogItem objects which are added will be returned in the completion handler.
        `completionHandler` - completion handler.

    - #### createCallLogItem

          CallLogItem createCallLogItem​(java.lang.String remoteNumber,
                                        java.lang.String localUserName,
                                        java.lang.String sessionSubject,
                                        java.util.Date startTime,
                                        java.util.Date endTime,
                                        CallLogSourceType sourceType,
                                        CallLogActionType actionType,
                                        boolean isConference,
                                        boolean isIgnored,
                                        boolean isCallerIdPrivate,
                                        java.util.List<CallLogParticipant> callLogParticipants,
                                        java.util.List<CallLogItem> callEvents,
                                        java.util.Map<java.lang.String,​java.lang.String> properties)

      Creates a CallLogItem from specified parameters.
      Parameters:
        `remoteNumber` - remote user number.
        `localUserName` - local user name.
        `sessionSubject` - subject of the call.
        `startTime` - call start time.
        `endTime` - call end time.
        `sourceType` - source type e.g. Undefined, Voice, Video, IM, EC500.
        `actionType` - action type e.g. Undefined, Missed, Redirected, Answered, Outgoing, Transferred, Incoming.
        `isConference` - the is conference flag
        `isIgnored` - the is ignored flag
        `isCallerIdPrivate` - the is caller id private flag
        `callLogParticipants` - call log participants.
        `callEvents` - call events.
        `properties` - call event's property.
      Returns:
        a new CallLogItem object.

    - #### createCallLogRemoteParticipant

          CallLogParticipant createCallLogRemoteParticipant​(java.lang.String displayName,
                                                            java.lang.String remoteAddress,
                                                            java.lang.String remoteNumber,
                                                            java.util.Date enterTime,
                                                            java.util.Date leaveTime,
                                                            boolean isModerator,
                                                            CallLogAddressSourceType addressSourceType)

      Creates a CallLogParticipant object from specified parameters.
      Parameters:
        `displayName` - display name.
        `remoteAddress` - CallLogItem's remote address.
        `remoteNumber` - remote user number.
        `enterTime` - call start time.
        `leaveTime` - call end time.
        `isModerator` - indicates whether the user is moderator.
        `addressSourceType` - call log address source type e.g. Undefined, User, Network, Conference.
      Returns:
        a new CallLogItem object.

    - #### getCallLogs

          java.util.List<CallLogItem> getCallLogs()

      Retrieve currently cached call log items.
      Returns:
        currently cached call log items.

    - #### getNetworkCallLogsCapability

          Capability getNetworkCallLogsCapability()

      Capability describing whether 24x7 Call Journaling is enabled.
      Returns:
        capability describing whether 24x7 Call Journaling is enabled.

    - #### getAddCallLogsCapability

          Capability getAddCallLogsCapability()

      Capability describing whether call logs can be added by client using `addCallLogs(List, CallLogCompletionHandler)`. Allowed when `getNetworkCallLogsCapability()` is not allowed. A client cannot add call logs when 24x7 Call Journaling is enabled on the server and allowed by `PPMConfiguration`.
      Returns:
        capability describing whether call logs can be added by client.

    - #### getRemoveCallLogsCapability

          Capability getRemoveCallLogsCapability()

      Capability describing whether call logs can be removed using `removeCallLogs(List, CallLogCompletionHandler)`.
      Returns:
        capability describing whether call logs can be removed.

    - #### getMarkCallLogsAsReadCapability

          Capability getMarkCallLogsAsReadCapability()

      Capability describing whether call logs can be marked as read using `markAllCallLogsAsRead(CallLogCompletionHandler)`. Disabled during network outage or when server does not have ability to provide read status.
      Returns:
        capability describing whether call logs can be marked as read.