Class GenericComposedTypeToStructureConverter
java.lang.Object
de.hybris.platform.cmsfacades.types.converter.GenericComposedTypeToStructureConverter
- All Implemented Interfaces:
Converter<ComposedTypeModel,,ComponentTypeStructure> org.springframework.beans.factory.InitializingBean
public class GenericComposedTypeToStructureConverter
extends Object
implements Converter<ComposedTypeModel,ComponentTypeStructure>, org.springframework.beans.factory.InitializingBean
Converter class from
ComposedTypeModel to ComponentTypeStructure.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidcollectAttributes(ComposedTypeModel composedType, List<ComponentTypeAttributeStructure> attributes) Recursively collects attributes of a given type that is not blacklisted until it reaches the root type (CMSItem).convert(ComposedTypeModel source) Uses the sourceSobject and produces an new instance ofT.protected ComponentTypeAttributeStructureconvertAttributeDescriptor(AttributeDescriptorModel attributeDescriptor) Converts an attribute descriptor into an instance ofComponentTypeAttributeStructure.protected AttributePopulatorsProviderprotected org.springframework.beans.factory.ObjectFactory<ComponentTypeAttributeStructure>protected org.springframework.beans.factory.ObjectFactory<ComponentTypeStructure>protected Function<ComposedTypeModel,Class> voidsetAttributePopulatorsProvider(AttributePopulatorsProvider attributePopulatorsProvider) voidsetBlacklistAttributes(Map<String, Set<String>> blacklistAttributes) voidsetComponentTypeAttributeStructureObjectFactory(org.springframework.beans.factory.ObjectFactory<ComponentTypeAttributeStructure> componentTypeAttributeStructureObjectFactory) voidsetComponentTypeStructureObjectFactory(org.springframework.beans.factory.ObjectFactory<ComponentTypeStructure> componentTypeStructureObjectFactory) voidsetStructureTypeBlacklistAttributeMap(Map<String, String> structureTypeBlacklistAttributeMap) voidsetTypeDataClassFunction(Function<ComposedTypeModel, Class> typeDataClassFunction)
-
Constructor Details
-
GenericComposedTypeToStructureConverter
public GenericComposedTypeToStructureConverter()
-
-
Method Details
-
convert
Description copied from interface:ConverterUses the sourceSobject and produces an new instance ofT.- Specified by:
convertin interfaceConverter<ComposedTypeModel,ComponentTypeStructure> - Parameters:
source- the input to be converted.- Returns:
- an instance of
T, converted from the input source.
-
collectAttributes
protected void collectAttributes(ComposedTypeModel composedType, List<ComponentTypeAttributeStructure> attributes) Recursively collects attributes of a given type that is not blacklisted until it reaches the root type (CMSItem).- Parameters:
composedType- the type which the attributes are collected from.attributes- the attribute list that will be augmented by introspecting thecomposedType.
-
convertAttributeDescriptor
protected ComponentTypeAttributeStructure convertAttributeDescriptor(AttributeDescriptorModel attributeDescriptor) Converts an attribute descriptor into an instance ofComponentTypeAttributeStructure. Applies registry configuration on top of each attribute as well.- Parameters:
attributeDescriptor- the attribute descriptor to be converted/- Returns:
- instance of ComponentTypeAttributeStructure populated with values from configuration on top of type service and registry.
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getTypeDataClassFunction
-
setTypeDataClassFunction
-
getStructureTypeBlacklistAttributeMap
-
setStructureTypeBlacklistAttributeMap
-
getBlacklistAttributes
-
setBlacklistAttributes
-
getAttributePopulatorsProvider
-
setAttributePopulatorsProvider
-
getComponentTypeAttributeStructureObjectFactory
protected org.springframework.beans.factory.ObjectFactory<ComponentTypeAttributeStructure> getComponentTypeAttributeStructureObjectFactory() -
setComponentTypeAttributeStructureObjectFactory
public void setComponentTypeAttributeStructureObjectFactory(org.springframework.beans.factory.ObjectFactory<ComponentTypeAttributeStructure> componentTypeAttributeStructureObjectFactory) -
getComponentTypeStructureObjectFactory
protected org.springframework.beans.factory.ObjectFactory<ComponentTypeStructure> getComponentTypeStructureObjectFactory() -
setComponentTypeStructureObjectFactory
public void setComponentTypeStructureObjectFactory(org.springframework.beans.factory.ObjectFactory<ComponentTypeStructure> componentTypeStructureObjectFactory)
-