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 Constructor Description B2BCostCentersController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description B2BSelectionDataWsDTOaddBudgetToCostCenter(java.lang.String costCenterCode, java.lang.String budgetCode, java.lang.String fields)B2BCostCenterWsDTOcreateCostCenter(B2BCostCenterWsDTO costCenter, java.lang.String fields)B2BCostCenterListWsDTOgetActiveCostCenters(java.lang.String fields)BudgetListWsDTOgetBudgetsForCostCenter(java.lang.String costCenterCode, int currentPage, int pageSize, java.lang.String sort, java.lang.String fields)B2BCostCenterWsDTOgetCostCenter(java.lang.String costCenterCode, java.lang.String fields)B2BCostCenterListWsDTOgetCostCenters(int currentPage, int pageSize, java.lang.String sort, java.lang.String fields)B2BSelectionDataWsDTOremoveBudgetFromCostCenter(java.lang.String costCenterCode, java.lang.String budgetCode, java.lang.String fields)B2BCostCenterWsDTOupdateCostCenter(java.lang.String costCenterCode, B2BCostCenterWsDTO costCenter, java.lang.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
-
-
-
-
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)
-
-