Class AutomationRenderer

java.lang.Object
org.nuxeo.ecm.platform.rendition.extension.AutomationRenderer

public class AutomationRenderer extends Object
Class introduced to share code between sync and lazy automation based renditions
Since:
7.2
Author:
Tiry
  • 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 given RenditionDefinition. Return is a List of Blob for bigger flexibility (typically HTML rendition with resources)
      Parameters:
      doc - the target DocumentModel
      definition - the RenditionDefinition to use
      session - the CoreSession 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 use
      mimeType - the mimeType from which the assigned extension is derived
      defaultExtension - the default extension to be assigned if the mimeType has no corresponding extension
      Returns:
      the filename with the revised extension
      Since:
      7.4