Storage API
The Storage API is used to represent input and output resource objects, such as files and documents, that are used by SPE API processing methods (envelope, transform, etc.).
Each storage type requires a storage provider (Java class) to handle the resource object. Standards Processing Engine includes default storage provider classes but allows custom storage providers if needed. See the Javadoc files for examples.
How to implement
Before calling anyStandards Processing Engine API processing methods, the storage providers for each type of input or output resource object must be registered. Whatever storage providers are registered are used throughout the system when necessary to perform the required processing.
- IResource.FILE
- Used for files that reside on the file system.
- IResource.DOCUMENT
- Used for process documents (represents data in the document table).
- IResource.DOC_DATA
- Used for the document data stored separately from the document objects.
To register a storage provider, invoke one of the following SPE API methods.
SPE.registerStorageProvider(int iResourceType, String className)
Example: SPE.registerStorageSPEProvider(IResource.FILE, SPEConstants.SPEStorageFS);
SPE.registerDefaultStorageProvider();
This method registers the following default storage providers: - IResource.FILE
- Uses the SPEStorageFS class.
- IResource.DOCUMENT
- Uses the SPEStorageDOC class.
- IResource.DOC_DATA
- Uses the SPEStorageFS class to store document data on the file system.
SPEStorageDB
for document data.