Client Store


Purpose

Initiates and controls the data synchronization capability via the HTTP maps replication process, as well as enables initialization of the Store and Forward process.

Under the Android platform, data chunking capability is enabled which permits to send large files in several smaller chunks during data synchronization. This capability also handles failures due to a user interaction or a network failure.

The object can be accessed using the launchbox.PRPC.ClientStore reference.

Module

This object belongs to the PRPC Client Store product module.

Constants

One of the following constants is passed in the errorCode parameter for the onStatusUpdate callback method to define the type of error that has occurred - see addListener.

Name Description
Error.ALREADY_STARTED Denotes that the operation is already in progress.
Error.AUTHENTICATION_FAILURE Denotes that the authentication process has failed.
Error.CLIENT_DB_FAILURE Denotes that an error related to the client database has occurred.
Error.CLIENT_PARSING_FAILURE Denotes that a parsing failure has occurred for the client.
Error.INTERNAL Denotes that an internal error has occurred.
Error.NETWORK_FAILURE Denotes that a network error has occurred.
Error.NOT_CONFIGURED Denotes that the ClientStore object has not yet been configured.
Error.SERVER_FAILURE Denotes that an error has occurred related to the server.

One of the following constants is passed in the event parameter for the onStatusUpdate callback method to define the type of event that has occurred - see addListener.

Name Description
Event.FAILED Denotes that the data synchronization operation has failed.
Event.STARTED Denotes that the data synchronization has started or has been resumed manually.
Event.STOPPED Denotes that the data synchronization has stopped or has been paused manually.
Event.SUCCEEDED Denotes that the data synchronization has successfully completed.

Management methods

Name Return type Description
configure undefined

Configures the Client Store process.

start undefined

Starts or resumes the Client Store process.

addListener undefined

Adds a listener to the Client Store service.

removeListener undefined

Removes a listener previously added to the Client Store service.

stop undefined

On Android, it pauses the Client Store process. On iOS, it stops the process.

Replicated storage methods

Name Return type Description
getItems undefined

Gets a list of items selected by specifying their type and handle.

getItemStats undefined

Returns statistics for all currently stored data items which are not being sychronized at this time.

writeItem undefined

Adds or updates an item within local storage.

getItemTypes undefined

Retrieves a list of item types for currently stored data items.

getOfflineStorageCount undefined

Retrieves a number of currently stored items.

deleteItem undefined

Deletes a specific item selected by specifying its type and handle.

clearItems undefined

Clears all items in local storage if data synchronization is not working.

Forwardable storage methods

Name Return type Description
addAction undefined

Adds an action to the action queue.

listActions undefined

Retrieves a map of currently stored actions.

getQueuedActionsCount undefined

Retrieves a number of actions in the actions queue.

removeRejectedAction undefined

Removes rejected actions from the action queue.

removeAction undefined

Removes a specified action from the action queue.

Related topic

Public API reference
Legal notice | Copyright © 2015 and Confidential to Pegasystems Inc. All rights reserved. | Feedback
Advanced...