Class ContainerDelegate
java.lang.Object
com.aquima.interactions.composer.model.delegate.ContainerDelegate
- All Implemented Interfaces:
ICompositeElement
,IContainer
,IElement
,Serializable
- Direct Known Subclasses:
TableContainer
IContainer implemenation that delegates to an IContainer for easy container extension.
- Since:
- 8.4
- Author:
- Jon van Leuven
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method will traverse the element structure and invoke the visitor for each element.This method should clone the element and return the cloned element.boolean
equalsContent
(ICompositeElement other) Method indicating if the composite element has the same content as another composite element.This method returns the content style of the element.protected IContainer
This method returns the optional display text that should be used for this container.getElement
(int index) This method returns the child element at the specified position.getElement
(RuntimeKey key) This method returns the element for the specified runtime key.int
This method returns the number of elements that is contained in this container.IElement[]
This method returns an array containing all the elements that are directly included in this container.This method may return an instance ID indicating the instance that should be active when processing this container.IMessage[]
getMessages
(boolean includeChildren) This method returns all the messages that were reported during the expand of this container.getName()
This method returns the name of the element.This method returns the parent container the element is contained in, or null if the element is not assigned to a container.This method will return the styles that should be used when rendering the element.getProperty
(String key) This method returns the property for the specified key.String[]
This method returns all the property keys for which a property value has been added to this element.This method will return the unique identifier of the element within a page.Method returning the name of the container type.boolean
hasFocus()
This method returns a boolean indicating if this element has the focus.boolean
This method will return true if the PresentationStyle is present on this element.boolean
This method returns a boolean indicating if the element should be displayed read-only.boolean
This method returns a boolean indicating whether to inherit the readonly state from its parent container.boolean
This method returns a boolean indicating if the element should be visible.setProperty
(String key, Serializable propertyValue) This method will add the property value for the specified property key.
-
Constructor Details
-
ContainerDelegate
-
-
Method Details
-
getDelegate
-
getRuntimeKey
Description copied from interface:IElement
This method will return the unique identifier of the element within a page. An element with the same name may be included multiple times on the same page, but each instance is assigned it's own unique runtime key do distinguish between the elements.
Note: Elements get a runtime key assigned during the final evaluation of a page. When an element is created outside a page, or during the creation of the page, the runtime key will still be unknown.- Specified by:
getRuntimeKey
in interfaceIElement
- Returns:
- The unique runtime key of the element within a page.
-
getMessages
Description copied from interface:IContainer
This method returns all the messages that were reported during the expand of this container.- Specified by:
getMessages
in interfaceIContainer
- Parameters:
includeChildren
- Boolean indicating if messages reported by child containers should also be returned.- Returns:
- Array of messages that were reported during the expand of the container.
-
getContentStyle
Description copied from interface:ICompositeElement
This method returns the content style of the element.- Specified by:
getContentStyle
in interfaceICompositeElement
- Returns:
- The content style of the element (never null).
-
getElementCount
public int getElementCount()Description copied from interface:ICompositeElement
This method returns the number of elements that is contained in this container.- Specified by:
getElementCount
in interfaceICompositeElement
- Returns:
- The number of child elements of this container.
-
getDisplayText
Description copied from interface:IContainer
This method returns the optional display text that should be used for this container. If there is no display text defined for the container, this method will return a null value.- Specified by:
getDisplayText
in interfaceIContainer
- Returns:
- Display text for the runtime container.
-
getElement
Description copied from interface:ICompositeElement
This method returns the child element at the specified position.- Specified by:
getElement
in interfaceICompositeElement
- Parameters:
index
- The position of the child element that is requested.- Returns:
- The child element at the specified position.
-
getElement
Description copied from interface:ICompositeElement
This method returns the element for the specified runtime key.- Specified by:
getElement
in interfaceICompositeElement
- Parameters:
key
- The runtime key of the element that is requested.- Returns:
- The element for the specified runtime key.
-
getParent
Description copied from interface:IElement
This method returns the parent container the element is contained in, or null if the element is not assigned to a container. -
getEntityInstanceId
Description copied from interface:IContainer
This method may return an instance ID indicating the instance that should be active when processing this container.- Specified by:
getEntityInstanceId
in interfaceIContainer
- Returns:
- Entity context associated with the container.
-
duplicate
Description copied from interface:IElement
This method should clone the element and return the cloned element. The duplicate method should usually make a deep copy of the element, with the exception of members that are not mutable (and thus can safely be shared between multiple copies). The properties of an element are considered to be non-mutable, and will thus by default be copied. -
getTypeName
Description copied from interface:IContainer
Method returning the name of the container type.- Specified by:
getTypeName
in interfaceIContainer
- Returns:
- The type name of the container.
-
getElements
Description copied from interface:ICompositeElement
This method returns an array containing all the elements that are directly included in this container.- Specified by:
getElements
in interfaceICompositeElement
- Returns:
- Array with the direct sub elements of the container.
-
getName
Description copied from interface:IElement
This method returns the name of the element. This name corresponds to the name of the element definition the element is based upon. -
equalsContent
Description copied from interface:ICompositeElement
Method indicating if the composite element has the same content as another composite element.- Specified by:
equalsContent
in interfaceICompositeElement
- Parameters:
other
- composite element to compare with- Returns:
- boolean indicating if the content of this composite element is equal to the content of the provided composite element.
-
getPresentationStyles
Description copied from interface:IElement
This method will return the styles that should be used when rendering the element. The styles is an optional parameter, and as such the styles may not have been set (empty array value).- Specified by:
getPresentationStyles
in interfaceIElement
- Returns:
- The styles information of the element, never null, but could be an empty array.
-
accept
Description copied from interface:IElement
This method will traverse the element structure and invoke the visitor for each element.- Specified by:
accept
in interfaceICompositeElement
- Specified by:
accept
in interfaceIElement
- Parameters:
visitor
- The visitor that should be used to traverse the structure with.- Returns:
- The visitor that should be used to process child element, or null when the child elements should not be processed.
-
hasPresentationStyle
Description copied from interface:IElement
This method will return true if the PresentationStyle is present on this element.- Specified by:
hasPresentationStyle
in interfaceIElement
- Parameters:
style
- The PresentationStyle to find- Returns:
- True if the presentationStyle was present, false otherwise.
-
isReadonly
public boolean isReadonly()Description copied from interface:IElement
This method returns a boolean indicating if the element should be displayed read-only. An element is read-only when the element itself is specified as being read-only, or whenIElement.isReadonlyInheritFromParent()
returns true and the parent container (if available) is marked as read-only.- Specified by:
isReadonly
in interfaceIElement
- Returns:
- boolean indicating if the element should be displayed read-only.
-
isReadonlyInheritFromParent
public boolean isReadonlyInheritFromParent()Description copied from interface:IElement
This method returns a boolean indicating whether to inherit the readonly state from its parent container.- Specified by:
isReadonlyInheritFromParent
in interfaceIElement
- Returns:
- boolean indicating whether to inherit the readonly state from its parent container.
-
isVisible
public boolean isVisible()Description copied from interface:IElement
This method returns a boolean indicating if the element should be visible. An element is visible when the element itself is specified as being visible and the parent container (if available) is visible. -
hasFocus
public boolean hasFocus()Description copied from interface:IElement
This method returns a boolean indicating if this element has the focus. -
getProperty
Description copied from interface:IElement
This method returns the property for the specified key. If no property was defined for the specified key, a null value will be returned.- Specified by:
getProperty
in interfaceIElement
- Parameters:
key
- The key for which the property value is requested.- Returns:
- The property value for the specified key, or null if no property was added for that key.
-
setProperty
Description copied from interface:IElement
This method will add the property value for the specified property key. If the property value is null, any existing property for that key will be removed.- Specified by:
setProperty
in interfaceIElement
- Parameters:
key
- The key for which the property value should be set.propertyValue
- The property value that should be set.- Returns:
- The previous value that was present for the specified key.
-
getPropertyKeys
Description copied from interface:IElement
This method returns all the property keys for which a property value has been added to this element.- Specified by:
getPropertyKeys
in interfaceIElement
- Returns:
- An array containing all the property keys for which a value is present.
-