Class ClusteringUtils
java.lang.Object
com.evolveum.midpoint.model.impl.mining.algorithm.cluster.action.ClusteringUtils
Utility class for performing clustering operations in the context of role analysis.
Provides methods for creating, preparing, and processing data points used in clustering.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetExistingRolesOidsSet(@NotNull ModelService modelService, @NotNull Task task, @NotNull OperationResult result) Retrieves existing role OIDs from the model service.getRoleBasedRoleToUserMap(@NotNull ModelService modelService, @Nullable SearchFilterType userQuery, @NotNull Set<String> existingRolesOidsSet, @NotNull Task task, @NotNull OperationResult result) Creates a mapping of users to roles based on role properties.getRoleBasedUserToRoleMap(int minProperties, int maxProperties, @NotNull com.google.common.collect.ListMultimap<String, String> roleToUserMap) Creates a mapping of users to roles based on (UserType) members.getUserBasedRoleToUserMap(@NotNull ModelService modelService, int minProperties, int maxProperties, @Nullable SearchFilterType userQuery, @NotNull Set<String> existingRolesOidsSet, @NotNull Task task, @NotNull OperationResult result) Creates a mapping of roles to users based on user properties.prepareDataPoints(@NotNull com.google.common.collect.ListMultimap<List<String>, String> chunkMap) Prepares data points based on the provided chunk map.
-
Constructor Details
-
ClusteringUtils
public ClusteringUtils()
-
-
Method Details
-
getExistingRolesOidsSet
@NotNull protected static @NotNull Set<String> getExistingRolesOidsSet(@NotNull @NotNull ModelService modelService, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Retrieves existing role OIDs from the model service.- Parameters:
modelService- The model service for accessing role data.task- The task associated with the operation.result- The operation result.- Returns:
- A set of existing role OIDs.
-
getUserBasedRoleToUserMap
@NotNull protected static @NotNull com.google.common.collect.ListMultimap<List<String>,String> getUserBasedRoleToUserMap(@NotNull @NotNull ModelService modelService, int minProperties, int maxProperties, @Nullable @Nullable SearchFilterType userQuery, @NotNull @NotNull Set<String> existingRolesOidsSet, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Creates a mapping of roles to users based on user properties.- Parameters:
modelService- The model service for accessing user data.minProperties- The minimum number of properties (RoleType) required.maxProperties- The maximum number of properties (RoleType) allowed.userQuery- The user query to filter user objects.existingRolesOidsSet- A set of existing role OIDs.task- The task associated with the operation.result- The operation result.- Returns:
- A list multimap mapping roles to users.
-
getRoleBasedRoleToUserMap
@NotNull protected static @NotNull com.google.common.collect.ListMultimap<String,String> getRoleBasedRoleToUserMap(@NotNull @NotNull ModelService modelService, @Nullable @Nullable SearchFilterType userQuery, @NotNull @NotNull Set<String> existingRolesOidsSet, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Creates a mapping of users to roles based on role properties.- Parameters:
modelService- The model service for accessing user data.userQuery- The user query to filter user objects.existingRolesOidsSet- A set of existing role OIDs.task- The task associated with the operation.result- The operation result.- Returns:
- A list multimap mapping role to users.
-
getRoleBasedUserToRoleMap
@NotNull protected static @NotNull com.google.common.collect.ListMultimap<List<String>,String> getRoleBasedUserToRoleMap(int minProperties, int maxProperties, @NotNull @NotNull com.google.common.collect.ListMultimap<String, String> roleToUserMap) Creates a mapping of users to roles based on (UserType) members.- Parameters:
minProperties- The minimum number of properties (UserType) required.maxProperties- The maximum number of properties (UserType) allowed.roleToUserMap- A list multimap mapping role to users.- Returns:
- A list multimap mapping users to roles.
-
prepareDataPoints
public static List<DataPoint> prepareDataPoints(@NotNull @NotNull com.google.common.collect.ListMultimap<List<String>, String> chunkMap) Prepares data points based on the provided chunk map.- Parameters:
chunkMap- A list multimap mapping roles to users.- Returns:
- A list of DataPoint instances.
-