Class DefaultAttributeContentValidator<T>
java.lang.Object
de.hybris.platform.cmsfacades.cmsitems.impl.DefaultAttributeContentValidator<T>
- Type Parameters:
T- the Object type being validated.
- All Implemented Interfaces:
AttributeContentValidator<T>
public class DefaultAttributeContentValidator<T>
extends Object
implements AttributeContentValidator<T>
Default and generic implementation of the
AttributeContentValidator.
Works as a dispatcher to other AttributeValidators, by processing all validations stored in
injected in this Bean if a Predicate<AttributeDesciptorModel> holds true.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisCollection(AttributeDescriptorModel attribute) will return true if this property is a collection (localized or not) as per our platform type systemvoidsetValidatorMap(Map<Predicate<AttributeDescriptorModel>, AttributeContentValidator> validatorMap) validate(T value, AttributeDescriptorModel attributeDescriptor) Performs validation on the given arguments.
-
Field Details
-
COLLECTION_TYPE
- See Also:
-
-
Constructor Details
-
DefaultAttributeContentValidator
public DefaultAttributeContentValidator()
-
-
Method Details
-
validate
Description copied from interface:AttributeContentValidatorPerforms validation on the given arguments.- Specified by:
validatein interfaceAttributeContentValidator<T>- Parameters:
value- the value objectattributeDescriptor- the attribute descriptor of the givenvalue.
-
isCollection
will return true if this property is a collection (localized or not) as per our platform type system- Parameters:
attribute- theAttributeDescriptorModeldescribing the metadata of the property of a class- Returns:
- a boolean
-
getValidatorMap
-
setValidatorMap
public void setValidatorMap(Map<Predicate<AttributeDescriptorModel>, AttributeContentValidator> validatorMap)
-