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>
public class NullCheckAttributeContentValidator<T> extends AbstractAttributeContentValidator<T>
Null check attribute content validator adds validation errors when value is null and attribute hasNotNullConstraintModelandNotEmptyConstraintModelconstraints.
-
-
Constructor Summary
Constructors Constructor Description NullCheckAttributeContentValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisEmpty(T value)Verifies if an object is empty.java.util.List<ValidationError>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
-
-
-
-
Method Detail
-
validate
public java.util.List<ValidationError> validate(T value, AttributeDescriptorModel attribute)
Description copied from interface:AttributeContentValidatorPerforms validation on the given arguments.- Parameters:
value- the value objectattribute- the attribute descriptor of the givenvalue.
-
isEmpty
protected boolean isEmpty(T value)
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.
-
-