adams.flow.core
Class AbstractGroovyActor

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.flow.core.AbstractActor
              extended by adams.flow.core.AbstractScriptActor
                  extended by adams.flow.core.AbstractGroovyActor
All Implemented Interfaces:
adams.core.AdditionalInformationHandler, adams.core.CleanUpHandler, adams.core.Debuggable, adams.core.DebugOutputHandler, adams.core.Destroyable, OptionHandler, adams.core.QuickInfoSupporter, adams.core.ShallowCopySupporter<AbstractActor>, adams.core.SizeOfHandler, adams.core.Stoppable, VariableChangeListener, Actor, ErrorHandler, Serializable, Comparable
Direct Known Subclasses:
Groovy, Groovy, Groovy, Groovy

public abstract class AbstractGroovyActor
extends AbstractScriptActor

Abstract ancestor for actors that execute Groovy scripts.

Version:
$Revision: 6844 $
Author:
FracPete (fracpete at waikato dot ac dot nz)
See Also:
Groovy, Serialized Form

Field Summary
protected  AbstractActor m_ActorObject
          the loaded script object.
protected  GroovyScript m_InlineScript
          the inline script.
 
Fields inherited from class adams.flow.core.AbstractScriptActor
m_ScriptFile, m_ScriptObject, m_ScriptOptions
 
Fields inherited from class adams.flow.core.AbstractActor
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_ScopeHandler, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Fields inherited from interface adams.flow.core.Actor
FILE_EXTENSION, FILE_EXTENSION_GZ
 
Constructor Summary
AbstractGroovyActor()
           
 
Method Summary
protected  String checkScriptObject()
          Checks the script object.
 void defineOptions()
          Adds options to the internal list of options.
protected  GroovyScript getDefaultInlineScript()
          Returns the default inline script.
 GroovyScript getInlineScript()
          Gets the inline script to use instead of the external script file.
 String getQuickInfo()
          Returns a quick info about the actor, which will be displayed in the GUI.
 String inlineScriptTipText()
          Returns the tip text for this property.
protected  String loadScriptObject()
          Loads the scripts object and sets its options.
 String scriptOptionsTipText()
          Returns the tip text for this property.
 void setInlineScript(GroovyScript value)
          Sets the inline script to use instead of the external script file.
 String setUp()
          Initializes the item for flow execution.
protected  String updateScriptOptions()
          Updates the script options.
 void wrapUp()
          Cleans up after the execution has finished.
 
Methods inherited from class adams.flow.core.AbstractScriptActor
getScriptFile, getScriptOptions, initScriptObject, scriptFileTipText, setScriptFile, setScriptOptions
 
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, backupState, canInspectOptions, canPerformSetUpCheck, cleanUp, compareTo, debug, destroy, doExecute, equals, execute, findVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, handleException, hasErrorHandler, hasStopMessage, index, initialize, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, postExecute, preExecute, pruneBackup, pruneBackup, reset, restoreState, setAnnotations, setErrorHandler, setHeadless, setName, setParent, setSkip, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, sizeOf, skipTipText, stopExecution, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, globalInfo, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager
 

Field Detail

m_ActorObject

protected transient AbstractActor m_ActorObject
the loaded script object.


m_InlineScript

protected GroovyScript m_InlineScript
the inline script.

Constructor Detail

AbstractGroovyActor

public AbstractGroovyActor()
Method Detail

defineOptions

public void defineOptions()
Adds options to the internal list of options.

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractScriptActor

getQuickInfo

public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.

Specified by:
getQuickInfo in interface adams.core.QuickInfoSupporter
Specified by:
getQuickInfo in interface Actor
Overrides:
getQuickInfo in class AbstractScriptActor
Returns:
null if no info available, otherwise short string

scriptOptionsTipText

public String scriptOptionsTipText()
Returns the tip text for this property.

Overrides:
scriptOptionsTipText in class AbstractScriptActor
Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

getDefaultInlineScript

protected GroovyScript getDefaultInlineScript()
Returns the default inline script.

Returns:
the default script

setInlineScript

public void setInlineScript(GroovyScript value)
Sets the inline script to use instead of the external script file.

Parameters:
value - the inline script

getInlineScript

public GroovyScript getInlineScript()
Gets the inline script to use instead of the external script file.

Returns:
the inline script

inlineScriptTipText

public String inlineScriptTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

loadScriptObject

protected String loadScriptObject()
Loads the scripts object and sets its options.

Specified by:
loadScriptObject in class AbstractScriptActor
Returns:
null if OK, otherwise the error message

checkScriptObject

protected String checkScriptObject()
Checks the script object.

Specified by:
checkScriptObject in class AbstractScriptActor
Returns:
null if OK, otherwise the error message

setUp

public String setUp()
Initializes the item for flow execution.

Specified by:
setUp in interface Actor
Overrides:
setUp in class AbstractScriptActor
Returns:
null if everything is fine, otherwise error message

updateScriptOptions

protected String updateScriptOptions()
Updates the script options.

Returns:
null if successful, otherwise error message

wrapUp

public void wrapUp()
Cleans up after the execution has finished.

Specified by:
wrapUp in interface Actor
Overrides:
wrapUp in class AbstractScriptActor


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.