Package com.aquima.interactions.portal
Interface IElementComposer
- All Known Implementing Classes:
ElementComposer
public interface IElementComposer
This factory knows how to create elements which are usable on the page during expand calls.
This object will take into account contexts regarding active instances for rendering (expanding) the elements.
- Since:
- 5.1
- Author:
- O. Kerpershoek, F. van der Meer
-
Method Summary
Modifier and TypeMethodDescriptionexpandAsset
(String assetName, String assetFormat) looks up a text (asset) for the specified name and returns the expanded content.expandButton
(String name) looks up a button with the specified name in the definition model and returns the expanded content.Element[]
expandChildren
(ContainerDefinition definition) This method will expand all the child elements of the container definition.expandContainer
(String name) looks up a container with the specified name in the definition model and returns the expanded content.expandContent
(String name) This method will expand a content using the current context.expandDocument
(String name) This method will expand an entire document using the current context.expandField
(String entityName, String attributeName) looks up a field with for the specified attribute and returns the expanded content.expandImage
(String imageName) looks up an image for the specified name and returns the expanded content.expandPage
(String name) This method will expand an entire page using the current context.Element[]
expandReference
(AbstractReference reference) This method will expand the elements indicated by the reference.expandText
(String name) This method will expand a text using the current context.forInstance
(IEntityInstance instance) This method returns a new element composer in which the specified instance is active.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 container 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.getDynamicContainer
(String name) Looks up the dynamic container 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
-
forInstance
This method returns a new element composer in which the specified instance is active.Note: Although the instance will be active in the new element composer, certain elements created by the composer may also need the instance to be active on the page. Usually the elements generated by a composer having an active instance will be put on the page in a container activating the same instance.
Use the setEntityContext method of a container to activate the instance in the page.- Parameters:
instance
- The instance that should be active in the new composer.- Returns:
- An element composer in which the provided instance is active.
- Throws:
AppException
- This exception is thrown when the instance could not be activated.- See Also:
-
expandReference
This method will expand the elements indicated by the reference. The context information contained in the reference, like the read-only condition, will also be applied to the expanded element.
This method can return multiple elements, due to the support for a repeat expression on a reference.
- Parameters:
reference
- The reference to the element that should be expanded.- Returns:
- The expanded elements indicated by the reference.
- Throws:
AppException
- This exception is thrown when the element could not be expanded.
-
expandChildren
This method will expand all the child elements of the container definition. The method is equivalent to calling the expandReference for each containment of the container definition.- Parameters:
definition
- The container definition whose references should be expanded.- Returns:
- Array containing the expanded child elements of the container.
- Throws:
AppException
- This exception is thrown when the child elements could not be expanded.
-
expandPage
This method will expand an entire page using the current context.- Parameters:
name
- The name of the page that should be expanded.- Returns:
- The expanded page.
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the specified name.AppException
- This exception is thrown when the element could not be created.
-
expandDocument
This method will expand an entire document using the current context.- Parameters:
name
- The name of the document that should be expanded.- Returns:
- The expanded document.
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the specified name.AppException
- This exception is thrown when the element could not be created.
-
expandText
This method will expand a text using the current context.- Parameters:
name
- The name of the text that should be expanded.- Returns:
- The expanded text.
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the specified name.AppException
- This exception is thrown when the element could not be created.
-
expandContent
This method will expand a content using the current context.- Parameters:
name
- The name of the content that should be expanded.- Returns:
- The expanded content.
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the specified name.AppException
- This exception is thrown when the element could not be created.
-
expandContainer
looks up a container with the specified name in the definition model and returns the expanded content. In case of an unknown element an exception is thrown- Parameters:
name
- The Name of the container as defined in studio.- Returns:
- A container object which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the specified name.AppException
- This exception is thrown when the element could not be created.
-
expandButton
looks up a button with the specified name in the definition model and returns the expanded content. In case of an unknown element an exception is thrown The returned button can be changed and events can be added as needed.- Parameters:
name
- The Name of the button as defined in studio.- Returns:
- A button object with empty event values, which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the specified name.AppException
- This exception is thrown when the element could not be created.
-
expandField
looks up a field with for the specified attribute and returns the expanded content. In case of an unknown element an exception is thrown The returned field can be changed and refresh, readonly, required can be settings changed accordingly.- Parameters:
entityName
- The name of the entity as defined in studio.attributeName
- The name of the attribute as defined in studio.- Returns:
- A field object which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the specified name.AppException
- This exception is thrown when the element could not be created.
-
expandAsset
looks up a text (asset) for the specified name and returns the expanded content. In case of an unknown element an exception is thrown- Parameters:
assetName
- The name of the text asset as defined in studio.assetFormat
- The asset format that should be used to locate the correct text content.- Returns:
- A asset object which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the specified name.AppException
- This exception is thrown when the element could not be created.
-
expandImage
looks up an image for the specified name and returns the expanded content. In case of an unknown element an exception is thrown- Parameters:
imageName
- The name of the image as defined in studio.- Returns:
- An image object which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the specified name.AppException
- This exception is thrown when the element could not be created.
-
getContainer
looks up the container 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.AppException
- This exception is thrown when the element could not be created
-
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.AppException
- This exception is thrown when the element could not be created
-
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.AppException
- This exception is thrown when the element could not be created
-
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.AppException
- This exception is thrown when the element could not be created
-
getDynamicContainer
Looks up the dynamic container definition for the specified name and returns the definition model.- Parameters:
name
- The name of the dynamic container requested.- Returns:
- A dynamic container definition model which is never null
- Throws:
UnknownDynamicContainerException
- This exception is thrown when there is no element defined with the name.AppException
- This exception is thrown when the element could not be created
-
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.AppException
- This exception is thrown when the element could not be created
-
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.AppException
- This exception is thrown when the element could not be created
-
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.AppException
- This exception is thrown when the element could not be created
-
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.AppException
- This exception is thrown when the element could not be created
-
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:
- A document definition model which is never null
- Throws:
UnknownElementException
- This exception is thrown when there is no element defined with the name.AppException
- This exception is thrown when the element could not be created
-
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.
-