Class RoleAnalysisServiceImpl
java.lang.Object
com.evolveum.midpoint.model.impl.mining.RoleAnalysisServiceImpl
- All Implemented Interfaces:
RoleAnalysisService
,Serializable
@Component
public class RoleAnalysisServiceImpl
extends Object
implements RoleAnalysisService, Serializable
Utility methods for working with role analysis objects in the Midpoint system.
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable PrismObject<RoleType>
cacheRoleTypeObject
(@NotNull Map<String, PrismObject<RoleType>> roleExistCache, @NotNull String roleOid, @NotNull Task task, @NotNull OperationResult result) Retrieves a RoleType PrismObject from a cache or, if not present, fetches it from the ModelService and stores it in the cache.@Nullable PrismObject<UserType>
cacheUserTypeObject
(@NotNull Map<String, PrismObject<UserType>> userExistCache, @NotNull String userOid, @NotNull Task task, @NotNull OperationResult result) Retrieves a UserType PrismObject from a cache or, if not present, fetches it from the ModelService and stores it in the cache.void
clusterObjectMigrationRecompute
(@NotNull String clusterRefOid, @NotNull String roleRefOid, @NotNull Task task, @NotNull OperationResult result) Recompute role analysis cluster (RoleAnalysisClusterType) parameters.@NotNull Integer
countSessionTypeObjects
(@NotNull Task task, @NotNull OperationResult result) Retrieves the number of RoleAnalysisSessionType objects in the system.@NotNull Integer
countUserTypeMembers
(@Nullable ObjectFilter userFilter, @NotNull String objectId, @NotNull Task task, @NotNull OperationResult result) Counts the number of members of a RoleType object.void
deleteCluster
(@NotNull RoleAnalysisClusterType cluster, @NotNull Task task, @NotNull OperationResult result) Deletes a single RoleAnalysisClusterType object.void
deleteSession
(@NotNull String sessionOid, @NotNull Task task, @NotNull OperationResult result) Deletes a single RoleAnalysisSessionType object.void
deleteSessionClustersMembers
(@NotNull String sessionOid, @NotNull Task task, @NotNull OperationResult result) Deletes all RoleAnalysisClusterType objects associated with a specific session.void
executeClusteringTask
(@NotNull PrismObject<RoleAnalysisSessionType> session, @Nullable String taskOid, @Nullable PolyStringType taskName, @NotNull Task task, @NotNull OperationResult result) This method is used to execute a clustering task.void
executeDetectionTask
(@NotNull PrismObject<RoleAnalysisClusterType> cluster, @Nullable String taskOid, @Nullable PolyStringType taskName, @NotNull Task task, @NotNull OperationResult result) This method is used to execute a detection task.void
executeMigrationTask
(@NotNull PrismObject<RoleAnalysisClusterType> cluster, @NotNull ActivityDefinitionType activityDefinition, @NotNull PrismObject<RoleType> roleObject, @Nullable String taskOid, @Nullable PolyStringType taskName, @NotNull Task task, @NotNull OperationResult result) This method is used to execute a migration task.extractUserTypeMembers
(@NotNull Map<String, PrismObject<UserType>> userExistCache, @Nullable ObjectFilter userFilter, @NotNull Set<String> clusterMembers, @NotNull Task task, @NotNull OperationResult result) Extracts a list of user members from set of RoleType object based on provided parameters.@NotNull PrismObject<RoleType>
generateBusinessRole
(@NotNull List<AssignmentType> assignmentTypes, @NotNull PolyStringType name) Retrieves a RoleType object that represents a business role.@NotNull Set<ObjectReferenceType>
generateObjectReferences
(@NotNull Set<String> objects, @NotNull QName complexType, @NotNull Task task, @NotNull OperationResult operationResult) Generates a set of object references based on a provided parameters.@Nullable PrismObject<RoleAnalysisClusterType>
getClusterTypeObject
(@NotNull String oid, @NotNull Task task, @NotNull OperationResult result) Retrieves a PrismObject of RoleAnalysisClusterType object based on its OID.@Nullable PrismObject<FocusType>
getFocusTypeObject
(@NotNull String oid, @NotNull Task task, @NotNull OperationResult result) Retrieves a PrismObject of FocusType object based on its OID.<T extends ObjectType>
@Nullable PrismObject<T>getObject
(@NotNull Class<T> objectTypeClass, @NotNull String oid, @NotNull Task task, @NotNull OperationResult result) Retrieves a PrismObject based on its OID.@Nullable PrismObject<RoleType>
getRoleTypeObject
(@NotNull String oid, @NotNull Task task, @NotNull OperationResult result) Retrieves a PrismObject of RoleType object based on its OID.@Nullable PrismObject<RoleAnalysisSessionType>
getSessionTypeObject
(@NotNull String oid, @NotNull Task task, @NotNull OperationResult result) Retrieves a PrismObject of RoleAnalysisSessionType object based on its OID.@NotNull AnalysisClusterStatisticType
getUpdatedAnalysisClusterStatistic
(double maxReduction, @NotNull AnalysisClusterStatisticType clusterStatistics) @Nullable PrismObject<UserType>
getUserTypeObject
(@NotNull String oid, @NotNull Task task, @NotNull OperationResult result) Retrieves a PrismObject of UserType object based on its OID.void
importCluster
(@NotNull PrismObject<RoleAnalysisClusterType> clusterPrismObject, @NotNull RoleAnalysisDetectionOptionType roleAnalysisSessionDetectionOption, @NotNull ObjectReferenceType parentRef, @NotNull Task task, @NotNull OperationResult result) Imports a RoleAnalysisClusterType object into the system.<T extends AssignmentHolderType & Objectable>
booleanisUnderActivity
(@NotNull PrismObject<T> object, @NotNull RoleAnalysisChannelMode channelMode, @NotNull Task task, @NotNull OperationResult result) This method is used to check if the role analysis object is under activity.@NotNull MiningOperationChunk
prepareCompressedMiningStructure
(@NotNull RoleAnalysisClusterType cluster, boolean fullProcess, @NotNull RoleAnalysisProcessModeType processMode, @NotNull OperationResult result, @NotNull Task task) Method for preparing a compressed mining structure for role analysis.@NotNull MiningOperationChunk
prepareExpandedMiningStructure
(@NotNull RoleAnalysisClusterType cluster, boolean fullProcess, @NotNull RoleAnalysisProcessModeType processMode, @NotNull OperationResult result, @NotNull Task task) Method for preparing an expanded mining structure for role analysis.@NotNull String
recomputeAndResolveClusterOpStatus
(@NotNull PrismObject<RoleAnalysisClusterType> clusterPrismObject, @NotNull RoleAnalysisChannelMode channelMode, @NotNull OperationResult result, @NotNull Task task) Recompute and resolve the cluster operation status.@NotNull String
recomputeAndResolveSessionOpStatus
(@NotNull PrismObject<RoleAnalysisSessionType> sessionPrismObject, @NotNull RoleAnalysisChannelMode channelMode, @NotNull OperationResult result, @NotNull Task task) Recompute and resolve the cluster operation status.void
recomputeClusterDetectionOptions
(@NotNull String clusterOid, @NotNull DetectionOption detectionOption, @NotNull Task task, @NotNull OperationResult result) Recompute the detection options of a RoleAnalysisClusterType object.void
recomputeSessionStatics
(@NotNull String sessionOid, @NotNull RoleAnalysisClusterType roleAnalysisClusterType, @NotNull Task task, @NotNull OperationResult result) Recomputes the statistics of a RoleAnalysisSessionType object.void
replaceDetectionPattern
(@NotNull String clusterOid, @NotNull List<DetectedPattern> detectedPatterns, @NotNull Task task, @NotNull OperationResult result) Replaces the detected patterns of a RoleAnalysisClusterType object.resolveClusterProcessMode
(@NotNull PrismObject<RoleAnalysisClusterType> cluster, @NotNull Task task, @NotNull OperationResult result) Resolves the process mode of a RoleAnalysisClusterType object based on role analysis session.@Nullable PrismObject<TaskType>
resolveTaskObject
(@NotNull List<OperationExecutionType> operationExecution, @NotNull RoleAnalysisChannelMode channelMode, @NotNull Task task, @NotNull OperationResult result) This method is used to retrive the task object for specific roleAnalysisChannelMode.<T extends AssignmentHolderType & Objectable>
voidsetOpStatus
(@NotNull PrismObject<T> object, @NotNull String taskOid, OperationResultStatusType operationResultStatusType, String message, @NotNull RoleAnalysisChannelMode channelMode, @NotNull OperationResult result, @NotNull Task task) This method is used to update the cluster operation status.void
updateClusterPatterns
(@NotNull String clusterRefOid, @NotNull Task task, @NotNull OperationResult result) This method is used to update the cluster detected patterns.void
updateSessionStatistics
(@NotNull ObjectReferenceType sessionRef, @NotNull RoleAnalysisSessionStatisticType sessionStatistic, @NotNull Task task, @NotNull OperationResult result) Modifies statistics of a RoleAnalysisSessionType object.
-
Field Details
-
OPERATION_PREPARE_OBJECTS
-
-
Constructor Details
-
RoleAnalysisServiceImpl
public RoleAnalysisServiceImpl()
-
-
Method Details
-
getUserTypeObject
@Nullable public @Nullable PrismObject<UserType> getUserTypeObject(@NotNull @NotNull String oid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Retrieves a PrismObject of UserType object based on its OID.- Specified by:
getUserTypeObject
in interfaceRoleAnalysisService
- Parameters:
oid
- The OID of the UserType object to retrieve.task
- The task associated with this operation.result
- The operation result.- Returns:
- The PrismObject of UserType object, or null if not found.
-
getFocusTypeObject
@Nullable public @Nullable PrismObject<FocusType> getFocusTypeObject(@NotNull @NotNull String oid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Retrieves a PrismObject of FocusType object based on its OID.- Specified by:
getFocusTypeObject
in interfaceRoleAnalysisService
- Parameters:
oid
- The OID of the FocusType object to retrieve.task
- The task associated with this operation.result
- The operation result.- Returns:
- The PrismObject of FocusType object, or null if not found.
-
getRoleTypeObject
@Nullable public @Nullable PrismObject<RoleType> getRoleTypeObject(@NotNull @NotNull String oid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Retrieves a PrismObject of RoleType object based on its OID.- Specified by:
getRoleTypeObject
in interfaceRoleAnalysisService
- Parameters:
oid
- The OID of the RoleType object to retrieve.task
- The task associated with this operation.result
- The operation result.- Returns:
- The PrismObject of RoleType object, or null if not found.
-
getClusterTypeObject
@Nullable public @Nullable PrismObject<RoleAnalysisClusterType> getClusterTypeObject(@NotNull @NotNull String oid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Retrieves a PrismObject of RoleAnalysisClusterType object based on its OID.- Specified by:
getClusterTypeObject
in interfaceRoleAnalysisService
- Parameters:
oid
- The OID of the RoleAnalysisClusterType object to retrieve.task
- The task associated with this operation.result
- The operation result.- Returns:
- The PrismObject of RoleAnalysisClusterType object, or null if not found.
-
getSessionTypeObject
@Nullable public @Nullable PrismObject<RoleAnalysisSessionType> getSessionTypeObject(@NotNull @NotNull String oid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Retrieves a PrismObject of RoleAnalysisSessionType object based on its OID.- Specified by:
getSessionTypeObject
in interfaceRoleAnalysisService
- Parameters:
oid
- The OID of the RoleAnalysisSessionType object to retrieve.task
- The task associated with this operation.result
- The operation result.- Returns:
- The PrismObject of RoleAnalysisSessionType object, or null if not found.
-
getObject
@Nullable public <T extends ObjectType> @Nullable PrismObject<T> getObject(@NotNull @NotNull Class<T> objectTypeClass, @NotNull @NotNull String oid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Retrieves a PrismObject based on its OID.- Specified by:
getObject
in interfaceRoleAnalysisService
oid
- The OID of the object to retrieve.task
- The task associated with this operation.result
- The operation result.- Returns:
- The PrismObject of object, or null if not found.
-
countSessionTypeObjects
@NotNull public @NotNull Integer countSessionTypeObjects(@NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Retrieves the number of RoleAnalysisSessionType objects in the system.- Specified by:
countSessionTypeObjects
in interfaceRoleAnalysisService
- Parameters:
task
- The task associated with this operation.result
- The operation result.- Returns:
- The number of RoleAnalysisSessionType objects in the system.
-
extractUserTypeMembers
@NotNull public @NotNull com.google.common.collect.ListMultimap<String,String> extractUserTypeMembers(@NotNull @NotNull Map<String, PrismObject<UserType>> userExistCache, @Nullable @Nullable ObjectFilter userFilter, @NotNull @NotNull Set<String> clusterMembers, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Extracts a list of user members from set of RoleType object based on provided parameters.- Specified by:
extractUserTypeMembers
in interfaceRoleAnalysisService
- Parameters:
userExistCache
- The cache of user objects.userFilter
- The UserType filter.clusterMembers
- The set of cluster members.task
- The task associated with this operation.result
- The operation result.- Returns:
- A list of user members.
-
importCluster
public void importCluster(@NotNull @NotNull PrismObject<RoleAnalysisClusterType> clusterPrismObject, @NotNull @NotNull RoleAnalysisDetectionOptionType roleAnalysisSessionDetectionOption, @NotNull @NotNull ObjectReferenceType parentRef, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Imports a RoleAnalysisClusterType object into the system.- Specified by:
importCluster
in interfaceRoleAnalysisService
- Parameters:
clusterPrismObject
- The cluster for importing.roleAnalysisSessionDetectionOption
- The session detection option.parentRef
- The parent Role analysis session reference.task
- The task associated with this operation.result
- The operation result.
-
updateSessionStatistics
public void updateSessionStatistics(@NotNull @NotNull ObjectReferenceType sessionRef, @NotNull @NotNull RoleAnalysisSessionStatisticType sessionStatistic, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Modifies statistics of a RoleAnalysisSessionType object.- Specified by:
updateSessionStatistics
in interfaceRoleAnalysisService
- Parameters:
sessionRef
- The session reference.sessionStatistic
- The session statistic to modify.task
- The task associated with this operation.result
- The operation result.
-
replaceDetectionPattern
public void replaceDetectionPattern(@NotNull @NotNull String clusterOid, @NotNull @NotNull List<DetectedPattern> detectedPatterns, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Replaces the detected patterns of a RoleAnalysisClusterType object.- Specified by:
replaceDetectionPattern
in interfaceRoleAnalysisService
- Parameters:
clusterOid
- The cluster OID.detectedPatterns
- The detected patterns to replace.task
- The task associated with this operation.result
- The operation result.
-
getUpdatedAnalysisClusterStatistic
@NotNull public @NotNull AnalysisClusterStatisticType getUpdatedAnalysisClusterStatistic(double maxReduction, @NotNull @NotNull AnalysisClusterStatisticType clusterStatistics) - Specified by:
getUpdatedAnalysisClusterStatistic
in interfaceRoleAnalysisService
-
generateObjectReferences
@NotNull public @NotNull Set<ObjectReferenceType> generateObjectReferences(@NotNull @NotNull Set<String> objects, @NotNull @NotNull QName complexType, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult operationResult) Description copied from interface:RoleAnalysisService
Generates a set of object references based on a provided parameters.- Specified by:
generateObjectReferences
in interfaceRoleAnalysisService
- Parameters:
objects
- The objects to create references for.complexType
- The complex type of the objects.task
- The task associated with this operation.operationResult
- The operation result.- Returns:
- A set of object references.
-
deleteSessionClustersMembers
public void deleteSessionClustersMembers(@NotNull @NotNull String sessionOid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Deletes all RoleAnalysisClusterType objects associated with a specific session.- Specified by:
deleteSessionClustersMembers
in interfaceRoleAnalysisService
- Parameters:
sessionOid
- The session OID.task
- The task associated with this operation.result
- The operation result.
-
deleteCluster
public void deleteCluster(@NotNull @NotNull RoleAnalysisClusterType cluster, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Deletes a single RoleAnalysisClusterType object.- Specified by:
deleteCluster
in interfaceRoleAnalysisService
- Parameters:
cluster
- The cluster to delete.task
- The task associated with this operation.result
- The operation result.
-
recomputeSessionStatics
public void recomputeSessionStatics(@NotNull @NotNull String sessionOid, @NotNull @NotNull RoleAnalysisClusterType roleAnalysisClusterType, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Recomputes the statistics of a RoleAnalysisSessionType object.- Specified by:
recomputeSessionStatics
in interfaceRoleAnalysisService
- Parameters:
sessionOid
- The session OID.roleAnalysisClusterType
- The cluster to recompute statistics for.task
- The task associated with this operation.result
- The operation result.
-
cacheRoleTypeObject
@Nullable public @Nullable PrismObject<RoleType> cacheRoleTypeObject(@NotNull @NotNull Map<String, PrismObject<RoleType>> roleExistCache, @NotNull @NotNull String roleOid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Retrieves a RoleType PrismObject from a cache or, if not present, fetches it from the ModelService and stores it in the cache.- Specified by:
cacheRoleTypeObject
in interfaceRoleAnalysisService
- Parameters:
roleExistCache
- A cache storing previously fetched RoleType PrismObjects.roleOid
- The OID of the RoleType PrismObject to retrieve.task
- The task associated with the operation.result
- The operation result.- Returns:
- The RoleType PrismObject fetched from the cache or ModelService, or null if not found.
-
cacheUserTypeObject
@Nullable public @Nullable PrismObject<UserType> cacheUserTypeObject(@NotNull @NotNull Map<String, PrismObject<UserType>> userExistCache, @NotNull @NotNull String userOid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Retrieves a UserType PrismObject from a cache or, if not present, fetches it from the ModelService and stores it in the cache.- Specified by:
cacheUserTypeObject
in interfaceRoleAnalysisService
- Parameters:
userExistCache
- A cache storing previously fetched UserType PrismObjects.userOid
- The OID of the UserType PrismObject to retrieve.task
- The task associated with the operation.result
- The operation result.- Returns:
- The UserType PrismObject fetched from the cache or ModelService, or null if not found.
-
countUserTypeMembers
@NotNull public @NotNull Integer countUserTypeMembers(@Nullable @Nullable ObjectFilter userFilter, @NotNull @NotNull String objectId, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Counts the number of members of a RoleType object.- Specified by:
countUserTypeMembers
in interfaceRoleAnalysisService
- Parameters:
userFilter
- The UserType filter.objectId
- The OID of the RoleType object.task
- The task associated with this operation.result
- The operation result.- Returns:
- The number of user members of a RoleType object.
-
generateBusinessRole
@NotNull public @NotNull PrismObject<RoleType> generateBusinessRole(@NotNull @NotNull List<AssignmentType> assignmentTypes, @NotNull @NotNull PolyStringType name) Description copied from interface:RoleAnalysisService
Retrieves a RoleType object that represents a business role.- Specified by:
generateBusinessRole
in interfaceRoleAnalysisService
- Parameters:
assignmentTypes
- The assignment types that represent inducements of the business role.name
- The name of the business role.- Returns:
- The PrismObject of RoleType object.
-
deleteSession
public void deleteSession(@NotNull @NotNull String sessionOid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Deletes a single RoleAnalysisSessionType object.- Specified by:
deleteSession
in interfaceRoleAnalysisService
- Parameters:
sessionOid
- The role analysis session OID.task
- The task associated with this operation.result
- The operation result.
-
resolveClusterProcessMode
public RoleAnalysisProcessModeType resolveClusterProcessMode(@NotNull @NotNull PrismObject<RoleAnalysisClusterType> cluster, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Resolves the process mode of a RoleAnalysisClusterType object based on role analysis session.- Specified by:
resolveClusterProcessMode
in interfaceRoleAnalysisService
- Parameters:
cluster
- The cluster to resolve the process mode for.task
- The task associated with this operation.result
- The operation result.- Returns:
- The resolved process mode.
-
recomputeClusterDetectionOptions
public void recomputeClusterDetectionOptions(@NotNull @NotNull String clusterOid, @NotNull @NotNull DetectionOption detectionOption, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Recompute the detection options of a RoleAnalysisClusterType object.- Specified by:
recomputeClusterDetectionOptions
in interfaceRoleAnalysisService
- Parameters:
clusterOid
- The cluster OID.detectionOption
- The detection option to recompute.task
- The task associated with this operation.result
- The operation result.
-
prepareCompressedMiningStructure
@NotNull public @NotNull MiningOperationChunk prepareCompressedMiningStructure(@NotNull @NotNull RoleAnalysisClusterType cluster, boolean fullProcess, @NotNull @NotNull RoleAnalysisProcessModeType processMode, @NotNull @NotNull OperationResult result, @NotNull @NotNull Task task) Description copied from interface:RoleAnalysisService
Method for preparing a compressed mining structure for role analysis.- Specified by:
prepareCompressedMiningStructure
in interfaceRoleAnalysisService
- Parameters:
cluster
- The cluster for which the mining structure is prepared.fullProcess
- The full process flag. If true, the entire structure is prepared. If false, only a partial structure (members) is prepared.processMode
- The process mode.result
- The operation result.task
- The task associated with this operation.- Returns:
- A MiningOperationChunk containing user and role chunks for further processing.
-
prepareExpandedMiningStructure
@NotNull public @NotNull MiningOperationChunk prepareExpandedMiningStructure(@NotNull @NotNull RoleAnalysisClusterType cluster, boolean fullProcess, @NotNull @NotNull RoleAnalysisProcessModeType processMode, @NotNull @NotNull OperationResult result, @NotNull @NotNull Task task) Description copied from interface:RoleAnalysisService
Method for preparing an expanded mining structure for role analysis.- Specified by:
prepareExpandedMiningStructure
in interfaceRoleAnalysisService
- Parameters:
cluster
- The cluster for which the mining structure is prepared.fullProcess
- The full process flag. If true, the entire structure is prepared. If false, only a partial structure (members) is prepared.processMode
- The process mode.result
- The operation result.task
- The task associated with this operation.- Returns:
- A MiningOperationChunk containing user and role chunks for further processing.
-
executeClusteringTask
public void executeClusteringTask(@NotNull @NotNull PrismObject<RoleAnalysisSessionType> session, @Nullable @Nullable String taskOid, @Nullable @Nullable PolyStringType taskName, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
This method is used to execute a clustering task. It creates a new cluster and stores it in the session.- Specified by:
executeClusteringTask
in interfaceRoleAnalysisService
- Parameters:
session
- The session under which the clustering task is executed.taskOid
- The OID of the task.taskName
- The name of the task.task
- The task associated with this operation.result
- The operation result.
-
executeDetectionTask
public void executeDetectionTask(@NotNull @NotNull PrismObject<RoleAnalysisClusterType> cluster, @Nullable @Nullable String taskOid, @Nullable @Nullable PolyStringType taskName, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
This method is used to execute a detection task. Detected patterns are stored in the cluster.- Specified by:
executeDetectionTask
in interfaceRoleAnalysisService
- Parameters:
cluster
- The cluster under which the detection task is executed.taskOid
- The OID of the task.taskName
- The name of the task.task
- The task associated with this operation.result
- The operation result.
-
executeMigrationTask
public void executeMigrationTask(@NotNull @NotNull PrismObject<RoleAnalysisClusterType> cluster, @NotNull @NotNull ActivityDefinitionType activityDefinition, @NotNull @NotNull PrismObject<RoleType> roleObject, @Nullable @Nullable String taskOid, @Nullable @Nullable PolyStringType taskName, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
This method is used to execute a migration task. It replaces the role assignment with business role assignment.- Specified by:
executeMigrationTask
in interfaceRoleAnalysisService
- Parameters:
cluster
- The cluster under which the migration task is executed.activityDefinition
- The activity definition.roleObject
- The role object for migration.taskOid
- The OID of the task.taskName
- The name of the task.task
- The task associated with this operation.result
- The operation result.
-
recomputeAndResolveClusterOpStatus
@NotNull public @NotNull String recomputeAndResolveClusterOpStatus(@NotNull @NotNull PrismObject<RoleAnalysisClusterType> clusterPrismObject, @NotNull @NotNull RoleAnalysisChannelMode channelMode, @NotNull @NotNull OperationResult result, @NotNull @NotNull Task task) Description copied from interface:RoleAnalysisService
Recompute and resolve the cluster operation status. This method also update the cluster operation status if detect some changes.- Specified by:
recomputeAndResolveClusterOpStatus
in interfaceRoleAnalysisService
- Parameters:
clusterPrismObject
- The cluster for recompute and resolve.channelMode
- The channel mode.result
- The operation result.task
- The task associated with this operation.- Returns:
- The cluster operation status.
-
recomputeAndResolveSessionOpStatus
@NotNull public @NotNull String recomputeAndResolveSessionOpStatus(@NotNull @NotNull PrismObject<RoleAnalysisSessionType> sessionPrismObject, @NotNull @NotNull RoleAnalysisChannelMode channelMode, @NotNull @NotNull OperationResult result, @NotNull @NotNull Task task) Description copied from interface:RoleAnalysisService
Recompute and resolve the cluster operation status. This method also update the cluster operation status if detect some changes.- Specified by:
recomputeAndResolveSessionOpStatus
in interfaceRoleAnalysisService
- Parameters:
sessionPrismObject
- The cluster for recompute and resolve.channelMode
- The channel mode.result
- The operation result.task
- The task associated with this operation.- Returns:
- The cluster operation status.
-
clusterObjectMigrationRecompute
public void clusterObjectMigrationRecompute(@NotNull @NotNull String clusterRefOid, @NotNull @NotNull String roleRefOid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
Recompute role analysis cluster (RoleAnalysisClusterType) parameters. This method should be called after migration to business role.- Specified by:
clusterObjectMigrationRecompute
in interfaceRoleAnalysisService
- Parameters:
clusterRefOid
- The cluster OID.roleRefOid
- The role OID.task
- The task associated with this operation.result
- The operation result.
-
updateClusterPatterns
public void updateClusterPatterns(@NotNull @NotNull String clusterRefOid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
This method is used to update the cluster detected patterns. Currently, it is used to update the cluster detected patterns after the migration task in the cluster.- Specified by:
updateClusterPatterns
in interfaceRoleAnalysisService
- Parameters:
clusterRefOid
- The cluster OID.task
- The task associated with this operation.result
- The operation result.
-
setOpStatus
public <T extends AssignmentHolderType & Objectable> void setOpStatus(@NotNull @NotNull PrismObject<T> object, @NotNull @NotNull String taskOid, OperationResultStatusType operationResultStatusType, String message, @NotNull @NotNull RoleAnalysisChannelMode channelMode, @NotNull @NotNull OperationResult result, @NotNull @NotNull Task task) Description copied from interface:RoleAnalysisService
This method is used to update the cluster operation status.- Specified by:
setOpStatus
in interfaceRoleAnalysisService
- Parameters:
object
- The assignment holder object.taskOid
- The OID of the task.operationResultStatusType
- The operation result status type.message
- The message to set.channelMode
- The channel mode.result
- The operation result.task
- The task associated with this operation.
-
isUnderActivity
public <T extends AssignmentHolderType & Objectable> boolean isUnderActivity(@NotNull @NotNull PrismObject<T> object, @NotNull @NotNull RoleAnalysisChannelMode channelMode, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
This method is used to check if the role analysis object is under activity.- Specified by:
isUnderActivity
in interfaceRoleAnalysisService
- Type Parameters:
T
- The assignment holder type.- Parameters:
object
- The assignment holder object.channelMode
- The channel mode.task
- The task associated with this operation.result
- The operation result.- Returns:
- The operation execution status.
-
resolveTaskObject
@Nullable public @Nullable PrismObject<TaskType> resolveTaskObject(@NotNull @NotNull List<OperationExecutionType> operationExecution, @NotNull @NotNull RoleAnalysisChannelMode channelMode, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) Description copied from interface:RoleAnalysisService
This method is used to retrive the task object for specific roleAnalysisChannelMode.- Specified by:
resolveTaskObject
in interfaceRoleAnalysisService
- Parameters:
operationExecution
- The operation execution list.channelMode
- The channel mode.task
- The task associated with this operation.result
- The operation result.- Returns:
- The task object.
-