JSONStore Class Reference
Inherits from | NSObject |
Declared in | JSONStore.h |
Contains JSONStore methods that operate on the store.
Tasks
_accessors property
_analytics property
_transactionActive property
+ sharedInstance
– openCollections:withOptions:error:
– getCollectionWithName:
– closeAllCollectionsAndReturnError:
– destroyWithUsername:error:
– destroyDataAndReturnError:
– changeCurrentPassword:withNewPassword:forUsername:error:
– fileInfoAndReturnError:
– startTransactionAndReturnError:
– commitTransactionAndReturnError:
– rollbackTransactionAndReturnError:
Properties
_accessors
Private. Dictionary that holds JSONStoreCollection objects.
@property (nonatomic, strong) NSMutableDictionary *_accessors
Availability
IBM Worklight V6.2.0
Declared In
JSONStore.h
_analytics
Private. Boolean that determines if analytics are logged or not.
@property (nonatomic) BOOL _analytics
Availability
IBM Worklight V6.2.0
Declared In
JSONStore.h
_transactionActive
Private. Boolean that determines if a transaction is running or not.
@property (nonatomic) BOOL _transactionActive
Availability
IBM Worklight V6.2.0
Declared In
JSONStore.h
Class Methods
sharedInstance
Provides access to methods that operate on a store.
+ (JSONStore *)sharedInstance
Return Value
self
Availability
IBM Worklight V6.2.0
Declared In
JSONStore.h
Instance Methods
changeCurrentPassword:withNewPassword:forUsername:error:
Changes the password that is associated with the security artifacts that are used to provide data encryption.
- (BOOL)changeCurrentPassword:(NSString *)oldPassword withNewPassword:(NSString *)newPassword forUsername:(NSString *)username error:(NSError **)error
Parameters
- oldPassword
-
Old password
- newPassword
-
New password
- username
-
Username
- error
-
Error
Return Value
Boolean that indicates the operation failed (false) or succeeded (true)
Availability
IBM Worklight V6.2.0
Declared In
JSONStore.h
closeAllCollectionsAndReturnError:
Locks access to all the collections until openCollections:withOptions:error: is called.
- (BOOL)closeAllCollectionsAndReturnError:(NSError **)error
Parameters
- error
-
Error
Return Value
Boolean that indicates the operation failed (false) or succeeded (true)
Availability
IBM Worklight V6.2.0
Declared In
JSONStore.h
commitTransactionAndReturnError:
Commits a transaction.
- (BOOL)commitTransactionAndReturnError:(NSError **)error
Parameters
- error
-
Error
Return Value
Boolean that indicates the operation failed (false) or succeeded (true)
Availability
IBM Worklight V6.2.0
Declared In
JSONStore.h
destroyDataAndReturnError:
Permanently deletes all data for all users, clears security artifacts, and removes accessors.
- (BOOL)destroyDataAndReturnError:(NSError **)error
Parameters
- error
-
Error
Return Value
Boolean that indicates the operation failed (false) or succeeded (true)
Availability
IBM Worklight V6.2.0
Declared In
JSONStore.h
destroyWithUsername:error:
Permanently deletes all data for a specific user, clears security artifacts, and removes accessors.
- (BOOL)destroyWithUsername:(NSString *)username error:(NSError **)error
Parameters
- username
-
Username for the store to remove
- error
-
Error
Return Value
Boolean that indicates the operation failed (false) or succeeded (true)
Availability
IBM Worklight V6.3.0
Declared In
JSONStore.h
fileInfoAndReturnError:
Returns information about the file used to persist data in the store.
- (NSArray *)fileInfoAndReturnError:(NSError **)error
Parameters
- error
-
Error
Return Value
NSDictionary with information about the store. Returns the following key value pairs: name - name of the store, size - the total size, in bytes, of the store, and isEncrypted - boolean that is true when encrypted and false otherwise
Availability
IBM Worklight V6.2.0
Declared In
JSONStore.h
getCollectionWithName:
Provides an accessor to the collection if the collection exists. This depends on openCollections:withOptions:error: being called first, with the collection requested.
- (JSONStoreCollection *)getCollectionWithName:(NSString *)collectionName
Parameters
- collectionName
-
Name of the opened collection
Return Value
Accessor to a single collection
Availability
IBM Worklight V6.2.0
Declared In
JSONStore.h
openCollections:withOptions:error:
Provides access to the collections inside the store, and creates them if they do not already exist.
- (BOOL)openCollections:(NSArray *)collections withOptions:(JSONStoreOpenOptions *)options error:(NSError **)error
Parameters
- collections
-
NSArray of JSONStoreCollection instances
- options
-
Options
- error
-
Error
Return Value
Boolean that indicates the operation failed (false) or succeeded (true)
Availability
IBM Worklight V6.2.0
Declared In
JSONStore.h
rollbackTransactionAndReturnError:
Rolls back a transaction.
- (BOOL)rollbackTransactionAndReturnError:(NSError **)error
Parameters
- error
-
Error
Return Value
Boolean that indicates the operation failed (false) or succeeded (true)
Availability
IBM Worklight V6.2.0
Declared In
JSONStore.h
startTransactionAndReturnError:
Starts a transaction.
- (BOOL)startTransactionAndReturnError:(NSError **)error
Parameters
- error
-
Error
Return Value
Boolean that indicates the operation failed (false) or succeeded (true)
Availability
IBM Worklight V6.2.0
Declared In
JSONStore.h
© Copyright IBM Corp. 2017