Class RoleAnalysisServiceUtils

java.lang.Object
com.evolveum.midpoint.model.impl.mining.RoleAnalysisServiceUtils

public class RoleAnalysisServiceUtils extends Object
  • 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

      @NotNull protected static @NotNull AssignmentType getAssignmentTo(String unassignedRole)
    • 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)