Class ComposedTypeToAttributeCollectionConverter
- java.lang.Object
-
- de.hybris.platform.cmsfacades.cmsitems.converter.ComposedTypeToAttributeCollectionConverter
-
- All Implemented Interfaces:
Converter<ComposedTypeModel,java.util.Collection<AttributeDescriptorModel>>,org.springframework.beans.factory.InitializingBean
public class ComposedTypeToAttributeCollectionConverter extends java.lang.Object implements Converter<ComposedTypeModel,java.util.Collection<AttributeDescriptorModel>>, org.springframework.beans.factory.InitializingBean
ThisConverteris used to retrieve the list of attributes to convert. The returned list only contains attributes that haven't been blacklisted.
-
-
Constructor Summary
Constructors Constructor Description ComposedTypeToAttributeCollectionConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()protected java.util.Collection<AttributeDescriptorModel>collectAttributeDescriptors(ComposedTypeModel composedType)Collects attributes of a given type that is not blacklisted until it reaches the root type.java.util.Collection<AttributeDescriptorModel>convert(ComposedTypeModel typeModel)Uses the sourceSobject and produces an new instance ofT.protected java.util.Map<java.lang.String,java.util.Set<java.lang.String>>getBlacklistedAttributes()protected java.util.Set<java.lang.String>getBlacklistedTypes()protected java.util.Map<java.lang.String,java.lang.String>getTypeBlacklistedAttributeMap()voidsetBlacklistedTypes(java.util.Set<java.lang.String> blacklistedTypes)voidsetTypeBlacklistedAttributeMap(java.util.Map<java.lang.String,java.lang.String> typeBlacklistedAttributeMap)
-
-
-
Method Detail
-
convert
public java.util.Collection<AttributeDescriptorModel> convert(ComposedTypeModel typeModel)
Description copied from interface:ConverterUses the sourceSobject and produces an new instance ofT.- Specified by:
convertin interfaceConverter<ComposedTypeModel,java.util.Collection<AttributeDescriptorModel>>- Parameters:
typeModel- the input to be converted.- Returns:
- an instance of
T, converted from the input source.
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
java.lang.Exception
-
collectAttributeDescriptors
protected java.util.Collection<AttributeDescriptorModel> collectAttributeDescriptors(ComposedTypeModel composedType)
Collects attributes of a given type that is not blacklisted until it reaches the root type.- Parameters:
composedType- the type which the attributes are collected from.
-
getTypeBlacklistedAttributeMap
protected java.util.Map<java.lang.String,java.lang.String> getTypeBlacklistedAttributeMap()
-
setTypeBlacklistedAttributeMap
public void setTypeBlacklistedAttributeMap(java.util.Map<java.lang.String,java.lang.String> typeBlacklistedAttributeMap)
-
getBlacklistedAttributes
protected java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getBlacklistedAttributes()
-
getBlacklistedTypes
protected java.util.Set<java.lang.String> getBlacklistedTypes()
-
setBlacklistedTypes
public void setBlacklistedTypes(java.util.Set<java.lang.String> blacklistedTypes)
-
-