Class LinkTargetAttributeContentConverter
- java.lang.Object
-
- de.hybris.platform.cmsfacades.cmsitems.attributeconverters.LinkTargetAttributeContentConverter
-
- All Implemented Interfaces:
AttributeContentConverter<AttributeDescriptorModel>
public class LinkTargetAttributeContentConverter extends java.lang.Object implements AttributeContentConverter<AttributeDescriptorModel>
Implementation ofAttributeContentConverterthat converts properties of typeLinkTargetsfrom and to boolean
-
-
Constructor Summary
Constructors Constructor Description LinkTargetAttributeContentConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectconvertDataToModel(AttributeDescriptorModel attributeDescriptor, java.lang.Object source)Converts a serializable representation to a property value in case that the predicate defined is true for a given attribute descriptor.java.lang.ObjectconvertModelToData(AttributeDescriptorModel attribute, java.lang.Object source)Converts a property value to a serializable representation in case that the predicate defined is true for a given attribute descriptor.java.util.function.Predicate<AttributeDescriptorModel>getConstrainedBy()Returns the predicate that constrains the converter.protected java.util.function.Predicate<AttributeDescriptorModel>getPredicate()voidsetPredicate(java.util.function.Predicate<AttributeDescriptorModel> predicate)
-
-
-
Method Detail
-
getConstrainedBy
public java.util.function.Predicate<AttributeDescriptorModel> 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
public java.lang.Object convertModelToData(AttributeDescriptorModel attribute, java.lang.Object source)
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
public java.lang.Object convertDataToModel(AttributeDescriptorModel attributeDescriptor, java.lang.Object source)
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
public void setPredicate(java.util.function.Predicate<AttributeDescriptorModel> predicate)
-
getPredicate
protected java.util.function.Predicate<AttributeDescriptorModel> getPredicate()
-
-