public class OakFileDataStore extends FileDataStore implements SharedDataStore
SharedDataStore.Type
Constructor and Description |
---|
OakFileDataStore() |
Modifier and Type | Method and Description |
---|---|
void |
addMetadataRecord(java.io.File input,
java.lang.String name)
Adds the root record.
|
void |
addMetadataRecord(java.io.InputStream input,
java.lang.String name)
Adds the root record.
|
void |
deleteAllMetadataRecords(java.lang.String prefix)
Deletes all records matching the given prefix.
|
boolean |
deleteMetadataRecord(java.lang.String name)
Deletes the root record represented by the given parameters.
|
java.util.Iterator<DataIdentifier> |
getAllIdentifiers()
Get all identifiers.
|
java.util.List<DataRecord> |
getAllMetadataRecords(java.lang.String prefix)
Gets the all root records.
|
java.util.Iterator<DataRecord> |
getAllRecords()
Retrieved an iterator over all DataRecords.
|
DataRecord |
getMetadataRecord(java.lang.String name)
Retrieves the metadata record with the given name
|
DataRecord |
getRecordForId(DataIdentifier id)
Retrieves the record for the given identifier
|
SharedDataStore.Type |
getType()
Gets the type.
|
boolean |
metadataRecordExists(java.lang.String name)
Checks if the metadata record with the name exists
|
void |
setReferenceKey(byte[] referenceKey) |
void |
setReferenceKeyEncoded(java.lang.String encodedKey)
Set Base64 encoded signing key
|
void |
setReferenceKeyPlainText(java.lang.String textKey)
Set the referenceKey from plain text.
|
addRecord, clearInUse, close, deleteAllOlderThan, deleteRecord, getMinRecordLength, getPath, getRecordIfStored, init, setMinRecordLength, setPath, updateModifiedDateOnAccess
getRecord, getRecordFromReference
public static final Logger LOG
public java.util.Iterator<DataIdentifier> getAllIdentifiers()
DataStore
getAllIdentifiers
in interface DataStore
getAllIdentifiers
in class FileDataStore
public void setReferenceKeyEncoded(java.lang.String encodedKey)
public void setReferenceKeyPlainText(java.lang.String textKey)
This is useful when setting key via generic
bean property manipulation from string properties. User can specify the
key in plain text and that would be passed on this object via
PropertiesUtil.populate(Object, java.util.Map, boolean)
textKey
- base64 encoded keyPropertiesUtil.populate(Object, java.util.Map, boolean)
public void setReferenceKey(byte[] referenceKey)
public void addMetadataRecord(java.io.InputStream input, java.lang.String name) throws DataStoreException
SharedDataStore
addMetadataRecord
in interface SharedDataStore
input
- the streamname
- the name of the root recordDataStoreException
- the data store exceptionpublic void addMetadataRecord(java.io.File input, java.lang.String name) throws DataStoreException
SharedDataStore
addMetadataRecord
in interface SharedDataStore
input
- the filename
- the name of the root recordDataStoreException
- the data store exceptionpublic DataRecord getMetadataRecord(java.lang.String name)
SharedDataStore
getMetadataRecord
in interface SharedDataStore
name
- the name of the recordpublic boolean metadataRecordExists(java.lang.String name)
SharedDataStore
metadataRecordExists
in interface SharedDataStore
public java.util.List<DataRecord> getAllMetadataRecords(java.lang.String prefix)
SharedDataStore
getAllMetadataRecords
in interface SharedDataStore
public boolean deleteMetadataRecord(java.lang.String name)
SharedDataStore
deleteMetadataRecord
in interface SharedDataStore
name
- the name of the root recordpublic void deleteAllMetadataRecords(java.lang.String prefix)
SharedDataStore
deleteAllMetadataRecords
in interface SharedDataStore
prefix
- metadata type identifierpublic java.util.Iterator<DataRecord> getAllRecords()
SharedDataStore
getAllRecords
in interface SharedDataStore
public DataRecord getRecordForId(DataIdentifier id) throws DataStoreException
SharedDataStore
getRecordForId
in interface SharedDataStore
id
- the if of the recordDataStoreException
public SharedDataStore.Type getType()
SharedDataStore
getType
in interface SharedDataStore
Copyright © 2010 - 2020 Adobe. All Rights Reserved