Class OakFileDataStore
java.lang.Object
org.apache.jackrabbit.core.data.AbstractDataStore
org.apache.jackrabbit.core.data.FileDataStore
org.apache.jackrabbit.oak.plugins.blob.datastore.OakFileDataStore
- All Implemented Interfaces:
DataStore,MultiDataStoreAware,SharedDataStore
Oak specific extension of JR2 FileDataStore which enables
provisioning the signing key via OSGi config
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.plugins.blob.SharedDataStore
SharedDataStore.Type -
Field Summary
FieldsFields inherited from class org.apache.jackrabbit.core.data.FileDataStore
inUseFields inherited from class org.apache.jackrabbit.core.data.AbstractDataStore
DIGEST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMetadataRecord(File input, String name) Adds the root record.voidaddMetadataRecord(InputStream input, String name) Adds the root record.voiddeleteAllMetadataRecords(String prefix) Deletes all records matching the given prefix.booleandeleteMetadataRecord(String name) Deletes the root record represented by the given parameters.getAllMetadataRecords(String prefix) Gets the all root records.Retrieved an iterator over all DataRecords.getMetadataRecord(String name) Retrieves the metadata record with the given nameprotected byte[]Retrieves the record for the given identifiergetType()Gets the type.booleanmetadataRecordExists(String name) Checks if the metadata record with the name existsvoidsetReferenceKey(byte[] referenceKey) voidsetReferenceKeyEncoded(String encodedKey) Set Base64 encoded signing keyvoidsetReferenceKeyPlainText(String textKey) Set the referenceKey from plain text.Methods inherited from class org.apache.jackrabbit.core.data.FileDataStore
addRecord, clearInUse, close, deleteAllOlderThan, deleteRecord, getMinRecordLength, getPath, getRecordIfStored, init, setMinRecordLength, setPath, updateModifiedDateOnAccessMethods inherited from class org.apache.jackrabbit.core.data.AbstractDataStore
encodeHexString, getRecord, getRecordFromReference, getReferenceFromIdentifierMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jackrabbit.oak.plugins.blob.SharedDataStore
getRepositoryId, setRepositoryId
-
Field Details
-
LOG
-
-
Constructor Details
-
OakFileDataStore
public OakFileDataStore()
-
-
Method Details
-
getAllIdentifiers
- Specified by:
getAllIdentifiersin interfaceDataStore- Overrides:
getAllIdentifiersin classFileDataStore
-
getOrCreateReferenceKey
- Overrides:
getOrCreateReferenceKeyin classFileDataStore- Throws:
DataStoreException
-
setReferenceKeyEncoded
Set Base64 encoded signing key -
setReferenceKeyPlainText
Set the referenceKey from plain text. Key content would be UTF-8 encoding of the string.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)- Parameters:
textKey- base64 encoded key- See Also:
-
PropertiesUtil.populate(Object, java.util.Map, boolean)
-
setReferenceKey
public void setReferenceKey(byte[] referenceKey) -
addMetadataRecord
Description copied from interface:SharedDataStoreAdds the root record.- Specified by:
addMetadataRecordin interfaceSharedDataStore- Parameters:
input- the streamname- the name of the root record- Throws:
DataStoreException- the data store exception
-
addMetadataRecord
Description copied from interface:SharedDataStoreAdds the root record.- Specified by:
addMetadataRecordin interfaceSharedDataStore- Parameters:
input- the filename- the name of the root record- Throws:
DataStoreException- the data store exception
-
getMetadataRecord
Description copied from interface:SharedDataStoreRetrieves the metadata record with the given name- Specified by:
getMetadataRecordin interfaceSharedDataStore- Parameters:
name- the name of the record- Returns:
-
metadataRecordExists
Description copied from interface:SharedDataStoreChecks if the metadata record with the name exists- Specified by:
metadataRecordExistsin interfaceSharedDataStore- Returns:
-
getAllMetadataRecords
Description copied from interface:SharedDataStoreGets the all root records.- Specified by:
getAllMetadataRecordsin interfaceSharedDataStore- Returns:
- the all root records
-
deleteMetadataRecord
Description copied from interface:SharedDataStoreDeletes the root record represented by the given parameters.- Specified by:
deleteMetadataRecordin interfaceSharedDataStore- Parameters:
name- the name of the root record- Returns:
- success/failure
-
deleteAllMetadataRecords
Description copied from interface:SharedDataStoreDeletes all records matching the given prefix.- Specified by:
deleteAllMetadataRecordsin interfaceSharedDataStore- Parameters:
prefix- metadata type identifier
-
getAllRecords
Description copied from interface:SharedDataStoreRetrieved an iterator over all DataRecords.- Specified by:
getAllRecordsin interfaceSharedDataStore- Returns:
- iterator over DataRecords
-
getRecordForId
Description copied from interface:SharedDataStoreRetrieves the record for the given identifier- Specified by:
getRecordForIdin interfaceSharedDataStore- Parameters:
id- the if of the record- Returns:
- data record
- Throws:
DataStoreException
-
getType
Description copied from interface:SharedDataStoreGets the type.- Specified by:
getTypein interfaceSharedDataStore- Returns:
- the type
-