Class UpdateConfigureProductController

    • Constructor Detail

      • UpdateConfigureProductController

        public UpdateConfigureProductController()
    • 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 BusinessException
        Updates a configuration based on the user inputs and renders back the changes.
        Parameters:
        configData - current configuration
        bindingResult - error message store
        model - view model
        request - HTTP-Request
        Returns:
        view name
        Throws:
        BusinessException
      • 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)
      • handleCPQActionBeforeUpdate

        protected void handleCPQActionBeforeUpdate​(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)
      • 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)
      • 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)
      • 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)