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 Details

    • GenericComposedTypeToStructureConverter

      public GenericComposedTypeToStructureConverter()
  • Method Details

    • convert

      public ComponentTypeStructure convert(ComposedTypeModel source)
      Description copied from interface: Converter
      Uses the source S object and produces an new instance of T.
      Specified by:
      convert in interface Converter<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 the composedType.
    • convertAttributeDescriptor

      protected ComponentTypeAttributeStructure convertAttributeDescriptor(AttributeDescriptorModel attributeDescriptor)
      Converts an attribute descriptor into an instance of ComponentTypeAttributeStructure. 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

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • getTypeDataClassFunction

      protected Function<ComposedTypeModel,Class> getTypeDataClassFunction()
    • setTypeDataClassFunction

      public void setTypeDataClassFunction(Function<ComposedTypeModel,Class> typeDataClassFunction)
    • getStructureTypeBlacklistAttributeMap

      public Map<String,String> getStructureTypeBlacklistAttributeMap()
    • setStructureTypeBlacklistAttributeMap

      public void setStructureTypeBlacklistAttributeMap(Map<String,String> structureTypeBlacklistAttributeMap)
    • getBlacklistAttributes

      protected Map<String,Set<String>> getBlacklistAttributes()
    • setBlacklistAttributes

      public void setBlacklistAttributes(Map<String,Set<String>> blacklistAttributes)
    • getAttributePopulatorsProvider

      protected AttributePopulatorsProvider getAttributePopulatorsProvider()
    • setAttributePopulatorsProvider

      public void setAttributePopulatorsProvider(AttributePopulatorsProvider attributePopulatorsProvider)
    • 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)