Class DefaultCxCustomizationService
- java.lang.Object
-
- de.hybris.platform.personalizationservices.customization.impl.DefaultCxCustomizationService
-
- All Implemented Interfaces:
CxCustomizationService
public class DefaultCxCustomizationService extends java.lang.Object implements CxCustomizationService
Default implementation ofCxCustomizationService.
-
-
Constructor Summary
Constructors Constructor Description DefaultCxCustomizationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CxCustomizationModelcreateCustomization(CxCustomizationModel customization, CxCustomizationsGroupModel customizationGroup, java.lang.Integer rank)Creates customization for given customization groupjava.util.Optional<CxCustomizationModel>getCustomization(java.lang.String code, CatalogVersionModel catalogVersion)Retrieves customization with given code defined for given catalog versionjava.util.List<CxCustomizationModel>getCustomizations(CatalogVersionModel catalogVersion)Retrieves all customizations from the systemSearchPageData<CxCustomizationModel>getCustomizations(CatalogVersionModel catalogVersion, java.util.Map<java.lang.String,java.lang.String> params, SearchPageData<?> pagination)Retrieves all customizations from the system filtered by given paramsprotected CxCustomizationGroupDaogetCxCustomizationGroupDao()protected CxCustomizationDaogetCxCustomziationDao()CxCustomizationsGroupModelgetDefaultGroup(CatalogVersionModel catalogVersion)Returns default customization group for given catalog versionprotected ModelServicegetModelService()booleanisDefaultGroup(CatalogVersionModel catalogVersion)Checks if default customization group is created for catalog versionvoidsetCxCustomizationGroupDao(CxCustomizationGroupDao cxCustomizationGroupDao)voidsetCxCustomziationDao(CxCustomizationDao cxCustomziationDao)voidsetModelService(ModelService modelService)
-
-
-
Method Detail
-
getCustomization
public java.util.Optional<CxCustomizationModel> getCustomization(java.lang.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
public java.util.List<CxCustomizationModel> getCustomizations(CatalogVersionModel catalogVersion)
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, java.util.Map<java.lang.String,java.lang.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
public CxCustomizationsGroupModel getDefaultGroup(CatalogVersionModel catalogVersion)
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, java.lang.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
public boolean isDefaultGroup(CatalogVersionModel catalogVersion)
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
public void setCxCustomizationGroupDao(CxCustomizationGroupDao cxCustomizationGroupDao)
-
getCxCustomizationGroupDao
protected CxCustomizationGroupDao getCxCustomizationGroupDao()
-
setCxCustomziationDao
public void setCxCustomziationDao(CxCustomizationDao cxCustomziationDao)
-
getCxCustomziationDao
protected CxCustomizationDao getCxCustomziationDao()
-
setModelService
public void setModelService(ModelService modelService)
-
getModelService
protected ModelService getModelService()
-
-