Class ContainerDelegate

java.lang.Object
com.aquima.interactions.composer.model.delegate.ContainerDelegate
All Implemented Interfaces:
ICompositeElement, IContainer, IElement, Serializable
Direct Known Subclasses:
TableContainer

public class ContainerDelegate extends Object implements IContainer
IContainer implemenation that delegates to an IContainer for easy container extension.
Since:
8.4
Author:
Jon van Leuven
See Also:
  • Constructor Details

    • ContainerDelegate

      public ContainerDelegate(IContainer delegate)
  • Method Details

    • getDelegate

      protected IContainer getDelegate()
    • getRuntimeKey

      public RuntimeKey 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 interface IElement
      Returns:
      The unique runtime key of the element within a page.
    • getMessages

      public IMessage[] getMessages(boolean includeChildren)
      Description copied from interface: IContainer
      This method returns all the messages that were reported during the expand of this container.
      Specified by:
      getMessages in interface IContainer
      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

      public ContentStyle getContentStyle()
      Description copied from interface: ICompositeElement
      This method returns the content style of the element.
      Specified by:
      getContentStyle in interface ICompositeElement
      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 interface ICompositeElement
      Returns:
      The number of child elements of this container.
    • getDisplayText

      public IMultilingualText 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 interface IContainer
      Returns:
      Display text for the runtime container.
    • getElement

      public IElement getElement(int index)
      Description copied from interface: ICompositeElement
      This method returns the child element at the specified position.
      Specified by:
      getElement in interface ICompositeElement
      Parameters:
      index - The position of the child element that is requested.
      Returns:
      The child element at the specified position.
    • getElement

      public IElement getElement(RuntimeKey key)
      Description copied from interface: ICompositeElement
      This method returns the element for the specified runtime key.
      Specified by:
      getElement in interface ICompositeElement
      Parameters:
      key - The runtime key of the element that is requested.
      Returns:
      The element for the specified runtime key.
    • getParent

      public ICompositeElement 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.
      Specified by:
      getParent in interface IElement
      Returns:
      The parent container of the element.
    • getEntityInstanceId

      public EntityValue 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 interface IContainer
      Returns:
      Entity context associated with the container.
    • duplicate

      public Element 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.
      Specified by:
      duplicate in interface IElement
      Returns:
      The cloned (duplicate) element.
    • getTypeName

      public String getTypeName()
      Description copied from interface: IContainer
      Method returning the name of the container type.
      Specified by:
      getTypeName in interface IContainer
      Returns:
      The type name of the container.
    • getElements

      public IElement[] 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 interface ICompositeElement
      Returns:
      Array with the direct sub elements of the container.
    • getName

      public String 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.
      Specified by:
      getName in interface IElement
      Returns:
      The name of the element (not null)
    • equalsContent

      public boolean equalsContent(ICompositeElement other)
      Description copied from interface: ICompositeElement
      Method indicating if the composite element has the same content as another composite element.
      Specified by:
      equalsContent in interface ICompositeElement
      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

      public PresentationStyle[] 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 interface IElement
      Returns:
      The styles information of the element, never null, but could be an empty array.
    • accept

      public IVisitor accept(IVisitor visitor)
      Description copied from interface: IElement
      This method will traverse the element structure and invoke the visitor for each element.
      Specified by:
      accept in interface ICompositeElement
      Specified by:
      accept in interface IElement
      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

      public boolean hasPresentationStyle(PresentationStyle style)
      Description copied from interface: IElement
      This method will return true if the PresentationStyle is present on this element.
      Specified by:
      hasPresentationStyle in interface IElement
      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 when IElement.isReadonlyInheritFromParent() returns true and the parent container (if available) is marked as read-only.
      Specified by:
      isReadonly in interface IElement
      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 interface IElement
      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.
      Specified by:
      isVisible in interface IElement
      Returns:
      boolean indicating if the element should be visible.
    • hasFocus

      public boolean hasFocus()
      Description copied from interface: IElement
      This method returns a boolean indicating if this element has the focus.
      Specified by:
      hasFocus in interface IElement
      Returns:
      boolean
    • getProperty

      public Serializable getProperty(String key)
      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 interface IElement
      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

      public Serializable setProperty(String key, Serializable propertyValue)
      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 interface IElement
      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

      public String[] 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 interface IElement
      Returns:
      An array containing all the property keys for which a value is present.