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.
Constructor and Description |
---|
BinaryBlobProvider(BinaryManager binaryManager) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the adapted
BinaryManager . |
BinaryManager |
getBinaryManager() |
void |
initialize(String blobProviderId,
Map<String,String> properties)
Initializes the blob provider.
|
Blob |
readBlob(BlobManager.BlobInfo blobInfo)
Reads a
Blob from storage. |
String |
writeBlob(Blob blob,
Document doc)
Writes a
Blob to storage and returns information about it. |
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 void close()
BinaryManager
.close
in interface BlobProvider
public BinaryManager getBinaryManager()
public Blob readBlob(BlobManager.BlobInfo blobInfo) throws IOException
BlobProvider
Blob
from storage.readBlob
in interface BlobProvider
blobInfo
- the blob informationIOException
public String writeBlob(Blob blob, Document doc) throws IOException
BlobProvider
Blob
to storage and returns information about it.
Called to store a user-created blob.
writeBlob
in interface BlobProvider
blob
- the blobdoc
- the document to which this blob belongsIOException
Copyright © 2015 Nuxeo SA. All rights reserved.