VaultMobileSDK  18R3
iOS framework for Vault API
VEVVaultJSONCache.h
Go to the documentation of this file.
1 
6 #import <Foundation/Foundation.h>
7 
8 #import "VEVVaultCache.h"
9 
10 
11 NS_ASSUME_NONNULL_BEGIN
12 
14 
22 typedef void (^VEVVaultJSONCacheReindexResultHandler)(NSError * _Nullable error);
23 
34 typedef void (^VEVVaultJSONCacheQueryResultHandler)(NSArray<VEVVaultJSONCacheEntry *>* _Nullable entries, NSError * _Nullable error);
35 
47 typedef void (^VEVVaultJSONCacheCacheResponseResultHandler)(NSArray<VEVVaultJSONCacheEntry *> * _Nullable entriesCached, NSError * _Nullable error);
48 
128 
131 @property (strong, nonatomic, readonly, nonnull) NSArray<VEVVaultJSONField*> * fields;
132 
148 + (instancetype)openCacheWithName:(NSString *)name vault:(VEVVault *)vault fields:(NSArray<VEVVaultJSONField*> *)fields;
149 
169 - (void)cache:(NSArray<NSDictionary*> *)jsonResponse vault:(VEVVault *)vault handler:(VEVVaultJSONCacheCacheResponseResultHandler _Nullable)handler;
170 
183 - (void)query:(VEVVaultLocalQuery *)query handler:(VEVVaultJSONCacheQueryResultHandler _Nullable)handler;
184 
191 - (void)removeEntries:(NSArray<VEVVaultCacheEntry *>*)entries handler:(VEVVaultCacheRemoveEntriesResultHandler _Nullable)handler;
192 
197 - (void)removeAllEntries:(VEVVaultCacheRemoveAllEntriesResultHandler _Nullable)handler;
198 
210 - (void)reindexWithFields:(NSArray<VEVVaultJSONField *> *)newFields handler:(VEVVaultJSONCacheReindexResultHandler _Nullable)handler;
211 
212 @end
213 NS_ASSUME_NONNULL_END
VEVVault * vault
The Vault associated with the cache.
Definition: VEVVaultCache.h:45
Instances of this class are associated with a specific key/value pair from a Vault response schema...
Definition: VEVVaultJSONField.h:33
NSString * name
The name associated with the cache.
Definition: VEVVaultCache.h:41
Instances of this class are used to define queries on a VEVVaultJSONCache.
Definition: VEVVaultLocalQuery.h:32
The abstract base class for all cache classes intended to store Vault related entities for offline ac...
Definition: VEVVaultCache.h:37
An object type that refers to a particular Vault. VEVVaultAuth::currentUser tracks the authenticated ...
Definition: VEVVaultAuth.h:22
void(^ VEVVaultJSONCacheQueryResultHandler)(NSArray< VEVVaultJSONCacheEntry *> *_Nullable entries, NSError *_Nullable error)
The block type used to call back to the application after the query method has be invoked...
Definition: VEVVaultJSONCache.h:34
void(^ VEVVaultCacheRemoveAllEntriesResultHandler)(NSError *_Nullable error)
The block type used to call back to the application after the removeAllEntries method has been invoke...
Definition: VEVVaultCache.h:32
void(^ VEVVaultJSONCacheCacheResponseResultHandler)(NSArray< VEVVaultJSONCacheEntry *> *_Nullable entriesCached, NSError *_Nullable error)
The block type used to call back to the application after the cache method has be invoked...
Definition: VEVVaultJSONCache.h:47
Instances of this class represent a JSON response stored in a VEVVaultJSONCache. Instances are return...
Definition: VEVVaultJSONCacheEntry.h:16
void(^ VEVVaultCacheRemoveEntriesResultHandler)(NSError *_Nullable error)
The block type used to call back to the application after the removeEntriesFromCache method has been ...
Definition: VEVVaultCache.h:22
NSArray< VEVVaultJSONField * > * fields
The fields that this cache has enabled for querying.
Definition: VEVVaultJSONCache.h:131
Instances of this class are used to store JSON responses from Vault for later use—for example when t...
Definition: VEVVaultJSONCache.h:127
void(^ VEVVaultJSONCacheReindexResultHandler)(NSError *_Nullable error)
The block type used to call back to the application after cache methods are called.
Definition: VEVVaultJSONCache.h:22