Class EventValueValidator

java.lang.Object
com.aquima.interactions.portal.model.session.page.EventValueValidator
All Implemented Interfaces:
IVisitor
Direct Known Subclasses:
ReadOnlyPageFieldValidator

public class EventValueValidator extends Object implements IVisitor
Page visitor that checks if required fields are present. This visitor also performs validations for the values that were changed (submitted). Any error that is detected will be added to the EventErrors object, but no modifications will be made to the page object containing the field definitions.
Since:
5.0
Author:
O. Kerpershoek
  • Field Details

  • Constructor Details

  • Method Details

    • getWarnings

      protected Set<Object> getWarnings()
      The set of warnings is needed by the next page submit to determine if a warning has already been shown on the page or if this was the first time. A warning message should block the submit at least once to ensure the warning has been seen.
      Returns:
      The set of warnings that were encountered for the field values.
    • accept

      public IVisitor accept(IElement element)
      Description copied from interface: IVisitor
      This method will be invoked for each element that is encountered during the visit. The return type of this method is the visitor that should be used to process the child elements of the current element. When the current element does not have any children, or when the child elements should not be processed, this method should return a null value as result. The returned visitor may either be a new visitor, for instance with specific context information for the element, or the same visitor.
      Specified by:
      accept in interface IVisitor
      Parameters:
      element - The current element that is encountered by the visitor.
      Returns:
      A visitor that should be used to process child elements.
    • validateValue

      protected boolean validateValue(IField field, IValue fieldValue, ValueReference valueReference, boolean isRequired, boolean isChanged)
    • getMessage

      protected IMultilingualText getMessage(String key, String[] parameters)
    • leave

      public void leave(ICompositeElement compositeElement, IVisitor childVisitor)
      Description copied from interface: IVisitor
      This method will be invoked after all the children of the specified container have been processed with the childVisitor. The implementation of this method may choose to merge the results of the child visitor with this visitor.
      Specified by:
      leave in interface IVisitor
      Parameters:
      compositeElement - The container of whom the child visitor has completed.
      childVisitor - The child visitor that was used to evaluate the children of the container.
    • containsErrors

      public boolean containsErrors()
      This method returns a boolean indicating if any errors were detected while validating the page.
      Returns:
      boolean indicating if any errors were detected while validating the page.