Class DefaultCxCustomizationService
java.lang.Object
de.hybris.platform.personalizationservices.customization.impl.DefaultCxCustomizationService
- All Implemented Interfaces:
CxCustomizationService
Default implementation of
CxCustomizationService.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCustomization(CxCustomizationModel customization, CxCustomizationsGroupModel customizationGroup, Integer rank) Creates customization for given customization groupgetCustomization(String code, CatalogVersionModel catalogVersion) Retrieves customization with given code defined for given catalog versiongetCustomizations(CatalogVersionModel catalogVersion) Retrieves all customizations from the systemgetCustomizations(CatalogVersionModel catalogVersion, Map<String, String> params, SearchPageData<?> pagination) Retrieves all customizations from the system filtered by given paramsprotected CxCustomizationGroupDaoprotected CxCustomizationDaogetDefaultGroup(CatalogVersionModel catalogVersion) Returns default customization group for given catalog versionprotected ModelServicebooleanisDefaultGroup(CatalogVersionModel catalogVersion) Checks if default customization group is created for catalog versionvoidsetCxCustomizationGroupDao(CxCustomizationGroupDao cxCustomizationGroupDao) voidsetCxCustomziationDao(CxCustomizationDao cxCustomziationDao) voidsetModelService(ModelService modelService)
-
Constructor Details
-
DefaultCxCustomizationService
public DefaultCxCustomizationService()
-
-
Method Details
-
getCustomization
public Optional<CxCustomizationModel> getCustomization(String code, CatalogVersionModel catalogVersion) Description copied from interface:CxCustomizationServiceRetrieves customization with given code defined for given catalog version- Specified by:
getCustomizationin interfaceCxCustomizationService- Parameters:
code- identifier of customizationcatalogVersion- Catalog version- Returns:
- customization with given code or Optional.empty
-
getCustomizations
Description copied from interface:CxCustomizationServiceRetrieves all customizations from the system- Specified by:
getCustomizationsin interfaceCxCustomizationService- Parameters:
catalogVersion- Catalog version- Returns:
- customizations from system or empty list if none
-
getCustomizations
public SearchPageData<CxCustomizationModel> getCustomizations(CatalogVersionModel catalogVersion, Map<String, String> params, SearchPageData<?> pagination) Description copied from interface:CxCustomizationServiceRetrieves all customizations from the system filtered by given params- Specified by:
getCustomizationsin interfaceCxCustomizationService- Parameters:
catalogVersion- Catalog versionparams- parameters for filteringpagination- holder of pagination data and sort options- Returns:
- customizations from system or empty list if none
-
getDefaultGroup
Description copied from interface:CxCustomizationServiceReturns default customization group for given catalog version- Specified by:
getDefaultGroupin interfaceCxCustomizationService- Parameters:
catalogVersion- Catalog version- Returns:
- default customization group
-
createCustomization
public CxCustomizationModel createCustomization(CxCustomizationModel customization, CxCustomizationsGroupModel customizationGroup, Integer rank) Description copied from interface:CxCustomizationServiceCreates customization for given customization group- Specified by:
createCustomizationin interfaceCxCustomizationService- Parameters:
customization- Customization to be createdcustomizationGroup- Customization group for which customization should be createdrank- Position in customization list for group. Parameter is optional. If null customization should be added at some default position.- Returns:
- Created customization
-
isDefaultGroup
Description copied from interface:CxCustomizationServiceChecks if default customization group is created for catalog version- Specified by:
isDefaultGroupin interfaceCxCustomizationService- Parameters:
catalogVersion- Catalog version- Returns:
- true if there is already customization group created for catalog version and false otherwise.
-
setCxCustomizationGroupDao
-
getCxCustomizationGroupDao
-
setCxCustomziationDao
-
getCxCustomziationDao
-
setModelService
-
getModelService
-