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 Details

    • UserRoleEndpoint

      public UserRoleEndpoint(UserRoleService<UserRole> userRoleService, com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation> translationEntityService)
  • Method Details

    • readAllRoles

      @FrameworkGetMapping @Policy(permissionRoots="ROLE", operationTypes=READ) public org.springframework.data.domain.Page<UserRole> readAllRoles(@RequestParam(value="q",required=false) String query, @RequestParam(value="accountRole",required=false,defaultValue="false") boolean accountRoles, @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)
      See Also:
    • logDebug

      protected void logDebug(Exception ex, org.springframework.web.context.request.WebRequest request)
    • replaceAllRoleTranslations

      @FrameworkPutMapping(value="/{id}/translations/{locale}", consumes="application/json") @Policy(permissionRoots="ROLE") public com.broadleafcommerce.translation.service.dto.TranslationsPayload replaceAllRoleTranslations(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id, @PathVariable("locale") Locale locale, @RequestBody com.broadleafcommerce.translation.service.dto.TranslationsPayload translationRequest)
    • getUserRoleService

      protected UserRoleService<UserRole> getUserRoleService()
    • getTranslationEntityService

      protected com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation> getTranslationEntityService()