Class NullCheckAttributeContentValidator<T>
java.lang.Object
de.hybris.platform.cmsfacades.cmsitems.attributevalidators.AbstractAttributeContentValidator<T>
de.hybris.platform.cmsfacades.cmsitems.attributevalidators.NullCheckAttributeContentValidator<T>
- Type Parameters:
T- type of the object being validated
- All Implemented Interfaces:
AttributeContentValidator<T>
Null check attribute content validator adds validation errors when value is null and attribute has
NotNullConstraintModel and NotEmptyConstraintModel constraints.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanVerifies if an object is empty.validate(T value, AttributeDescriptorModel attribute) Performs validation on the given arguments.Methods inherited from class de.hybris.platform.cmsfacades.cmsitems.attributevalidators.AbstractAttributeContentValidator
addValidationError, getConstraintMap, getValidationErrorsProvider, setValidationErrorsProvider
-
Constructor Details
-
NullCheckAttributeContentValidator
public NullCheckAttributeContentValidator()
-
-
Method Details
-
validate
Description copied from interface:AttributeContentValidatorPerforms validation on the given arguments.- Parameters:
value- the value objectattribute- the attribute descriptor of the givenvalue.
-
isEmpty
Verifies if an object is empty. Possible value types are: String, Collection and Map.- Parameters:
value- if the value is empty- Returns:
trueif the value is empty;falseotherwise.
-