Class ContainerTemplate

Direct Known Subclasses:
PageTemplate

public class ContainerTemplate extends ElementTemplate
Template that can be used to initialize a container definition.
Since:
6.0
Author:
O. Kerpershoek
  • Constructor Details

    • ContainerTemplate

      protected ContainerTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, ComposerTemplate composer, String name)
  • Method Details

    • getComposer

      protected ComposerTemplate getComposer()
    • getTypeName

      protected String getTypeName()
    • setTypeName

      public void setTypeName(String type)
      This method may be used to override the type of the container.
      Parameters:
      type - the type of the container.
    • getDisplayText

      protected com.aquima.interactions.foundation.text.IMultilingualText getDisplayText()
    • setDisplayText

      public void setDisplayText(String text)
      This method may be used to override the display text of the container.
      Parameters:
      text - The display text of the container.
    • setDisplayText

      public void setDisplayText(com.aquima.interactions.foundation.text.IMultilingualText text)
      This method may be used to override the display text of the container.
      Parameters:
      text - The display text of the container.
      Since:
      8.4
    • setTypedParameters

      public void setTypedParameters(com.aquima.interactions.portal.ITypedParameters parameters, boolean allowEmpty)
      This method may be used to set all the typed parameters of the container at once.
      Parameters:
      parameters - The parameters for the container.
    • addProperty

      public void addProperty(String key, String strValue)
      This method may be used to add a property to the container.
      Parameters:
      key - The name of the property.
      strValue - The value of the property.
    • getProperties

      protected Map<String,String> getProperties()
    • addEventMapping

      public void addEventMapping(String containerEventName, String flowEventName)
      This method may be used to add a eventMapping to the container.
      Parameters:
      containerEventName - the name of the event in the container
      flowEventName - the name of the event in the flow
    • addEventMapping

      public void addEventMapping(String containerEventName, String flowEventName, String... parameters)
    • getEventMappings

      protected Map<String,Object> getEventMappings()
    • addPortalEventMapping

      public void addPortalEventMapping(String portalEventName, String flowEventName)
      This method may be used to add a portal event mapping to the page.
      Parameters:
      portalEventName - The name of the portalEvent.
      flowEventName - The name of the event in the flow.
    • getPortalEventMappings

      protected Map<String,String> getPortalEventMappings()
    • addParameter

      public void addParameter(String key, String strValue)
      This method may be used to add a parameter for the container.
      Parameters:
      key - The name of the parameter.
      strValue - The value of the parameter.
    • getParameters

      protected ParametersTemplate getParameters()
    • setParameters

      public void setParameters(com.aquima.interactions.foundation.IParameters parameters)
      This method may be used to set all the parameters of the container at once. The parameters may contain only value parameters. See setTypedParameters(ITypedParameters, boolean) for using value/expression/reference parameters.
      Parameters:
      parameters - The parameters for the container.
    • setParameters

      public void setParameters(ParametersTemplate parameters)
      This method may be used to set all the parameters of the container at once.
      Parameters:
      parameters - The parameters for the container.
    • contents

      protected List<ElementReference> contents()
    • addAllowedRole

      public void addAllowedRole(String role)
      This method may be used to add a role that is allowed to view the container. *
      Parameters:
      role - a role that is allowed to view the container.
    • getAllowedRoles

      protected List<String> getAllowedRoles()
    • addAllowedChannel

      public void addAllowedChannel(String channel)
      This method may be used to add a channel that is allowed to display the container.
      Parameters:
      channel - a channel that is allowed to display the container.
    • getAllowedChannels

      protected List<String> getAllowedChannels()
    • addAsset

      public AssetReference addAsset(String name)
      This method may be used to add a asset to this container.
      Parameters:
      name - The name of the asset that should be added.
      Returns:
      Template representing the reference to the added element.
    • addText

      public TextReference addText(String name)

      This method may be used to add a text to this container.

      Note:

      This method can be used to add a reference to a "document" text object to the container, this is not an asset. To add a (TSL) asset, use the addAsset method.

      Parameters:
      name - The name of the text that should be added.
      Returns:
      Template representing the reference to the added element.
    • addContent

      public ContentReference addContent(String name)

      This method may be used to add a content element to this container.

      Note:

      This method can be used to add a reference to a "document" content object to the container, this is not an asset. To add a (TSL) asset, use the addAsset method.

      Parameters:
      name - The name of the text that should be added.
      Returns:
      Template representing the reference to the added element.
    • addField

      public FieldReference addField(String name)
      This method may be used to add a field to this container.
      Parameters:
      name - The name of the field that should be added.
      Returns:
      Template representing the reference to the added element.
    • addField

      public FieldReference addField(FieldTemplate field)
      This method may be used to add a field template to this container.
      Parameters:
      field - The field template of the field that should be added.
      Returns:
      Template representing the reference to the added element.
    • addImage

      public ImageReference addImage(String name)
      This method may be used to add an image to this container.
      Parameters:
      name - The name of the image that should be added.
      Returns:
      Template representing the reference to the added element.
    • addButton

      public ButtonReference addButton(String name)
      This method may be used to add a button to this container.
      Parameters:
      name - The name of the button that should be added.
      Returns:
      Template representing the reference to the added element.
    • addContainer

      public ContainerReference addContainer(String name)
      This method may be used to add a container to this container.
      Parameters:
      name - The name of the container that should be added.
      Returns:
      Template representing the reference to the added element.
    • addInlineContainer

      public ContainerReference addInlineContainer()
      This method may be used to add an inline container to this container.
      Returns:
      Container template representing the added container.
    • addReference

      public void addReference(ElementReference reference)
      This method may be used to directly add an element reference to an already defined element. warning: This method does not check if the reference is valid, so use with care.
      Parameters:
      reference - The reference that should be added.
    • toDataSource

      public com.aquima.interactions.composer.ds.IContainerDS toDataSource()
      This method converts the template to a data source that can be used to initialize a container definition.
      Returns:
      a data source that can be used to initialize a container definition.
    • getExitEvents

      protected String[] getExitEvents()
    • setExitEvents

      public void setExitEvents(String... exitEvents)
      This method may be used to override the possible exit events for this container.
      Parameters:
      exitEvents - The possible exit events.
    • toDynamicContainerDS

      public com.aquima.interactions.portal.ds.IContainerExpanderDS toDynamicContainerDS()
      This method returns the dynamic container datasource if this container is a dynamic container. If this container is no dynamic container, null will be returned.
      Returns:
      The dynamic container datasource, may be null.
    • isDynamic

      protected boolean isDynamic()
    • getContentStyle

      protected String getContentStyle()
    • setContentStyle

      public void setContentStyle(String contentStyle)
      This method may be used to set the content style of the container.
      Parameters:
      contentStyle - The content style of the container.