Class UserRoleEndpoint
java.lang.Object
com.broadleafcommerce.auth.resource.web.endpoint.UserRoleEndpoint
Endpoint for CRUD operations on UserRoles
- Author:
- Chris Getz
-
Constructor Summary
ConstructorDescriptionUserRoleEndpoint
(UserRoleService<UserRole> userRoleService, com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation> translationEntityService) -
Method Summary
Modifier and TypeMethodDescriptioncreateRole
(UserRole req) void
deleteRole
(String id) findByIdIn
(Collection<String> ids) protected com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation>
protected UserRoleService<UserRole>
org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError>
handleInvalidUserRoleDeleteException
(InvalidUserRoleDeleteException ex, org.springframework.web.context.request.WebRequest request) protected void
org.springframework.data.domain.Page<UserRole>
readAllRoles
(String query, boolean accountRoles, org.springframework.data.domain.Pageable page) com.broadleafcommerce.translation.service.dto.TranslationsPayload
replaceAllRoleTranslations
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, Locale locale, com.broadleafcommerce.translation.service.dto.TranslationsPayload translationRequest) replaceRole
(String id, UserRole req)
-
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
-
createRole
-
replaceRole
-
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
-
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
-
getTranslationEntityService
protected com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation> getTranslationEntityService()
-