IMFDataManager Class Reference
Inherits from | NSObject |
Declared in | IMFDataManager.h |
Properties
datastoreManager
The CDTDatastoreManager associated with the IMFDataManager
@property (readonly, atomic) CDTDatastoreManager *datastoreManager
Declared In
IMFDataManager.h
Class Methods
initializeWithUrl:
Initialize the IMFDataManager
+ (instancetype)initializeWithUrl:(NSString *)cloudantProxyUrl
Parameters
- cloudantProxyUrl
The URL for the Cloudant proxy
Return Value
The sharedInstance of the IMFDataManager
Declared In
IMFDataManager.h
Instance Methods
localStore:error:
Creates a local CDTStore.
- (CDTStore *)localStore:(NSString *)name error:(NSError **)error
Parameters
- name
The name of the store.
- error
Cause of failure or nil if successful
Return Value
The local CDTStore instance
Declared In
IMFDataManager.h
pullReplicationForStore:
Generates a CDTPullReplication object to be used to replicate with local CDTStore created with this manager
- (CDTPullReplication *)pullReplicationForStore:(NSString *)name
Parameters
- name
the name of the data store to replicate from remote to local
Return Value
the CDTPullReplication object
Declared In
IMFDataManager.h
pushReplicationForStore:
Generates a CDTPushReplication object to be used to replicate with local Store created with this manager.
- (CDTPushReplication *)pushReplicationForStore:(NSString *)name
Parameters
- name
the name of the data store to replicate from local to remote
Return Value
the CDTPushReplication object
Declared In
IMFDataManager.h
remoteStore:completionHandler:
Creates a remote CDTStore.
- (void)remoteStore:(NSString *)name completionHandler:(void ( ^ ) ( CDTStore *store , NSError *error ))completionHandler
Parameters
- name
The name of the data store
- completionHandler
The completion handler that gets invoked when the operation is completed
Declared In
IMFDataManager.h
setCurrentUserPermissions:forStoreName:completionHander:
Sets user permissions on a remote Cloudant database.
- (void)setCurrentUserPermissions:(NSString *)access forStoreName:(NSString *)storeName completionHander:(void ( ^ ) ( BOOL success , NSError *error ))completionHandler
Parameters
- access
Specifies the access group to which to add the user. Valid values are admins or members. For convenience, constants are provided above (DB_ACCESS_GROUP_ADMINS and DB_ACCESS_GROUP_MEMBERS)
- storeName
Specifies the name of the remote Cloudant database on which to set permissions.
- completionHandler
The completion handler used to receive result
Declared In
IMFDataManager.h