Class HvlOAuthRoleManagerImpl
java.lang.Object
tr.com.havelsan.javarch.oauth.jpa.data.provider.module.role.manager.HvlOAuthRoleManagerImpl
- All Implemented Interfaces:
HvlOAuthRoleManager
@Service
@Transactional(readOnly=true)
public class HvlOAuthRoleManagerImpl
extends Object
implements HvlOAuthRoleManager
The class which implements
HvlOAuthRoleManager
.-
Constructor Summary
ConstructorDescriptionHvlOAuthRoleManagerImpl
(HvlOAuthRoleRepository roleRepository, HvlOAuthAcquiredRoleManager acquiredRoleManager, HvlOAuthRoleQueryGenerator roleQueryGenerator, HvlOAuthRoleClaimPredefinedRoleQueryGenerator roleClaimPredefinedRoleQueryGenerator, HvlOAuthRoleClaimRoleGroupQueryGenerator roleClaimRoleGroupQueryGenerator, HvlOAuthRoleClaimProfileQueryGenerator roleClaimProfileQueryGenerator, HvlOAuthRoleClaimProfileGroupQueryGenerator roleClaimProfileGroupQueryGenerator, HvlOAuthRoleClaimPredefinedProxyQueryGenerator roleClaimPredefinedProxyQueryGenerator, HvlOAuthRoleClaimProxyQueryGenerator roleClaimProxyQueryGenerator, HvlOAuthRoleClaimTrustedProxyQueryGenerator roleClaimTrustedProxyQueryGenerator, HvlOAuthRoleMapper roleMapper) Instantiates a new manager implementation. -
Method Summary
Modifier and TypeMethodDescriptionfindIdByUuidOrElseThrow
(@NotBlank @Size(min=36,max=36) String uuid) Finds role id by uuid.Gets role by id.Gets role by uuid.getDeletedByUuid
(@NotBlank @Size(min=36,max=36) String uuid) Gets by uuid for delete event.getNameListByIdSet
(@NotEmpty @Size(max=100) Set<@NotNull Long> idSet) Gets name list by id set.static com.querydsl.core.types.QBean<HvlOAuthRoleClaimDataModel>
prepareRoleClaimDataProjection
(HvlOAuthRoleQuery roleQuery) Prepare role claim data projection q bean.static com.querydsl.core.types.QBean<HvlOAuthRoleDataModel>
prepareRoleDataProjection
(HvlOAuthRoleQuery roleQuery) Prepare role data projection q bean.tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleClaimDataModel>
queryClaimDataPage
(@NotNull @Valid HvlOAuthRoleClaimQueryModel roleClaimQueryModel, @NotNull LongSupplier userProfileIdSupplier) Returns a page of role claim for assigned entity relation matching the query criteria.queryDataList
(@NotNull @Valid HvlOAuthRoleQueryModel roleQueryModel, @NotNull LongSupplier userProfileIdSupplier) Returns a list of role matching the query criteria.tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleDataModel>
queryDataPage
(@NotNull @Valid HvlOAuthRoleQueryModel roleQueryModel, @NotNull LongSupplier userProfileIdSupplier) Returns a page of role matching the query criteria.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.verifyEditableByIdThenReturnId
(@NotNull Long id) Verify editable role by uuid or else throw exception.verifyEditableByUuidThenReturnId
(@NotBlank @Size(min=36,max=36) String uuid) Verify editable role by uuid or else throw exception.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface tr.com.havelsan.javarch.oauth.jpa.data.provider.module.role.manager.HvlOAuthRoleManager
queryDataList
-
Constructor Details
-
HvlOAuthRoleManagerImpl
public HvlOAuthRoleManagerImpl(HvlOAuthRoleRepository roleRepository, HvlOAuthAcquiredRoleManager acquiredRoleManager, HvlOAuthRoleQueryGenerator roleQueryGenerator, HvlOAuthRoleClaimPredefinedRoleQueryGenerator roleClaimPredefinedRoleQueryGenerator, HvlOAuthRoleClaimRoleGroupQueryGenerator roleClaimRoleGroupQueryGenerator, HvlOAuthRoleClaimProfileQueryGenerator roleClaimProfileQueryGenerator, HvlOAuthRoleClaimProfileGroupQueryGenerator roleClaimProfileGroupQueryGenerator, HvlOAuthRoleClaimPredefinedProxyQueryGenerator roleClaimPredefinedProxyQueryGenerator, HvlOAuthRoleClaimProxyQueryGenerator roleClaimProxyQueryGenerator, HvlOAuthRoleClaimTrustedProxyQueryGenerator roleClaimTrustedProxyQueryGenerator, HvlOAuthRoleMapper roleMapper) Instantiates a new manager implementation.- Parameters:
roleRepository
- the role repositoryacquiredRoleManager
- the acquired role managerroleQueryGenerator
- the role query generatorroleClaimPredefinedRoleQueryGenerator
- the role claim predefined role query generatorroleClaimRoleGroupQueryGenerator
- the role claim role group query generatorroleClaimProfileQueryGenerator
- the role claim profile query generatorroleClaimProfileGroupQueryGenerator
- the role claim profile group query generatorroleClaimPredefinedProxyQueryGenerator
- the role claim predefined proxy query generatorroleClaimProxyQueryGenerator
- the role claim proxy query generatorroleClaimTrustedProxyQueryGenerator
- the role claim trusted proxy query generatorroleMapper
- the role mapper
-
-
Method Details
-
findIdByUuidOrElseThrow
public Long findIdByUuidOrElseThrow(@NotBlank @Size(min=36,max=36) @NotBlank @Size(min=36,max=36) String uuid) Finds role id by uuid.- Specified by:
findIdByUuidOrElseThrow
in interfaceHvlOAuthRoleManager
- Parameters:
uuid
- the uuid- Returns:
- an optional id
-
getById
Gets role by id.- Specified by:
getById
in interfaceHvlOAuthRoleManager
- Parameters:
id
- the id- Returns:
- the role model
-
getByUuid
public HvlOAuthRoleModel getByUuid(@NotBlank @Size(min=36,max=36) @NotBlank @Size(min=36,max=36) String uuid) Gets role by uuid.- Specified by:
getByUuid
in interfaceHvlOAuthRoleManager
- Parameters:
uuid
- the uuid- Returns:
- the role model
-
getDeletedByUuid
public HvlOAuthRoleModel getDeletedByUuid(@NotBlank @Size(min=36,max=36) @NotBlank @Size(min=36,max=36) String uuid) Gets by uuid for delete event.- Specified by:
getDeletedByUuid
in interfaceHvlOAuthRoleManager
- Parameters:
uuid
- the uuid- Returns:
- the by uuid for delete event
-
getNameListByIdSet
public List<String> getNameListByIdSet(@NotEmpty @Size(max=100) @NotEmpty @Size(max=100) Set<@NotNull Long> idSet) Gets name list by id set.- Specified by:
getNameListByIdSet
in interfaceHvlOAuthRoleManager
- Parameters:
idSet
- the id set- Returns:
- the name list
-
verifyEditableByIdThenReturnId
Verify editable role by uuid or else throw exception.- Specified by:
verifyEditableByIdThenReturnId
in interfaceHvlOAuthRoleManager
- Parameters:
id
- the id- Returns:
- the id
-
verifyEditableByUuidThenReturnId
public Long verifyEditableByUuidThenReturnId(@NotBlank @Size(min=36,max=36) @NotBlank @Size(min=36,max=36) String uuid) Verify editable role by uuid or else throw exception.- Specified by:
verifyEditableByUuidThenReturnId
in interfaceHvlOAuthRoleManager
- Parameters:
uuid
- the uuid- Returns:
- the id
-
queryDataList
public List<HvlOAuthRoleDataModel> queryDataList(@NotNull @Valid @NotNull @Valid HvlOAuthRoleQueryModel roleQueryModel, @NotNull @NotNull LongSupplier userProfileIdSupplier) Returns a list of role matching the query criteria.- Specified by:
queryDataList
in interfaceHvlOAuthRoleManager
- Parameters:
roleQueryModel
- the role query modeluserProfileIdSupplier
- the user profile id supplier- Returns:
- the role data model list
-
queryDataPage
public tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleDataModel> queryDataPage(@NotNull @Valid @NotNull @Valid HvlOAuthRoleQueryModel roleQueryModel, @NotNull @NotNull LongSupplier userProfileIdSupplier) Returns a page of role matching the query criteria.- Specified by:
queryDataPage
in interfaceHvlOAuthRoleManager
- Parameters:
roleQueryModel
- the role query modeluserProfileIdSupplier
- the user profile id supplier- Returns:
- the role data model page
-
queryClaimDataPage
public tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleClaimDataModel> queryClaimDataPage(@NotNull @Valid @NotNull @Valid HvlOAuthRoleClaimQueryModel roleClaimQueryModel, @NotNull @NotNull LongSupplier userProfileIdSupplier) Returns a page of role claim for assigned entity relation matching the query criteria.- Specified by:
queryClaimDataPage
in interfaceHvlOAuthRoleManager
- Parameters:
roleClaimQueryModel
- the role claim query modeluserProfileIdSupplier
- the user profile id supplier- Returns:
- the role claim data model page
-
queryReportDataPage
public tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleDataModel> queryReportDataPage(@NotNull @Valid @NotNull @Valid HvlOAuthReportQueryModel reportQueryModel) Returns a page of role report matching the report query criteria.- Specified by:
queryReportDataPage
in interfaceHvlOAuthRoleManager
- Parameters:
reportQueryModel
- the report query model- Returns:
- the hvl page
-
prepareRoleDataProjection
public static com.querydsl.core.types.QBean<HvlOAuthRoleDataModel> prepareRoleDataProjection(HvlOAuthRoleQuery roleQuery) Prepare role data projection q bean.- Parameters:
roleQuery
- the role query- Returns:
- the q bean
-
prepareRoleClaimDataProjection
public static com.querydsl.core.types.QBean<HvlOAuthRoleClaimDataModel> prepareRoleClaimDataProjection(HvlOAuthRoleQuery roleQuery) Prepare role claim data projection q bean.- Parameters:
roleQuery
- the role query- Returns:
- the q bean
-