public class DummyBlobProvider extends AbstractBlobProvider
Modifier and Type | Field and Description |
---|---|
protected Map<String,byte[]> |
blobs |
protected AtomicLong |
counter |
blobProviderId, properties
Constructor and Description |
---|
DummyBlobProvider() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this blob provider and releases resources that may be held by it.
|
void |
initialize(String blobProviderId,
Map<String,String> properties)
Initializes the blob provider.
|
Blob |
readBlob(BlobInfo blobInfo)
Reads a
Blob from storage. |
String |
writeBlob(Blob blob)
Writes a
Blob to storage and returns information about it. |
getProperties, hasCreateFromKeyPermission, isTransient, supportsUserUpdate, supportsUserUpdateDefaultFalse, supportsUserUpdateDefaultTrue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canConvert, getAppLinks, getAvailableConversions, getBinaryManager, getStream, getThumbnail, getURI, isVersion, performsExternalAccessControl
protected AtomicLong counter
public DummyBlobProvider()
public void initialize(String blobProviderId, Map<String,String> properties) throws IOException
BlobProvider
initialize
in interface BlobProvider
initialize
in class AbstractBlobProvider
blobProviderId
- the blob provider id for this binary managerproperties
- initialization propertiesIOException
public void close()
BlobProvider
public Blob readBlob(BlobInfo blobInfo)
BlobProvider
Blob
from storage.blobInfo
- the blob informationpublic String writeBlob(Blob blob) throws IOException
BlobProvider
Blob
to storage and returns information about it.
Called to store a user-created blob.
blob
- the blobIOException
Copyright © 2018 Nuxeo. All rights reserved.