Class Violation

java.lang.Object
org.hippoecm.frontend.validation.Violation
All Implemented Interfaces:
Serializable, org.apache.wicket.model.IDetachable, org.apache.wicket.util.io.IClusterable

public final class Violation extends Object implements org.apache.wicket.model.IDetachable
Validation constraint violation. Provides the list of ModelPaths that led up to the violation and three parameters that can be used to generate a translated description of the violation. These parameters are a message key, an array of parameters for value substitution in the translation and a resourceBundleClass to specify the location of the resource bundle.
See Also:
  • Constructor Details

    • Violation

      public Violation(Set<ModelPath> fieldPaths, org.apache.wicket.model.IModel<String> messageModel)
      Create a new violation with the specified message. The scope of this violation will be ValidationScope.DOCUMENT
      Parameters:
      fieldPaths - list of ModelPaths that led up to the violation
      messageModel - a model of the message to be shown to the user
    • Violation

      public Violation(Set<ModelPath> fieldPaths, org.apache.wicket.model.IModel<String> message, FeedbackScope feedbackScope)
  • Method Details

    • getMessage

      public org.apache.wicket.model.IModel<String> getMessage()
    • getDependentPaths

      public Set<ModelPath> getDependentPaths()
    • getFeedbackScope

      public FeedbackScope getFeedbackScope()
    • setFeedbackScope

      public void setFeedbackScope(FeedbackScope feedbackScope)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • detach

      public void detach()
      Specified by:
      detach in interface org.apache.wicket.model.IDetachable