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  | 
protected boolean | 
transientFlag  | 
| 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. 
 | 
Map<String,String> | 
getProperties()
Returns the properties of the blob provider. 
 | 
void | 
initialize(String blobProviderId,
          Map<String,String> properties)
Initializes the blob provider. 
 | 
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. 
 | 
Blob | 
readBlob(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)
Writes a  
Blob to storage and returns information about it. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanConvert, getAppLinks, getAvailableConversions, getStream, getThumbnail, getURI, hasCreateFromKeyPermission, isVersion, performsExternalAccessControlprotected final BinaryManager binaryManager
protected boolean supportsUserUpdate
protected boolean transientFlag
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 boolean isTransient()
BlobProviderisTransient in interface BlobProviderpublic void close()
BinaryManager.close in interface BlobProviderpublic BinaryManager getBinaryManager()
BlobProvidergetBinaryManager in interface BlobProvidernullpublic Blob readBlob(BlobInfo blobInfo) throws IOException
BlobProviderBlob from storage.readBlob in interface BlobProviderblobInfo - the blob informationIOExceptionpublic String writeBlob(Blob blob) throws IOException
BlobProviderBlob to storage and returns information about it.
 Called to store a user-created blob.
writeBlob in interface BlobProviderblob - the blobIOExceptionpublic Map<String,String> getProperties()
BlobProvidergetProperties in interface BlobProviderCopyright © 2019 Nuxeo. All rights reserved.