Interface HybrisConstraintViolation
-
- All Known Subinterfaces:
ConfigurableHybrisConstraintViolation
- All Known Implementing Classes:
DefaultHybrisConstraintViolation,LocalizedHybrisConstraintViolation
public interface HybrisConstraintViolationThe HybrisConstraintViolation wraps aConstraintViolationand provides additionally informations about the validation violation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AbstractConstraintModelgetConstraintModel()Gets the constraint model which was used for validation.javax.validation.ConstraintViolationgetConstraintViolation()java.lang.StringgetLocalizedMessage()Gets a localized message for this violation.java.lang.StringgetMessageTemplate()Gets the message template from the originalConstraintViolation.java.lang.StringgetModelName()Gets the name of the model which causes the violation.java.lang.StringgetProperty()Gets theproperty pathfrom theConstraintViolationas string.java.lang.StringgetQualifier()Gets the qualifier in the stylegetTypeName()+"."+getProperty().java.lang.StringgetTypeName()Gets the name of the model which causes the violation.SeveritygetViolationSeverity()Gets severity enum of the violation.
-
-
-
Method Detail
-
getConstraintViolation
javax.validation.ConstraintViolation getConstraintViolation()
- Returns:
- the original
ConstraintViolation
-
getProperty
java.lang.String getProperty()
Gets theproperty pathfrom theConstraintViolationas string.- Returns:
- the
property pathfrom theConstraintViolationas string
-
getModelName
java.lang.String getModelName()
Gets the name of the model which causes the violation.- Returns:
- the name of the model which causes the violation
-
getTypeName
java.lang.String getTypeName()
Gets the name of the model which causes the violation.- Returns:
- the name of the type which causes the violation
-
getQualifier
java.lang.String getQualifier()
Gets the qualifier in the stylegetTypeName()+"."+getProperty().- Returns:
- the qualifier in the style
getTypeName()+"."+getProperty()
-
getMessageTemplate
java.lang.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
java.lang.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
-
-