Interface HybrisConstraintViolation
- All Known Subinterfaces:
ConfigurableHybrisConstraintViolation
- All Known Implementing Classes:
DefaultHybrisConstraintViolation,LocalizedHybrisConstraintViolation
public interface HybrisConstraintViolation
The HybrisConstraintViolation wraps a
ConstraintViolation and provides additionally informations about the
validation violation.-
Method Summary
Modifier and TypeMethodDescriptionGets the constraint model which was used for validation.javax.validation.ConstraintViolationGets a localized message for this violation.Gets the message template from the originalConstraintViolation.Gets the name of the model which causes the violation.Gets theproperty pathfrom theConstraintViolationas string.Gets the qualifier in the stylegetTypeName()+"."+getProperty().Gets the name of the model which causes the violation.Gets severity enum of the violation.
-
Method Details
-
getConstraintViolation
javax.validation.ConstraintViolation getConstraintViolation()- Returns:
- the original
ConstraintViolation
-
getProperty
String getProperty()Gets theproperty pathfrom theConstraintViolationas string.- Returns:
- the
property pathfrom theConstraintViolationas string
-
getModelName
String getModelName()Gets the name of the model which causes the violation.- Returns:
- the name of the model which causes the violation
-
getTypeName
String getTypeName()Gets the name of the model which causes the violation.- Returns:
- the name of the type which causes the violation
-
getQualifier
String getQualifier()Gets the qualifier in the stylegetTypeName()+"."+getProperty().- Returns:
- the qualifier in the style
getTypeName()+"."+getProperty()
-
getMessageTemplate
String getMessageTemplate()Gets the message template from the originalConstraintViolation.- Returns:
- the message template from the original
ConstraintViolation
-
getConstraintModel
AbstractConstraintModel getConstraintModel()Gets the constraint model which was used for validation.- Returns:
AbstractConstraintModel
-
getLocalizedMessage
String getLocalizedMessage()Gets a localized message for this violation.- Returns:
- localized message
-
getViolationSeverity
Severity getViolationSeverity()Gets severity enum of the violation. Default is theSeverity.ERROR.- Returns:
- severity enumeration value
-