Class: StorageObject

Class: StorageObject

StorageObject(storageCollection, json)

Class that represents a storage object resource that can be used to store data. This class constructor accessible by mcs.StorageObject method.

Constructor

new StorageObject(storageCollection, json)

Parameters:
Name Type Description
storageCollection StorageCollection
json Object
Source:

Methods

getDisplayName() → {String}

Get Display name. Returns a StorageObject's display name from an object.
Source:
Returns:
object's name decoded if encoded into the MobileBackend.
Type
String

getPayload()

Get payload. Returns the current StorageObject payload. When contentType is json, this method returns JSON object, otherwise string.
Source:
Returns:
Current Storage object payload.

getStorage()

Get storage. Returns the current StorageObject.
Source:
Returns:
Current StorageObject.

getstorageCollection()

Get storage collection. Returns the current StorageCollection.
Source:
Returns:
Current StorageCollection.

loadPayload(payload, contentType)

Load payload. Loads a StorageObject's contents from an object.
Parameters:
Name Type Description
payload Object The object to load from.
contentType String The media-type to associate with the content.
Source:

readPayload(objectType) → {Promise.<(StorageObject|NetworkResponse)>}

Read payload. Returns the contents of the StorageObject. May result in a download from the service if the contents were not previously downloaded.
Parameters:
Name Type Description
objectType String responseType for the XMLHttpRequest Object.
Source:
Returns:
Type
Promise.<(StorageObject|NetworkResponse)>

setDisplayName(name)

Set display name. Sets a StorageObject's display name from an object.
Parameters:
Name Type Description
name Object The object's name to be associated with the object.
Source:
Returns:
The object's name in UTC-8 ASCII format.\

setPayload(payload)

Set payload. Sets the payload for the StorageObject.
Parameters:
Name Type Description
payload The payload to be associated with StorageObject.
Source: