java.lang.Object
com.aquima.interactions.composer.model.Element
com.aquima.interactions.composer.model.Asset
All Implemented Interfaces:
IAsset, IElement, Serializable

public class Asset extends Element implements IAsset
Simple runtime page element to represent a block of text.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • Asset

      public Asset(String name, String contentType, IMultilingualText text)
      Constructor which requires a name and the content text.
      Parameters:
      name - The name of the text element (mandatory).
      contentType - The type of the content text (optional).
      text - The content of the text element (mandatory).
    • Asset

      protected Asset(Asset other)
  • Method Details

    • 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.
    • getText

      public IMultilingualText getText()
      Description copied from interface: IAsset
      This method returns a multilingual text object containing the actual content of the text element.
      Specified by:
      getText in interface IAsset
      Returns:
      a multilingual text object containing the actual content of the text element.
    • setText

      public void setText(IMultilingualText text)
      This method can be used to change the text of the element.
      Parameters:
      text - Object containing the new text (content) for the element.
    • getContentType

      public String getContentType()
      Description copied from interface: IAsset
      This method returns the content type of the text element. The content type is optional, so this method may return a null value when the content type is not available. The content type will usually be the asset format that was used when including the text on a container.
      Specified by:
      getContentType in interface IAsset
      Returns:
      The content type of the text element.
    • setContentType

      public void setContentType(String contentType)
      This method may be used to override the content type of the text element. The content type is optional, so this method may also be used to clear the content type by providing a null value.
      Parameters:
      contentType - The new content type of the text element.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Element
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Element