Class B2BCostCentersController

java.lang.Object
de.hybris.platform.b2b.occ.v2.controllers.BaseController
de.hybris.platform.b2b.occ.v2.controllers.B2BCostCentersController

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

    • B2BCostCentersController

      public B2BCostCentersController()
  • Method Details

    • getCostCenters

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @GetMapping(value="/costcentersall", produces="application/json") @ResponseBody public B2BCostCenterListWsDTO getCostCenters(@RequestParam(defaultValue="0") int currentPage, @RequestParam(defaultValue="20") int pageSize, @RequestParam(required=false) String sort, @RequestParam(defaultValue="DEFAULT") String fields)
    • getActiveCostCenters

      @Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @GetMapping("/costcenters") @ResponseBody public B2BCostCenterListWsDTO getActiveCostCenters(@RequestParam(defaultValue="DEFAULT") String fields)
    • getCostCenter

      @Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @GetMapping("/costcenters/{costCenterCode}") @ResponseBody public B2BCostCenterWsDTO getCostCenter(@PathVariable String costCenterCode, @RequestParam(defaultValue="DEFAULT") String fields)
    • createCostCenter

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @PostMapping(value="/costcenters", produces="application/json", consumes="application/json") @ResponseBody @ResponseStatus(CREATED) public B2BCostCenterWsDTO createCostCenter(@RequestBody B2BCostCenterWsDTO costCenter, @RequestParam(defaultValue="DEFAULT") String fields)
    • updateCostCenter

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @PatchMapping(value="/costcenters/{costCenterCode}", produces="application/json", consumes="application/json") @ResponseBody @ResponseStatus(OK) public B2BCostCenterWsDTO updateCostCenter(@PathVariable String costCenterCode, @RequestBody B2BCostCenterWsDTO costCenter, @RequestParam(defaultValue="DEFAULT") String fields)
    • addBudgetToCostCenter

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @PostMapping(value="/costcenters/{costCenterCode}/budgets", produces="application/json") @ResponseBody @ResponseStatus(OK) public B2BSelectionDataWsDTO addBudgetToCostCenter(@PathVariable String costCenterCode, @RequestParam String budgetCode, @RequestParam(defaultValue="DEFAULT") String fields)
    • removeBudgetFromCostCenter

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @DeleteMapping(value="/costcenters/{costCenterCode}/budgets/{budgetCode}", produces="application/json") @ResponseBody @ResponseStatus(OK) public B2BSelectionDataWsDTO removeBudgetFromCostCenter(@PathVariable String costCenterCode, @PathVariable String budgetCode, @RequestParam(defaultValue="DEFAULT") String fields)
    • getBudgetsForCostCenter

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @GetMapping(value="/costcenters/{costCenterCode}/budgets", produces="application/json") @ResponseBody public BudgetListWsDTO getBudgetsForCostCenter(@PathVariable String costCenterCode, @RequestParam(defaultValue="0") int currentPage, @RequestParam(defaultValue="20") int pageSize, @RequestParam(required=false) String sort, @RequestParam(defaultValue="DEFAULT") String fields)