Class HvlAuthzRoleRestController
java.lang.Object
tr.com.havelsan.javarch.oauth.authz.starter.module.role.controller.HvlAuthzRoleRestController
- All Implemented Interfaces:
HvlAuthzRoleOperationalRestService
,HvlAuthzRoleRestService
@RestController
@RequestMapping("${hvl.oauth.authz.service.role.controller-path:/roles}")
@HvlActuatorService(name="HvlAuthzRoleRestService",
groupName="HvlAuthzRole")
public class HvlAuthzRoleRestController
extends Object
implements HvlAuthzRoleRestService, HvlAuthzRoleOperationalRestService
The class in which service endpoints are defined for role operations.
-
Constructor Summary
ConstructorDescriptionHvlAuthzRoleRestController
(HvlAuthzRoleService roleService) Instantiates a new HvlAuthzRoleRestController. -
Method Summary
Modifier and TypeMethodDescriptiontr.com.havelsan.javarch.service.data.HvlResponse
<Void> activateByUuid
(@NotBlank @Size(min=36,max=36) String uuid) Method used to activate role according to uuid.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> deactivateByUuid
(@NotBlank @Size(min=36,max=36) String uuid) Method used to deactivate role according to uuid.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> deleteByUuid
(@NotBlank @Size(min=36,max=36) String uuid) Delete role by uuid.tr.com.havelsan.javarch.service.data.HvlResponse
<HvlOAuthRoleModel> Gets role by uuid.tr.com.havelsan.javarch.service.data.HvlResponse
<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleDataModel>> queryAssignerDataPage
(@NotNull @Valid HvlOAuthRoleQueryModel roleQueryModel) Returns a page of role claim for assigned entity relation matching the query criteria.tr.com.havelsan.javarch.service.data.HvlResponse
<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleClaimDataModel>> queryClaimDataPage
(@NotNull @Valid HvlOAuthRoleClaimQueryModel roleClaimQueryModel) Returns a page of role claim for assigned entity relation matching the query criteria.tr.com.havelsan.javarch.service.data.HvlResponse
<List<HvlOAuthRoleDataModel>> queryDataList
(@NotNull @Valid HvlOAuthRoleQueryModel roleQueryModel) Returns a list of role matching the query criteria.tr.com.havelsan.javarch.service.data.HvlResponse
<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleDataModel>> queryDataPage
(@NotNull @Valid HvlOAuthRoleQueryModel roleQueryModel) Returns a page of role matching the query criteria.tr.com.havelsan.javarch.service.data.HvlResponse
<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleDataModel>> queryReportByAdminDataPage
(@NotNull @Valid HvlOAuthReportQueryModel reportQueryModel) Returns a page of role report matching the report query criteria by admin.tr.com.havelsan.javarch.service.data.HvlResponse
<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleDataModel>> queryReportDataPage
(@NotNull @Valid HvlOAuthReportQueryModel reportQueryModel) Returns a page of role report matching the report query criteria.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> save
(@NotNull @Valid HvlOAuthRoleCopiablePersistModel roleCopiablePersistModel) Save role.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> update
(@NotNull @Valid HvlOAuthRolePersistModel rolePersistModel) Update role.
-
Constructor Details
-
HvlAuthzRoleRestController
Instantiates a new HvlAuthzRoleRestController.- Parameters:
roleService
- the role service
-
-
Method Details
-
save
@PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> save(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthRoleCopiablePersistModel roleCopiablePersistModel) Save role.- Specified by:
save
in interfaceHvlAuthzRoleOperationalRestService
- Parameters:
roleCopiablePersistModel
- the role copiable persist model- Returns:
- the hvl response
-
update
@PreAuthorize("hasAuthority(\'keysis\')") @Validated(tr.com.havelsan.javarch.data.commons.validation.HvlConstraintGroups.ModifyingOperation.class) public tr.com.havelsan.javarch.service.data.HvlResponse<Void> update(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthRolePersistModel rolePersistModel) Update role.- Specified by:
update
in interfaceHvlAuthzRoleOperationalRestService
- Parameters:
rolePersistModel
- the role persist model- Returns:
- the hvl response
-
deleteByUuid
@PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> deleteByUuid(@NotBlank @Size(min=36,max=36) @PathVariable("uuid") @NotBlank @Size(min=36,max=36) String uuid) Delete role by uuid.- Specified by:
deleteByUuid
in interfaceHvlAuthzRoleOperationalRestService
- Parameters:
uuid
- the uuid- Returns:
- hvl response
-
activateByUuid
@PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> activateByUuid(@NotBlank @Size(min=36,max=36) @PathVariable("uuid") @NotBlank @Size(min=36,max=36) String uuid) Method used to activate role according to uuid.- Specified by:
activateByUuid
in interfaceHvlAuthzRoleOperationalRestService
- Parameters:
uuid
- the uuid- Returns:
- the hvl response
-
deactivateByUuid
@PreAuthorize("hasAuthority(\'keysis\')") public tr.com.havelsan.javarch.service.data.HvlResponse<Void> deactivateByUuid(@NotBlank @Size(min=36,max=36) @PathVariable("uuid") @NotBlank @Size(min=36,max=36) String uuid) Method used to deactivate role according to uuid.- Specified by:
deactivateByUuid
in interfaceHvlAuthzRoleOperationalRestService
- Parameters:
uuid
- the uuid- Returns:
- the hvl response
-
getByUuid
@PreAuthorize("hasAuthority(\'keysis:role_assigner\')") public tr.com.havelsan.javarch.service.data.HvlResponse<HvlOAuthRoleModel> getByUuid(@NotBlank @Size(min=36,max=36) @PathVariable("uuid") @NotBlank @Size(min=36,max=36) String uuid) Gets role by uuid.- Specified by:
getByUuid
in interfaceHvlAuthzRoleRestService
- Parameters:
uuid
- the uuid- Returns:
- the hvl response
-
queryDataList
@PreAuthorize("hasAuthority(\'keysis:role_assigner\')") public tr.com.havelsan.javarch.service.data.HvlResponse<List<HvlOAuthRoleDataModel>> queryDataList(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthRoleQueryModel roleQueryModel) Returns a list of role matching the query criteria.- Specified by:
queryDataList
in interfaceHvlAuthzRoleRestService
- Parameters:
roleQueryModel
- the role query model- Returns:
- the hvl response
-
queryDataPage
@PreAuthorize("hasAuthority(\'default_authority\')") public tr.com.havelsan.javarch.service.data.HvlResponse<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleDataModel>> queryDataPage(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthRoleQueryModel roleQueryModel) Returns a page of role matching the query criteria.- Specified by:
queryDataPage
in interfaceHvlAuthzRoleRestService
- Parameters:
roleQueryModel
- the role query model- Returns:
- the hvl response
-
queryReportByAdminDataPage
@PreAuthorize("hasAuthority(\'keysis\')") @Validated(PredicatingOperation.class) public tr.com.havelsan.javarch.service.data.HvlResponse<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleDataModel>> queryReportByAdminDataPage(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthReportQueryModel reportQueryModel) Returns a page of role report matching the report query criteria by admin.- Specified by:
queryReportByAdminDataPage
in interfaceHvlAuthzRoleRestService
- Parameters:
reportQueryModel
- the report query model- Returns:
- the hvl response
-
queryReportDataPage
@PreAuthorize("hasAuthority(\'default_authority\')") public tr.com.havelsan.javarch.service.data.HvlResponse<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleDataModel>> queryReportDataPage(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthReportQueryModel reportQueryModel) Returns a page of role report matching the report query criteria.- Specified by:
queryReportDataPage
in interfaceHvlAuthzRoleRestService
- Parameters:
reportQueryModel
- the report query model- Returns:
- the hvl response
-
queryAssignerDataPage
@PreAuthorize("hasAuthority(\'keysis:role_assigner\')") public tr.com.havelsan.javarch.service.data.HvlResponse<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleDataModel>> queryAssignerDataPage(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthRoleQueryModel roleQueryModel) Returns a page of role claim for assigned entity relation matching the query criteria.- Specified by:
queryAssignerDataPage
in interfaceHvlAuthzRoleRestService
- Parameters:
roleQueryModel
- the role query model- Returns:
- the hvl response
-
queryClaimDataPage
@PreAuthorize("hasAuthority(\'default_authority\')") public tr.com.havelsan.javarch.service.data.HvlResponse<tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleClaimDataModel>> queryClaimDataPage(@NotNull @Valid @RequestBody @NotNull @Valid HvlOAuthRoleClaimQueryModel roleClaimQueryModel) Returns a page of role claim for assigned entity relation matching the query criteria.- Specified by:
queryClaimDataPage
in interfaceHvlAuthzRoleRestService
- Parameters:
roleClaimQueryModel
- the role claim query model- Returns:
- the hvl response
-