Class SyncTaskHelper
java.lang.Object
com.evolveum.midpoint.model.impl.sync.tasks.SyncTaskHelper
Auxiliary methods for synchronization tasks: Live Sync, Async Update, Import, Reconciliation,
and - strange but true - Shadow Cleanup).
Deals mainly with processing resource, objectclass, kind, intent tuple, i.e. specifying resource object class to be processed.
The resource object class determination has the following flow in synchronization tasks:
1. User specifies
ResourceObjectSetType
bean with `resourceRef`, OC name, kind, intent, query (many of them optional).
2. It is then converted to three objects:
- ProcessingScope
that holds resolved resource, object class definition, kind, and intent, see
getProcessingScopeCheckingMaintenance(ResourceObjectSetType, Task, OperationResult)
.
It does _not_ contain user-specified query.
- ResourceSearchSpecification
that contains precise query intended to obtain resource objects
(plus search options). This spec is later fine-tuned by activity run to cover its specific needs
(like selecting only shadows that were not updated for given time - see SearchBasedActivityRunSpecifics#customizeQuery(ObjectQuery, OperationResult)
), to cater for bucketing, handling errored
objects, and so on. This search specification is used only for search-based activities, e.g. not for live sync
or async update.
- PostSearchFilter
that filters any object returned by the item source (e.g. search operation
in search-based activities).
Note:
* PostSearchFilter
is currently used only for import and reconciliation. In theory, it might
be used also for live sync or async update. However, it is a bit questionable, because it would mean that
non-compliant changes would be skipped, i.e. in fact thrown away.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull ProcessingScope
createProcessingScopeForShadow
(@NotNull ShadowType shadow, Task task, OperationResult opResult) CreatesProcessingScope
for a single shadow.createSearchSpecification
(@NotNull ResourceObjectSetType set, Task task, OperationResult opResult) Creates "complete" search specification from given configuration.@NotNull ProcessingScope
getProcessingScopeCheckingMaintenance
(@NotNull ResourceObjectSetType resourceObjectSet, Task task, OperationResult opResult) Returns the specification of objects against which the synchronization will be done (ProcessingScope
).@NotNull String
static void
setSkipMaintenanceCheck
(boolean skipMaintenanceCheck)
-
Constructor Details
-
SyncTaskHelper
public SyncTaskHelper()
-
-
Method Details
-
getProcessingScopeCheckingMaintenance
@NotNull public @NotNull ProcessingScope getProcessingScopeCheckingMaintenance(@NotNull @NotNull ResourceObjectSetType resourceObjectSet, Task task, OperationResult opResult) throws ActivityRunException Returns the specification of objects against which the synchronization will be done (ProcessingScope
). Also checks for the maintenance mode.- Throws:
ActivityRunException
-
createSearchSpecification
public ResourceSearchSpecification createSearchSpecification(@NotNull @NotNull ResourceObjectSetType set, Task task, OperationResult opResult) throws ActivityRunException, SchemaException Creates "complete" search specification from given configuration. Contains processing scope + user-specified query. Does _not_ contain tweaking (customizations) by activity run. These are applied later.- Throws:
ActivityRunException
SchemaException
-
createProcessingScopeForShadow
@NotNull public @NotNull ProcessingScope createProcessingScopeForShadow(@NotNull @NotNull ShadowType shadow, Task task, OperationResult opResult) throws ActivityRunException, SchemaException CreatesProcessingScope
for a single shadow.- Throws:
ActivityRunException
SchemaException
-
getResourceOid
@NotNull public @NotNull String getResourceOid(ResourceObjectSetType set) throws ActivityRunException - Throws:
ActivityRunException
-
setSkipMaintenanceCheck
public static void setSkipMaintenanceCheck(boolean skipMaintenanceCheck)
-