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 Summary
Constructors Constructor Description ElementModel()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addProperty(String key, Object value)
Adds a property to the internal properties map.boolean
equals(Object obj)
String
getFunctionalKey()
Returns the functional key of the element.String
getKey()
Returns the element key.String
getName()
Returns the name of the element.Map<String,Object>
getProperties()
Returns the properties of the model, or null if no properties are availableList<String>
getStyles()
Returns the presentationStyles of the model.abstract String
getType()
int
hashCode()
void
setFunctionalKey(String functionalKey)
Sets the functional key of the element.void
setKey(String key)
Sets the key of the element.void
setName(String name)
Sets the name of the element.
-
-
-
Method Detail
-
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 nullvalue
- Property value can be empty or null
-
-