Class UpdateConfigureProductController
- java.lang.Object
-
- de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
-
- de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
-
- de.hybris.platform.sap.productconfig.frontend.controllers.AbstractProductConfigController
-
- de.hybris.platform.sap.productconfig.frontend.controllers.UpdateConfigureProductController
-
@Controller("asdf") @RequestMapping public class UpdateConfigureProductController extends AbstractProductConfigControllerController for updating the dynamic product configuration content page.- See Also:
ConfigureProductController
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
AbstractController.HttpNotFoundException
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.sap.productconfig.frontend.controllers.AbstractProductConfigController
CMS_PAGE_TYPE, CMS_PC_PAGE_ID, CMS_PC_PAGE_TYPE
-
Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
CMS_PAGE_MODEL, CMS_PAGE_TITLE, PAGE_ROOT, REDIRECT_TO_LOGIN_FOR_CHECKOUT, REDIRECT_TO_MULTISTEP_CHECKOUT, REGISTRATION_CONSENT_ID, UTF_8
-
Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
FORWARD_PREFIX, REDIRECT_PREFIX, ROOT
-
-
Constructor Summary
Constructors Constructor Description UpdateConfigureProductController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterUpdate(UpdateDataHolder updateData, org.springframework.ui.Model model)protected voidbeforeUpdate(UpdateDataHolder updateData)protected voidcheckAutoExpandMode(CPQActionType action, UpdateDataHolder updateData)protected voidcheckAutoExpandModeOnValueChange(ConfigurationData configData, java.lang.String firstErrorCsticId)protected voidexecuteUpdate(UpdateDataHolder updateData)protected intfindCurrentGroupIndex(java.lang.String currentGroupId, java.util.List<UiGroupData> csticGroupsFlat)protected UiGroupDatafindFirstConflictGroupForCsticId(java.util.List<UiGroupData> uiGroups, java.lang.String csticId)protected UiGroupDatafindFirstGroupForCsticId(java.util.List<UiGroupData> uiGroups, java.lang.String csticId)protected java.lang.StringgetCsticKeyForFocusIdPath(ConfigurationData configData)protected java.util.List<java.lang.String>getCsticKeysForExpandedSingleLevelGroups(java.util.List<UiGroupData> groups)protected java.lang.StringgetGroupIdForPrevNextButtonClick(CPQActionType prevNextButtonClicked, java.lang.String currentGroupId, java.util.List<UiGroupData> csticGroupsFlat, int currentGroupIndex)protected java.lang.StringgetNextGroupId(java.lang.String currentGroupId, java.util.List<UiGroupData> csticGroupsFlat, int currentGroupPosition)protected java.lang.StringgetPreviousGroupId(java.lang.String currentGroupId, java.util.List<UiGroupData> csticGroupsFlat, int currentGroupPosition)protected voidhandleAutoExpand(UpdateDataHolder updateData, ConfigurationData configData)protected voidhandleAutoExpandAndSyncUIStatus(UpdateDataHolder updateData, ConfigurationData configData)protected voidhandleCPQAction(UpdateDataHolder updateData)protected voidhandleCPQActionBeforeUpdate(UpdateDataHolder updateData)protected voidhandleGroupIdToDisplayForNavigationLinks(CPQActionType action, UpdateDataHolder updateData)protected voidhandleGroupIdToDisplayWhenSolvingConflicts(CPQActionType action, UpdateDataHolder updateData)protected voidhandleShowExtendedMessageFlag(CPQActionType action, UpdateDataHolder updateData)protected voidhandleShowFullLongTextFlag(CPQActionType action, UpdateDataHolder updateData)This method handles the show long text flag consistently for all occurrences of a cstic.
The same cstic can appear in several groups (e.g.protected voidhandleToggleImageGallery(CPQActionType action, UpdateDataHolder updateData)protected voididentifyPrevNextGroup(CPQActionType action, UpdateDataHolder updateData)Checks if previous or next button has been clicked and tries to identify the previous or next group respectively.protected UpdateDataHolderinitUpdateData(ConfigurationData configData, org.springframework.validation.BindingResult bindingResult, javax.servlet.http.HttpServletRequest request)protected booleanisCsticPartOfGroup(UiGroupData uiGroup, java.lang.String csticId)protected booleanisFirstErrorCurrentFocusCstic(java.lang.String firstErrorCsticId, java.lang.String focusId)protected booleanisFocusIdSet(java.lang.String focusId)protected booleanisOutdatedValidationError(java.util.Map.Entry<java.lang.String,org.springframework.validation.FieldError> entry, java.util.List<java.lang.String> csticsDisplayed)protected java.util.Map<java.lang.String,org.springframework.validation.FieldError>removeOutdatedValidationErrors(UpdateDataHolder updateData)protected org.springframework.web.servlet.ModelAndViewrender(org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request, UpdateDataHolder updateData)protected voidresetCPQActionType(ConfigurationData configData)protected voidupdateConfiguration(UpdateDataHolder updateData, org.springframework.ui.Model model)org.springframework.web.servlet.ModelAndViewupdateConfigureProduct(@Valid ConfigurationData configData, org.springframework.validation.BindingResult bindingResult, org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request)Updates a configuration based on the user inputs and renders back the changes.-
Methods inherited from class de.hybris.platform.sap.productconfig.frontend.controllers.AbstractProductConfigController
afterReloadConfiguration, cleanUpSessionAttribute, getAbstractOrderEntryLinkStrategy, getBindingResultForConfigAndSaveUiStatus, getBindingResultForConfiguration, getBreadcrumbBuilder, getCartEntryNumber, getCartEntryNumber, getCartFacade, getCartItemByConfigId, getCartItemByProductCode, getConfigCartFacade, getConfigFacade, getConfigurationErrorHandler, getGalleryImages, getOrderEntry, getOrderEntry, getPageId, getPageType, getProductCodeForCartItem, getProductConfigurationConflictChecker, getProductConfigurationValidator, getProductDataForProductCode, getProductFacade, getProductLinkStrategy, getProductService, getSessionAccessFacade, getUiRecorder, getUiStateHandler, getUiStatusForConfig, getUiStatusForConfigId, getUiStatusSync, handleRequestContext, initBinderConfigData, initializeUiStatus, isConfigLinkedToCart, isConfigRemoved, loadNewConfiguration, logConfigurationCheckDeviation, logLoadConfig, logModelmetaData, logRequestMetaData, populateCMSAttributes, populateProductData, populateProductData, populateProductDetailForDisplay, reloadConfigurationById, reloadConfigurationByKBKey, removeNullCstics, removeNullCsticsFromGroup, setAbstractOrderEntryLinkStrategy, setBreadcrumbBuilder, setCartEntryLinks, setCartFacade, setConfigCartFacade, setConfigFacade, setConfigurationErrorHandler, setProductConfigurationConflictChecker, setProductConfigurationValidator, setProductFacade, setProductLinkStrategy, setProductService, setSessionAccessFacade, setUiRecorder, setUiStateHandler, setUiStatusForConfig, setUiStatusSync, updatePageTitle
-
Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
addRegistrationConsentDataToModel, checkRequestUrl, createMetaElement, decodeWithScheme, getBaseSiteService, getCheckoutRedirectUrl, getCmsPageService, getCmsPreviewService, getCmsSiteService, getConfigurationService, getConsentFacade, getContentPageForLabelOrId, getCurrencies, getCurrentCurrency, getCurrentLanguage, getCustomerFacade, getHostConfigService, getI18nService, getLanguages, getMessageSource, getPageTitleResolver, getRequestContextData, getSessionService, getSiteConfigService, getSiteName, getSiteUid, getStoreSessionFacade, getUser, getUserFacade, getViewForPage, getViewForPage, prepareNotFoundPage, setUpMetaData, setUpMetaDataForContentPage, storeCmsPageInModel, storeContentPageTitleInModel, storeContinueUrl, urlEncode
-
Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
addRequestToModel, getBean
-
-
-
-
Method Detail
-
updateConfigureProduct
@RequestMapping(value="/cpq/config", method=POST) @ResponseBody public org.springframework.web.servlet.ModelAndView updateConfigureProduct(@ModelAttribute("config") @Valid @Valid ConfigurationData configData, org.springframework.validation.BindingResult bindingResult, org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request) throws BusinessExceptionUpdates a configuration based on the user inputs and renders back the changes.- Parameters:
configData- current configurationbindingResult- error message storemodel- view modelrequest- HTTP-Request- Returns:
- view name
- Throws:
BusinessException
-
render
protected org.springframework.web.servlet.ModelAndView render(org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest request, UpdateDataHolder updateData) throws CMSItemNotFoundException- Throws:
CMSItemNotFoundException
-
updateConfiguration
protected void updateConfiguration(UpdateDataHolder updateData, org.springframework.ui.Model model)
-
afterUpdate
protected void afterUpdate(UpdateDataHolder updateData, org.springframework.ui.Model model)
-
handleCPQAction
protected void handleCPQAction(UpdateDataHolder updateData)
-
handleShowExtendedMessageFlag
protected void handleShowExtendedMessageFlag(CPQActionType action, UpdateDataHolder updateData)
-
handleCPQActionBeforeUpdate
protected void handleCPQActionBeforeUpdate(UpdateDataHolder updateData)
-
checkAutoExpandMode
protected void checkAutoExpandMode(CPQActionType action, UpdateDataHolder updateData)
-
checkAutoExpandModeOnValueChange
protected void checkAutoExpandModeOnValueChange(ConfigurationData configData, java.lang.String firstErrorCsticId)
-
isFirstErrorCurrentFocusCstic
protected boolean isFirstErrorCurrentFocusCstic(java.lang.String firstErrorCsticId, java.lang.String focusId)
-
getCsticKeyForFocusIdPath
protected java.lang.String getCsticKeyForFocusIdPath(ConfigurationData configData)
-
handleToggleImageGallery
protected void handleToggleImageGallery(CPQActionType action, UpdateDataHolder updateData)
-
handleGroupIdToDisplayWhenSolvingConflicts
protected void handleGroupIdToDisplayWhenSolvingConflicts(CPQActionType action, UpdateDataHolder updateData)
-
handleShowFullLongTextFlag
protected void handleShowFullLongTextFlag(CPQActionType action, UpdateDataHolder updateData)
This method handles the show long text flag consistently for all occurrences of a cstic.
The same cstic can appear in several groups (e.g. in conflict groups and in normal cstic groups). The user clicks "show long text" for one occurence of a cstic. This should trigger the display/hide of the long text for all occurences of this cstic not only for the one where it was clicked.
Therefore the value of the show long text flag has to be propagated to all occurences of the same cstic in all groups.- Parameters:
updateData-action-
-
resetCPQActionType
protected void resetCPQActionType(ConfigurationData configData)
-
identifyPrevNextGroup
protected void identifyPrevNextGroup(CPQActionType action, UpdateDataHolder updateData)
Checks if previous or next button has been clicked and tries to identify the previous or next group respectively.
The identified groupId is changed in UIStatus so that this group will be displayed next.
The groupId is not changed if the previous button has been clicked on first group or if the next button has been clicked on the last group.- Parameters:
action-updateData-
-
getGroupIdForPrevNextButtonClick
protected java.lang.String getGroupIdForPrevNextButtonClick(CPQActionType prevNextButtonClicked, java.lang.String currentGroupId, java.util.List<UiGroupData> csticGroupsFlat, int currentGroupIndex)
-
findCurrentGroupIndex
protected int findCurrentGroupIndex(java.lang.String currentGroupId, java.util.List<UiGroupData> csticGroupsFlat)
-
getNextGroupId
protected java.lang.String getNextGroupId(java.lang.String currentGroupId, java.util.List<UiGroupData> csticGroupsFlat, int currentGroupPosition)
-
getPreviousGroupId
protected java.lang.String getPreviousGroupId(java.lang.String currentGroupId, java.util.List<UiGroupData> csticGroupsFlat, int currentGroupPosition)
-
handleAutoExpand
protected void handleAutoExpand(UpdateDataHolder updateData, ConfigurationData configData)
-
handleGroupIdToDisplayForNavigationLinks
protected void handleGroupIdToDisplayForNavigationLinks(CPQActionType action, UpdateDataHolder updateData)
-
findFirstConflictGroupForCsticId
protected UiGroupData findFirstConflictGroupForCsticId(java.util.List<UiGroupData> uiGroups, java.lang.String csticId)
-
isFocusIdSet
protected boolean isFocusIdSet(java.lang.String focusId)
-
handleAutoExpandAndSyncUIStatus
protected void handleAutoExpandAndSyncUIStatus(UpdateDataHolder updateData, ConfigurationData configData)
-
executeUpdate
protected void executeUpdate(UpdateDataHolder updateData)
-
beforeUpdate
protected void beforeUpdate(UpdateDataHolder updateData)
-
initUpdateData
protected UpdateDataHolder initUpdateData(ConfigurationData configData, org.springframework.validation.BindingResult bindingResult, javax.servlet.http.HttpServletRequest request)
-
removeOutdatedValidationErrors
protected java.util.Map<java.lang.String,org.springframework.validation.FieldError> removeOutdatedValidationErrors(UpdateDataHolder updateData)
-
getCsticKeysForExpandedSingleLevelGroups
protected java.util.List<java.lang.String> getCsticKeysForExpandedSingleLevelGroups(java.util.List<UiGroupData> groups)
-
isOutdatedValidationError
protected boolean isOutdatedValidationError(java.util.Map.Entry<java.lang.String,org.springframework.validation.FieldError> entry, java.util.List<java.lang.String> csticsDisplayed)
-
findFirstGroupForCsticId
protected UiGroupData findFirstGroupForCsticId(java.util.List<UiGroupData> uiGroups, java.lang.String csticId)
-
isCsticPartOfGroup
protected boolean isCsticPartOfGroup(UiGroupData uiGroup, java.lang.String csticId)
-
-