public interface Platform
Modifier and Type | Method and Description |
---|---|
void |
createObject(Callback<VaultObject> callback,
java.lang.String collection,
JsonObject object)
|
void |
createObject(Callback<VaultObject> callback,
java.lang.String collection,
java.lang.String objectId,
JsonObject object)
|
void |
deleteObject(Callback<java.lang.Boolean> callback,
java.lang.String collection,
java.lang.String objectId)
Deletes a
VaultObject in the given collection |
void |
destroy(android.content.Context context)
Disconnects from the service.
|
void |
getCollection(Callback<VaultCollection> callback,
java.lang.String collection)
Fetches a collection from the vault service
|
void |
getCollections(Callback<VaultCollections> callback) |
void |
getDevice(Callback<Device> callback)
Fetches info about this device from the Mason Platform
|
void |
getDeviceInfo(Callback<DeviceInfo> callback)
Gets
DeviceInfo that is stored on the device |
void |
getObject(Callback<VaultObject> callback,
java.lang.String collection,
java.lang.String objectId)
Fetches a
VaultObject by ID |
boolean |
isConnected() |
void |
updateDeviceMetadata(Callback<Device> callback,
java.lang.String name,
java.lang.String[] tags)
Update metadata for this device in the Mason Platform
|
void |
updateObject(Callback<VaultObject> callback,
java.lang.String collection,
java.lang.String objectId,
JsonObject object)
Updates a
VaultObject in the given collection |
boolean isConnected()
void destroy(android.content.Context context)
context
- void getDeviceInfo(Callback<DeviceInfo> callback)
DeviceInfo
that is stored on the devicecallback
- returns DeviceInfo
void getDevice(Callback<Device> callback)
callback
- returns the Device
void updateDeviceMetadata(Callback<Device> callback, java.lang.String name, java.lang.String[] tags)
callback
- returns the updated Device
name
- unique name to assign to the device (optional)tags
- tag(s) to assign to the device (optional)void getCollections(Callback<VaultCollections> callback)
callback
- returns all VaultCollections
void getCollection(Callback<VaultCollection> callback, java.lang.String collection)
callback
- returns the VaultCollection
collection
- name of the collection to fetchvoid getObject(Callback<VaultObject> callback, java.lang.String collection, java.lang.String objectId)
VaultObject
by IDcallback
- returns the VaultObject
collection
- the collection containing the VaultObject
objectId
objectId
- ID of the VaultObject
to fetchvoid createObject(Callback<VaultObject> callback, java.lang.String collection, JsonObject object)
callback
- returns the VaultObject
collection
- name of the collection where the object
should be storedobject
- data stored in the VaultObject
void createObject(Callback<VaultObject> callback, java.lang.String collection, java.lang.String objectId, JsonObject object)
callback
- returns the VaultObject
collection
- name of the collection where the object
should be storedobjectId
- unique ID of this object
object
- data stored in the VaultObject
void updateObject(Callback<VaultObject> callback, java.lang.String collection, java.lang.String objectId, JsonObject object)
VaultObject
in the given collection
callback
- returns the VaultObject
collection
- name of the collection where the object
is storedobjectId
- unique ID of the VaultObject
to be updatedobject
- new data to update the VaultObject
withvoid deleteObject(Callback<java.lang.Boolean> callback, java.lang.String collection, java.lang.String objectId)
VaultObject
in the given collection
callback
- true
if the VaultObject
was deleted, false
otherwisecollection
- name of the collection where the VaultObject
with ID objectId
is storedobjectId
- unique ID of the VaultObject
to be deleted