Class DocumentEngine

java.lang.Object
com.aquima.interactions.portal.model.session.DocumentEngine
All Implemented Interfaces:
IDocumentEngine

public class DocumentEngine extends Object implements IDocumentEngine
Document engine to be used in the portal engine.
Since:
6.0
Author:
Jon van Leuven, F. van der Meer
  • Constructor Details

    • DocumentEngine

      public DocumentEngine(IInternalPortalContext portalContext, IComposer composer)
      Construct a document engine. Note that since 8.4 this constructs a DocumentEngine that uses the current instance context. When no instance context is needed use the withNoActiveInstances() method. (see AQR-2102)
      Parameters:
      portalContext - Current portal context.
      composer - The composer containing the various content definitions.
    • DocumentEngine

      protected DocumentEngine(IInternalPortalContext portalContext, IMaskFactory maskFactory, IRendererFactory rendererFactory, IResourceManager resourceManager, IComposer composer)
  • Method Details

    • withActiveInstance

      public IDocumentEngine withActiveInstance(IEntityInstance instance)
      Description copied from interface: IDocumentEngine
      This method constructs a new document composer with the desired instance defined as an active instance. The returned composer can then be used to construct documents with a specific active-instance.
      Specified by:
      withActiveInstance in interface IDocumentEngine
      Parameters:
      instance - The mandatory instance which should be active within the returned document composer.
      Returns:
      A new document composer with instance context which is never null.
    • withNoActiveInstances

      public IDocumentEngine withNoActiveInstances()
      Description copied from interface: IDocumentEngine
      This method constructs a new document composer with no active instances.
      Specified by:
      withNoActiveInstances in interface IDocumentEngine
      Returns:
      A new document composer with no instance context which is never null.
    • renderDocument

      public IRenderedDocument renderDocument(String documentName, OutputFormat format, ILanguage language)
      Description copied from interface: IDocumentEngine
      Compose and render a specific document to a binary document.
      Specified by:
      renderDocument in interface IDocumentEngine
      Parameters:
      documentName - The name of the document to generate
      format - The output format of the resulting document
      language - The language used during composition and rendering.
      Returns:
      The resulting document
    • renderElement

      public IRenderedDocument[] renderElement(ICompositeElement element, OutputFormat[] formats, ILanguage language)
      Description copied from interface: IDocumentEngine
      Render a composite element to a binary documents for one or more output formats.
      Specified by:
      renderElement in interface IDocumentEngine
      Parameters:
      element - The composite element to generate
      formats - The output format(s) of the resulting document, should at least contain one output format.
      language - The language used during composition and rendering.
      Returns:
      The resulting documents
    • getSupportedFormats

      public OutputFormat[] getSupportedFormats()
      Description copied from interface: IDocumentEngine
      This method returns all the output formats that are supported by the current document engine.
      Specified by:
      getSupportedFormats in interface IDocumentEngine
      Returns:
      The supported formats, never null