Class ElementModel

java.lang.Object
com.aquima.web.api.model.page.element.ElementModel
Direct Known Subclasses:
Asset, Button, CompositeModel, FailedElement, Field, Image, Link, TextItem, UnknownElement

public abstract class ElementModel extends Object
This class represents the viewmodel of the IElement interfaces
Since:
9.2
Author:
A.Pragt
  • Constructor Details

    • ElementModel

      public ElementModel()
  • Method Details

    • getType

      public abstract String getType()
    • getKey

      public String getKey()
      Returns the element key.
      Returns:
      The key of the element.
    • setKey

      public void setKey(String key)
      Sets the key of the element.
      Parameters:
      key - The key of the element.
    • getFunctionalKey

      public String getFunctionalKey()
      Returns the functional key of the element.
      Returns:
      The functional key of the element
    • setFunctionalKey

      public void setFunctionalKey(String functionalKey)
      Sets the functional key of the element.
      Parameters:
      functionalKey - The functional key of the element.
    • getName

      public String getName()
      Returns the name of the element.
      Returns:
      The name of the element.
    • setName

      public void setName(String name)
      Sets the name of the element.
      Parameters:
      name - The name of the element.
    • getStyles

      public List<String> getStyles()
      Returns the presentationStyles of the model.
      Returns:
      The list of presentation styles.
    • getProperties

      public Map<String,Object> getProperties()
      Returns the properties of the model, or null if no properties are available
      Returns:
      The map of properties.
    • addProperty

      public void addProperty(String key, Object value)
      Adds a property to the internal properties map.
      Parameters:
      key - Property key cannot be empty or null
      value - Property value can be empty or null
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object