public interface BlobManager
Blob
s, through internally-registered BlobProvider
s.Modifier and Type | Interface and Description |
---|---|
static class |
BlobManager.BlobInfo
Class describing information from a
Blob , suitable for serialization and storage. |
static class |
BlobManager.UsageHint
Hints for returning
URI s appropriate for the expected usage. |
Modifier and Type | Method and Description |
---|---|
void |
freezeVersion(Document doc)
Freezes the blobs' versions on a document version when it is created via a check in.
|
Map<String,URI> |
getAvailableConversions(Blob blob,
BlobManager.UsageHint hint)
Gets a map of available MIME type conversions and corresponding
URI for a blob. |
BlobProvider |
getBlobProvider(String id)
Gets the blob provider with the given id.
|
Map<String,BlobProvider> |
getBlobProviders()
Get the map of blob providers
|
InputStream |
getConvertedStream(Blob blob,
String mimeType)
Gets an
InputStream for a conversion to the given MIME type. |
InputStream |
getStream(Blob blob)
INTERNAL - Gets an
InputStream for the data of a managed blob. |
InputStream |
getThumbnail(Blob blob)
Gets an
InputStream for a thumbnail of a blob. |
URI |
getURI(Blob blob,
BlobManager.UsageHint hint)
Gets an
URI for the content of a blob. |
void |
notifyChanges(Document doc,
Set<String> xpaths)
Notifies the blob manager that a set of xpaths have changed on a document.
|
Blob |
readBlob(BlobManager.BlobInfo blobInfo,
String repositoryName)
Reads a
Blob from storage. |
String |
writeBlob(Blob blob,
Document doc)
Writes a
Blob to storage and returns its key. |
BlobProvider getBlobProvider(String id)
id
- the blob provider idBlob readBlob(BlobManager.BlobInfo blobInfo, String repositoryName) throws IOException
Blob
from storage.blobInfo
- the blob informationrepositoryName
- the repository to which this blob belongsIOException
String writeBlob(Blob blob, Document doc) throws IOException
Blob
to storage and returns its key.blob
- the blobdoc
- the document to which this blob belongsIOException
InputStream getStream(Blob blob) throws IOException
InputStream
for the data of a managed blob. Used by internal implementations, regular
callers should call Blob.getStream()
.blob
- the blobIOException
InputStream getThumbnail(Blob blob) throws IOException
InputStream
for a thumbnail of a blob.
Like all InputStream
, the result must be closed when done with it to avoid resource leaks.
blob
- the blobIOException
URI getURI(Blob blob, BlobManager.UsageHint hint) throws IOException
URI
for the content of a blob.blob
- the blobhint
- BlobManager.UsageHint
URI
, or null
if none availableIOException
Map<String,URI> getAvailableConversions(Blob blob, BlobManager.UsageHint hint) throws IOException
URI
for a blob.URI
, which may be emptyIOException
InputStream getConvertedStream(Blob blob, String mimeType) throws IOException
InputStream
for a conversion to the given MIME type.
Like all InputStream
, the result must be closed when done with it to avoid resource leaks.
blob
- the blobmimeType
- the MIME type to convert tonull
if no conversion is available for the given MIME typeIOException
Map<String,BlobProvider> getBlobProviders()
void freezeVersion(Document doc) throws DocumentException
doc
- the new document versionDocumentException
Copyright © 2015 Nuxeo SA. All rights reserved.