Class FieldDefinition

java.lang.Object
com.aquima.interactions.composer.model.definition.ElementDefinition
com.aquima.interactions.composer.model.definition.FieldDefinition
All Implemented Interfaces:
IElementDefinition, Serializable

public class FieldDefinition extends ElementDefinition
This class holds the definition of a field.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

  • Method Details

    • updateWith

      protected FieldDefinition updateWith(FieldDefinition definition)
    • getName

      public String getName()
      Description copied from interface: IElementDefinition
      This method returns the name of the element definition. The name can be empty for element definitions that can not be retrieved by name, these elements can only be used via an inline reference.
      Specified by:
      getName in interface IElementDefinition
      Overrides:
      getName in class ElementDefinition
      Returns:
      The name of the element definition, can be null.
    • getType

      public ElementType getType()
      Description copied from interface: IElementDefinition
      This method returns the type of the element.
      Returns:
      The type of the element the definition represents.
    • getAttribute

      public AttributeReference getAttribute()
      This method returns the attribute the field is defined for. For custom fields, the attribute may not be defined, and thus the method may return null.
      Returns:
      the attribute the field is defined for.
    • getDataType

      public DataType getDataType()
      This method returns the type of the field.
      Returns:
      the type of the field.
    • isMultivalue

      public boolean isMultivalue()
      This method returns a boolean indicating if the field supports multiple values.
      Returns:
      a boolean indicating if the field supports multiple values.
    • getExplainText

      public IDynamicText getExplainText()
      This method returns the text object that should be used as explanation for this field.
      Returns:
      the text object that should be used as explanation for this field.
    • getQuestionText

      public IDynamicText getQuestionText()
      This method returns the text object that should be used as question text for this field.
      Returns:
      the text object that should be used as question text for this field.
    • addValidation

      protected void addValidation(FieldValidationDefinition validation)
    • getValidations

      public FieldValidationDefinition[] getValidations()
      This method returns an array containing all the validations that are defined for this field.
      Returns:
      array containing all the validations that are defined for this field.
    • addParameterValue

      protected void addParameterValue(GlobalParameterValueDefinition parameter)
    • getParameters

      public GlobalParameterValueDefinition[] getParameters()
      Returns the parameter value definitions of this field.
      Returns:
      an array containing the parameter value definitions, may be empty but never null.
    • getParameter

      public GlobalParameterValueDefinition getParameter(String parameterName)
      Returns the parameter value definition for the parameter with the given name, or null if no parameter with the given name exists.
      Parameters:
      parameterName - the name of the parameter
      Returns:
      the parameter value definition or null
    • hasParameter

      public boolean hasParameter(String parameterName, GlobalParameterType parameterType)
      Indicates whether this field has a parameter value definition for a parameter with the given name and type.
      Parameters:
      parameterName - the name of the parameter
      parameterType - the type of the parameter
      Returns:
      true if a parameter value definition with the given name and type exists, false otherwise.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class ElementDefinition
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ElementDefinition
    • toString

      public String toString()
      Overrides:
      toString in class Object