Kofax Mobile SDK API Reference
|
Public Member Functions | |
BundleCacheProvider (Context context) | |
BundleCacheProvider (File cache) | |
String | getLatestModelDataBuildInfo (String projectName) |
File | getProject (String projectName, String version) |
File | cacheProject (String projectName, IBundle bundle, String version) |
File | getVariant (String projectName, String variant, String version) |
File | cacheVariant (String projectName, String variantName, IBundle bundle, String version) |
String | getLatestVersionForProject (final String projectName) |
Public Member Functions inherited from IBundleCacheProvider | |
String | getLatestVersionForProject (String projectName) |
Static Public Attributes | |
static final String | ODE_CACHE = "_COM_KOFAX_MOBILE_SDK_EXTRACT_ID_ODE_CACHE_" |
Protected Member Functions | |
void | clearCache () |
The BundleCacheProvider handles extracting/copying entries from a bundle into a cache folder. The provider is used to determine the cache location.
By default, the SDK uses the Context.getFilesDir() to save extracted bundle entries as /[app dir]/files/ODE_CACHE/[version]/{project,variant}/
Depending on where the cache is (Context.getCacheDir() or Context.getFilesDir()), the saved files may be stored temporarily, or permanently.
This implementation uses the version string, and will completely empty downloaded files if the given version string does not match what is already on disk.
BundleCacheProvider | ( | Context | context | ) |
Create a cache provider which uses context.getFilesDir() as the cache location.
context | The context |
BundleCacheProvider | ( | File | cache | ) |
Create a cache provider specifying the cache location.
cache | The directory where this should cache files |
File cacheProject | ( | String | projectName, |
IBundle | bundle, | ||
String | version | ||
) |
Extracts the project parts from the given bundle and caches them in the application's local storage.
projectName | The project to extract |
bundle | The bundle from which the project will be extracted |
version | The version of this bundle |
Implements IBundleCacheProvider.
File cacheVariant | ( | String | projectName, |
String | variantName, | ||
IBundle | bundle, | ||
String | version | ||
) |
Extracts the variant parts from the given bundle and caches them in the application's local storage.
projectName | The name of the project to which this variant belongs |
variantName | The variant to extract |
bundle | The bundle from which the variant will be extracted |
version | The version of this bundle |
Implements IBundleCacheProvider.
|
protected |
Recursively deletes the cache folder, and its contents.
String getLatestModelDataBuildInfo | ( | String | projectName | ) |
Get the project latest build model from cache
projectName | The name of the project to retrieve |
Implements IBundleCacheProvider.
String getLatestVersionForProject | ( | final String | projectName | ) |
Gets the version of the cached project file
projectName | The name of the project to get the version string for |
ProjectProviderException | If more than one project cache exists |
File getProject | ( | String | projectName, |
String | version | ||
) |
Get the project directory
projectName | The name of the project to retrieve |
version | The version of the project to retrieve |
Implements IBundleCacheProvider.
File getVariant | ( | String | projectName, |
String | variant, | ||
String | version | ||
) |
Get the variant directory
projectName | The name of the project to which this variant belongs |
variant | The variant to retrieve |
version | The version of the variant to retrieve |
Implements IBundleCacheProvider.
|
static |