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 Summary
FieldsModifier and TypeFieldDescriptionprotected B2BUnitFacadeprotected org.springframework.validation.Validatorprotected Map<String,OrgUnitUserRoleManagementStrategy> protected Map<String,OrgUnitUsersDisplayStrategy> protected Map<String,UserRoleManagementStrategy> 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 TypeMethodDescriptionvoidaddOrgUnitRoleToOrgCustomer(String orgUnitId, String orgCustomerId, String roleId) addRoleToOrgCustomer(String orgCustomerId, String roleId, String fields) createOrgUnitAddress(AddressWsDTO address, String orgUnitId, String fields) createUnit(B2BUnitWsDTO orgUnit, String fields) protected AddressDatagetAddressData(String addressId, String orgUnitId) getAvailableParentUnits(String orgUnitId, String fields) getBranchNodes(String fields) getOrgUnit(String orgUnitId, String fields) getOrgUnitAddresses(String orgUnitId, String fields) getOrgUnitsRootNodeTree(String fields) protected OrgUnitUserRoleManagementStrategygetOrgUnitUsers(String orgUnitId, String roleId, int currentPage, int pageSize, String sort, String fields) protected OrgUnitUsersDisplayStrategygetOrgUnitUsersDisplayStrategy(String roleId) protected B2BUnitDatagetUnitForUid(String orgUnitId) protected UserRoleManagementStrategygetUserRoleManagementStrategy(String roleId) voidremoveOrgUnitAddress(String orgUnitId, String addressId) voidremoveOrgUnitRoleFromOrgCustomer(String orgUnitId, String orgCustomerId, String roleId) removeRoleFromOrgCustomer(String orgCustomerId, String roleId, String fields) voidupdateOrgUnit(String orgUnitId, B2BUnitWsDTO orgUnit) voidupdateOrgUnitAddress(AddressWsDTO address, String orgUnitId, String addressId) 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
-
Field Details
-
b2bUnitFacade
-
b2BUnitWsDTOValidator
protected org.springframework.validation.Validator b2BUnitWsDTOValidator -
userRoleManagementStrategyMap
-
orgUnitUsersDisplayStrategyMap
-
orgUnitUserRoleManagementStrategyMap
-
-
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
-
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
-
getOrgUnitUserRoleManagementStrategy
-
getOrgUnitUsersDisplayStrategy
-
getUnitForUid
-
getAddressData
-