StorageObject
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 |
Methods
getDisplayName() → {String}
Returns a StorageObject's display name from an object.
Returns:
object's name decoded if encoded into the MobileBackend.
- Type
- String
getPayload()
Get payload.
Returns the current StorageObject payload.
Returns:
Current Storage object payload.
getStorage()
Returns the current StorageObject.
Returns:
Current StorageObject.
getstorageCollection()
Returns the current StorageCollection.
Returns:
Current StorageCollection.
loadPayload(payload, contentType)
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. |
setDisplayName(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. |
Returns:
The object's name in UTC-8 ASCII format.
setPayload(payload)
Sets the payload for the StorageObject.
Parameters:
Name | Type | Description |
---|---|---|
payload |
The payload to be associated with StorageObject. |