Class UserRoleEndpoint
- java.lang.Object
-
- com.broadleafcommerce.auth.resource.web.endpoint.UserRoleEndpoint
-
@FrameworkRestController @FrameworkMapping("/roles") public class UserRoleEndpoint extends Object
Endpoint for CRUD operations on UserRoles- Author:
- Chris Getz
-
-
Constructor Summary
Constructors Constructor Description UserRoleEndpoint(UserRoleService<UserRole> userRoleService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserRole
createRole(UserRole req)
void
deleteRole(String id)
List<UserRole>
findByIdIn(Collection<String> ids)
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)
-
-
-
Constructor Detail
-
UserRoleEndpoint
public UserRoleEndpoint(UserRoleService<UserRole> userRoleService)
-
-
Method Detail
-
readAllRoles
@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)
-
readRole
@FrameworkGetMapping("/{id}") @Policy(permissionRoots="ROLE", operationTypes=READ) public UserRole readRole(@PathVariable("id") String id)
-
createRole
@FrameworkPostMapping @Policy(permissionRoots="ROLE", operationTypes=CREATE) public UserRole createRole(@RequestBody UserRole req)
-
replaceRole
@FrameworkPutMapping("/{id}") @Policy(permissionRoots="ROLE", operationTypes=UPDATE) public UserRole replaceRole(@PathVariable("id") String id, @RequestBody UserRole req)
-
deleteRole
@FrameworkDeleteMapping("/{id}") @Policy(permissionRoots="ROLE", operationTypes=DELETE) public void deleteRole(@PathVariable("id") String id)
-
findByIdIn
@FrameworkGetMapping("/ids") @Policy(permissionRoots="ROLE", operationTypes=READ) public List<UserRole> findByIdIn(@RequestParam(name="ids") Collection<String> ids)
-
handleInvalidUserRoleDeleteException
@ExceptionHandler(InvalidUserRoleDeleteException.class) public org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError> handleInvalidUserRoleDeleteException(InvalidUserRoleDeleteException ex, org.springframework.web.context.request.WebRequest request)
-
logDebug
protected void logDebug(Exception ex, org.springframework.web.context.request.WebRequest request)
-
-