Class ValidationTreeObject

java.lang.Object
com.aquima.web.aaas.validation.ValidationTreeObject
All Implemented Interfaces:
IValidationMessageContainer

public class ValidationTreeObject extends Object implements IValidationMessageContainer
Represents an object in the validation tree.

In general, an object has a name, values (representing attributes), objects (represting relations) and validations (if this object is the target of a relation, the validation message represent the validation messages on that relation).

If this object represents an array (i.e, the target of a multi-valued relation), then this object doesn't have values (as arrays cannot have properties like regular objects). To indicate that this object represents an array, the #setNoValues() method should be called.

If this object represents an element of an array, then it should have no name.

Since:
11.3
Author:
Petru Galanton
  • Constructor Details

    • ValidationTreeObject

      public ValidationTreeObject()
  • Method Details

    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getValues

      public List<ValidationTreeValue> getValues()
    • addValue

      public void addValue(ValidationTreeValue value)
    • setValues

      public void setValues(List<ValidationTreeValue> values)
    • hasValues

      public boolean hasValues()
      Indicates whether this object has at least 1 value.
      Returns:
      true if this object has at least 1 value, false otherwise.
    • getObjects

      public List<ValidationTreeObject> getObjects()
    • addObject

      public void addObject(ValidationTreeObject object)
    • setObjects

      public void setObjects(List<ValidationTreeObject> objects)
    • hasObjects

      public boolean hasObjects()
      Indicates whether this object has at least 1 child objects.
      Returns:
      true if this object has at least 1 child object, false otherwise.
    • getValidations

      public List<ValidationMessage> getValidations()
    • addValidation

      public void addValidation(ValidationMessage validation)
      Description copied from interface: IValidationMessageContainer
      Adds the given validation message to this object.
      Specified by:
      addValidation in interface IValidationMessageContainer
      Parameters:
      validation - the validation message to add
    • setValidations

      public void setValidations(List<ValidationMessage> validation)
    • hasValidations

      public boolean hasValidations()
      Indicates whether this object has at least 1 validation message.
      Returns:
      true if this object has at least 1 validation message, false otherwise