Class OrgUnitsController

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

@RestController @RequestMapping("/{baseSiteId}/users/{userId}") @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) public class OrgUnitsController extends BaseController
  • Field Details

  • Constructor Details

    • OrgUnitsController

      public OrgUnitsController()
  • Method Details

    • getOrgUnit

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @GetMapping(value="/orgUnits/{orgUnitId}", produces="application/json") public B2BUnitWsDTO getOrgUnit(@PathVariable String orgUnitId, @RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • createUnit

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @PostMapping(value="/orgUnits", produces="application/json", consumes="application/json") @ResponseStatus(CREATED) public B2BUnitWsDTO createUnit(@RequestBody B2BUnitWsDTO orgUnit, @RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • getAvailableParentUnits

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @GetMapping(value="/orgUnits/{orgUnitId}/availableParents", produces="application/json") public B2BUnitNodeListWsDTO getAvailableParentUnits(@PathVariable String orgUnitId, @RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • updateOrgUnit

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @ResponseStatus(NO_CONTENT) @PatchMapping(value="/orgUnits/{orgUnitId}", produces="application/json", consumes="application/json") public void updateOrgUnit(@PathVariable String orgUnitId, @RequestBody B2BUnitWsDTO orgUnit)
    • createOrgUnitAddress

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @PostMapping(value="/orgUnits/{orgUnitId}/addresses", produces="application/json", consumes="application/json") @ResponseStatus(CREATED) public AddressWsDTO createOrgUnitAddress(@RequestBody AddressWsDTO address, @PathVariable String orgUnitId, @RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • getOrgUnitAddresses

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @GetMapping(value="/orgUnits/{orgUnitId}/addresses", produces="application/json") @ResponseStatus(OK) public AddressListWsDTO getOrgUnitAddresses(@PathVariable String orgUnitId, @RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • updateOrgUnitAddress

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @PatchMapping(value="/orgUnits/{orgUnitId}/addresses/{addressId}", produces="application/json", consumes="application/json") @ResponseStatus(NO_CONTENT) public void updateOrgUnitAddress(@RequestBody AddressWsDTO address, @PathVariable String orgUnitId, @PathVariable String addressId)
    • removeOrgUnitAddress

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @ResponseStatus(OK) @DeleteMapping(value="/orgUnits/{orgUnitId}/addresses/{addressId}", produces="application/json") public void removeOrgUnitAddress(@PathVariable String orgUnitId, @PathVariable String addressId)
    • getOrgUnitUsers

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @GetMapping(value="/orgUnits/{orgUnitId}/availableUsers/{roleId}", produces="application/json") public OrgUnitUserListWsDTO getOrgUnitUsers(@PathVariable String orgUnitId, @PathVariable String roleId, @RequestParam(defaultValue="0") int currentPage, @RequestParam(defaultValue="20") int pageSize, @RequestParam(required=false) String sort, @RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • addRoleToOrgCustomer

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @PostMapping(value="/orgCustomers/{orgCustomerId}/roles", produces="application/json") @ResponseStatus(CREATED) @ResponseBody public B2BSelectionDataWsDTO addRoleToOrgCustomer(@PathVariable String orgCustomerId, @RequestParam String roleId, @RequestParam(defaultValue="DEFAULT") String fields)
    • removeRoleFromOrgCustomer

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @DeleteMapping(value="/orgCustomers/{orgCustomerId}/roles/{roleId}", produces="application/json") @ResponseBody public B2BSelectionDataWsDTO removeRoleFromOrgCustomer(@PathVariable String orgCustomerId, @PathVariable String roleId, @RequestParam(defaultValue="DEFAULT") String fields)
    • addOrgUnitRoleToOrgCustomer

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @PostMapping(value="/orgUnits/{orgUnitId}/orgCustomers/{orgCustomerId}/roles", produces="application/json") @ResponseStatus(CREATED) public void addOrgUnitRoleToOrgCustomer(@PathVariable String orgUnitId, @PathVariable String orgCustomerId, @RequestParam String roleId)
    • removeOrgUnitRoleFromOrgCustomer

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @DeleteMapping(value="/orgUnits/{orgUnitId}/orgCustomers/{orgCustomerId}/roles/{roleId}", produces="application/json") public void removeOrgUnitRoleFromOrgCustomer(@PathVariable String orgUnitId, @PathVariable String orgCustomerId, @PathVariable String roleId)
    • getOrgUnitsAvailableApprovalProcesses

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @GetMapping(value="/orgUnitsAvailableApprovalProcesses", produces="application/json") public B2BApprovalProcessListWsDTO getOrgUnitsAvailableApprovalProcesses(@RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • getOrgUnitsRootNodeTree

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @ResponseBody @GetMapping(value="/orgUnitsRootNodeTree", produces="application/json") public B2BUnitNodeWsDTO getOrgUnitsRootNodeTree(@RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • getBranchNodes

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @ResponseBody @GetMapping(value="/availableOrgUnitNodes", produces="application/json") public B2BUnitNodeListWsDTO getBranchNodes(@RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • getUserRoleManagementStrategy

      protected UserRoleManagementStrategy getUserRoleManagementStrategy(String roleId)
    • getOrgUnitUserRoleManagementStrategy

      protected OrgUnitUserRoleManagementStrategy getOrgUnitUserRoleManagementStrategy(String roleId)
    • getOrgUnitUsersDisplayStrategy

      protected OrgUnitUsersDisplayStrategy getOrgUnitUsersDisplayStrategy(String roleId)
    • getUnitForUid

      protected B2BUnitData getUnitForUid(String orgUnitId)
    • getAddressData

      protected AddressData getAddressData(String addressId, String orgUnitId)