Package com.evolveum.midpoint.smart.api
Interface SmartIntegrationService
public interface SmartIntegrationService
Provides methods for suggesting parts of the integration solution, like inbound/outbound mappings.
-
Method Summary
Modifier and TypeMethodDescriptionBuilds synchronization reactions from SOURCE scenario answers.Builds synchronization reactions from TARGET scenario answers.booleancancelRequest(String token, long timeToWait, Task task, OperationResult result) Cancels the request with the given token.computeSchemaMatch(String resourceOid, ResourceObjectTypeIdentification typeIdentification, boolean useAiService, Task task, OperationResult parentResult) Computes schema match pairs for the given resource and object type.@Nullable StringcreateNewResource(PolyStringType name, ObjectReferenceType connectorRef, ConnectorConfigurationType connectorConfiguration, Task task, OperationResult result) Creates a new resource with the given connector and the given connector configuration.voiddeleteFocusObjectStatistics(QName objectTypeName, String resourceOid, ShadowKindType kind, String intent, OperationResult result) Deletes all focus object statistics for the given object type and resource/kind/intent.voiddeleteObjectTypeStatistics(String resourceOid, String kind, String intent, OperationResult result) Deletes all object type statistics for the given resource, kind, and intent.voiddeleteStatisticsForResource(String resourceOid, QName objectClassName, OperationResult result) Deletes all statistics objects for the given resource and object class.estimateObjectClassSize(String resourceOid, QName objectClassName, int maxSizeForEstimation, Task task, OperationResult result) Estimates the number of objects of the given class on the given resource.getLatestFocusObjectStatistics(QName objectTypeName, String resourceOid, ShadowKindType kind, String intent, OperationResult parentResult) Returns the object holding last known statistics for the given focus object type and resource/kind/intent.getLatestObjectClassStatistics(String resourceOid, QName objectClassName, OperationResult result) Returns the object holding last known statistics for the given resource and object class.getLatestObjectTypeSchemaMatch(String resourceOid, String kind, String intent, OperationResult parentResult) Returns the object holding last known schema match for the given resource, kind and intent.getLatestObjectTypeStatistics(String resourceOid, String kind, String intent, OperationResult parentResult) Returns OID of the object holding last known statistics for the given resource, kind and intent.getPredefinedSynchronizationReactions(SynchronizationConfigurationScenario scenario, boolean includeCorrelationCaseAction) Returns predefined synchronization reactions for the given direction scenario.getSuggestAssociationsOperationStatus(String token, Task task, OperationResult result) Checks the status of the "suggest associations" request.getSuggestCorrelationOperationStatus(String token, Task task, OperationResult result) Checks the status of the "suggest correlation" request.getSuggestFocusTypeOperationStatus(String token, Task task, OperationResult result) Checks the status of the "suggest focus type" request.getSuggestMappingsOperationStatus(String token, Task task, OperationResult result) Checks the status of the "suggest mappings" request.getSuggestObjectTypesOperationStatus(String token, Task task, OperationResult result) Checks the status of the "suggest object types" request.@NotNull SearchResultList<PrismObject<TaskType>>listObjectTypeRelatedSuggestionTasks(@NotNull ResourceObjectTypeIdentification objectTypeIdentification, @NotNull String resourceOid, @NotNull List<ItemName> activityTypes, @NotNull Task task, @NotNull OperationResult result) Returns suggestion tasks related to the given resource object type, filtered by activity types.listSuggestAssociationsOperationStatuses(String resourceOid, Task task, OperationResult result) Lists statuses of all relevant "suggest associations" requests (for the given resource OID).listSuggestCorrelationOperationStatuses(String resourceOid, Task task, OperationResult result) List statuses of all relevant "suggest correlation" requests (for given resource OID).listSuggestFocusTypeOperationStatuses(String resourceOid, Task task, OperationResult result) List statuses of all relevant "suggest focus type" requests (for given resource OID).listSuggestMappingsOperationStatuses(String resourceOid, ResourceObjectTypeIdentification objectTypeIdentification, Boolean isInbound, Task task, OperationResult result) List statuses of all relevant "suggest mappings" requests (for given resource OID).listSuggestObjectTypesOperationStatuses(String resourceOid, Task task, OperationResult result) List statuses of all relevant "suggest object types" requests (for given resource OID).regenerateFocusObjectStatistics(QName objectTypeName, String resourceOid, ShadowKindType kind, String intent, Task task, OperationResult result) Regenerates statistics for the given focus object type (e.g.regenerateObjectClassStatistics(String resourceOid, QName objectClassName, Task task, OperationResult result) Regenerates statistics for the given resource and object class.regenerateObjectTypeStatistics(String resourceOid, ResourceObjectTypeIdentification resourceObjectTypeIdentification, Task task, OperationResult result) Regenerates statistics for the given resource object type.submitSuggestAssociationsOperation(String resourceOid, Task task, OperationResult result) Submits "suggest associations" request.submitSuggestCorrelationOperation(String resourceOid, ResourceObjectTypeIdentification typeIdentification, List<DataAccessPermissionType> permissions, boolean forceRecomputeSchemaMatch, Task task, OperationResult result) Submits "suggest correlation" request.submitSuggestFocusTypeOperation(String resourceOid, ResourceObjectTypeIdentification typeIdentification, List<DataAccessPermissionType> permissions, Task task, OperationResult result) Submits "suggest focus type" request.submitSuggestMappingsOperation(String resourceOid, ResourceObjectTypeIdentification typeIdentification, Boolean isInbound, List<ItemPathType> targetPathsToIgnore, List<DataAccessPermissionType> permissions, boolean forceRecomputeSchemaMatch, Task task, OperationResult result) Submits a "suggest mappings" request.submitSuggestObjectTypesOperation(String resourceOid, QName objectClassName, List<DataAccessPermissionType> permissions, @Nullable RegenerateMode regenerateMode, @Nullable List<ResourceObjectTypeDefinitionType> previousObjectTypes, Task task, OperationResult result) Submits "suggest object types" request.suggestAssociations(String resourceOid, boolean isInbound, Task task, OperationResult result) Suggests association type definitions for the given resource.suggestCorrelation(String resourceOid, ResourceObjectTypeIdentification typeIdentification, SchemaMatchResultType schemaMatch, @Nullable List<ItemPath> targetPathsToIgnore, @Nullable Object interactionMetadata, Task task, OperationResult result) Suggests correlation rules for the given resource object type and focus type.suggestFocusType(String resourceOid, ResourceObjectTypeIdentification typeIdentification, List<DataAccessPermissionType> permissions, Task task, OperationResult result) Suggests a discrete focus type for the application (resource) object type.suggestFocusType(String resourceOid, ResourceObjectTypeDefinitionType typeDefBean, List<DataAccessPermissionType> permissions, Task task, OperationResult result) Suggests a discrete focus type for the application (resource) object type which is not yet defined in the resource.suggestMappings(String resourceOid, ResourceObjectTypeIdentification typeIdentification, SchemaMatchResultType schemaMatch, Boolean isInbound, Boolean useAiService, @Nullable ShadowObjectClassStatisticsType objectTypeStatistics, @Nullable List<ItemPath> targetPathsToIgnore, @Nullable CurrentActivityState<?> activityState, Task task, OperationResult result) Suggests inbound/outbound mappings for the given resource object type and focus type.suggestObjectTypes(String resourceOid, QName objectClassName, ShadowObjectClassStatisticsType statistics, @Nullable RegenerateMode regenerateMode, @Nullable List<ResourceObjectTypeDefinitionType> previousObjectTypes, Task task, OperationResult parentResult) Invokes the service client to suggest object types for the given resource and object class.
-
Method Details
-
createNewResource
@Nullable @Nullable String createNewResource(PolyStringType name, ObjectReferenceType connectorRef, ConnectorConfigurationType connectorConfiguration, Task task, OperationResult result) Creates a new resource with the given connector and the given connector configuration.- Returns:
- OID of the created resource (if the resource was created successfully)
-
estimateObjectClassSize
ObjectClassSizeEstimationType estimateObjectClassSize(String resourceOid, QName objectClassName, int maxSizeForEstimation, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException, SecurityViolationException, CommunicationException, ConfigurationException, ObjectNotFoundException Estimates the number of objects of the given class on the given resource. NOTE: Maybe this method could reside right in `ModelService`.- Parameters:
resourceOid- OID of the resource to estimate the size forobjectClassName- Name of the object class to estimate the size formaxSizeForEstimation- When trying to estimate the size, the implementation may use a sample of objects - at most this many objects.- Throws:
SchemaExceptionExpressionEvaluationExceptionSecurityViolationExceptionCommunicationExceptionConfigurationExceptionObjectNotFoundException
-
getLatestObjectClassStatistics
GenericObjectType getLatestObjectClassStatistics(String resourceOid, QName objectClassName, OperationResult result) throws SchemaException Returns the object holding last known statistics for the given resource and object class.- Throws:
SchemaException
-
regenerateObjectClassStatistics
String regenerateObjectClassStatistics(String resourceOid, QName objectClassName, Task task, OperationResult result) throws CommonException Regenerates statistics for the given resource and object class.- Throws:
CommonException
-
regenerateObjectTypeStatistics
String regenerateObjectTypeStatistics(String resourceOid, ResourceObjectTypeIdentification resourceObjectTypeIdentification, Task task, OperationResult result) throws CommonException Regenerates statistics for the given resource object type.- Throws:
CommonException
-
getLatestObjectTypeStatistics
GenericObjectType getLatestObjectTypeStatistics(String resourceOid, String kind, String intent, OperationResult parentResult) throws SchemaException Returns OID of the object holding last known statistics for the given resource, kind and intent.- Throws:
SchemaException
-
deleteObjectTypeStatistics
void deleteObjectTypeStatistics(String resourceOid, String kind, String intent, OperationResult result) throws SchemaException Deletes all object type statistics for the given resource, kind, and intent.- Throws:
SchemaException
-
deleteStatisticsForResource
void deleteStatisticsForResource(String resourceOid, QName objectClassName, OperationResult result) throws SchemaException Deletes all statistics objects for the given resource and object class.- Throws:
SchemaException
-
getLatestFocusObjectStatistics
GenericObjectType getLatestFocusObjectStatistics(QName objectTypeName, String resourceOid, ShadowKindType kind, String intent, OperationResult parentResult) throws SchemaException Returns the object holding last known statistics for the given focus object type and resource/kind/intent.- Throws:
SchemaException
-
deleteFocusObjectStatistics
void deleteFocusObjectStatistics(QName objectTypeName, String resourceOid, ShadowKindType kind, String intent, OperationResult result) throws SchemaException Deletes all focus object statistics for the given object type and resource/kind/intent.- Throws:
SchemaException
-
regenerateFocusObjectStatistics
String regenerateFocusObjectStatistics(QName objectTypeName, String resourceOid, ShadowKindType kind, String intent, Task task, OperationResult result) throws CommonException Regenerates statistics for the given focus object type (e.g. UserType) filtered by resource/kind/intent.- Throws:
CommonException
-
getLatestObjectTypeSchemaMatch
GenericObjectType getLatestObjectTypeSchemaMatch(String resourceOid, String kind, String intent, OperationResult parentResult) throws SchemaException Returns the object holding last known schema match for the given resource, kind and intent.- Throws:
SchemaException
-
computeSchemaMatch
SchemaMatchResultType computeSchemaMatch(String resourceOid, ResourceObjectTypeIdentification typeIdentification, boolean useAiService, Task task, OperationResult parentResult) throws SchemaException, ExpressionEvaluationException, SecurityViolationException, CommunicationException, ConfigurationException, ObjectNotFoundException Computes schema match pairs for the given resource and object type. -
submitSuggestObjectTypesOperation
String submitSuggestObjectTypesOperation(String resourceOid, QName objectClassName, List<DataAccessPermissionType> permissions, @Nullable @Nullable RegenerateMode regenerateMode, @Nullable @Nullable List<ResourceObjectTypeDefinitionType> previousObjectTypes, Task task, OperationResult result) throws CommonException Submits "suggest object types" request. Returns a token used to query the status.- Throws:
CommonException
-
listSuggestObjectTypesOperationStatuses
List<StatusInfo<ObjectTypesSuggestionType>> listSuggestObjectTypesOperationStatuses(String resourceOid, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, ConfigurationException List statuses of all relevant "suggest object types" requests (for given resource OID). They are sorted by finished time, then by started time. -
getSuggestObjectTypesOperationStatus
StatusInfo<ObjectTypesSuggestionType> getSuggestObjectTypesOperationStatus(String token, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, ConfigurationException Checks the status of the "suggest object types" request. -
submitSuggestFocusTypeOperation
String submitSuggestFocusTypeOperation(String resourceOid, ResourceObjectTypeIdentification typeIdentification, List<DataAccessPermissionType> permissions, Task task, OperationResult result) throws CommonException Submits "suggest focus type" request. Returns a token used to query the status.- Throws:
CommonException
-
listSuggestFocusTypeOperationStatuses
List<StatusInfo<FocusTypeSuggestionType>> listSuggestFocusTypeOperationStatuses(String resourceOid, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, ConfigurationException List statuses of all relevant "suggest focus type" requests (for given resource OID). They are sorted by finished time, then by started time. -
getSuggestFocusTypeOperationStatus
StatusInfo<FocusTypeSuggestionType> getSuggestFocusTypeOperationStatus(String token, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, ConfigurationException Checks the status of the "suggest focus type" request. -
suggestObjectTypes
ObjectTypesSuggestionType suggestObjectTypes(String resourceOid, QName objectClassName, ShadowObjectClassStatisticsType statistics, @Nullable @Nullable RegenerateMode regenerateMode, @Nullable @Nullable List<ResourceObjectTypeDefinitionType> previousObjectTypes, Task task, OperationResult parentResult) throws SchemaException, ExpressionEvaluationException, SecurityViolationException, CommunicationException, ConfigurationException, ObjectNotFoundException Invokes the service client to suggest object types for the given resource and object class. -
suggestFocusType
FocusTypeSuggestionType suggestFocusType(String resourceOid, ResourceObjectTypeIdentification typeIdentification, List<DataAccessPermissionType> permissions, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException, SecurityViolationException, CommunicationException, ConfigurationException, ObjectNotFoundException, InsufficientPermissionsException Suggests a discrete focus type for the application (resource) object type. -
suggestFocusType
FocusTypeSuggestionType suggestFocusType(String resourceOid, ResourceObjectTypeDefinitionType typeDefBean, List<DataAccessPermissionType> permissions, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException, SecurityViolationException, CommunicationException, ConfigurationException, ObjectNotFoundException, InsufficientPermissionsException Suggests a discrete focus type for the application (resource) object type which is not yet defined in the resource. -
suggestCorrelation
CorrelationSuggestionsType suggestCorrelation(String resourceOid, ResourceObjectTypeIdentification typeIdentification, SchemaMatchResultType schemaMatch, @Nullable @Nullable List<ItemPath> targetPathsToIgnore, @Nullable @Nullable Object interactionMetadata, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException, SecurityViolationException, CommunicationException, ConfigurationException, ObjectNotFoundException Suggests correlation rules for the given resource object type and focus type. The method returns the correlation rules along with any missing mappings that are needed for the rules to work. The ability to find correlation rules is limited by the information available. In particular: . TODO -
submitSuggestCorrelationOperation
String submitSuggestCorrelationOperation(String resourceOid, ResourceObjectTypeIdentification typeIdentification, List<DataAccessPermissionType> permissions, boolean forceRecomputeSchemaMatch, Task task, OperationResult result) throws CommonException Submits "suggest correlation" request. Returns a token used to query the status. Interaction metadata will be added later.- Throws:
CommonException
-
listSuggestCorrelationOperationStatuses
List<StatusInfo<CorrelationSuggestionsType>> listSuggestCorrelationOperationStatuses(String resourceOid, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, ConfigurationException List statuses of all relevant "suggest correlation" requests (for given resource OID). They are sorted by finished time, then by started time. -
getSuggestCorrelationOperationStatus
StatusInfo<CorrelationSuggestionsType> getSuggestCorrelationOperationStatus(String token, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, ConfigurationException Checks the status of the "suggest correlation" request. -
suggestMappings
MappingsSuggestionType suggestMappings(String resourceOid, ResourceObjectTypeIdentification typeIdentification, SchemaMatchResultType schemaMatch, Boolean isInbound, Boolean useAiService, @Nullable @Nullable ShadowObjectClassStatisticsType objectTypeStatistics, @Nullable @Nullable List<ItemPath> targetPathsToIgnore, @Nullable @Nullable CurrentActivityState<?> activityState, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException, SecurityViolationException, CommunicationException, ConfigurationException, ObjectNotFoundException, ObjectAlreadyExistsException, ActivityInterruptedException Suggests inbound/outbound mappings for the given resource object type and focus type. The ability to find mappings is limited by the information available. In particular, if there are no correlated data (between resource and midPoint), it cannot suggest any mappings other than "as-is" ones. Hence, mappings and correlation suggestions should be created hand in hand. These two methods can be called in alternation, most probably in a loop, until the suggestions stabilize. User should review the suggestions during the process.- Parameters:
activityState- State of the current activity, if running within a task. It is used for progress reporting.- Throws:
SchemaExceptionExpressionEvaluationExceptionSecurityViolationExceptionCommunicationExceptionConfigurationExceptionObjectNotFoundExceptionObjectAlreadyExistsExceptionActivityInterruptedException
-
submitSuggestMappingsOperation
String submitSuggestMappingsOperation(String resourceOid, ResourceObjectTypeIdentification typeIdentification, Boolean isInbound, List<ItemPathType> targetPathsToIgnore, List<DataAccessPermissionType> permissions, boolean forceRecomputeSchemaMatch, Task task, OperationResult result) throws CommonException Submits a "suggest mappings" request.Returns a token that can be used to query operation status.
- Parameters:
targetPathsToIgnore- Item paths representing mapping targets that should be ignored when generating suggestions. The interpretation of these paths depends on theisInboundparameter:- Inbound mappings: paths on the midpoint side (i.e. where inbound mapping results would be stored)
- Outbound mappings: paths of resource attributes (i.e. where outbound mapping results would be stored)
- Throws:
CommonException
-
listSuggestMappingsOperationStatuses
List<StatusInfo<MappingsSuggestionType>> listSuggestMappingsOperationStatuses(String resourceOid, ResourceObjectTypeIdentification objectTypeIdentification, Boolean isInbound, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, ConfigurationException List statuses of all relevant "suggest mappings" requests (for given resource OID). They are sorted by finished time, then by started time. -
getSuggestMappingsOperationStatus
StatusInfo<MappingsSuggestionType> getSuggestMappingsOperationStatus(String token, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, ConfigurationException Checks the status of the "suggest mappings" request. -
suggestAssociations
AssociationsSuggestionType suggestAssociations(String resourceOid, boolean isInbound, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException, SecurityViolationException, CommunicationException, ConfigurationException, ObjectNotFoundException Suggests association type definitions for the given resource. (Either for all object types, or with some restrictions.) NOTE: Interaction metadata will be added later. -
submitSuggestAssociationsOperation
String submitSuggestAssociationsOperation(String resourceOid, Task task, OperationResult result) throws CommonException Submits "suggest associations" request. Returns a token used to query the status.- Throws:
CommonException
-
listSuggestAssociationsOperationStatuses
List<StatusInfo<AssociationsSuggestionType>> listSuggestAssociationsOperationStatuses(String resourceOid, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, ConfigurationException Lists statuses of all relevant "suggest associations" requests (for the given resource OID). They are sorted by finished time, then by started time. -
getSuggestAssociationsOperationStatus
StatusInfo<AssociationsSuggestionType> getSuggestAssociationsOperationStatus(String token, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, ConfigurationException Checks the status of the "suggest associations" request. -
cancelRequest
boolean cancelRequest(String token, long timeToWait, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, ConfigurationException, ExpressionEvaluationException, SecurityViolationException, CommunicationException Cancels the request with the given token. Currently it is implemented by suspending the task that is executing the request. The user must have the authorization to suspend the task.- Parameters:
token- Token of the request to canceltimeToWait- How long to wait for the task to suspend. If the time is exceeded, the method returns (a value of false) and the task will stop eventually.- Returns:
- true if the request was successfully cancelled, false if it was not possible to cancel it in the time given.
- Throws:
SchemaExceptionObjectNotFoundExceptionConfigurationExceptionExpressionEvaluationExceptionSecurityViolationExceptionCommunicationException
-
getPredefinedSynchronizationReactions
SynchronizationReactionsType getPredefinedSynchronizationReactions(SynchronizationConfigurationScenario scenario, boolean includeCorrelationCaseAction) Returns predefined synchronization reactions for the given direction scenario. For TARGET scenarios, a DISPUTED reaction with a default "create correlation case" action is included only whenincludeCorrelationCaseActionis true. SOURCE scenarios do not include DISPUTED. -
buildSourceSynchronizationReactionsFromAnswers
SynchronizationReactionsType buildSourceSynchronizationReactionsFromAnswers(SourceSynchronizationAnswers answers) Builds synchronization reactions from SOURCE scenario answers. -
buildTargetSynchronizationReactionsFromAnswers
SynchronizationReactionsType buildTargetSynchronizationReactionsFromAnswers(TargetSynchronizationAnswers answers) Builds synchronization reactions from TARGET scenario answers. -
listObjectTypeRelatedSuggestionTasks
@NotNull @NotNull SearchResultList<PrismObject<TaskType>> listObjectTypeRelatedSuggestionTasks(@NotNull @NotNull ResourceObjectTypeIdentification objectTypeIdentification, @NotNull @NotNull String resourceOid, @NotNull @NotNull List<ItemName> activityTypes, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws CommonException Returns suggestion tasks related to the given resource object type, filtered by activity types.- Throws:
CommonException
-