StorageClient

interface StorageClient

Data Access interface used to store and load Accounts, Mechanisms and Notifications. Encapsulates a backing storage mechanism, and provides a standard set of functions for operating on the data.

Inheritors

Functions

Link copied to clipboard
abstract fun getAccount(accountId: String): Account
Get the Account object with its id
Link copied to clipboard
abstract fun getAllAccounts(): List<Account>
Get all accounts stored in the system.
Link copied to clipboard
Get all notifications from the storage system.
Link copied to clipboard
Get all notifications for within the mechanism.
Link copied to clipboard
abstract fun getMechanismByUUID(mechanismUID: String): Mechanism
Get the mechanism by UUID.
Link copied to clipboard
Get the mechanisms associated with an account.
Link copied to clipboard
abstract fun getNotification(notificationId: String): PushNotification
Get the PushNotification object with its id
Link copied to clipboard
abstract fun isEmpty(): Boolean
Whether the storage system currently contains any data.
Link copied to clipboard
abstract fun removeAccount(account: Account): Boolean
Delete the Account that was passed in.
Link copied to clipboard
abstract fun removeMechanism(mechanism: Mechanism): Boolean
Delete the mechanism uniquely identified by an id.
Link copied to clipboard
abstract fun removeNotification(pushNotification: PushNotification): Boolean
Delete the pushNotification uniquely identified by an id.
Link copied to clipboard
abstract fun setAccount(account: Account): Boolean
Add or Update the Account to the storage system.
Link copied to clipboard
abstract fun setMechanism(mechanism: Mechanism): Boolean
Add or update the mechanism to the storage system.
Link copied to clipboard
abstract fun setNotification(pushNotification: PushNotification): Boolean
Add or update the pushNotification to the storage system.