Class UpdateConfigureProductController


@Controller @RequestMapping public class UpdateConfigureProductController extends AbstractProductConfigController
Controller for updating the dynamic product configuration content page.
See Also:
  • Field Details

    • EXPECTED_NUMBER_OF_MESSAGE_ELEMENTS

      public static final int EXPECTED_NUMBER_OF_MESSAGE_ELEMENTS
      See Also:
    • CSTIC_ID_BEGIN_INDEX

      public static final int CSTIC_ID_BEGIN_INDEX
      See Also:
    • MESSAGE_KEY_ELEMENT_INDEX

      public static final int MESSAGE_KEY_ELEMENT_INDEX
      See Also:
  • Constructor Details

    • UpdateConfigureProductController

      public UpdateConfigureProductController()
  • Method Details

    • 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
    • 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, String firstErrorCsticId)
    • isFirstErrorCurrentFocusCstic

      protected boolean isFirstErrorCurrentFocusCstic(String firstErrorCsticId, String focusId)
    • getCsticKeyForFocusIdPath

      protected 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 String getGroupIdForPrevNextButtonClick(CPQActionType prevNextButtonClicked, String currentGroupId, List<UiGroupData> csticGroupsFlat, int currentGroupIndex)
    • findCurrentGroupIndex

      protected int findCurrentGroupIndex(String currentGroupId, List<UiGroupData> csticGroupsFlat)
    • getNextGroupId

      protected String getNextGroupId(String currentGroupId, List<UiGroupData> csticGroupsFlat, int currentGroupPosition)
    • getPreviousGroupId

      protected String getPreviousGroupId(String currentGroupId, 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(List<UiGroupData> uiGroups, String csticId)
    • isFocusIdSet

      protected boolean isFocusIdSet(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 Map<String,org.springframework.validation.FieldError> removeOutdatedValidationErrors(UpdateDataHolder updateData)
    • getCsticKeysForExpandedSingleLevelGroups

      protected List<String> getCsticKeysForExpandedSingleLevelGroups(List<UiGroupData> groups)
    • isOutdatedValidationError

      protected boolean isOutdatedValidationError(Map.Entry<String,org.springframework.validation.FieldError> entry, List<String> csticsDisplayed)
    • findFirstGroupForCsticId

      protected UiGroupData findFirstGroupForCsticId(List<UiGroupData> uiGroups, String csticId)
    • isCsticPartOfGroup

      protected boolean isCsticPartOfGroup(UiGroupData uiGroup, String csticId)