Class B2BCostCentersController


  • @Controller
    @RequestMapping("/{baseSiteId}")
    public class B2BCostCentersController
    extends BaseController
    • Constructor Detail

      • B2BCostCentersController

        public B2BCostCentersController()
    • Method Detail

      • getCostCenters

        @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"})
        @RequestMapping(value="/costcentersall",
                        method=GET)
        @ResponseBody
        public B2BCostCenterListWsDTO getCostCenters​(@RequestParam(defaultValue="0")
                                                     int currentPage,
                                                     @RequestParam(defaultValue="20")
                                                     int pageSize,
                                                     @RequestParam(required=false)
                                                     java.lang.String sort,
                                                     @RequestParam(defaultValue="DEFAULT")
                                                     java.lang.String fields)
      • getActiveCostCenters

        @Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"})
        @RequestMapping(value="/costcenters",
                        method=GET)
        @ResponseBody
        public B2BCostCenterListWsDTO getActiveCostCenters​(@RequestParam(defaultValue="DEFAULT")
                                                           java.lang.String fields)
      • getCostCenter

        @Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"})
        @RequestMapping(value="/costcenters/{costCenterCode}",
                        method=GET)
        @ResponseBody
        public B2BCostCenterWsDTO getCostCenter​(@PathVariable
                                                java.lang.String costCenterCode,
                                                @RequestParam(defaultValue="DEFAULT")
                                                java.lang.String fields)
      • createCostCenter

        @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"})
        @RequestMapping(value="/costcenters",
                        method=POST)
        @ResponseBody
        @ResponseStatus(CREATED)
        public B2BCostCenterWsDTO createCostCenter​(@RequestBody
                                                   B2BCostCenterWsDTO costCenter,
                                                   @RequestParam(defaultValue="DEFAULT")
                                                   java.lang.String fields)
      • updateCostCenter

        @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"})
        @RequestMapping(value="/costcenters/{costCenterCode}",
                        method=PATCH)
        @ResponseBody
        @ResponseStatus(OK)
        public B2BCostCenterWsDTO updateCostCenter​(@PathVariable
                                                   java.lang.String costCenterCode,
                                                   @RequestBody
                                                   B2BCostCenterWsDTO costCenter,
                                                   @RequestParam(defaultValue="DEFAULT")
                                                   java.lang.String fields)
      • addBudgetToCostCenter

        @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"})
        @RequestMapping(value="/costcenters/{costCenterCode}/budgets",
                        method=POST)
        @ResponseBody
        @ResponseStatus(OK)
        public B2BSelectionDataWsDTO addBudgetToCostCenter​(@PathVariable
                                                           java.lang.String costCenterCode,
                                                           @RequestParam
                                                           java.lang.String budgetCode,
                                                           @RequestParam(defaultValue="DEFAULT")
                                                           java.lang.String fields)
      • removeBudgetFromCostCenter

        @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"})
        @RequestMapping(value="/costcenters/{costCenterCode}/budgets/{budgetCode}",
                        method=DELETE)
        @ResponseBody
        @ResponseStatus(OK)
        public B2BSelectionDataWsDTO removeBudgetFromCostCenter​(@PathVariable
                                                                java.lang.String costCenterCode,
                                                                @PathVariable
                                                                java.lang.String budgetCode,
                                                                @RequestParam(defaultValue="DEFAULT")
                                                                java.lang.String fields)
      • getBudgetsForCostCenter

        @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"})
        @RequestMapping(value="/costcenters/{costCenterCode}/budgets",
                        method=GET)
        @ResponseBody
        public BudgetListWsDTO getBudgetsForCostCenter​(@PathVariable
                                                       java.lang.String costCenterCode,
                                                       @RequestParam(defaultValue="0")
                                                       int currentPage,
                                                       @RequestParam(defaultValue="20")
                                                       int pageSize,
                                                       @RequestParam(required=false)
                                                       java.lang.String sort,
                                                       @RequestParam(defaultValue="DEFAULT")
                                                       java.lang.String fields)