Class B2BCostCentersController
java.lang.Object
de.hybris.platform.b2bocc.v2.controllers.BaseController
de.hybris.platform.b2bocc.v2.controllers.B2BCostCentersController
@Controller
@RequestMapping("/{baseSiteId}")
public class B2BCostCentersController
extends BaseController
-
Field Summary
Fields inherited from class de.hybris.platform.b2bocc.v2.controllers.BaseController
BASIC_FIELD_SET, DEFAULT_CURRENT_PAGE, DEFAULT_FIELD_SET, DEFAULT_PAGE_SIZE, HEADER_TOTAL_COUNT, INVALID_REQUEST_BODY_ERROR_MESSAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddBudgetToCostCenter(String costCenterCode, String budgetCode, String fields) createCostCenter(B2BCostCenterWsDTO costCenter, String fields) getActiveCostCenters(String fields) getBudgetsForCostCenter(String costCenterCode, int currentPage, int pageSize, String sort, String fields) getCostCenter(String costCenterCode, String fields) getCostCenters(int currentPage, int pageSize, String sort, String fields) removeBudgetFromCostCenter(String costCenterCode, String budgetCode, String fields) updateCostCenter(String costCenterCode, B2BCostCenterWsDTO costCenter, String fields) Methods inherited from class de.hybris.platform.b2bocc.v2.controllers.BaseController
addPaginationField, getDataMapper, handleDuplicateUidException, handleErrorInternal, handleHttpMessageNotReadableException, handleModelNotFoundException, logParam, logParam, logParam, logValue, sanitize, setDataMapper, setTotalCountHeader, setTotalCountHeader, validate
-
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)
-