Class DefaultStoredRenditionManager
java.lang.Object
org.nuxeo.ecm.platform.rendition.service.DefaultStoredRenditionManager
- All Implemented Interfaces:
StoredRenditionManager
The default @{link StoredRenditionManager} to Manage
StoredRendition
s on behalf of the
RenditionService
.- Since:
- 8.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateStoredRendition
(DocumentModel liveDocument, DocumentModel versionDocument, Blob renditionBlob, RenditionDefinition renditionDefinition) Creates aStoredRendition
for the live document or the version document if provided.findStoredRendition
(DocumentModel sourceDocument, RenditionDefinition renditionDefinition) Finds theStoredRendition
associated with aDocumentModel
.protected StoredRendition
toStoredRendition
(DocumentModel storedDoc, RenditionDefinition def, CoreSession coreSession) Wraps the re-attached stored document in aStoredRendition
.
-
Constructor Details
-
DefaultStoredRenditionManager
public DefaultStoredRenditionManager()
-
-
Method Details
-
createStoredRendition
public StoredRendition createStoredRendition(DocumentModel liveDocument, DocumentModel versionDocument, Blob renditionBlob, RenditionDefinition renditionDefinition) Description copied from interface:StoredRenditionManager
Creates aStoredRendition
for the live document or the version document if provided.- Specified by:
createStoredRendition
in interfaceStoredRenditionManager
- Parameters:
liveDocument
- the live documentversionDocument
- the version documentrenditionBlob
- the rendition blobrenditionDefinition
- the rendition definition- Returns:
- the created stored rendition
-
findStoredRendition
public StoredRendition findStoredRendition(DocumentModel sourceDocument, RenditionDefinition renditionDefinition) Description copied from interface:StoredRenditionManager
Finds theStoredRendition
associated with aDocumentModel
.- Specified by:
findStoredRendition
in interfaceStoredRenditionManager
- Parameters:
sourceDocument
- the source documentrenditionDefinition
- the rendition definition- Returns:
- the found stored rendition, or
null
if not found
-
toStoredRendition
protected StoredRendition toStoredRendition(DocumentModel storedDoc, RenditionDefinition def, CoreSession coreSession) Wraps the re-attached stored document in aStoredRendition
.- Parameters:
storedDoc
- the stored documentdef
- the rendition definitioncoreSession
- the session- Returns:
- the stored rendition
-