Class AutomationRenderer
java.lang.Object
org.nuxeo.ecm.platform.rendition.extension.AutomationRenderer
Class introduced to share code between sync and lazy automation based renditions
- Since:
- 7.2
- Author:
- Tiry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getFilenameWithExtension
(String filename, String mimeType, String defaultExtension) Generate a revised filename whose extension is either based on the supplied mimeType if applicable or the supplied default extension.render
(DocumentModel doc, RenditionDefinition definition, CoreSession session) Generate the rendition Blobs for a givenRenditionDefinition
.
-
Constructor Details
-
AutomationRenderer
public AutomationRenderer()
-
-
Method Details
-
render
public static List<Blob> render(DocumentModel doc, RenditionDefinition definition, CoreSession session) Generate the rendition Blobs for a givenRenditionDefinition
. Return is a List of Blob for bigger flexibility (typically HTML rendition with resources)- Parameters:
doc
- the targetDocumentModel
definition
- theRenditionDefinition
to usesession
- theCoreSession
to use- Returns:
- The list of Blobs
-
getFilenameWithExtension
public static String getFilenameWithExtension(String filename, String mimeType, String defaultExtension) Generate a revised filename whose extension is either based on the supplied mimeType if applicable or the supplied default extension.- Parameters:
filename
- the filename to usemimeType
- the mimeType from which the assigned extension is deriveddefaultExtension
- the default extension to be assigned if the mimeType has no corresponding extension- Returns:
- the filename with the revised extension
- Since:
- 7.4
-