public interface SharedBackend
| Modifier and Type | Method and Description |
|---|---|
void |
addMetadataRecord(File input,
String name)
Adds a metadata record with the specified name
|
void |
addMetadataRecord(InputStream input,
String name)
Adds a metadata record with the specified name
|
void |
close()
Close backend and release resources like database connection if any.
|
void |
deleteAllMetadataRecords(String prefix)
Deletes all the metadata records with the specified prefix.
|
boolean |
deleteMetadataRecord(String name)
Deletes the metadata record with the specified name
|
void |
deleteRecord(DataIdentifier identifier)
Delete record identified by identifier.
|
boolean |
exists(DataIdentifier identifier)
This method check the existence of record in backend.
|
Iterator<DataIdentifier> |
getAllIdentifiers()
Returns identifiers of all records that exists in backend.
|
List<DataRecord> |
getAllMetadataRecords(String prefix)
Gets all the metadata with a specified prefix.
|
Iterator<DataRecord> |
getAllRecords()
Returns a list of all DataRecords
|
DataRecord |
getMetadataRecord(String name)
Gets the metadata of the specified name.
|
DataRecord |
getRecord(DataIdentifier id)
Gets the record with the specified identifier
|
void |
init()
Initialize
|
boolean |
metadataRecordExists(String name)
Checks if the metadata record with the specified name exists.
|
InputStream |
read(DataIdentifier identifier)
Return inputstream of record identified by identifier.
|
void |
write(DataIdentifier identifier,
File file)
Stores file to backend with identifier used as key.
|
InputStream read(DataIdentifier identifier) throws DataStoreException
identifier - identifier of record.DataStoreException - if record not found or any error.void write(DataIdentifier identifier, File file) throws DataStoreException
identifier - key of the filefile - file that would be stored in backend.DataStoreException - for any error.DataRecord getRecord(DataIdentifier id) throws DataStoreException
id - the record identifierDataStoreExceptionIterator<DataIdentifier> getAllIdentifiers() throws DataStoreException
DataStoreExceptionIterator<DataRecord> getAllRecords() throws DataStoreException
DataStoreExceptionboolean exists(DataIdentifier identifier) throws DataStoreException
identifier - identifier to be checked.DataStoreExceptionvoid close()
throws DataStoreException
DataStoreExceptionvoid deleteRecord(DataIdentifier identifier) throws DataStoreException
identifier - DataStoreExceptionvoid addMetadataRecord(InputStream input, String name) throws DataStoreException
input - the record input streamname - the nameDataStoreExceptionvoid addMetadataRecord(File input, String name) throws DataStoreException
input - the record filename - the nameDataStoreExceptionDataRecord getMetadataRecord(String name)
name - the name of the recordList<DataRecord> getAllMetadataRecords(String prefix)
prefix - the prefix of the records to retrieveboolean deleteMetadataRecord(String name)
name - the name of the recordvoid deleteAllMetadataRecords(String prefix)
prefix - the prefix of the recordboolean metadataRecordExists(String name)
name - the name of the recordvoid init() throws DataStoreException
DataStoreExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved