Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

app

fileStorageEndpoint

fileStorageEndpoint: string

keyNamespace

keyNamespace: string

The key prefix for this provider. This will be used to segregate stored values between applications.

localServerAddress

localServerAddress: string

Methods

clear

  • clear(successCallback: function, errorCallback: function): void
  • Clears all data for the current application.

    Parameters

    • successCallback: function
        • (): void
        • Returns void

    • errorCallback: function
        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    Returns void

clearAllData

  • clearAllData(successCallback: function, errorCallback: function): void
  • Clears all data for all applications.

    Parameters

    • successCallback: function
        • (): void
        • Returns void

    • errorCallback: function
        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    Returns void

fileStorageRequest

  • fileStorageRequest(method: string, path: string, successCallback: function, errorCallback: function, data?: any): void
  • Parameters

    • method: string
    • path: string
    • successCallback: function
        • (result?: any): void
        • Parameters

          • Optional result: any

          Returns void

    • errorCallback: function
        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    • Optional data: any

    Returns void

get

  • get(key: string, successCallback: function, errorCallback: function, shared?: boolean): void
  • Fetches a value based on its key.

    Parameters

    • key: string

      The key of the value to fetch.

    • successCallback: function

      The callback to fire upon success. If the key is not found, the callback will be fired with null passed in.

        • (result: any): void
        • Parameters

          • result: any

          Returns void

    • errorCallback: function

      The callback to fire if an error occurs.

        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    • Optional shared: boolean

      An optional flag that when set to true causes the storage mechanism to fetch the resource as a resource that is common to all applications on the same domain. Default is false.

    Returns void

getScore

  • getScore(): number
  • Returns the scoring value for this provider, if supported.

    Returns number

getStats

initialize

  • initialize(): void

isFull

  • isFull(): boolean
  • Returns a boolean value indicating whether or not this provider mechanism is full.

    Returns boolean

isSupported

  • isSupported(): boolean
  • Detects whether or not this provider is supported by the current user agent.

    Returns boolean

remove

  • remove(key: string, successCallback: function, errorCallback: function, shared?: boolean): void
  • Removes a key and associated value from the store.

    Parameters

    • key: string

      The key for which key/value pair to remove.

    • successCallback: function

      The callback to invoke upon successfully removing the desired key/value pair.

        • (): void
        • Returns void

    • errorCallback: function

      The callback to invoke if an error occurs trying to remove the key/value pair.

        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    • Optional shared: boolean

      An optional flag that when set to true removes a resource previously saved as a shared resource. Default is false.

    Returns void

set

  • set(key: string, value: any, successCallback: function, errorCallback: function, shared?: boolean): void
  • Adds a new key/value pair to storage or overwrites an existing one.

    Parameters

    • key: string

      The key of the value to store.

    • value: any

      The value to store.

    • successCallback: function

      The callback to fire upon success.

        • (): void
        • Returns void

    • errorCallback: function

      The callback to fire if an error occurs. Passed a key, and the error that occurred.

        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    • Optional shared: boolean

      An optional flag that when set to true causes the storage mechanism to save the resource in a way that is common to all applications on the same domain. Default is false.

    Returns void

Static isSupported

  • isSupported(): boolean
  • Detects whether or not this provider is supported by the current user agent.

    Returns boolean