public class DefaultHybrisConstraintViolation extends Object implements ConfigurableHybrisConstraintViolation
HybrisConstraintViolation.| Modifier and Type | Field and Description |
|---|---|
protected ResourceBundleProvider |
bundleProvider |
protected I18NService |
i18nService |
protected ModelService |
modelService |
static String |
PREFIX |
static String |
SUFFIX |
protected TypeService |
typeService |
| Constructor and Description |
|---|
DefaultHybrisConstraintViolation() |
| Modifier and Type | Method and Description |
|---|---|
AbstractConstraintModel |
getConstraintModel()
Gets the constraint model which was used for validation.
|
ConstraintViolation |
getConstraintViolation() |
String |
getLocalizedMessage()
Gets a localized message for this violation.
|
String |
getMessageTemplate()
Gets the message template from the original
ConstraintViolation. |
String |
getModelName()
Gets the name of the model which causes the violation.
|
String |
getProperty()
Gets the
property path from the ConstraintViolation as string. |
String |
getQualifier()
Gets the qualifier in the style
getTypeName()+"."+getProperty(). |
String |
getTypeName()
Gets the name of the model which causes the violation.
|
Severity |
getViolationSeverity()
Gets severity enum of the violation.
|
void |
setBundleProvider(ResourceBundleProvider bundleProvider) |
void |
setConstraintViolation(ConstraintViolation constraintViolation)
Configures the constraint violation by using based violation object.
|
void |
setI18nService(I18NService i18nService) |
void |
setModelService(ModelService modelService) |
void |
setTypeService(TypeService typeService) |
String |
toString() |
public static final String PREFIX
public static final String SUFFIX
protected ModelService modelService
protected TypeService typeService
protected ResourceBundleProvider bundleProvider
protected I18NService i18nService
public ConstraintViolation getConstraintViolation()
getConstraintViolation in interface HybrisConstraintViolationConstraintViolationpublic String getProperty()
HybrisConstraintViolationproperty path from the ConstraintViolation as string.getProperty in interface HybrisConstraintViolationproperty path from the ConstraintViolation as stringpublic String getModelName()
HybrisConstraintViolationgetModelName in interface HybrisConstraintViolationpublic String getTypeName()
HybrisConstraintViolationgetTypeName in interface HybrisConstraintViolationpublic String getQualifier()
HybrisConstraintViolationgetTypeName()+"."+getProperty().getQualifier in interface HybrisConstraintViolationgetTypeName()+"."+getProperty()public String getMessageTemplate()
HybrisConstraintViolationConstraintViolation.getMessageTemplate in interface HybrisConstraintViolationConstraintViolationpublic AbstractConstraintModel getConstraintModel()
HybrisConstraintViolationgetConstraintModel in interface HybrisConstraintViolationAbstractConstraintModelpublic String getLocalizedMessage()
HybrisConstraintViolationgetLocalizedMessage in interface HybrisConstraintViolationpublic Severity getViolationSeverity()
HybrisConstraintViolationSeverity.ERROR.getViolationSeverity in interface HybrisConstraintViolationpublic void setConstraintViolation(ConstraintViolation constraintViolation)
ConfigurableHybrisConstraintViolationsetConstraintViolation in interface ConfigurableHybrisConstraintViolationpublic void setModelService(ModelService modelService)
public void setTypeService(TypeService typeService)
public void setBundleProvider(ResourceBundleProvider bundleProvider)
public void setI18nService(I18NService i18nService)
Copyright © 2017 SAP SE. All Rights Reserved.