Class CMSItemDropdownComponentTypeAttributePopulator

java.lang.Object
de.hybris.platform.cmsfacades.types.populator.CMSItemDropdownComponentTypeAttributePopulator
All Implemented Interfaces:
Populator<AttributeDescriptorModel,ComponentTypeAttributeData>
Direct Known Subclasses:
CMSNavigationEntryItemPopulator

public class CMSItemDropdownComponentTypeAttributePopulator extends Object implements Populator<AttributeDescriptorModel,ComponentTypeAttributeData>
Populator aimed at setting all necessary information for the receiving end to build a cms item dropdown widget:
  • identifies the cmsStructureType as CMS_ITEM_DROPDOWN
  • marks the dropdown to use ID_ATTRIBUTE as idAttribute
  • Constructor Details

    • CMSItemDropdownComponentTypeAttributePopulator

      public CMSItemDropdownComponentTypeAttributePopulator()
  • Method Details

    • populate

      public void populate(AttributeDescriptorModel source, ComponentTypeAttributeData target) throws ConversionException
      Description copied from interface: Populator
      Populate the target instance with values from the source instance.
      Specified by:
      populate in interface Populator<AttributeDescriptorModel,ComponentTypeAttributeData>
      Parameters:
      source - the source object
      target - the target to fill
      Throws:
      ConversionException - if an error occurs
    • setPlaceholder

      protected void setPlaceholder(ComponentTypeAttributeData target)
      Sets placeholder for a dropdown if it's not empty.
      Parameters:
      target - the ComponentTypeAttributeData
    • getComponentParams

      protected Map<String,String> getComponentParams(Class<?> type, ComponentTypeAttributeData target)
    • getComponentSubTypes

      protected Map<String,String> getComponentSubTypes(Class<?> type)
      This method retrieves a map of concrete subtypes of the provided type. (If the provided type is concrete it will also be included in the map).
      Parameters:
      type - The type for which to retrieve its map of subtypes.
      Returns:
      map Map of concrete component subtypes. The key is the code of the sub-type and the value is its i18n key.
    • getComponentTypeI18nKey

      protected String getComponentTypeI18nKey(ComposedTypeModel typeModel)
      This method retrieves the i18n key of the provided component type.
      Parameters:
      typeModel - The type for which to retrieve its map of subtypes.
      Returns:
      String The i18n key of the provided component type.
    • setAttributeDescriptorModelHelperService

      public void setAttributeDescriptorModelHelperService(AttributeDescriptorModelHelperService attributeDescriptorModelHelperService)
    • getAttributeDescriptorModelHelperService

      protected AttributeDescriptorModelHelperService getAttributeDescriptorModelHelperService()
    • setTypeService

      public void setTypeService(TypeService typeService)
    • getTypeService

      protected TypeService getTypeService()
    • setI18nComponentTypePopulator

      public void setI18nComponentTypePopulator(I18nComponentTypePopulator i18nComponentTypePopulator)
    • getI18nComponentTypePopulator

      protected I18nComponentTypePopulator getI18nComponentTypePopulator()
    • setComponentTypeDataFactory

      public void setComponentTypeDataFactory(org.springframework.beans.factory.ObjectFactory<ComponentTypeData> componentTypeDataFactory)
    • getComponentTypeDataFactory

      protected org.springframework.beans.factory.ObjectFactory<ComponentTypeData> getComponentTypeDataFactory()
    • setSearchParams

      public void setSearchParams(String searchParams)
      If searchParams is set, the value will be added to the "params" map for the "itemSearchParams" key. This is useful when the "itemSearchParams" query-parameter needs to be set when calling the CMS Item Search API. Example of usage of this setter:
       
       	<property name="searchParams" value="pageStatus:active" />
       
       
      Parameters:
      searchParams - the searchParams value
    • getSearchParams

      protected String getSearchParams()
    • getPlaceholder

      protected String getPlaceholder()
    • setPlaceholder

      public void setPlaceholder(String placeholder)