OMCStorage Class Reference

Inherits from OMCMobileBackendServiceProxy : OMCServiceProxy : NSObject
Declared in OMCStorage.h

Overview

This is the main class for Storage API operations. As the Storage functionality relies heavily on the Sync module, it is necessary to include the OMCSynchronization library and SyncStore.mom with your app.

– getCollection:

Fetch an OMCStorageCollection from the Storage Service for the current user. The OMCStorageCollection is specified with the collectionID.

- (OMCStorageCollection *)getCollection:(NSString *)collectionID

Parameters

collectionID

The ID of the OMCStorageCollection to be fetched.

Return Value

The target OMCStorageCollection object, or nil if a collection is not found for the given collectionID.

Declared In

OMCStorage.h

– getCollection:forUserId:

In comparison to the getCollection function, which returns OMCStorageCollections for the current user, this function is designed to return OMCStorageCollections for a different specified user. This is useful when, from a MCS perspective, the collection is marked as ‘isolated’ rather than ‘shared’ and the current user needs access to another user’s isolated collection objects. In order to access objects in another user’s isolated collected, the current user must have READ_ALL or READ_WRITE_ALL privileges on the other user’s collection.

- (OMCStorageCollection *)getCollection:(NSString *)collectionID forUserId:(NSString *)userId

Parameters

collectionID

The ID of the OMCStorageCollection.

userId

The ID of the user who owns the collection.

Return Value

The target OMCStorageCollection object, or nil if a collection is not found for the given collectionID.

Declared In

OMCStorage.h