Class CostCenterManagementPageController


  • @Controller
    @RequestMapping("/my-company/organization-management/manage-costcenters")
    public class CostCenterManagementPageController
    extends MyCompanyPageController
    Controller defines routes to mange Budgets and Cost Centers within My Company section.
    • Constructor Detail

      • CostCenterManagementPageController

        public CostCenterManagementPageController()
    • Method Detail

      • viewCostCenterUnitDetails

        @RequestMapping(value="/unitDetails",
                        method=GET)
        public java.lang.String viewCostCenterUnitDetails​(@RequestParam("costCenterCode")
                                                          java.lang.String costCenterCode,
                                                          @RequestParam("unit")
                                                          java.lang.String unit,
                                                          org.springframework.ui.Model model)
                                                   throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • manageCostCenters

        @RequestMapping(value="",
                        method=GET)
        public java.lang.String manageCostCenters​(@RequestParam(value="page",defaultValue="0")
                                                  int page,
                                                  @RequestParam(value="show",defaultValue="Page")
                                                  AbstractSearchPageController.ShowMode showMode,
                                                  @RequestParam(value="sort",defaultValue="code")
                                                  java.lang.String sortCode,
                                                  org.springframework.ui.Model model)
                                           throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • viewCostCenterDetails

        @RequestMapping(value="/view",
                        method=GET)
        public java.lang.String viewCostCenterDetails​(@RequestParam("costCenterCode")
                                                      java.lang.String costCenterCode,
                                                      org.springframework.ui.Model model)
                                               throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Overrides:
        viewCostCenterDetails in class MyCompanyPageController
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • assignBudgetsForCostCenter

        @RequestMapping(value="/selectBudget",
                        method=GET)
        public java.lang.String assignBudgetsForCostCenter​(@RequestParam(value="page",defaultValue="0")
                                                           int page,
                                                           @RequestParam(value="show",defaultValue="Page")
                                                           AbstractSearchPageController.ShowMode showMode,
                                                           @RequestParam(value="sort",defaultValue="code")
                                                           java.lang.String sortCode,
                                                           @RequestParam("costCenterCode")
                                                           java.lang.String costCenterCode,
                                                           org.springframework.ui.Model model,
                                                           javax.servlet.http.HttpServletRequest request)
                                                    throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • selectBudgetForCostCenter

        @ResponseBody
        @RequestMapping(value="/budgets/select",
                        method=POST)
        public B2BSelectionData selectBudgetForCostCenter​(@RequestParam("costCenterCode")
                                                          java.lang.String costCenterCode,
                                                          @RequestParam("budgetCode")
                                                          java.lang.String budgetCode)
                                                   throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • deselectBudgetForCostCenter

        @ResponseBody
        @RequestMapping(value="/budgets/deselect",
                        method=POST)
        public B2BSelectionData deselectBudgetForCostCenter​(@RequestParam("costCenterCode")
                                                            java.lang.String costCenterCode,
                                                            @RequestParam("budgetCode")
                                                            java.lang.String budgetCode)
                                                     throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • enableCostCenter

        @RequestMapping(value="/enable",
                        method=GET)
        public java.lang.String enableCostCenter​(@RequestParam("costCenterCode")
                                                 java.lang.String costCenterCode,
                                                 org.springframework.ui.Model model)
                                          throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • confirmDisableCostCenter

        @RequestMapping(value="/disable",
                        method=GET)
        public java.lang.String confirmDisableCostCenter​(@RequestParam("costCenterCode")
                                                         java.lang.String costCenterCode,
                                                         org.springframework.ui.Model model)
                                                  throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • disableCostCenter

        @RequestMapping(value="/disable",
                        method=POST)
        public java.lang.String disableCostCenter​(@RequestParam("costCenterCode")
                                                  java.lang.String costCenterCode,
                                                  org.springframework.ui.Model model)
                                           throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • editCostCenterDetails

        @RequestMapping(value="/edit",
                        method=GET)
        public java.lang.String editCostCenterDetails​(@RequestParam("costCenterCode")
                                                      java.lang.String costCenterCode,
                                                      org.springframework.ui.Model model)
                                               throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Overrides:
        editCostCenterDetails in class MyCompanyPageController
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • updateCostCenterDetails

        @RequestMapping(value="/update",
                        method=POST)
        public java.lang.String updateCostCenterDetails​(@Valid
                                                        @Valid B2BCostCenterForm b2BCostCenterForm,
                                                        org.springframework.validation.BindingResult bindingResult,
                                                        org.springframework.ui.Model model,
                                                        org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
                                                 throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Overrides:
        updateCostCenterDetails in class MyCompanyPageController
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • addCostCenter

        @RequestMapping(value="/add",
                        method=GET)
        public java.lang.String addCostCenter​(org.springframework.ui.Model model)
                                       throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Overrides:
        addCostCenter in class MyCompanyPageController
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      • saveCostCenter

        @RequestMapping(value="/add",
                        method=POST)
        public java.lang.String saveCostCenter​(@Valid
                                               @Valid B2BCostCenterForm b2BCostCenterForm,
                                               org.springframework.validation.BindingResult bindingResult,
                                               org.springframework.ui.Model model,
                                               org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel)
                                        throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
        Overrides:
        saveCostCenter in class MyCompanyPageController
        Throws:
        de.hybris.platform.cms2.exceptions.CMSItemNotFoundException