Class HvlOAuthRoleAssignerManagerImpl
java.lang.Object
tr.com.havelsan.javarch.oauth.jpa.data.provider.module.role.manager.HvlOAuthRoleAssignerManagerImpl
- All Implemented Interfaces:
HvlOAuthRoleAssignerManager
@Service
public class HvlOAuthRoleAssignerManagerImpl
extends Object
implements HvlOAuthRoleAssignerManager
The class which implements
HvlOAuthRoleAssignerManager
.-
Constructor Summary
ConstructorDescriptionHvlOAuthRoleAssignerManagerImpl
(HvlOAuthRoleRepository roleRepository, HvlOAuthAcquiredRoleManager acquiredRoleManager, HvlOAuthRoleManager roleManager, HvlOAuthRoleAuthorityRelManager roleAuthorityRelManager, HvlOAuthProfileManager profileManager, HvlOAuthRoleQueryGenerator roleQueryGenerator, HvlOAuthProfileQueryGenerator profileQueryGenerator, HvlOAuthRoleAssignerQueryGenerator roleAssignerQueryGenerator) Instantiates a new Hvl o auth role assigner manager. -
Method Summary
Modifier and TypeMethodDescriptionfindDataListByUsername
(@NotBlank String username, @NotNull Long profileId) Find data list by username list.findIdByUuidOrElseThrow
(@NotBlank @Size(min=36,max=36) String uuid) Finds role assigner id by uuid.static com.querydsl.core.types.QBean
<HvlOAuthRoleDataModel> prepareRoleDataProjection
(HvlOAuthRoleQuery roleQuery) Prepare role data projection q bean.tr.com.havelsan.javarch.data.commons.pageable.HvlPage
<HvlOAuthRoleDataModel> queryDataPage
(@NotNull @Valid HvlOAuthRoleAssignerQueryModel roleAssignerQueryModel) queryProfileUserDataPage is a method which is used to get all profile data pagination list filtered via query modelverifyAuthorityByIdThenReturnId
(@NotNull Long roleAssignerId) Verify role id as role assigner.void
verifyProfileRoleAssignByRoleAssigner
(@NotNull Long roleAssignerId, @NotNull Long sourceProfileId, @NotBlank @Size(min=36,max=36) String targetProfileUuid, @NotEmpty @Size(max=100) Set<@NotNull Long> roleIdSet) Verify profile role assign by role assigner boolean.
-
Constructor Details
-
HvlOAuthRoleAssignerManagerImpl
public HvlOAuthRoleAssignerManagerImpl(HvlOAuthRoleRepository roleRepository, HvlOAuthAcquiredRoleManager acquiredRoleManager, HvlOAuthRoleManager roleManager, HvlOAuthRoleAuthorityRelManager roleAuthorityRelManager, HvlOAuthProfileManager profileManager, HvlOAuthRoleQueryGenerator roleQueryGenerator, HvlOAuthProfileQueryGenerator profileQueryGenerator, HvlOAuthRoleAssignerQueryGenerator roleAssignerQueryGenerator) Instantiates a new Hvl o auth role assigner manager.- Parameters:
roleRepository
- the role repositoryacquiredRoleManager
- the acquired role managerroleManager
- the role managerroleAuthorityRelManager
- the role authority rel managerprofileManager
- the profile managerroleQueryGenerator
- the role query generatorprofileQueryGenerator
- the profile query generatorroleAssignerQueryGenerator
- the role assigner query generator
-
-
Method Details
-
findIdByUuidOrElseThrow
public Long findIdByUuidOrElseThrow(@NotBlank @Size(min=36,max=36) @NotBlank @Size(min=36,max=36) String uuid) Finds role assigner id by uuid.- Specified by:
findIdByUuidOrElseThrow
in interfaceHvlOAuthRoleAssignerManager
- Parameters:
uuid
- the uuid- Returns:
- an optional id
-
findDataListByUsername
public List<HvlOAuthRoleDataModel> findDataListByUsername(@NotBlank @NotBlank String username, @NotNull @NotNull Long profileId) Find data list by username list.- Specified by:
findDataListByUsername
in interfaceHvlOAuthRoleAssignerManager
- Parameters:
username
- the usernameprofileId
- the profile id- Returns:
- the list
-
verifyProfileRoleAssignByRoleAssigner
public void verifyProfileRoleAssignByRoleAssigner(@NotNull @NotNull Long roleAssignerId, @NotNull @NotNull Long sourceProfileId, @NotBlank @Size(min=36,max=36) @NotBlank @Size(min=36,max=36) String targetProfileUuid, @NotEmpty @Size(max=100) @NotEmpty @Size(max=100) Set<@NotNull Long> roleIdSet) Verify profile role assign by role assigner boolean.- Specified by:
verifyProfileRoleAssignByRoleAssigner
in interfaceHvlOAuthRoleAssignerManager
- Parameters:
roleAssignerId
- the role assigner idsourceProfileId
- the source profile idtargetProfileUuid
- the target profile uuidroleIdSet
- the role id set
-
verifyAuthorityByIdThenReturnId
Verify role id as role assigner.- Specified by:
verifyAuthorityByIdThenReturnId
in interfaceHvlOAuthRoleAssignerManager
- Parameters:
roleAssignerId
- the role assigner id- Returns:
- the id
-
queryDataPage
public tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlOAuthRoleDataModel> queryDataPage(@NotNull @Valid @NotNull @Valid HvlOAuthRoleAssignerQueryModel roleAssignerQueryModel) queryProfileUserDataPage is a method which is used to get all profile data pagination list filtered via query model- Specified by:
queryDataPage
in interfaceHvlOAuthRoleAssignerManager
- Parameters:
roleAssignerQueryModel
- the role assigner query model- Returns:
- profile data 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
-