Class CCPControllerHelperImpl
java.lang.Object
de.hybris.platform.sap.productconfig.occ.util.impl.CCPControllerHelperImpl
- All Implemented Interfaces:
CCPControllerHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompileCsticKey(CsticData cstic, UiGroupData uiGroup) Compiles characteristic keycompilePricingResult(String configId, PricingData priceSummary, List<PriceValueUpdateData> valuePrices) Compiles pricing supplement in WS format, which represents value prices and price summary), from the pricing DTO datacompileValuePriceInput(UiGroupData uiGroup) Compiles the facade layer input for the call for value prices from the provided UI groupConverts price data into the DTO structure we use for OCC exposalcreateAttributeSupplementDTO(PriceValueUpdateData valuePrice) Creates characteristic supplements DTO from the bean representing value prices for a characteristiccreatePriceSupplements(Map<String, PriceDataPair> prices) Creates a list of characteristic value supplements DTO from value pricesvoiddeleteCstics(UiGroupData group) Deletes characteristics that form a UI group (by initializing the respective list)determineFirstGroupId(List<UiGroupData> uiGroups) Searches for the first group with visible characteristics.voidfilterGroups(ConfigurationData configData, String requestedGroupId) Filters group data of given configuration by removing characteristic data from groups that are not matching the requested group Id.voidfilterGroups(List<UiGroupData> groups, String requestedGroupId) Filters the given group list by removing characteristic data from groups that are not matching the requested group Id and are not a conflict group.protected ConfigurationFacadeprotected ConfigurationExpertModeFacadegetConfigurationFromTemplate(String productCode, String configIdTemplate) Copies the values of another configuration that is already existing into a new configuration that is managed by commerce.protected DataMappergetFlattened(UiGroupData uiGroup) Flattens the UI group hierarchy, i.e.Returns image handlerprotected MessageHandlerprotected ProviderFactorygetUiGroup(String configId, String groupId) Gets UI group for provided idgetUiGroup(List<UiGroupData> groupList, String groupId) Finds UI group in a list of groupsReturns UI key generatorbooleanhasSubGroups(UiGroupData group) Checks if a UI groups has sub groupsbooleanisNotRequestedGroup(UiGroupData group, String requestedGroupId) Checks if UI group does not match the provided group IDprotected booleanisStandardGroup(UiGroupData group) mapDTOData(ConfigurationData configData) Maps configuration from DTO to WS representationreadDefaultConfiguration(String productCode) Provides default configuration for product codereadDefaultConfiguration(String productCode, boolean forceReset) Provides default configuration for product code.protected voidsetConfigFacade(ConfigurationFacade configFacade) protected voidsetDataMapper(DataMapper dataMapper)
-
Field Details
-
dataMapper
-
-
Constructor Details
-
CCPControllerHelperImpl
public CCPControllerHelperImpl()
-
-
Method Details
-
getConfigurationExpertModeFacade
-
getProviderFactory
-
getUniqueUIKeyGenerator
Description copied from interface:CCPControllerHelperReturns UI key generator- Specified by:
getUniqueUIKeyGeneratorin interfaceCCPControllerHelper- Returns:
- UI key generator
-
getDataMapper
-
setDataMapper
-
getConfigFacade
-
setConfigFacade
-
getImageHandler
Description copied from interface:CCPControllerHelperReturns image handler- Specified by:
getImageHandlerin interfaceCCPControllerHelper- Returns:
- Image handler
-
compileCsticKey
Description copied from interface:CCPControllerHelperCompiles characteristic key- Specified by:
compileCsticKeyin interfaceCCPControllerHelper- Parameters:
cstic- CharacteristicuiGroup- Group the characteristic belongs to- Returns:
- Key
-
mapDTOData
Description copied from interface:CCPControllerHelperMaps configuration from DTO to WS representation- Specified by:
mapDTODatain interfaceCCPControllerHelper- Parameters:
configData- Configuration in DTO format- Returns:
- Configuration in WS format
-
readDefaultConfiguration
Description copied from interface:CCPControllerHelperProvides default configuration for product code- Specified by:
readDefaultConfigurationin interfaceCCPControllerHelper- Parameters:
productCode- Code of CCP configurable product- Returns:
- Default configuration
-
readDefaultConfiguration
Description copied from interface:CCPControllerHelperProvides default configuration for product code. If parameter forceReset is true it will always return a new configuration independent of an existing configuration for the given product code.- Specified by:
readDefaultConfigurationin interfaceCCPControllerHelper- Parameters:
productCode- Code of CCP configurable productforceReset- If true it returns a new configuration- Returns:
- Default configuration
-
compilePricingResult
public ConfigurationSupplementsWsDTO compilePricingResult(String configId, PricingData priceSummary, List<PriceValueUpdateData> valuePrices) Description copied from interface:CCPControllerHelperCompiles pricing supplement in WS format, which represents value prices and price summary), from the pricing DTO data- Specified by:
compilePricingResultin interfaceCCPControllerHelper- Parameters:
configId- Configuration idpriceSummary- Price summary in DTO formatvaluePrices- Value prices in DTO format- Returns:
- Configuration supplement in WS format
-
createAttributeSupplementDTO
Description copied from interface:CCPControllerHelperCreates characteristic supplements DTO from the bean representing value prices for a characteristic- Specified by:
createAttributeSupplementDTOin interfaceCCPControllerHelper- Parameters:
valuePrice- Value prices- Returns:
- Price supplements on characteristic level
-
filterGroups
Description copied from interface:CCPControllerHelperFilters group data of given configuration by removing characteristic data from groups that are not matching the requested group Id. No filtering if requested group id is null.- Specified by:
filterGroupsin interfaceCCPControllerHelper- Parameters:
configData- Configuration data to filterrequestedGroupId- Group id for which data should be completely returned
-
filterGroups
Description copied from interface:CCPControllerHelperFilters the given group list by removing characteristic data from groups that are not matching the requested group Id and are not a conflict group. Sub-groups are also taken into account. No filtering if requested group id is null.- Specified by:
filterGroupsin interfaceCCPControllerHelper- Parameters:
groups- List of groups to filterrequestedGroupId- The group id for which data should be completely returned
-
deleteCstics
Description copied from interface:CCPControllerHelperDeletes characteristics that form a UI group (by initializing the respective list)- Specified by:
deleteCsticsin interfaceCCPControllerHelper- Parameters:
group- UI group
-
isNotRequestedGroup
Description copied from interface:CCPControllerHelperChecks if UI group does not match the provided group ID- Specified by:
isNotRequestedGroupin interfaceCCPControllerHelper- Parameters:
group- UI grouprequestedGroupId- Group ID that we expect to find- Returns:
- Group does not match ID?
-
isStandardGroup
-
hasSubGroups
Description copied from interface:CCPControllerHelperChecks if a UI groups has sub groups- Specified by:
hasSubGroupsin interfaceCCPControllerHelper- Parameters:
group- UI group- Returns:
- Does UI group have sub groups?
-
determineFirstGroupId
Description copied from interface:CCPControllerHelperSearches for the first group with visible characteristics. It first searches in the groups of the given list before searching in subgroups.- Specified by:
determineFirstGroupIdin interfaceCCPControllerHelper- Parameters:
uiGroups- List of UI groups- Returns:
- Id of first group
-
createPriceSupplements
Description copied from interface:CCPControllerHelperCreates a list of characteristic value supplements DTO from value prices- Specified by:
createPriceSupplementsin interfaceCCPControllerHelper- Parameters:
prices- Map of value prices- Returns:
- List of characteristic value supplements
-
convertEntrytoWsDTO
Description copied from interface:CCPControllerHelperConverts price data into the DTO structure we use for OCC exposal- Specified by:
convertEntrytoWsDTOin interfaceCCPControllerHelper- Parameters:
entry- Price data, with characteristic value id as key- Returns:
- DTO holding the supplementary price data per value
-
getUiGroup
Description copied from interface:CCPControllerHelperGets UI group for provided id- Specified by:
getUiGroupin interfaceCCPControllerHelper- Parameters:
configId- Configuration idgroupId- Group id- Returns:
- Ui group in DTO representation
-
getFlattened
Description copied from interface:CCPControllerHelperFlattens the UI group hierarchy, i.e. brings the tree of UI groups in a stream consisting of all UI groups- Specified by:
getFlattenedin interfaceCCPControllerHelper- Parameters:
uiGroup- Root group- Returns:
- Strem of UI groups
-
getUiGroup
Description copied from interface:CCPControllerHelperFinds UI group in a list of groups- Specified by:
getUiGroupin interfaceCCPControllerHelper- Parameters:
groupList- List of UI groups we want to searchgroupId- Group id (which is unique)- Returns:
- Group that matches provided groupId
-
compileValuePriceInput
Description copied from interface:CCPControllerHelperCompiles the facade layer input for the call for value prices from the provided UI group- Specified by:
compileValuePriceInputin interfaceCCPControllerHelper- Parameters:
uiGroup- UI group- Returns:
- List of characteristic keys for the facade layer call
-
getConfigurationFromTemplate
Description copied from interface:CCPControllerHelperCopies the values of another configuration that is already existing into a new configuration that is managed by commerce. This API does not support product variants- Specified by:
getConfigurationFromTemplatein interfaceCCPControllerHelper- Parameters:
productCode- Code of CCP configurable productconfigIdTemplate- ID of configuration template- Returns:
- Configuration carrying attribute values of the configuration template
-
getMessageHandler
-