Class RoleAnalysisServiceUtils
java.lang.Object
com.evolveum.midpoint.model.impl.mining.RoleAnalysisServiceUtils
-
Method Summary
Modifier and TypeMethodDescriptionprotected static void
addAdditionalObject
(@NotNull RoleAnalysisService roleAnalysisService, String candidateRoleId, @NotNull List<String> detectedPatternUsers, @NotNull List<String> detectedPatternRoles, @NotNull List<MiningUserTypeChunk> users, @NotNull List<MiningRoleTypeChunk> roles, @NotNull Task task, @NotNull OperationResult result) static ObjectQuery
buildAssignmentRoleMemberSearchObjectQuery
(@NotNull Set<String> roles, @Nullable ObjectFilter userObjectFiler, @Nullable ObjectFilter roleObjectFilter, @Nullable ObjectFilter assignmentFilter) Builds an ObjectQuery for assignment role member search based on the provided role, user, and assignment filters.static ObjectQuery
buildAssignmentSearchObjectQuery
(@Nullable ObjectFilter userObjectFiler, @Nullable ObjectFilter roleObjectFilter, @Nullable ObjectFilter assignmentFilter) Builds an ObjectQuery for assignment search based on the provided user, role, and assignment filters.static ObjectQuery
buildAssignmentUserAccessSearchObjectQuery
(@NotNull Set<String> users, @Nullable ObjectFilter userObjectFiler, @Nullable ObjectFilter roleObjectFilter, @Nullable ObjectFilter assignmentFilter) Builds an ObjectQuery for assignment user access search based on the provided user, role, and assignment filters.static ObjectQuery
buildMembershipSearchObjectQuery
(@Nullable ObjectFilter userObjectFiler, @Nullable ObjectFilter roleObjectFilter) Builds an ObjectQuery for membership search based on the provided user and role filters.protected static double
calculateDensity
(@NotNull List<RoleAnalysisAttributeAnalysis> attributeAnalysisList) protected static void
cleanClusterDetectedPatterns
(@NotNull RepositoryService repositoryService, @NotNull PrismObject<RoleAnalysisClusterType> cluster, @NotNull Trace logger, @NotNull OperationResult result) protected static <PV extends PrismValue>
List<ProvenanceMetadataType>collectProvenanceMetadata
(PV rowValue) protected static <PV extends PrismValue>
@NotNull List<ValueMetadataType>collectValueMetadata
(PV rowValue) protected static @NotNull List<AssignmentPathMetadataType>
computeAssignmentPaths
(@NotNull ObjectReferenceType roleMembershipRef) protected static @Nullable ActivityDefinitionType
createMigrationActivity
(@NotNull List<FocusType> roleMembersOid, @NotNull String roleOid, @NotNull Trace logger, @NotNull OperationResult result) protected static void
executeBusinessRoleMigrationTask
(@NotNull ModelInteractionService modelInteractionService, @NotNull ActivityDefinitionType activityDefinition, @NotNull Task task, @NotNull OperationResult result, @NotNull TaskType taskObject) extractCorrespondingOutlierValues
(@NotNull RoleAnalysisAttributeAnalysisResult outlierCandidateAttributeAnalysisResult, String itemPath) protected static @Nullable DetectedPattern
findMultiplePatternWithBestConfidence
(@NotNull List<DetectedPattern> topDetectedPatterns) static @Nullable DetectedPattern
findPatternWithBestConfidence
(@NotNull List<DetectedPattern> detectedPatterns) protected static @NotNull AssignmentType
getAssignmentTo
(String unassignedRole) static void
loadDetectedPattern
(@NotNull RepositoryService repositoryService, @NotNull RoleAnalysisDetectionPatternType pattern, @NotNull Map<String, RoleAnalysisClusterType> mappedClusters, @Nullable Collection<SelectorOptions<GetOperationOptions>> options, @NotNull List<DetectedPattern> detectedPatterns, @NotNull OperationResult result) static void
prepareOutlierPartitionMap
(@NotNull RoleAnalysisService roleAnalysisService, @NotNull Task task, @NotNull OperationResult result, @NotNull RoleAnalysisOutlierPartitionType partition, Map<RoleAnalysisOutlierPartitionType, RoleAnalysisOutlierType> partitionOutlierMap, @NotNull Trace logger) protected static @NotNull RoleAnalysisSessionStatisticType
prepareRoleAnalysisSessionStatistic
(@NotNull AnalysisClusterStatisticType clusterStatistics, @NotNull RoleAnalysisSessionStatisticType sessionStatistic, int deletedClusterMembersCount) protected static void
resolveTablePatternChunk
(RoleAnalysisProcessModeType processMode, MiningOperationChunk basicChunk, @NotNull List<MiningRoleTypeChunk> miningRoleTypeChunks, List<List<String>> detectedPatternsRoles, List<String> candidateRolesIds, List<MiningUserTypeChunk> miningUserTypeChunks, List<List<String>> detectedPatternsUsers) protected static void
switchRoleToActiveLifeState
(@NotNull ModelService modelService, @NotNull PrismObject<RoleType> roleObject, @NotNull Trace logger, @NotNull Task task, @NotNull OperationResult result)
-
Method Details
-
prepareRoleAnalysisSessionStatistic
@NotNull protected static @NotNull RoleAnalysisSessionStatisticType prepareRoleAnalysisSessionStatistic(@NotNull @NotNull AnalysisClusterStatisticType clusterStatistics, @NotNull @NotNull RoleAnalysisSessionStatisticType sessionStatistic, int deletedClusterMembersCount) -
resolveTablePatternChunk
protected static void resolveTablePatternChunk(RoleAnalysisProcessModeType processMode, MiningOperationChunk basicChunk, @NotNull @NotNull List<MiningRoleTypeChunk> miningRoleTypeChunks, List<List<String>> detectedPatternsRoles, List<String> candidateRolesIds, List<MiningUserTypeChunk> miningUserTypeChunks, List<List<String>> detectedPatternsUsers) -
addAdditionalObject
protected static void addAdditionalObject(@NotNull @NotNull RoleAnalysisService roleAnalysisService, String candidateRoleId, @NotNull @NotNull List<String> detectedPatternUsers, @NotNull @NotNull List<String> detectedPatternRoles, @NotNull @NotNull List<MiningUserTypeChunk> users, @NotNull @NotNull List<MiningRoleTypeChunk> roles, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) -
executeBusinessRoleMigrationTask
protected static void executeBusinessRoleMigrationTask(@NotNull @NotNull ModelInteractionService modelInteractionService, @NotNull @NotNull ActivityDefinitionType activityDefinition, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result, @NotNull @NotNull TaskType taskObject) -
switchRoleToActiveLifeState
protected static void switchRoleToActiveLifeState(@NotNull @NotNull ModelService modelService, @NotNull @NotNull PrismObject<RoleType> roleObject, @NotNull @NotNull Trace logger, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) -
createMigrationActivity
@Nullable protected static @Nullable ActivityDefinitionType createMigrationActivity(@NotNull @NotNull List<FocusType> roleMembersOid, @NotNull @NotNull String roleOid, @NotNull @NotNull Trace logger, @NotNull @NotNull OperationResult result) -
cleanClusterDetectedPatterns
protected static void cleanClusterDetectedPatterns(@NotNull @NotNull RepositoryService repositoryService, @NotNull @NotNull PrismObject<RoleAnalysisClusterType> cluster, @NotNull @NotNull Trace logger, @NotNull @NotNull OperationResult result) -
getAssignmentTo
-
calculateDensity
protected static double calculateDensity(@NotNull @NotNull List<RoleAnalysisAttributeAnalysis> attributeAnalysisList) -
extractCorrespondingOutlierValues
@Nullable protected static @Nullable Set<String> extractCorrespondingOutlierValues(@NotNull @NotNull RoleAnalysisAttributeAnalysisResult outlierCandidateAttributeAnalysisResult, String itemPath) -
findPatternWithBestConfidence
@Nullable public static @Nullable DetectedPattern findPatternWithBestConfidence(@NotNull @NotNull List<DetectedPattern> detectedPatterns) -
findMultiplePatternWithBestConfidence
@Nullable protected static @Nullable DetectedPattern findMultiplePatternWithBestConfidence(@NotNull @NotNull List<DetectedPattern> topDetectedPatterns) -
computeAssignmentPaths
@NotNull protected static @NotNull List<AssignmentPathMetadataType> computeAssignmentPaths(@NotNull @NotNull ObjectReferenceType roleMembershipRef) -
collectProvenanceMetadata
protected static <PV extends PrismValue> List<ProvenanceMetadataType> collectProvenanceMetadata(PV rowValue) -
collectValueMetadata
@NotNull protected static <PV extends PrismValue> @NotNull List<ValueMetadataType> collectValueMetadata(@NotNull PV rowValue) -
buildAssignmentSearchObjectQuery
public static ObjectQuery buildAssignmentSearchObjectQuery(@Nullable @Nullable ObjectFilter userObjectFiler, @Nullable @Nullable ObjectFilter roleObjectFilter, @Nullable @Nullable ObjectFilter assignmentFilter) Builds an ObjectQuery for assignment search based on the provided user, role, and assignment filters.- Parameters:
userObjectFiler
- An optional filter to apply to the user objects.roleObjectFilter
- An optional filter to apply to the role objects.assignmentFilter
- An optional filter to apply to the assignment objects.- Returns:
- The constructed ObjectQuery for assignment search.
-
buildMembershipSearchObjectQuery
public static ObjectQuery buildMembershipSearchObjectQuery(@Nullable @Nullable ObjectFilter userObjectFiler, @Nullable @Nullable ObjectFilter roleObjectFilter) Builds an ObjectQuery for membership search based on the provided user and role filters.- Parameters:
userObjectFiler
- An optional filter to apply to the user objects.roleObjectFilter
- An optional filter to apply to the role objects.- Returns:
- The constructed ObjectQuery for membership search.
-
buildAssignmentRoleMemberSearchObjectQuery
public static ObjectQuery buildAssignmentRoleMemberSearchObjectQuery(@NotNull @NotNull Set<String> roles, @Nullable @Nullable ObjectFilter userObjectFiler, @Nullable @Nullable ObjectFilter roleObjectFilter, @Nullable @Nullable ObjectFilter assignmentFilter) Builds an ObjectQuery for assignment role member search based on the provided role, user, and assignment filters.- Parameters:
roles
- A set of role OIDs to be included in the search.userObjectFiler
- An optional filter to apply to the user objects.roleObjectFilter
- An optional filter to apply to the role objects.assignmentFilter
- An optional filter to apply to the assignment objects.- Returns:
- The constructed ObjectQuery for assignment role member search.
-
buildAssignmentUserAccessSearchObjectQuery
public static ObjectQuery buildAssignmentUserAccessSearchObjectQuery(@NotNull @NotNull Set<String> users, @Nullable @Nullable ObjectFilter userObjectFiler, @Nullable @Nullable ObjectFilter roleObjectFilter, @Nullable @Nullable ObjectFilter assignmentFilter) Builds an ObjectQuery for assignment user access search based on the provided user, role, and assignment filters.- Parameters:
users
- A set of user OIDs to be included in the search.userObjectFiler
- An optional filter to apply to the user objects.roleObjectFilter
- An optional filter to apply to the role objects.assignmentFilter
- An optional filter to apply to the assignment objects.- Returns:
- The constructed ObjectQuery for assignment user access search.
-
loadDetectedPattern
public static void loadDetectedPattern(@NotNull @NotNull RepositoryService repositoryService, @NotNull @NotNull RoleAnalysisDetectionPatternType pattern, @NotNull @NotNull Map<String, RoleAnalysisClusterType> mappedClusters, @Nullable @Nullable Collection<SelectorOptions<GetOperationOptions>> options, @NotNull @NotNull List<DetectedPattern> detectedPatterns, @NotNull @NotNull OperationResult result) -
prepareOutlierPartitionMap
public static void prepareOutlierPartitionMap(@NotNull @NotNull RoleAnalysisService roleAnalysisService, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result, @NotNull @NotNull RoleAnalysisOutlierPartitionType partition, Map<RoleAnalysisOutlierPartitionType, RoleAnalysisOutlierType> partitionOutlierMap, @NotNull @NotNull Trace logger)
-