Class LinkTargetAttributeContentConverter
java.lang.Object
de.hybris.platform.cmsfacades.cmsitems.attributeconverters.LinkTargetAttributeContentConverter
- All Implemented Interfaces:
AttributeContentConverter<AttributeDescriptorModel>
public class LinkTargetAttributeContentConverter
extends Object
implements AttributeContentConverter<AttributeDescriptorModel>
Implementation of
AttributeContentConverter that converts properties of type LinkTargets from and to boolean-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertDataToModel(AttributeDescriptorModel attributeDescriptor, Object source) Converts a serializable representation to a property value in case that the predicate defined is true for a given attribute descriptor.convertModelToData(AttributeDescriptorModel attribute, Object source) Converts a property value to a serializable representation in case that the predicate defined is true for a given attribute descriptor.Returns the predicate that constrains the converter.protected Predicate<AttributeDescriptorModel>voidsetPredicate(Predicate<AttributeDescriptorModel> predicate)
-
Constructor Details
-
LinkTargetAttributeContentConverter
public LinkTargetAttributeContentConverter()
-
-
Method Details
-
getConstrainedBy
Description copied from interface:AttributeContentConverterReturns the predicate that constrains the converter. This predicate will be tested against a given attribute descriptor and if this predicate istrue, then it applies the conversion,- Specified by:
getConstrainedByin interfaceAttributeContentConverter<AttributeDescriptorModel>- Returns:
- the predicate related with the converter. Never
null.
-
convertModelToData
Description copied from interface:AttributeContentConverterConverts a property value to a serializable representation in case that the predicate defined is true for a given attribute descriptor.- Specified by:
convertModelToDatain interfaceAttributeContentConverter<AttributeDescriptorModel>- Parameters:
attribute- the object describing the sourcesource- the persistent source described by the attribute that needs be converted to some serializable representation- Returns:
- the converter instance. Never
null.
-
convertDataToModel
Description copied from interface:AttributeContentConverterConverts a serializable representation to a property value in case that the predicate defined is true for a given attribute descriptor.- Specified by:
convertDataToModelin interfaceAttributeContentConverter<AttributeDescriptorModel>- Parameters:
attributeDescriptor- the object describing the sourcesource- the serializable representation described by the attribute that needs be converted to some persistent property- Returns:
- the converter instance. Never
null.
-
setPredicate
-
getPredicate
-