de.cau.cs.kieler.sim.kiem.automated
Class AbstractAutomatedComponent

java.lang.Object
  extended by de.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent
      extended by de.cau.cs.kieler.sim.kiem.JSONObjectDataComponent
          extended by de.cau.cs.kieler.sim.kiem.ui.datacomponent.JSONObjectSimulationDataComponent
              extended by de.cau.cs.kieler.sim.kiem.automated.AbstractAutomatedComponent
All Implemented Interfaces:
IAutomatedComponent, IDataComponent, IJSONObjectDataComponent, IExecutableExtension
Direct Known Subclasses:
AbstractAutomatedProducer

public abstract class AbstractAutomatedComponent
extends JSONObjectSimulationDataComponent
implements IAutomatedComponent

Default implementation of an automated component.

Rating yellow
(2010-03-16) ctr, tam

Nested Class Summary
 
Nested classes/interfaces inherited from class de.cau.cs.kieler.sim.kiem.ui.datacomponent.JSONObjectSimulationDataComponent
JSONObjectSimulationDataComponent.M2MProgressMonitor
 
Field Summary
 
Fields inherited from class de.cau.cs.kieler.sim.kiem.ui.datacomponent.JSONObjectSimulationDataComponent
activePage, activePageFlag, exception, modelEditor
 
Fields inherited from class de.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent
MASTER_CMD_MACROSTEP, MASTER_CMD_PAUSE, MASTER_CMD_RUN, MASTER_CMD_STEP, MASTER_CMD_STEPBACK, MASTER_CMD_STOP
 
Fields inherited from interface de.cau.cs.kieler.sim.kiem.automated.IAutomatedComponent
ANY_TYPE, ANY_TYPE_ARRAY, ITERATION, MODEL_FILE
 
Constructor Summary
AbstractAutomatedComponent()
           
 
Method Summary
protected  int getIteration()
          Getter for the iteration index retrieved from the parameter list.
protected  IPath getModelFile()
          Getter for the model file retrieved from the parameter list.
 int getNumberOfAdditionalIterations()
          The default implementation doesn't need any runs.
 int getNumberOfAdditionalSteps()
          The default implementation doesn't need any steps.
 String[] getSupportedExtensions()
          This component doesn't support any files.
 void setParameters(List<KiemProperty> properties)
          The default implementation only retrieves the model file and the current iteration index.
 int wantsMoreRuns()
          Deprecated. use getNumberOfAdditionalIterations()
 int wantsMoreSteps()
          Deprecated. use getNumberOfAdditionalSteps()
 
Methods inherited from class de.cau.cs.kieler.sim.kiem.ui.datacomponent.JSONObjectSimulationDataComponent
bringProblemsViewToFront, checkModelValidation, checkProperties, doModel2ModelTransform, doProvideInitialVariables, doProvideProperties, doStep, getActivePage, getEditor, getInputEditor, getInputModel, getInputModelAsURI, getInputModelEObject, getInputResourceSet, getInputWorkspaceModel, getModelRootElement, getNotationElement, initialize, isObserver, isProducer, isTransformationCompleted, isTransformationError, provideFilterKeysJSON, provideInitialVariables, provideProperties, resolveBundelFile, step
 
Methods inherited from class de.cau.cs.kieler.sim.kiem.JSONObjectDataComponent
getInitialVariables, setInitialVariables
 
Methods inherited from class de.cau.cs.kieler.sim.kiem.internal.AbstractDataComponent
finalize, getConfigurationElement, getCurrentComponentID, getDataComponentId, getName, getPluginId, getProperties, getShell, isDeltaObserver, isHistoryObserver, isHistoryStep, isInvisible, isMacroStepDone, isMaster, isMasterImplementingGUI, isMultiInstantiable, masterCommand, masterGetAimedStepDuration, masterGUI, masterGUIisEnabled, masterIsPaused, masterIsRunning, masterSetAimedStepDuration, masterSetKIEMInstance, notifyEvent, provideEventOfInterest, provideFilterKeys, setConfigurationElemenet, setCurrentComponentID, setHistoryStep, setInitializationData, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.cau.cs.kieler.sim.kiem.IDataComponent
wrapup
 

Constructor Detail

AbstractAutomatedComponent

public AbstractAutomatedComponent()
Method Detail

getSupportedExtensions

public String[] getSupportedExtensions()
This component doesn't support any files. Subclasses should override this to indicate which type of file they support. Example: types = {"kixs", "strl}; types = IAutomatedComponent.ANY_TYPE;

Specified by:
getSupportedExtensions in interface IAutomatedComponent
Returns:
null

setParameters

public void setParameters(List<KiemProperty> properties)
                   throws KiemInitializationException
The default implementation only retrieves the model file and the current iteration index. Subclasses should extend this method.

Specified by:
setParameters in interface IAutomatedComponent
Parameters:
properties - the properties passed before each execution
Throws:
KiemInitializationException - if something went wrong

wantsMoreRuns

@Deprecated
public int wantsMoreRuns()
Deprecated. use getNumberOfAdditionalIterations()

The default implementation doesn't need any runs. Subclasses should override this method.

Specified by:
wantsMoreRuns in interface IAutomatedComponent
Returns:
0

getNumberOfAdditionalIterations

public int getNumberOfAdditionalIterations()
The default implementation doesn't need any runs. Subclasses should override this method.

Specified by:
getNumberOfAdditionalIterations in interface IAutomatedComponent
Returns:
0

wantsMoreSteps

@Deprecated
public int wantsMoreSteps()
Deprecated. use getNumberOfAdditionalSteps()

The default implementation doesn't need any steps. Subclasses should override this method.

Specified by:
wantsMoreSteps in interface IAutomatedComponent
Returns:
0

getNumberOfAdditionalSteps

public int getNumberOfAdditionalSteps()
The default implementation doesn't need any steps. Subclasses should override this method.

Specified by:
getNumberOfAdditionalSteps in interface IAutomatedComponent
Returns:
0

getModelFile

protected IPath getModelFile()
Getter for the model file retrieved from the parameter list. May be null if setParameters was not called.

Returns:
the model file

getIteration

protected int getIteration()
Getter for the iteration index retrieved from the parameter list. May be -1 if setParameters was not called.

Returns:
the iteration index