Package org.nuxeo.ecm.core.blob
Class AbstractBlobProvider
- java.lang.Object
-
- org.nuxeo.ecm.core.blob.AbstractBlobProvider
-
- All Implemented Interfaces:
BlobProvider
- Direct Known Subclasses:
AbstractLiveConnectBlobProvider
,BlobStoreBlobProvider
,FilesystemBlobProvider
public abstract class AbstractBlobProvider extends Object implements BlobProvider
Abstract implementation forBlobProvider
providing common logic.- Since:
- 7.10
-
-
Field Summary
Fields Modifier and Type Field Description String
blobProviderId
Map<String,String>
properties
-
Constructor Summary
Constructors Constructor Description AbstractBlobProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowByteRange()
Checks whether this blob provider allows byte ranges in keys.Map<String,String>
getProperties()
Returns the properties of the blob provider.boolean
hasCreateFromKeyPermission()
Checks if current user has the rights to create blobs in the blob provider using a key.void
initialize(String blobProviderId, Map<String,String> properties)
Initializes the blob provider.boolean
isColdStorageMode()
Checks whether this blob provider uses "cold storage mode".boolean
isRecordMode()
Checks whether this blob provider uses "record mode".boolean
isTransactional()
Checks whether this blob provider is transactional.boolean
isTransient()
Checks whether this blob provider is transient: blobs may disappear after a while, so a caller should not rely on them being available forever.boolean
supportsUserUpdate()
Checks if user update is supported.protected boolean
supportsUserUpdateDefaultFalse()
protected boolean
supportsUserUpdateDefaultTrue()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.core.blob.BlobProvider
allowDirectDownload, canConvert, close, deleteBlob, getAppLinks, getAvailableConversions, getBinaryGarbageCollector, getBinaryManager, getFile, getStatus, getStream, getStream, getThumbnail, getURI, isVersion, performsExternalAccessControl, readBlob, readBlob, supportsSync, updateBlob, writeBlob, writeBlob
-
-
-
-
Method Detail
-
initialize
public void initialize(String blobProviderId, Map<String,String> properties) throws IOException
Description copied from interface:BlobProvider
Initializes the blob provider.- Specified by:
initialize
in interfaceBlobProvider
- Parameters:
blobProviderId
- the blob provider id for this binary managerproperties
- initialization properties- Throws:
IOException
-
supportsUserUpdateDefaultTrue
protected boolean supportsUserUpdateDefaultTrue()
-
supportsUserUpdateDefaultFalse
protected boolean supportsUserUpdateDefaultFalse()
-
supportsUserUpdate
public boolean supportsUserUpdate()
Description copied from interface:BlobProvider
Checks if user update is supported.A user update refers to the fact that a blob from this provider may be overwritten with another blob, wherever the original blob may occur (usually in a document property).
- Specified by:
supportsUserUpdate
in interfaceBlobProvider
- Returns:
true
if user update is supported
-
isColdStorageMode
public boolean isColdStorageMode()
Description copied from interface:BlobProvider
Checks whether this blob provider uses "cold storage mode".Cold storage mode has the following characteristics:
- transactional (blobs aren't actually written/deleted until the transaction commits, and transaction rollback is possible)
- Specified by:
isColdStorageMode
in interfaceBlobProvider
-
isTransient
public boolean isTransient()
Description copied from interface:BlobProvider
Checks whether this blob provider is transient: blobs may disappear after a while, so a caller should not rely on them being available forever.- Specified by:
isTransient
in interfaceBlobProvider
-
isRecordMode
public boolean isRecordMode()
Description copied from interface:BlobProvider
Checks whether this blob provider uses "record mode".Record mode has the following characteristics:
- transactional (blobs aren't actually written/deleted until the transaction commits, and transaction rollback is possible),
- can replace or delete a document's blob.
- Specified by:
isRecordMode
in interfaceBlobProvider
-
isTransactional
public boolean isTransactional()
Description copied from interface:BlobProvider
Checks whether this blob provider is transactional.A transactional blob provider only writes blobs to final storage at commit time.
- Specified by:
isTransactional
in interfaceBlobProvider
-
allowByteRange
public boolean allowByteRange()
Description copied from interface:BlobProvider
Checks whether this blob provider allows byte ranges in keys.- Specified by:
allowByteRange
in interfaceBlobProvider
-
getProperties
public Map<String,String> getProperties()
Description copied from interface:BlobProvider
Returns the properties of the blob provider.- Specified by:
getProperties
in interfaceBlobProvider
-
hasCreateFromKeyPermission
public boolean hasCreateFromKeyPermission()
Description copied from interface:BlobProvider
Checks if current user has the rights to create blobs in the blob provider using a key.- Specified by:
hasCreateFromKeyPermission
in interfaceBlobProvider
-
-