Package org.hippoecm.frontend.validation
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 ofModelPath
s 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Violation(Set<ModelPath> fieldPaths, org.apache.wicket.model.IModel<String> messageModel)
Create a new violation with the specified message.Violation(Set<ModelPath> fieldPaths, org.apache.wicket.model.IModel<String> message, FeedbackScope feedbackScope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
detach()
Set<ModelPath>
getDependentPaths()
FeedbackScope
getFeedbackScope()
org.apache.wicket.model.IModel<String>
getMessage()
void
setFeedbackScope(FeedbackScope feedbackScope)
String
toString()
-
-
-
Constructor Detail
-
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 beValidationScope.DOCUMENT
- Parameters:
fieldPaths
- list ofModelPath
s that led up to the violationmessageModel
- 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 Detail
-
getMessage
public org.apache.wicket.model.IModel<String> getMessage()
-
getFeedbackScope
public FeedbackScope getFeedbackScope()
-
setFeedbackScope
public void setFeedbackScope(FeedbackScope feedbackScope)
-
detach
public void detach()
- Specified by:
detach
in interfaceorg.apache.wicket.model.IDetachable
-
-