Interface RenditionService
- All Known Implementing Classes:
RenditionServiceImpl
- Since:
- 5.4.1
- Author:
- Thomas Roger, Tiry
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteStoredRenditions
(String repositoryName) Query and delete stored renditions where the related version or live document does not exist anymore.getAvailableRenditionDefinition
(DocumentModel doc, String renditionName) Returns theRenditionDefinition
available on the given document for the given rendition definition name.Returns aList
ofRenditionDefinition
available on the given Document.Returns aList
ofRendition
available on the given Document.getAvailableRenditions
(DocumentModel doc, boolean onlyVisible) Returns aList
ofRendition
available on the given Document.Returns aList
of registeredRenditionDefinition
.getDefaultRendition
(DocumentModel doc, String reason, boolean store, Map<String, Serializable> extendedInfos) Return the defaultRendition
object for the givenDocumentModel
.getDefaultRendition
(DocumentModel doc, String reason, Map<String, Serializable> extendedInfos) Same asgetDefaultRendition(DocumentModel, String, boolean, Map)
with store parameter set to false.getRendition
(DocumentModel doc, String renditionName) Return theRendition
object for the givenDocumentModel
and a rendition definition name.getRendition
(DocumentModel doc, String renditionName, boolean store) Return theRendition
object for the givenDocumentModel
and a rendition definition name.publishRendition
(DocumentModel doc, DocumentModel target, String renditionName, boolean override) Publish a document's rendition.storeRendition
(DocumentModel sourceDocument, String renditionDefinitionName) Render a document based on the given rendition definition name and returns the stored RenditionDocumentRef
.
-
Method Details
-
getDeclaredRenditionDefinitions
List<RenditionDefinition> getDeclaredRenditionDefinitions()Returns aList
of registeredRenditionDefinition
. The order of the List does not depend on the registering order. -
getAvailableRenditionDefinitions
Returns aList
ofRenditionDefinition
available on the given Document. The order of the List does not depend on the registering order. -
getAvailableRenditionDefinition
Returns theRenditionDefinition
available on the given document for the given rendition definition name.- Since:
- 10.10
-
storeRendition
Render a document based on the given rendition definition name and returns the stored RenditionDocumentRef
.Only the user launching the render operation has the Read right on the returned document.
- Parameters:
sourceDocument
- the document to renderrenditionDefinitionName
- the rendition definition to use- Returns:
- the
DocumentRef
of the newly created Rendition document.
-
getRendition
Return theRendition
object for the givenDocumentModel
and a rendition definition name.A stored rendition is returned if found and up to date, a new Rendition is created otherwise.
- Parameters:
doc
- the document to renderrenditionName
- the name of the rendition definition- Returns:
- the
Rendition
object
-
getDefaultRendition
Rendition getDefaultRendition(DocumentModel doc, String reason, Map<String, Serializable> extendedInfos) Same asgetDefaultRendition(DocumentModel, String, boolean, Map)
with store parameter set to false.- Parameters:
doc
- the document to renderreason
- the reason the rendition is being rendered (optional)extendedInfos
- map of extended info added in the default rendition computation (optional)- Returns:
- the default
Rendition
object - Since:
- 9.10
-
getDefaultRendition
Rendition getDefaultRendition(DocumentModel doc, String reason, boolean store, Map<String, Serializable> extendedInfos) Return the defaultRendition
object for the givenDocumentModel
.A stored rendition is returned if found and up to date, a new Rendition is created otherwise.
- Parameters:
doc
- the document to renderreason
- the reason the rendition is being rendered (optional)store
- indicates if the rendition must be storedextendedInfos
- map of extended info added in the default rendition computation (optional)- Returns:
- the default
Rendition
object - Since:
- 10.3
-
getRendition
Return theRendition
object for the givenDocumentModel
and a rendition definition name.A stored rendition is returned if found and up to date, a new (live) Rendition is created and returned otherwise.
If store parameter is true, the new created rendition is stored too unless it is marked as stale.
- Parameters:
doc
- the document to renderrenditionName
- the name of the rendition definitionstore
- indicates if the rendition must be stored- Returns:
- the
Rendition
object
-
getAvailableRenditions
Returns aList
ofRendition
available on the given Document.The order of the List does not depend on the registering order.
The returned rendition may be live or stored
-
getAvailableRenditions
Returns aList
ofRendition
available on the given Document.If
onlyVisible
is true, returns only the rendition marked as visible.The order of the List does not depend on the registering order.
The returned rendition may be live or stored
- Since:
- 7.2
-
deleteStoredRenditions
Query and delete stored renditions where the related version or live document does not exist anymore.- Since:
- 8.4
-
publishRendition
DocumentModel publishRendition(DocumentModel doc, DocumentModel target, String renditionName, boolean override) Publish a document's rendition. If the rendition name is not given, it publishes its default rendition obtained fromgetDefaultRendition(DocumentModel, String, Map)
.- Parameters:
doc
- the document to be publishedtarget
- the location where to publishrenditionName
- the rendition to be publishedoverride
- if true, will remove existing publication of the document- Returns:
- the published document
- Since:
- 10.3
-