public interface DocumentBlobManager
| 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. 
 | 
InputStream | 
getConvertedStream(Blob blob,
                  String mimeType,
                  DocumentModel doc)
Gets an  
InputStream for a conversion to the given MIME type. | 
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(BlobInfo blobInfo,
        String repositoryName)
Reads a  
Blob from storage. | 
String | 
writeBlob(Blob blob,
         Document doc,
         String xpath)
Writes a  
Blob to storage and returns its key. | 
Blob readBlob(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, String xpath) throws IOException
Blob to storage and returns its key.blob - the blobdoc - the document to which this blob belongsxpath - the xpath of blob in docIOExceptionInputStream 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 typeIOExceptionvoid 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 © 2019 Nuxeo. All rights reserved.