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>
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final intFields inherited from class de.hybris.platform.cmsfacades.common.populator.impl.AbstractNamedQueryDataPopulator
COLON, COMMA, PERCENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildParameterStringMap(String params) Using the parameter String, convert it to a Map<String, String> for future processing.convertParameters(String params) Converts the parameters from the request String into a Map.protected CatalogVersionServicevoidsetCatalogVersionService(CatalogVersionService catalogVersionService) protected voidvalidateInputParameters(String catalogId, String catalogVersionId, String code) Validate if the input parameters are empty, and if they are, throws a ConversionExceptionMethods inherited from class de.hybris.platform.cmsfacades.common.populator.impl.AbstractNamedQueryDataPopulator
getActiveCatalogVersion, getCmsAdminSiteService, populate, setCmsAdminSiteService
-
Field Details
-
PARAM_CODE
- See Also:
-
PARAM_CATALOG_ID
- See Also:
-
PARAM_CATALOG_VERSION
- See Also:
-
PARAMETER_BLOCK_LENGTH
public static final int PARAMETER_BLOCK_LENGTH- See Also:
-
-
Constructor Details
-
MediaSearchByCodeNamedQueryDataPopulator
public MediaSearchByCodeNamedQueryDataPopulator()
-
-
Method Details
-
convertParameters
Description copied from class:AbstractNamedQueryDataPopulatorConverts 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:
convertParametersin classAbstractNamedQueryDataPopulator- Parameters:
params- - the parameters received from the request- Returns:
- a Map of parameters
-
validateInputParameters
Validate if the input parameters are empty, and if they are, throws a ConversionException- Parameters:
catalogId- - the catalog id extracted from the requestcatalogVersionId- - the catalog version id extracted from the request- Throws:
ConversionException
-
buildParameterStringMap
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:
buildParameterStringMapin classAbstractNamedQueryDataPopulator- Parameters:
params- - the String parameter received from the request- Returns:
- a Map<String, String> representing the requested parameter String
-
setCatalogVersionService
-
getCatalogVersionService
-