Package com.aquima.web.aaas.validation
Class ValidationTreeObject
java.lang.Object
com.aquima.web.aaas.validation.ValidationTreeObject
- All Implemented Interfaces:
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).
If this object represents an element of an array, then it should have no name.
- Since:
- 11.3
- Author:
- Petru Galanton
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addObject
(ValidationTreeObject object) void
addValidation
(ValidationMessage validation) Adds the given validation message to this object.void
addValue
(ValidationTreeValue value) getName()
boolean
Indicates whether this object has at least 1 child objects.boolean
Indicates whether this object has at least 1 validation message.boolean
Indicates whether this object has at least 1 value.void
void
setObjects
(List<ValidationTreeObject> objects) void
setValidations
(List<ValidationMessage> validation) void
setValues
(List<ValidationTreeValue> values)
-
Constructor Details
-
Method Details
-
getName
-
setName
-
getValues
-
addValue
-
setValues
-
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
-
addObject
-
setObjects
-
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
-
addValidation
Description copied from interface:IValidationMessageContainer
Adds the given validation message to this object.- Specified by:
addValidation
in interfaceIValidationMessageContainer
- Parameters:
validation
- the validation message to add
-
setValidations
-
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
-