public interface RenditionService
Modifier and Type | Method and Description |
---|---|
void |
deleteStoredRenditions(String repositoryName)
Query and delete stored renditions where the related version or live document does not exist anymore.
|
RenditionDefinition |
getAvailableRenditionDefinition(DocumentModel doc,
String renditionName)
Returns the
RenditionDefinition available on the given document for the given rendition definition name. |
List<RenditionDefinition> |
getAvailableRenditionDefinitions(DocumentModel doc)
Returns a
List of RenditionDefinition available on the given Document. |
List<Rendition> |
getAvailableRenditions(DocumentModel doc)
Returns a
List of Rendition available on the given Document. |
List<Rendition> |
getAvailableRenditions(DocumentModel doc,
boolean onlyVisible)
Returns a
List of Rendition available on the given Document. |
List<RenditionDefinition> |
getDeclaredRenditionDefinitions()
Deprecated.
since 7.2 because unused
|
List<RenditionDefinition> |
getDeclaredRenditionDefinitionsForProviderType(String providerType)
Deprecated.
since 7.2 because unused
|
Rendition |
getDefaultRendition(DocumentModel doc,
String reason,
boolean store,
Map<String,Serializable> extendedInfos)
Return the default
Rendition object for the given DocumentModel . |
Rendition |
getDefaultRendition(DocumentModel doc,
String reason,
Map<String,Serializable> extendedInfos)
Same as
getDefaultRendition(DocumentModel, String, boolean, Map) with store parameter set to false. |
Rendition |
getRendition(DocumentModel doc,
String renditionName)
Return the
Rendition object for the given DocumentModel and a rendition definition name. |
Rendition |
getRendition(DocumentModel doc,
String renditionName,
boolean store)
Return the
Rendition object for the given DocumentModel and a rendition definition name. |
DocumentModel |
publishRendition(DocumentModel doc,
DocumentModel target,
String renditionName,
boolean override)
Publish a document's rendition.
|
DocumentRef |
storeRendition(DocumentModel sourceDocument,
String renditionDefinitionName)
Render a document based on the given rendition definition name and returns the stored Rendition
DocumentRef . |
@Deprecated List<RenditionDefinition> getDeclaredRenditionDefinitions()
List
of registered RenditionDefinition
. The order of the List does not depend on the
registering order.@Deprecated List<RenditionDefinition> getDeclaredRenditionDefinitionsForProviderType(String providerType)
List
of registered RenditionDefinition
matching a given provider typeList<RenditionDefinition> getAvailableRenditionDefinitions(DocumentModel doc)
List
of RenditionDefinition
available on the given Document. The order of the List does
not depend on the registering order.RenditionDefinition getAvailableRenditionDefinition(DocumentModel doc, String renditionName)
RenditionDefinition
available on the given document for the given rendition definition name.DocumentRef storeRendition(DocumentModel sourceDocument, String renditionDefinitionName)
DocumentRef
.
Only the user launching the render operation has the Read right on the returned document.
sourceDocument
- the document to renderrenditionDefinitionName
- the rendition definition to useDocumentRef
of the newly created Rendition document.Rendition getRendition(DocumentModel doc, String renditionName)
Rendition
object for the given DocumentModel
and a rendition definition name.
A stored rendition is returned if found and up to date, a new Rendition is created otherwise.
doc
- the document to renderrenditionName
- the name of the rendition definitionRendition
objectRendition getDefaultRendition(DocumentModel doc, String reason, Map<String,Serializable> extendedInfos)
getDefaultRendition(DocumentModel, String, boolean, Map)
with store parameter set to false.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)Rendition
objectRendition getDefaultRendition(DocumentModel doc, String reason, boolean store, Map<String,Serializable> extendedInfos)
Rendition
object for the given DocumentModel
.
A stored rendition is returned if found and up to date, a new Rendition is created otherwise.
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)Rendition
objectRendition getRendition(DocumentModel doc, String renditionName, boolean store)
Rendition
object for the given DocumentModel
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.
doc
- the document to renderrenditionName
- the name of the rendition definitionstore
- indicates if the rendition must be storedRendition
objectList<Rendition> getAvailableRenditions(DocumentModel doc)
List
of Rendition
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
List<Rendition> getAvailableRenditions(DocumentModel doc, boolean onlyVisible)
List
of Rendition
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
void deleteStoredRenditions(String repositoryName)
DocumentModel publishRendition(DocumentModel doc, DocumentModel target, String renditionName, boolean override)
getDefaultRendition(DocumentModel, String, Map)
.doc
- the document to be publishedtarget
- the location where to publishrenditionName
- the rendition to be publishedoverride
- if true, will remove existing publication of the documentCopyright © 2019 Nuxeo. All rights reserved.