public interface BlobManager
Blobs, through internally-registered BlobProviders.| 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
URIs 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.
|
BinaryManagerStatus |
garbageCollectBinaries(boolean delete)
Garbage collect the unused binaries.
|
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(Blob blob)
Gets the blob provider for the given 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,
DocumentModel doc)
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,
javax.servlet.http.HttpServletRequest servletRequest)
Gets an
URI for the content of a blob. |
boolean |
isBinariesGarbageCollectionInProgress()
Checks if a garbage collection of the binaries in progress.
|
void |
markReferencedBinary(String key,
String repositoryName)
INTERNAL.
|
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 idBlobProvider getBlobProvider(Blob blob)
Blob readBlob(BlobManager.BlobInfo blobInfo, String repositoryName) throws IOException
Blob from storage.blobInfo - the blob informationrepositoryName - the repository to which this blob belongsIOExceptionString writeBlob(Blob blob, Document doc) throws IOException
Blob to storage and returns its key.blob - the blobdoc - the document to which this blob belongsIOExceptionInputStream 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 blobIOExceptionInputStream 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 blobIOExceptionURI getURI(Blob blob, BlobManager.UsageHint hint, javax.servlet.http.HttpServletRequest servletRequest) throws IOException
URI for the content of a blob.blob - the blobhint - BlobManager.UsageHintservletRequest - the servlet request, or nullURI, or null if none availableIOExceptionMap<String,URI> getAvailableConversions(Blob blob, BlobManager.UsageHint hint) throws IOException
URI for a blob.URI, which may be emptyIOExceptionInputStream getConvertedStream(Blob blob, String mimeType, DocumentModel doc) 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 todoc - the document that holds the blobnull if no conversion is available for the given MIME typeIOExceptionMap<String,BlobProvider> getBlobProviders()
void freezeVersion(Document doc)
doc - the new document versionvoid notifyChanges(Document doc, Set<String> xpaths)
doc - the documentxpaths - the set of changed xpathsBinaryManagerStatus garbageCollectBinaries(boolean delete)
delete - if false don't actually delete the garbage collected binaries (but still return statistics
about them), if true delete themboolean isBinariesGarbageCollectionInProgress()
true if a garbage collection of the binaries is in progressvoid markReferencedBinary(String key, String repositoryName)
garbageCollectBinaries(boolean).key - the binary keyrepositoryName - the repository nameCopyright © 2016 Nuxeo SA. All rights reserved.