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 has NotNullConstraintModel and NotEmptyConstraintModel constraints.
  • Constructor Details

    • NullCheckAttributeContentValidator

      public NullCheckAttributeContentValidator()
  • Method Details

    • validate

      public List<ValidationError> validate(T value, AttributeDescriptorModel attribute)
      Description copied from interface: AttributeContentValidator
      Performs validation on the given arguments.
      Parameters:
      value - the value object
      attribute - the attribute descriptor of the given value.
    • 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:
      true if the value is empty; false otherwise.