Class CurrentActivityState<WS extends AbstractActivityWorkStateType>
- java.lang.Object
-
- com.evolveum.midpoint.repo.common.activity.run.state.ActivityState
-
- com.evolveum.midpoint.repo.common.activity.run.state.CurrentActivityState<WS>
-
- Type Parameters:
WS
- Work (business) state of the activity.
- All Implemented Interfaces:
DebugDumpable
public class CurrentActivityState<WS extends AbstractActivityWorkStateType> extends ActivityState
Activity state for the current activity run. Provides the full functionality, including creation of the work state and maintenance of live progress and statistics.
-
-
Field Summary
-
Fields inherited from class com.evolveum.midpoint.repo.common.activity.run.state.ActivityState
beans, stateItemPath
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description CurrentActivityState(@NotNull AbstractActivityRun<?,?,WS> activityRun)
-
Method Summary
-
Methods inherited from class com.evolveum.midpoint.repo.common.activity.run.state.ActivityState
addDeleteItemRealValues, debugDump, flushPendingTaskModifications, flushPendingTaskModificationsChecked, getActivityStateDownwards, getActivityStateUpwards, getBucketingRole, getCurrentActivityStateInParentTask, getParentActivityState, getPropertyRealValue, getRealizationStartTimestamp, getRealizationState, getResultStatus, getWorkStateItemRealValueClone, getWorkStatePropertyRealValue, getWorkStateReferenceRealValue, getWorkStateReferenceRealValues, incrementCounters, isComplete, isScavenger, isWorker, setItemRealValues, setItemRealValuesCollection, setWorkStateItemRealValues, setWorkStateItemRealValues, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
-
-
-
Constructor Detail
-
CurrentActivityState
public CurrentActivityState(@NotNull @NotNull AbstractActivityRun<?,?,WS> activityRun)
-
-
Method Detail
-
initialize
public void initialize(OperationResult result) throws ActivityRunException
Puts the activity state into operation: 1. finds/creates activity and optionally also work state container values; 2. initializes live structures - currently that means progress and statistics objects. This method may or may not be called just before the real run. For example, there can be a need to initialize the state of all child activities before starting their real run.- Throws:
ActivityRunException
-
close
public void close()
Closes the activity state. Currently this means closing the reports.
-
recordRunStart
public void recordRunStart(Long startTimestamp) throws ActivityRunException
- Throws:
ActivityRunException
-
recordRunEnd
public void recordRunEnd(Long endTimestamp) throws ActivityRunException
- Throws:
ActivityRunException
-
recordRealizationStart
public void recordRealizationStart(long startTimestamp) throws ActivityRunException
- Throws:
ActivityRunException
-
recordRealizationStart
public void recordRealizationStart(XMLGregorianCalendar startTimestamp) throws ActivityRunException
- Throws:
ActivityRunException
-
markComplete
public void markComplete(OperationResultStatus resultStatus, Long endTimestamp) throws ActivityRunException
- Throws:
ActivityRunException
-
setRealizationState
public void setRealizationState(ActivityRealizationStateType value) throws ActivityRunException
- Throws:
ActivityRunException
-
setRunEndTimestamp
public void setRunEndTimestamp(Long value) throws ActivityRunException
- Throws:
ActivityRunException
-
setResultStatus
public void setResultStatus(@NotNull @NotNull OperationResultStatus status) throws ActivityRunException
- Throws:
ActivityRunException
-
getActivityPath
@NotNull public @NotNull ActivityPath getActivityPath()
- Specified by:
getActivityPath
in classActivityState
-
getActivityRun
@NotNull public @NotNull AbstractActivityRun<?,?,WS> getActivityRun()
-
getItemPath
public ItemPath getItemPath()
-
getTask
@NotNull protected @NotNull Task getTask()
- Specified by:
getTask
in classActivityState
-
getWorkStateComplexTypeDefinition
@NotNull public @NotNull ComplexTypeDefinition getWorkStateComplexTypeDefinition()
- Specified by:
getWorkStateComplexTypeDefinition
in classActivityState
-
getLiveProgress
@NotNull public @NotNull ActivityProgress getLiveProgress()
-
getStoredProgress
public ActivityProgressType getStoredProgress()
-
getLiveStatistics
@NotNull public @NotNull ActivityStatistics getLiveStatistics()
-
getLiveItemProcessingStatistics
@NotNull public @NotNull ActivityItemProcessingStatistics getLiveItemProcessingStatistics()
-
getStoredItemProcessingStatistics
public ActivityItemProcessingStatisticsType getStoredItemProcessingStatistics()
-
getStoredBucketManagementStatistics
public ActivityBucketManagementStatisticsType getStoredBucketManagementStatistics()
-
updateProgressAndStatisticsNoCommit
public void updateProgressAndStatisticsNoCommit() throws ActivityRunException
- Throws:
ActivityRunException
-
updateProgressNoCommit
public void updateProgressNoCommit() throws ActivityRunException
- Throws:
ActivityRunException
-
getBucketsReport
@NotNull public @NotNull BucketsReport getBucketsReport()
-
getItemsReport
@NotNull public @NotNull ItemsReport getItemsReport()
-
getConnIdOperationsReport
@NotNull public @NotNull ConnIdOperationsReport getConnIdOperationsReport()
-
getInternalOperationsReport
@NotNull public @NotNull InternalOperationsReport getInternalOperationsReport()
-
debugDumpExtra
protected void debugDumpExtra(StringBuilder sb, int indent)
- Specified by:
debugDumpExtra
in classActivityState
-
getEnhancedClassName
@NotNull protected @NotNull String getEnhancedClassName()
- Overrides:
getEnhancedClassName
in classActivityState
-
-