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.
|
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()
Returns a
List of registered RenditionDefinition . |
List<RenditionDefinition> |
getDeclaredRenditionDefinitionsForProviderType(String providerType)
Returns a
List of registered RenditionDefinition matching a given provider type |
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. |
DocumentRef |
storeRendition(DocumentModel sourceDocument,
String renditionDefinitionName)
Render a document based on the given rendition definition name and returns the stored Rendition
DocumentRef . |
List<RenditionDefinition> getDeclaredRenditionDefinitions()
List
of registered RenditionDefinition
. The order of the List does not depend on the
registering order.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.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 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 otherwise.
If store parameter is true, the new created rendition is stored too and returned
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)
Copyright © 2016 Nuxeo SA. All rights reserved.