@FrameworkRestController @FrameworkMapping(value="/roles") public class UserRoleEndpoint extends Object
Constructor and Description |
---|
UserRoleEndpoint(UserRoleService<UserRole> userRoleService) |
Modifier and Type | Method and Description |
---|---|
UserRole |
createRole(UserRole req) |
void |
deleteRole(String id) |
org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError> |
handleInvalidUserRoleDeleteException(InvalidUserRoleDeleteException ex,
org.springframework.web.context.request.WebRequest request) |
protected void |
logDebug(Exception ex,
org.springframework.web.context.request.WebRequest request) |
org.springframework.data.domain.Page<UserRole> |
readAllRoles(String query,
org.springframework.data.domain.Pageable page) |
UserRole |
readRole(String id) |
UserRole |
replaceRole(String id,
UserRole req) |
public UserRoleEndpoint(UserRoleService<UserRole> userRoleService)
@FrameworkGetMapping @Policy(permissionRoots="ROLE", operationTypes=READ) public org.springframework.data.domain.Page<UserRole> readAllRoles(@RequestParam(value="q",required=false) String query, @PageableDefault(size=50) org.springframework.data.domain.Pageable page)
@FrameworkGetMapping(value="/{id}") @Policy(permissionRoots="ROLE", operationTypes=READ) public UserRole readRole(@PathVariable(value="id") String id)
@FrameworkPostMapping @Policy(permissionRoots="ROLE", operationTypes=CREATE) public UserRole createRole(@RequestBody UserRole req)
@FrameworkPutMapping(value="/{id}") @Policy(permissionRoots="ROLE", operationTypes=UPDATE) public UserRole replaceRole(@PathVariable(value="id") String id, @RequestBody UserRole req)
@FrameworkDeleteMapping(value="/{id}") @Policy(permissionRoots="ROLE", operationTypes=DELETE) public void deleteRole(@PathVariable(value="id") String id)
@ExceptionHandler(value=InvalidUserRoleDeleteException.class) public org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError> handleInvalidUserRoleDeleteException(InvalidUserRoleDeleteException ex, org.springframework.web.context.request.WebRequest request)
protected void logDebug(Exception ex, org.springframework.web.context.request.WebRequest request)
Copyright © 2021. All rights reserved.