Class MediaSearchByCodeNamedQueryDataPopulator

java.lang.Object
de.hybris.platform.cmsfacades.common.populator.impl.AbstractNamedQueryDataPopulator
de.hybris.platform.cmsfacades.media.populator.MediaSearchByCodeNamedQueryDataPopulator
All Implemented Interfaces:
Populator<NamedQueryData,NamedQuery>

public class MediaSearchByCodeNamedQueryDataPopulator extends AbstractNamedQueryDataPopulator
This populator will convert parameters for the Media Search by code Named Query. This converter uses the catalogId and catalogVersionId parameters to fetch the CatalogVersionModel and add it to the NamedQuery parameter's Map.
  • Field Details

  • Constructor Details

    • MediaSearchByCodeNamedQueryDataPopulator

      public MediaSearchByCodeNamedQueryDataPopulator()
  • Method Details

    • convertParameters

      public Map<String,Object> convertParameters(String params)
      Description copied from class: AbstractNamedQueryDataPopulator
      Converts the parameters from the request String into a Map. The input, if not empty, should be already validated with the following format: {param}:{value} Multiple parameters are also allowed separated by comma
      Specified by:
      convertParameters in class AbstractNamedQueryDataPopulator
      Parameters:
      params - - the parameters received from the request
      Returns:
      a Map of parameters
    • validateInputParameters

      protected void validateInputParameters(String catalogId, String catalogVersionId, String code)
      Validate if the input parameters are empty, and if they are, throws a ConversionException
      Parameters:
      catalogId - - the catalog id extracted from the request
      catalogVersionId - - the catalog version id extracted from the request
      Throws:
      ConversionException
    • buildParameterStringMap

      public Map<String,String> buildParameterStringMap(String params)
      Using the parameter String, convert it to a Map<String, String> for future processing. Suppress sonar warning (squid:S2095 | Java's garbage collection cannot be relied on to clean up everything. Specifically, connections, streams, files and other classes that implement the Closeable interface or it's super-interface) : in this case Stream is not opening any connection or IO stream.
      Overrides:
      buildParameterStringMap in class AbstractNamedQueryDataPopulator
      Parameters:
      params - - the String parameter received from the request
      Returns:
      a Map<String, String> representing the requested parameter String
    • setCatalogVersionService

      public void setCatalogVersionService(CatalogVersionService catalogVersionService)
    • getCatalogVersionService

      protected CatalogVersionService getCatalogVersionService()