Package com.aquima.interactions.composer
Interface IComposer
- All Known Implementing Classes:
Composer
public interface IComposer
This object holds the information on all existing pages/containers/buttons/documents etc. within the system.
This class is not serializable.
Note: pre 7.0 this functionality was accessible via the IPageComposer and IDocumentEngine
- Since:
- 7.0
- Author:
- O. Kerpershoek, Jon van Leuven
-
Method Summary
Modifier and TypeMethodDescriptioncomposeDocument
(IComposerHandler handler, InferenceContext context, String documentName) Composes a document model which can be transformed to other formats at a later stage.composeElement
(IComposerHandler handler, InferenceContext context, String elementName) composePage
(IComposerHandler handler, InferenceContext context, String pageName) This method will expand the page with the specified name, and add all the values and messages to the expanded page.composeText
(InferenceContext context, String textName) Element[]
expandReference
(IComposerHandler handler, IComposerContext context, AbstractReference reference) This method will expand the elements referenced by the abstract reference.Element[]
expandReference
(IComposerHandler handler, InferenceContext context, AbstractReference reference) This method will expand the elements referenced by the abstract reference.Looks up the text definition (also called an asset) for the specified name and returns the definition model.Looks up the button definition for the specified name and returns the definition model.getContainer
(String name) looks up the text definition for the specified name and returns the definition model.getContent
(String name) Looks up the content definition for the specified name and returns the definition model.getDocument
(String name) looks up the document definition for the specified name and returns the definition model.String[]
getElementNames
(ElementType type) This method returns all the available names for a specified type.Looks up the field definition for the specified entity name and attribute name and returns the definition model.looks up the image definition for the specified name and returns the definition model.Looks up the page definition for the specified name and returns the definition model.Looks up the text definition for the specified name and returns the definition model.
-
Method Details
-
composePage
IPage composePage(IComposerHandler handler, InferenceContext context, String pageName) throws AppException This method will expand the page with the specified name, and add all the values and messages to the expanded page.- Parameters:
handler
- The page handler that should be used.context
- The context that should be used during expansion.pageName
- The name of the page that should be composed.- Returns:
- Full page model containing values and messages for all the fields on the page.
- Throws:
AppException
- This exception is thrown when the page could not be expanded.
-
composeDocument
IDocument composeDocument(IComposerHandler handler, InferenceContext context, String documentName) throws AppException Composes a document model which can be transformed to other formats at a later stage.- Parameters:
handler
- The handler that should be used to evaluate context specific information.context
- The context that should be used to generate the document with.documentName
- The name of the document that should be composed.- Returns:
- The composed document, should never be null.
- Throws:
AppException
- This exception is thrown when the document could not be expanded.
-
composeElement
Element composeElement(IComposerHandler handler, InferenceContext context, String elementName) throws AppException - Throws:
AppException
-
composeText
- Throws:
AppException
-
expandReference
Element[] expandReference(IComposerHandler handler, InferenceContext context, AbstractReference reference) throws AppException This method will expand the elements referenced by the abstract reference.- Parameters:
handler
- The page handler that should be used.context
- The context that should be used during expansion.reference
- The reference to the elements that should be expanded.- Returns:
- The expanded elements, never null
- Throws:
AppException
- This exception is thrown when the element could not be expanded.
-
expandReference
Element[] expandReference(IComposerHandler handler, IComposerContext context, AbstractReference reference) throws AppException This method will expand the elements referenced by the abstract reference.- Parameters:
handler
- The page handler that should be used.context
- The context that should be used during expansion.reference
- The reference to the elements that should be expanded.- Returns:
- The expanded elements, never null
- Throws:
AppException
- This exception is thrown when the element could not be expanded.
-
getPage
Looks up the page definition for the specified name and returns the definition model.- Parameters:
name
- The name of the page as defined in studio.- Returns:
- A page definition model which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the name.
-
getContainer
looks up the text definition for the specified name and returns the definition model.- Parameters:
name
- The name of the container as defined in studio.- Returns:
- A container definition model which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the name.
-
getDocument
looks up the document definition for the specified name and returns the definition model.- Parameters:
name
- The name of the document as defined in studio.- Returns:
- A document definition model which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the name.
-
getImage
looks up the image definition for the specified name and returns the definition model.- Parameters:
name
- The name of the image as defined in studio.- Returns:
- An image definition model which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the name.
-
getButton
Looks up the button definition for the specified name and returns the definition model.- Parameters:
name
- The name of the button as defined in studio.- Returns:
- A button definition model which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the name.
-
getField
Looks up the field definition for the specified entity name and attribute name and returns the definition model.- Parameters:
name
- The full attribute name (entity.attribute) of the field requested.- Returns:
- A field definition model which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the name.
-
getAsset
Looks up the text definition (also called an asset) for the specified name and returns the definition model.- Parameters:
name
- The name of the text as defined in studio.- Returns:
- A text definition model which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the name.
-
getText
Looks up the text definition for the specified name and returns the definition model.- Parameters:
name
- The name of the text as defined in studio.- Returns:
- A text definition model which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the name.
-
getContent
Looks up the content definition for the specified name and returns the definition model.- Parameters:
name
- The name of the content as defined in studio.- Returns:
- A content definition model which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the name.
-
getElementNames
This method returns all the available names for a specified type.- Parameters:
type
- The element type, may not be null.- Returns:
- The element names, never null.
-