public class RenditionCreator extends UnrestrictedSessionRunner
Modifier and Type | Field and 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 |
isUnrestricted, originatingUsername, repositoryName, session, sessionIsAlreadyUnrestricted
Constructor and Description |
---|
RenditionCreator(DocumentModel liveDocument,
DocumentModel versionDocument,
Blob renditionBlob,
RenditionDefinition renditionDefinition) |
Modifier and Type | Method and Description |
---|---|
protected DocumentModel |
createRenditionDocument(DocumentModel sourceDocument) |
DocumentModel |
getDetachedDendition()
Deprecated.
since 7.10, misspelled, use
getDetachedRendition() instead. |
DocumentModel |
getDetachedRendition() |
protected String |
getSourceDocumentModificationDatePropertyName() |
protected void |
removeBlobs(DocumentModel rendition) |
void |
run()
This method will be called by
UnrestrictedSessionRunner.runUnrestricted() with UnrestrictedSessionRunner.session available as an unrestricted
session. |
protected void |
setCorrectVersion(DocumentModel rendition,
DocumentModel versionDocument) |
protected void |
updateMainBlob(DocumentModel rendition) |
getOriginatingUsername, isUnrestricted, runUnrestricted, setOriginatingUsername
public static final String FILE
protected DocumentModel detachedRendition
protected String liveDocumentId
protected String versionDocumentId
protected Blob renditionBlob
protected String renditionName
protected RenditionDefinition renditionDefinition
protected final String renditionVariant
public RenditionCreator(DocumentModel liveDocument, DocumentModel versionDocument, Blob renditionBlob, RenditionDefinition renditionDefinition)
public DocumentModel getDetachedRendition()
@Deprecated public DocumentModel getDetachedDendition()
getDetachedRendition()
instead.public void run()
UnrestrictedSessionRunner
UnrestrictedSessionRunner.runUnrestricted()
with UnrestrictedSessionRunner.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)
.
run
in class UnrestrictedSessionRunner
protected DocumentModel createRenditionDocument(DocumentModel sourceDocument)
protected void removeBlobs(DocumentModel rendition)
protected void updateMainBlob(DocumentModel rendition)
protected void setCorrectVersion(DocumentModel rendition, DocumentModel versionDocument)
protected String getSourceDocumentModificationDatePropertyName()
Copyright © 2016 Nuxeo SA. All rights reserved.