Class DefaultHybrisConstraintViolation
- java.lang.Object
-
- de.hybris.platform.validation.services.impl.DefaultHybrisConstraintViolation
-
- All Implemented Interfaces:
ConfigurableHybrisConstraintViolation,HybrisConstraintViolation
- Direct Known Subclasses:
LocalizedHybrisConstraintViolation
public class DefaultHybrisConstraintViolation extends java.lang.Object implements ConfigurableHybrisConstraintViolation
Implementation of interfaceHybrisConstraintViolation.
-
-
Field Summary
Fields Modifier and Type Field Description protected ResourceBundleProviderbundleProviderprotected I18NServicei18nServiceprotected ModelServicemodelServicestatic java.lang.StringPREFIXstatic java.lang.StringSUFFIXprotected TypeServicetypeService
-
Constructor Summary
Constructors Constructor Description DefaultHybrisConstraintViolation()
-
Method Summary
All Methods Instance Methods Concrete 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.voidsetBundleProvider(ResourceBundleProvider bundleProvider)voidsetConstraintViolation(javax.validation.ConstraintViolation constraintViolation)Configures the constraint violation by using based violation object.voidsetI18nService(I18NService i18nService)voidsetModelService(ModelService modelService)voidsetTypeService(TypeService typeService)java.lang.StringtoString()
-
-
-
Field Detail
-
PREFIX
public static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
SUFFIX
public static final java.lang.String SUFFIX
- See Also:
- Constant Field Values
-
modelService
protected ModelService modelService
-
typeService
protected TypeService typeService
-
bundleProvider
protected ResourceBundleProvider bundleProvider
-
i18nService
protected I18NService i18nService
-
-
Method Detail
-
getConstraintViolation
public javax.validation.ConstraintViolation getConstraintViolation()
- Specified by:
getConstraintViolationin interfaceHybrisConstraintViolation- Returns:
- the original
ConstraintViolation
-
getProperty
public java.lang.String getProperty()
Description copied from interface:HybrisConstraintViolationGets theproperty pathfrom theConstraintViolationas string.- Specified by:
getPropertyin interfaceHybrisConstraintViolation- Returns:
- the
property pathfrom theConstraintViolationas string
-
getModelName
public java.lang.String getModelName()
Description copied from interface:HybrisConstraintViolationGets the name of the model which causes the violation.- Specified by:
getModelNamein interfaceHybrisConstraintViolation- Returns:
- the name of the model which causes the violation
-
getTypeName
public java.lang.String getTypeName()
Description copied from interface:HybrisConstraintViolationGets the name of the model which causes the violation.- Specified by:
getTypeNamein interfaceHybrisConstraintViolation- Returns:
- the name of the type which causes the violation
-
getQualifier
public java.lang.String getQualifier()
Description copied from interface:HybrisConstraintViolationGets the qualifier in the stylegetTypeName()+"."+getProperty().- Specified by:
getQualifierin interfaceHybrisConstraintViolation- Returns:
- the qualifier in the style
getTypeName()+"."+getProperty()
-
getMessageTemplate
public java.lang.String getMessageTemplate()
Description copied from interface:HybrisConstraintViolationGets the message template from the originalConstraintViolation.- Specified by:
getMessageTemplatein interfaceHybrisConstraintViolation- Returns:
- the message template from the original
ConstraintViolation
-
getConstraintModel
public AbstractConstraintModel getConstraintModel()
Description copied from interface:HybrisConstraintViolationGets the constraint model which was used for validation.- Specified by:
getConstraintModelin interfaceHybrisConstraintViolation- Returns:
AbstractConstraintModel
-
getLocalizedMessage
public java.lang.String getLocalizedMessage()
Description copied from interface:HybrisConstraintViolationGets a localized message for this violation.- Specified by:
getLocalizedMessagein interfaceHybrisConstraintViolation- Returns:
- localized message
-
getViolationSeverity
public Severity getViolationSeverity()
Description copied from interface:HybrisConstraintViolationGets severity enum of the violation. Default is theSeverity.ERROR.- Specified by:
getViolationSeverityin interfaceHybrisConstraintViolation- Returns:
- severity enumeration value
-
setConstraintViolation
public void setConstraintViolation(javax.validation.ConstraintViolation constraintViolation)
Description copied from interface:ConfigurableHybrisConstraintViolationConfigures the constraint violation by using based violation object.- Specified by:
setConstraintViolationin interfaceConfigurableHybrisConstraintViolation
-
setModelService
public void setModelService(ModelService modelService)
-
setTypeService
public void setTypeService(TypeService typeService)
-
setBundleProvider
public void setBundleProvider(ResourceBundleProvider bundleProvider)
-
setI18nService
public void setI18nService(I18NService i18nService)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-