Class DocumentEngine
java.lang.Object
com.aquima.interactions.portal.model.session.DocumentEngine
- All Implemented Interfaces:
IDocumentEngine
Document engine to be used in the portal engine.
- Since:
- 6.0
- Author:
- Jon van Leuven, F. van der Meer
-
Constructor Summary
ModifierConstructorDescriptionDocumentEngine
(IInternalPortalContext portalContext, IComposer composer) Construct a document engine.protected
DocumentEngine
(IInternalPortalContext portalContext, IMaskFactory maskFactory, IRendererFactory rendererFactory, IResourceManager resourceManager, IComposer composer) -
Method Summary
Modifier and TypeMethodDescriptionThis method returns all the output formats that are supported by the current document engine.renderDocument
(String documentName, OutputFormat format, ILanguage language) Compose and render a specific document to a binary document.renderElement
(ICompositeElement element, OutputFormat[] formats, ILanguage language) Render a composite element to a binary documents for one or more output formats.withActiveInstance
(IEntityInstance instance) This method constructs a new document composer with the desired instance defined as an active instance.This method constructs a new document composer with no active instances.
-
Constructor Details
-
DocumentEngine
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
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 interfaceIDocumentEngine
- 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
Description copied from interface:IDocumentEngine
This method constructs a new document composer with no active instances.- Specified by:
withNoActiveInstances
in interfaceIDocumentEngine
- 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 interfaceIDocumentEngine
- Parameters:
documentName
- The name of the document to generateformat
- The output format of the resulting documentlanguage
- 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 interfaceIDocumentEngine
- Parameters:
element
- The composite element to generateformats
- 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
Description copied from interface:IDocumentEngine
This method returns all the output formats that are supported by the current document engine.- Specified by:
getSupportedFormats
in interfaceIDocumentEngine
- Returns:
- The supported formats, never null
-