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 Details

    • getConstraintViolation

      javax.validation.ConstraintViolation getConstraintViolation()
      Returns:
      the original ConstraintViolation
    • getProperty

      String getProperty()
      Gets the property path from the ConstraintViolation as string.
      Returns:
      the property path from the ConstraintViolation as 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 style getTypeName()+"."+getProperty().
      Returns:
      the qualifier in the style getTypeName()+"."+getProperty()
    • getMessageTemplate

      String getMessageTemplate()
      Gets the message template from the original ConstraintViolation.
      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 the Severity.ERROR.
      Returns:
      severity enumeration value