public class BinaryBlobProvider extends Object implements BlobProvider
BinaryManager and a BlobProvider for the BlobManager.
Can be used by legacy implementations of a BinaryManager to provide a BlobProvider implementation.
| Modifier and Type | Field and Description |
|---|---|
protected BinaryManager |
binaryManager |
protected boolean |
supportsUserUpdate |
| Constructor and Description |
|---|
BinaryBlobProvider(BinaryManager binaryManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the adapted
BinaryManager. |
BinaryManager |
getBinaryManager()
Gets the associated binary manager, if any.
|
void |
initialize(String blobProviderId,
Map<String,String> properties)
Initializes the blob provider.
|
Blob |
readBlob(BlobManager.BlobInfo blobInfo)
Reads a
Blob from storage. |
boolean |
supportsUserUpdate()
Checks if user update is supported.
|
protected boolean |
supportsUserUpdateDefaultTrue(Map<String,String> properties) |
String |
writeBlob(Blob blob,
Document doc)
Writes a
Blob to storage and returns information about it. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfreezeVersion, getAppLinks, getAvailableConversions, getConvertedStream, getStream, getThumbnail, getURI, isVersionprotected final BinaryManager binaryManager
protected boolean supportsUserUpdate
public BinaryBlobProvider(BinaryManager binaryManager)
public void initialize(String blobProviderId, Map<String,String> properties) throws IOException
BlobProviderinitialize in interface BlobProviderblobProviderId - the blob provider id for this binary managerproperties - initialization propertiesIOExceptionpublic boolean supportsUserUpdate()
BlobProviderA 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).
supportsUserUpdate in interface BlobProvidertrue if user update is supportedprotected boolean supportsUserUpdateDefaultTrue(Map<String,String> properties)
public void close()
BinaryManager.close in interface BlobProviderpublic BinaryManager getBinaryManager()
BlobProvidergetBinaryManager in interface BlobProvidernullpublic Blob readBlob(BlobManager.BlobInfo blobInfo) throws IOException
BlobProviderBlob from storage.readBlob in interface BlobProviderblobInfo - the blob informationIOExceptionpublic String writeBlob(Blob blob, Document doc) throws IOException
BlobProviderBlob to storage and returns information about it.
Called to store a user-created blob.
writeBlob in interface BlobProviderblob - the blobdoc - the document to which this blob belongsIOExceptionCopyright © 2015 Nuxeo SA. All rights reserved.