Class RenditionCreator
- java.lang.Object
-
- org.nuxeo.ecm.core.api.UnrestrictedSessionRunner
-
- org.nuxeo.ecm.platform.rendition.service.RenditionCreator
-
public class RenditionCreator extends UnrestrictedSessionRunner
- Author:
- Thomas Roger
-
-
Field Summary
Fields Modifier and Type Field Description protected DocumentModel
detachedRendition
static String
FILE
protected String
liveDocumentId
protected Blob
renditionBlob
protected RenditionDefinition
renditionDefinition
protected String
renditionName
protected String
renditionVariant
protected String
versionDocumentId
-
Fields inherited from class org.nuxeo.ecm.core.api.UnrestrictedSessionRunner
isUnrestricted, originatingUsername, repositoryName, session, sessionIsAlreadyUnrestricted
-
-
Constructor Summary
Constructors Constructor Description RenditionCreator(DocumentModel liveDocument, DocumentModel versionDocument, Blob renditionBlob, RenditionDefinition renditionDefinition)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected DocumentModel
createRenditionDocument(DocumentModel sourceDocument)
DocumentModel
getDetachedDendition()
Deprecated.since 7.10, misspelled, usegetDetachedRendition()
instead.DocumentModel
getDetachedRendition()
protected String
getSourceDocumentModificationDatePropertyName()
protected void
removeBlobs(DocumentModel rendition)
void
run()
This method will be called byUnrestrictedSessionRunner.runUnrestricted()
withUnrestrictedSessionRunner.session
available as an unrestricted session.protected void
setCorrectVersion(DocumentModel rendition, DocumentModel versionDocument)
protected void
updateMainBlob(DocumentModel rendition)
-
Methods inherited from class org.nuxeo.ecm.core.api.UnrestrictedSessionRunner
checkUnrestricted, getOriginatingUsername, runUnrestricted, setOriginatingUsername
-
-
-
-
Field Detail
-
FILE
public static final String FILE
- See Also:
- Constant Field Values
-
detachedRendition
protected DocumentModel detachedRendition
-
liveDocumentId
protected String liveDocumentId
-
versionDocumentId
protected String versionDocumentId
-
renditionBlob
protected Blob renditionBlob
-
renditionName
protected String renditionName
-
renditionDefinition
protected RenditionDefinition renditionDefinition
- Since:
- 8.1
-
renditionVariant
protected final String renditionVariant
- Since:
- 8.1
-
-
Constructor Detail
-
RenditionCreator
public RenditionCreator(DocumentModel liveDocument, DocumentModel versionDocument, Blob renditionBlob, RenditionDefinition renditionDefinition)
- Since:
- 8.1
-
-
Method Detail
-
getDetachedRendition
public DocumentModel getDetachedRendition()
-
getDetachedDendition
@Deprecated public DocumentModel getDetachedDendition()
Deprecated.since 7.10, misspelled, usegetDetachedRendition()
instead.
-
run
public void run()
Description copied from class:UnrestrictedSessionRunner
This method will be called byUnrestrictedSessionRunner.runUnrestricted()
withUnrestrictedSessionRunner.session
available as an unrestricted session.It can also be called directly in which case the
UnrestrictedSessionRunner.session
available will be the one passed to#UnrestrictedSessionRunner(CoreSession)
.- Specified by:
run
in classUnrestrictedSessionRunner
-
createRenditionDocument
protected DocumentModel createRenditionDocument(DocumentModel sourceDocument)
-
removeBlobs
protected void removeBlobs(DocumentModel rendition)
-
updateMainBlob
protected void updateMainBlob(DocumentModel rendition)
-
setCorrectVersion
protected void setCorrectVersion(DocumentModel rendition, DocumentModel versionDocument)
-
getSourceDocumentModificationDatePropertyName
protected String getSourceDocumentModificationDatePropertyName()
-
-