Class SimulationResultManagerImpl
java.lang.Object
com.evolveum.midpoint.model.impl.simulation.SimulationResultManagerImpl
- All Implemented Interfaces:
- SimulationResultManager,- SystemConfigurationChangeListener
@Component
public class SimulationResultManagerImpl
extends Object
implements SimulationResultManager, SystemConfigurationChangeListener
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.evolveum.midpoint.model.api.simulation.SimulationResultManagerSimulationResultManager.SimulatedFunctionCall<X>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription@NotNull SimulationResultImplcreateSimulationResult(@Nullable SimulationDefinitionType definition, @Nullable Task rootTask, @Nullable ConfigurationSpecificationType configurationSpecification, @NotNull OperationResult result) Creates a new simulation result in repository.@NotNull SimulationDefinitionTypeReturns the default simulation definition: either from the system configuration (if present there), or a new one.<X> XexecuteWithSimulationResult(@NotNull TaskExecutionMode mode, @Nullable SimulationDefinitionType simulationDefinition, @NotNull Task task, @NotNull OperationResult result, @NotNull SimulationResultManager.SimulatedFunctionCall<X> functionCall) @Nullable SimulationMetricDefinitionTypegetMetricDefinition(@NotNull String identifier) Returns the definition of a metric or `null` if there's none.getSimulationResult(@NotNull String resultOid, @NotNull OperationResult result) Provides aSimulationResultfor given simulation result OID.@NotNull List<ProcessedObjectImpl<?>>getStoredProcessedObjects(@NotNull String oid, OperationResult result) TEMPORARY.voidinit()voidshutdown()voidupdate(@Nullable SystemConfigurationType value) Updates the listener's internal state with the configuration provided.
- 
Constructor Details- 
SimulationResultManagerImplpublic SimulationResultManagerImpl()
 
- 
- 
Method Details- 
defaultDefinitionDescription copied from interface:SimulationResultManagerReturns the default simulation definition: either from the system configuration (if present there), or a new one. Returned value is freely modifiable by client.- Specified by:
- defaultDefinitionin interface- SimulationResultManager
- Throws:
- ConfigurationException
 
- 
createSimulationResult@NotNull public @NotNull SimulationResultImpl createSimulationResult(@Nullable @Nullable SimulationDefinitionType definition, @Nullable @Nullable Task rootTask, @Nullable @Nullable ConfigurationSpecificationType configurationSpecification, @NotNull @NotNull OperationResult result) throws ConfigurationException Description copied from interface:SimulationResultManagerCreates a new simulation result in repository.- Specified by:
- createSimulationResultin interface- SimulationResultManager
- Parameters:
- definition- Definition to use. If null, the default one is used.
- Throws:
- ConfigurationException
- See Also:
 
- 
updateDescription copied from interface:SystemConfigurationChangeListenerUpdates the listener's internal state with the configuration provided.- Specified by:
- updatein interface- SystemConfigurationChangeListener
- Parameters:
- value- Current value of the system configuration object. It is 'null' if the object does not exist. Usually listeners keep their current state in such cases, but if needed, it will have the information about missing sysconfig object, so it could act accordingly.
 
- 
init@PostConstruct public void init()
- 
shutdown@PreDestroy public void shutdown()
- 
getStoredProcessedObjects@VisibleForTesting @NotNull public @NotNull List<ProcessedObjectImpl<?>> getStoredProcessedObjects(@NotNull @NotNull String oid, OperationResult result) throws SchemaException TEMPORARY. Retrieves stored deltas. May be replaced by something more general in the future.- Specified by:
- getStoredProcessedObjectsin interface- SimulationResultManager
- Throws:
- SchemaException
 
- 
getSimulationResultpublic SimulationResult getSimulationResult(@NotNull @NotNull String resultOid, @NotNull @NotNull OperationResult result) throws SchemaException, ObjectNotFoundException Description copied from interface:SimulationResultManagerProvides aSimulationResultfor given simulation result OID. May involve repository get operation. Makes sure that the simulation result is open. Although this does not prevent writing to closed results (as the result may be closed after obtaining the context), it should be good enough to cover e.g. cases when we re-use existing result by mistake.- Specified by:
- getSimulationResultin interface- SimulationResultManager
- Throws:
- SchemaException
- ObjectNotFoundException
 
- 
executeWithSimulationResultpublic <X> X executeWithSimulationResult(@NotNull @NotNull TaskExecutionMode mode, @Nullable @Nullable SimulationDefinitionType simulationDefinition, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result, @NotNull @NotNull SimulationResultManager.SimulatedFunctionCall<X> functionCall) throws CommonException Description copied from interface:SimulationResultManagerSeeModelInteractionService.executeWithSimulationResult(TaskExecutionMode, SimulationDefinitionType, Task, OperationResult, SimulatedFunctionCall). When in `functionCall`, theTask.getSimulationTransaction()returns non-null value for the task.- Specified by:
- executeWithSimulationResultin interface- SimulationResultManager
- Throws:
- CommonException
 
- 
getMetricDefinition@Nullable public @Nullable SimulationMetricDefinitionType getMetricDefinition(@NotNull @NotNull String identifier) Description copied from interface:SimulationResultManagerReturns the definition of a metric or `null` if there's none.- Specified by:
- getMetricDefinitionin interface- SimulationResultManager
 
 
-