Class OrgUnitsController

java.lang.Object
de.hybris.platform.b2bocc.v2.controllers.BaseController
de.hybris.platform.b2bocc.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"}) @RequestMapping(value="/orgUnits/{orgUnitId}", method=GET) public B2BUnitWsDTO getOrgUnit(@PathVariable String orgUnitId, @RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • createUnit

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/orgUnits", method=POST) @ResponseStatus(CREATED) public B2BUnitWsDTO createUnit(@RequestBody B2BUnitWsDTO orgUnit, @RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • getAvailableParentUnits

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

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @ResponseStatus(NO_CONTENT) @RequestMapping(value="/orgUnits/{orgUnitId}", method=PATCH) public void updateOrgUnit(@PathVariable String orgUnitId, @RequestBody B2BUnitWsDTO orgUnit)
    • createOrgUnitAddress

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/orgUnits/{orgUnitId}/addresses", method=POST) @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"}) @RequestMapping(value="/orgUnits/{orgUnitId}/addresses", method=GET) @ResponseStatus(OK) public AddressListWsDTO getOrgUnitAddresses(@PathVariable String orgUnitId, @RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • updateOrgUnitAddress

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/orgUnits/{orgUnitId}/addresses/{addressId}", method=PATCH) @ResponseStatus(NO_CONTENT) public void updateOrgUnitAddress(@RequestBody AddressWsDTO address, @PathVariable String orgUnitId, @PathVariable String addressId)
    • removeOrgUnitAddress

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @ResponseStatus(OK) @RequestMapping(value="/orgUnits/{orgUnitId}/addresses/{addressId}", method=DELETE) public void removeOrgUnitAddress(@PathVariable String orgUnitId, @PathVariable String addressId)
    • getOrgUnitUsers

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/orgUnits/{orgUnitId}/availableUsers/{roleId}", method=GET) 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"}) @RequestMapping(value="/orgCustomers/{orgCustomerId}/roles", method=POST) @ResponseStatus(CREATED) @ResponseBody public B2BSelectionDataWsDTO addRoleToOrgCustomer(@PathVariable String orgCustomerId, @RequestParam String roleId, @RequestParam(defaultValue="DEFAULT") String fields)
    • removeRoleFromOrgCustomer

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

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

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/orgUnits/{orgUnitId}/orgCustomers/{orgCustomerId}/roles/{roleId}", method=DELETE) public void removeOrgUnitRoleFromOrgCustomer(@PathVariable String orgUnitId, @PathVariable String orgCustomerId, @PathVariable String roleId)
    • getOrgUnitsAvailableApprovalProcesses

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @RequestMapping(value="/orgUnitsAvailableApprovalProcesses", method=GET) public B2BApprovalProcessListWsDTO getOrgUnitsAvailableApprovalProcesses(@RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • getOrgUnitsRootNodeTree

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @ResponseBody @RequestMapping(value="/orgUnitsRootNodeTree", method=GET) public B2BUnitNodeWsDTO getOrgUnitsRootNodeTree(@RequestParam(required=false,defaultValue="DEFAULT") String fields)
    • getBranchNodes

      @Secured({"ROLE_B2BADMINGROUP","ROLE_TRUSTED_CLIENT"}) @ResponseBody @RequestMapping(value="/availableOrgUnitNodes", method=GET) 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)