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, wait
canConvert, getAppLinks, getAvailableConversions, getStream, getThumbnail, getURI, hasCreateFromKeyPermission, isVersion, performsExternalAccessControl
protected final BinaryManager binaryManager
protected boolean supportsUserUpdate
protected boolean transientFlag
public BinaryBlobProvider(BinaryManager binaryManager)
public void initialize(String blobProviderId, Map<String,String> properties) throws IOException
BlobProvider
initialize
in interface BlobProvider
blobProviderId
- the blob provider id for this binary managerproperties
- initialization propertiesIOException
public boolean supportsUserUpdate()
BlobProvider
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).
supportsUserUpdate
in interface BlobProvider
true
if user update is supportedprotected boolean supportsUserUpdateDefaultTrue(Map<String,String> properties)
public boolean isTransient()
BlobProvider
isTransient
in interface BlobProvider
public void close()
BinaryManager
.close
in interface BlobProvider
public BinaryManager getBinaryManager()
BlobProvider
getBinaryManager
in interface BlobProvider
null
public Blob readBlob(BlobInfo blobInfo) throws IOException
BlobProvider
Blob
from storage.readBlob
in interface BlobProvider
blobInfo
- the blob informationIOException
public String writeBlob(Blob blob) throws IOException
BlobProvider
Blob
to storage and returns information about it.
Called to store a user-created blob.
writeBlob
in interface BlobProvider
blob
- the blobIOException
public Map<String,String> getProperties()
BlobProvider
getProperties
in interface BlobProvider
Copyright © 2019 Nuxeo. All rights reserved.