Package adams.flow.control
Class LocalScopeTee
-
- All Implemented Interfaces:
AdditionalInformationHandler
,CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,Pausable
,QuickInfoSupporter
,ShallowCopySupporter<Actor>
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,VariablesHandler
,VariablesInspectionHandler
,FlowPauseStateListener
,VariableChangeListener
,AtomicExecution
,LocalScopeHandler
,ProgrammaticLocalScope
,ScopeHandler
,StorageHandler
,Actor
,ActorHandler
,ActorWithConditionalEquivalent
,ActorWithTimedEquivalent
,ControlActor
,ErrorHandler
,Flushable
,InputConsumer
,MutableActorHandler
,OutputProducer
,StopRestrictor
,SubFlowWrapUp
,Serializable
,Comparable
public class LocalScopeTee extends Tee implements VariablesHandler, StorageHandler, LocalScopeHandler, StopRestrictor, ProgrammaticLocalScope
Executes the sub-actors whenever a token gets passed through, just like the adams.flow.control.Tee actor, but also provides its own scope for variables and internal storage.
It is possible to 'propagate' or 'leak' variables and storage items from within the local scope back to the output scope. However, storage items from caches cannot be propagated.
Input/output:
- accepts:
adams.flow.core.Unknown
- generates:
adams.flow.core.Unknown
Conditional equivalent:
adams.flow.control.ConditionalTee
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING min-user-mode: Expert
-name <java.lang.String> (property: name) The name of the actor. default: LocalScopeTee
-annotation <adams.core.base.BaseAnnotation> (property: annotations) The annotations to attach to this actor. default:
-skip <boolean> (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is. default: false
-stop-flow-on-error <boolean> (property: stopFlowOnError) If set to true, the flow execution at this level gets stopped in case this actor encounters an error; the error gets propagated; useful for critical actors. default: false min-user-mode: Expert
-silent <boolean> (property: silent) If enabled, then no errors are output in the console; Note: the enclosing actor handler must have this enabled as well. default: false min-user-mode: Expert
-finish-before-stopping <boolean> (property: finishBeforeStopping) If enabled, actor first finishes processing all data before stopping. default: false
-stopping-timeout <int> (property: stoppingTimeout) The timeout in milliseconds when waiting for actors to finish (<= 0 for infinity; see 'finishBeforeStopping'). default: -1 minimum: -1
-asynchronous <boolean> (property: asynchronous) If enabled, the sub-actors get executed asynchronously rather than the flow waiting for them to finish before proceeding with execution. default: false min-user-mode: Expert
-tee <adams.flow.core.Actor> [-tee ...] (property: actors) The actors to siphon-off the tokens to. default:
-scope-handling-variables <EMPTY|COPY|SHARE> (property: scopeHandlingVariables) Defines how variables are handled in the local scope; whether to start with empty set, a copy of the outer scope variables or share variables with the outer scope. default: EMPTY
-variables-filter <adams.core.base.BaseRegExp> (property: variablesFilter) The regular expression that variable names must match in order to get into the local scope (when using COPY). default: .* more: https://docs.oracle.com/javase/tutorial/essential/regex/ https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html
-propagate-variables <boolean> (property: propagateVariables) If enabled and variables are not shared with outer scope, variables that match the specified regular expression get propagated to the outer scope. default: false
-variables-regexp <adams.core.base.BaseRegExp> (property: variablesRegExp) The regular expression that variable names must match in order to get propagated. default: .* more: https://docs.oracle.com/javase/tutorial/essential/regex/ https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html
-scope-handling-storage <EMPTY|COPY|SHARE> (property: scopeHandlingStorage) Defines how storage is handled in the local scope; whether to start with empty set, a (deep) copy of the outer scope storage or share the storage with the outer scope. default: EMPTY
-storage-filter <adams.core.base.BaseRegExp> (property: storageFilter) The regular expression that storage item names must match in order to get into the local scope (when using COPY). default: .* more: https://docs.oracle.com/javase/tutorial/essential/regex/ https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html
-propagate-storage <boolean> (property: propagateStorage) If enabled and storage is not shared with outer scope, storage items which names match the specified regular expression get propagated to the outer scope. default: false
-storage-regexp <adams.core.base.BaseRegExp> (property: storageRegExp) The regular expression that the names of storage items must match in order to get propagated. default: .* more: https://docs.oracle.com/javase/tutorial/essential/regex/ https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.flow.control.AbstractTee
AbstractTee.TeeSwingWorker
-
Nested classes/interfaces inherited from interface adams.flow.control.ScopeHandler
ScopeHandler.ScopeHandling
-
-
Field Summary
Fields Modifier and Type Field Description protected CallableNamesRecorder
m_CallableNames
the callable names.protected boolean
m_EnforceCallableNameCheck
whether the callable name check is enforced.protected Storage
m_LocalStorage
the storage for temporary data.protected FlowVariables
m_LocalVariables
the variables manager.protected boolean
m_ProgrammaticLocalStorage
whether the local storage was programmatically set.protected boolean
m_ProgrammaticLocalVariables
whether the local vars were programmatically set.protected boolean
m_PropagateStorage
whether to propagate variables from the local scope to the outer scope.protected boolean
m_PropagateVariables
whether to propagate variables from the local scope to the outer scope.protected boolean
m_RestrictedStop
whether a restricted stop occurred.protected ScopeHandler.ScopeHandling
m_ScopeHandlingStorage
how to handle the storage.protected ScopeHandler.ScopeHandling
m_ScopeHandlingVariables
how to handle the variables.protected BaseRegExp
m_StorageFilter
the regular expression of the storage items to allow into the local scope.protected BaseRegExp
m_StorageRegExp
the regular expression of the variables to propagate.protected BaseRegExp
m_VariablesFilter
the regular expression of the variables to allow into the local scope.protected BaseRegExp
m_VariablesRegExp
the regular expression of the variables to propagate.-
Fields inherited from class adams.flow.control.AbstractTee
BACKUP_INPUT, m_Actors, m_Asynchronous, m_AsynchronousWorker, m_InputToken, m_MinimumActiveActors, m_OutputToken
-
Fields inherited from class adams.flow.control.AbstractControlActor
m_Compatibility, m_PauseStateManager, m_SetUpSubActors
-
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_LoggingPrefix, m_Name, m_Parent, m_ScopeHandler, m_Self, m_Silent, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from interface adams.flow.core.Actor
FILE_EXTENSION, FILE_EXTENSION_GZ
-
-
Constructor Summary
Constructors Constructor Description LocalScopeTee()
Default constructor.LocalScopeTee(String name)
Initializes with the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
addCallableName(ActorHandler handler, Actor actor)
Adds the callable name to the list of used ones.void
cleanUp()
Cleans up after the execution has finished.void
defineOptions()
Adds options to the internal list of options.protected void
forceVariables(Variables value)
Updates the Variables instance in use.boolean
getEnforceCallableNameCheck()
Returns whether the check of callable names is enforced.Variables
getLocalVariables()
Returns the Variables instance to use.boolean
getPropagateStorage()
Returns whether to propagate storage items from the local to the outer scope.boolean
getPropagateVariables()
Returns whether to propagate variables from the local to the outer scope.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.ScopeHandler.ScopeHandling
getScopeHandlingStorage()
Returns how storage is handled in the local scope.ScopeHandler.ScopeHandling
getScopeHandlingVariables()
Returns how variables are handled in the local scope.Storage
getStorage()
Returns the storage container.BaseRegExp
getStorageFilter()
Returns the regular expression that storage item names must match to get into the local scope.BaseRegExp
getStorageRegExp()
Returns the regular expression that storage item names must match to get propagated.Variables
getVariables()
Returns the Variables instance to use.BaseRegExp
getVariablesFilter()
Returns the regular expression that variable names must match to get into the local scope.BaseRegExp
getVariablesRegExp()
Returns the regular expression that variable names must match to get propagated.String
globalInfo()
Returns a string describing the object.protected void
initialize()
Initializes the members.boolean
isCallableNameUsed(ActorHandler handler, Actor actor)
Checks whether a callable name is already in use.boolean
isRestrictedStop()
Returns whether the stop was a restricted one (that can be resumed).boolean
isRestrictingStops()
Returns whether stops are being restricted.protected String
postExecute()
Post-execute hook.protected String
preExecute()
Pre-execute hook.String
propagateStorageTipText()
Returns the tip text for this property.String
propagateVariablesTipText()
Returns the tip text for this property.protected void
reset()
Resets the actor.void
restrictedStopExecution()
Stops the (restricted) execution.void
restrictedStopExecution(String msg)
Stops the (restricted) execution.String
scopeHandlingStorageTipText()
Returns the tip text for this property.String
scopeHandlingVariablesTipText()
Returns the tip text for this property.void
setEnforceCallableNameCheck(boolean value)
Sets whether to enforce the callable name check.void
setPropagateStorage(boolean value)
Sets whether to propagate storage items from the local to the outer scope.void
setPropagateVariables(boolean value)
Sets whether to propagate variables from the local to the outer scope.void
setScopeHandlingStorage(ScopeHandler.ScopeHandling value)
Sets how to handle storage in the local scope.void
setScopeHandlingVariables(ScopeHandler.ScopeHandling value)
Sets how to handle variables into the local scope.void
setStorageFilter(BaseRegExp value)
Sets the regular expression that storage item names must match to get into the local scope.void
setStorageRegExp(BaseRegExp value)
Sets the regular expression that storage item names must match to get propagated.void
setVariablesFilter(BaseRegExp value)
Sets the regular expression that variable names must match to get into the local scope.void
setVariablesRegExp(BaseRegExp value)
Sets the regular expression that variable names must match to get propagated.String
storageFilterTipText()
Returns the tip text for this property.String
storageRegExpTipText()
Returns the tip text for this property.void
useLocalStorage(Storage storage)
The local storage to use.void
useLocalVariables(Variables variables)
The local variables to use.String
variablesFilterTipText()
Returns the tip text for this property.String
variablesRegExpTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.control.Tee
checkTeeActor, checkTeeActors, getActorHandlerInfo, getConditionalEquivalent, getTimedEquivalent, setUpTeeActors
-
Methods inherited from class adams.flow.control.AbstractTee
accepts, actorsTipText, add, add, asynchronousTipText, backupState, canProcessInput, check, createTeeToken, currentInput, doExecute, execute, finishBeforeStoppingTipText, finishedAsynchronousExecution, flushExecution, generates, get, getActors, getAsynchronous, getFinishBeforeStopping, getInternalActors, getMinimumActiveActors, getStoppingTimeout, hasInput, hasPendingOutput, indexOf, input, output, processInput, remove, removeAll, restoreState, set, setActors, setAsynchronous, setFinishBeforeStopping, setLoggingLevel, setMinimumActiveActors, setSkip, setStoppingTimeout, setUpSubActors, size, stopExecution, stoppingTimeoutTipText, updateParent, waitForAsynchronousExecution, wrapUp
-
Methods inherited from class adams.flow.control.AbstractControlActor
active, canInspectOptions, destroy, firstActive, firstInputConsumer, flowPauseStateChanged, isPaused, isSubFlowWrappedUp, lastActive, pauseExecution, resumeExecution, setParent, setUp, wrapUpSubFlow
-
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, canPerformSetUpCheck, compareTo, configureLogger, equals, finalUpdateVariables, findVariables, findVariables, forCommandLine, forName, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, handleError, handleException, hasErrorHandler, hasStopMessage, index, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, performVariableChecks, pruneBackup, pruneBackup, setAnnotations, setErrorHandler, setName, setSilent, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, silentTipText, sizeOf, skipTipText, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.core.Actor
compareTo, destroy, equals, execute, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, sizeOf, stopExecution, stopExecution, toCommandLine, variableChanged, wrapUp
-
Methods inherited from interface adams.flow.core.ActorHandler
check, firstActive, flushExecution, get, getActorHandlerInfo, indexOf, lastActive, set, size
-
Methods inherited from interface adams.core.AdditionalInformationHandler
getAdditionalInformation
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager
-
Methods inherited from interface adams.core.VariablesInspectionHandler
canInspectOptions
-
-
-
-
Field Detail
-
m_LocalStorage
protected transient Storage m_LocalStorage
the storage for temporary data.
-
m_LocalVariables
protected FlowVariables m_LocalVariables
the variables manager.
-
m_ProgrammaticLocalStorage
protected boolean m_ProgrammaticLocalStorage
whether the local storage was programmatically set.
-
m_ProgrammaticLocalVariables
protected boolean m_ProgrammaticLocalVariables
whether the local vars were programmatically set.
-
m_CallableNames
protected CallableNamesRecorder m_CallableNames
the callable names.
-
m_EnforceCallableNameCheck
protected boolean m_EnforceCallableNameCheck
whether the callable name check is enforced.
-
m_ScopeHandlingVariables
protected ScopeHandler.ScopeHandling m_ScopeHandlingVariables
how to handle the variables.
-
m_VariablesFilter
protected BaseRegExp m_VariablesFilter
the regular expression of the variables to allow into the local scope.
-
m_ScopeHandlingStorage
protected ScopeHandler.ScopeHandling m_ScopeHandlingStorage
how to handle the storage.
-
m_StorageFilter
protected BaseRegExp m_StorageFilter
the regular expression of the storage items to allow into the local scope.
-
m_PropagateVariables
protected boolean m_PropagateVariables
whether to propagate variables from the local scope to the outer scope.
-
m_VariablesRegExp
protected BaseRegExp m_VariablesRegExp
the regular expression of the variables to propagate.
-
m_PropagateStorage
protected boolean m_PropagateStorage
whether to propagate variables from the local scope to the outer scope.
-
m_StorageRegExp
protected BaseRegExp m_StorageRegExp
the regular expression of the variables to propagate.
-
m_RestrictedStop
protected boolean m_RestrictedStop
whether a restricted stop occurred.
-
-
Constructor Detail
-
LocalScopeTee
public LocalScopeTee()
Default constructor.
-
LocalScopeTee
public LocalScopeTee(String name)
Initializes with the specified name.- Parameters:
name
- the name to use
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Overrides:
globalInfo
in classTee
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractTee
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceActor
- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractTee
- Returns:
- null if no info available, otherwise short string
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classAbstractTee
-
reset
protected void reset()
Resets the actor.- Overrides:
reset
in classAbstractControlActor
-
setScopeHandlingVariables
public void setScopeHandlingVariables(ScopeHandler.ScopeHandling value)
Sets how to handle variables into the local scope.- Specified by:
setScopeHandlingVariables
in interfaceLocalScopeHandler
- Parameters:
value
- the scope handling
-
getScopeHandlingVariables
public ScopeHandler.ScopeHandling getScopeHandlingVariables()
Returns how variables are handled in the local scope.- Specified by:
getScopeHandlingVariables
in interfaceLocalScopeHandler
- Returns:
- the scope handling
-
scopeHandlingVariablesTipText
public String scopeHandlingVariablesTipText()
Returns the tip text for this property.- Specified by:
scopeHandlingVariablesTipText
in interfaceLocalScopeHandler
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setVariablesFilter
public void setVariablesFilter(BaseRegExp value)
Sets the regular expression that variable names must match to get into the local scope.- Specified by:
setVariablesFilter
in interfaceLocalScopeHandler
- Parameters:
value
- the expression
-
getVariablesFilter
public BaseRegExp getVariablesFilter()
Returns the regular expression that variable names must match to get into the local scope.- Specified by:
getVariablesFilter
in interfaceLocalScopeHandler
- Returns:
- the expression
-
variablesFilterTipText
public String variablesFilterTipText()
Returns the tip text for this property.- Specified by:
variablesFilterTipText
in interfaceLocalScopeHandler
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPropagateVariables
public void setPropagateVariables(boolean value)
Sets whether to propagate variables from the local to the outer scope.- Specified by:
setPropagateVariables
in interfaceLocalScopeHandler
- Parameters:
value
- if true then variables get propagated
-
getPropagateVariables
public boolean getPropagateVariables()
Returns whether to propagate variables from the local to the outer scope.- Specified by:
getPropagateVariables
in interfaceLocalScopeHandler
- Returns:
- true if variables get propagated
-
propagateVariablesTipText
public String propagateVariablesTipText()
Returns the tip text for this property.- Specified by:
propagateVariablesTipText
in interfaceLocalScopeHandler
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setVariablesRegExp
public void setVariablesRegExp(BaseRegExp value)
Sets the regular expression that variable names must match to get propagated.- Specified by:
setVariablesRegExp
in interfaceLocalScopeHandler
- Parameters:
value
- the expression
-
getVariablesRegExp
public BaseRegExp getVariablesRegExp()
Returns the regular expression that variable names must match to get propagated.- Specified by:
getVariablesRegExp
in interfaceLocalScopeHandler
- Returns:
- the expression
-
variablesRegExpTipText
public String variablesRegExpTipText()
Returns the tip text for this property.- Specified by:
variablesRegExpTipText
in interfaceLocalScopeHandler
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setScopeHandlingStorage
public void setScopeHandlingStorage(ScopeHandler.ScopeHandling value)
Sets how to handle storage in the local scope.- Specified by:
setScopeHandlingStorage
in interfaceLocalScopeHandler
- Parameters:
value
- the scope handling
-
getScopeHandlingStorage
public ScopeHandler.ScopeHandling getScopeHandlingStorage()
Returns how storage is handled in the local scope.- Specified by:
getScopeHandlingStorage
in interfaceLocalScopeHandler
- Returns:
- the scope handling
-
scopeHandlingStorageTipText
public String scopeHandlingStorageTipText()
Returns the tip text for this property.- Specified by:
scopeHandlingStorageTipText
in interfaceLocalScopeHandler
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setStorageFilter
public void setStorageFilter(BaseRegExp value)
Sets the regular expression that storage item names must match to get into the local scope.- Specified by:
setStorageFilter
in interfaceLocalScopeHandler
- Parameters:
value
- the expression
-
getStorageFilter
public BaseRegExp getStorageFilter()
Returns the regular expression that storage item names must match to get into the local scope.- Specified by:
getStorageFilter
in interfaceLocalScopeHandler
- Returns:
- the expression
-
storageFilterTipText
public String storageFilterTipText()
Returns the tip text for this property.- Specified by:
storageFilterTipText
in interfaceLocalScopeHandler
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPropagateStorage
public void setPropagateStorage(boolean value)
Sets whether to propagate storage items from the local to the outer scope.- Specified by:
setPropagateStorage
in interfaceLocalScopeHandler
- Parameters:
value
- if true then storage items get propagated
-
getPropagateStorage
public boolean getPropagateStorage()
Returns whether to propagate storage items from the local to the outer scope.- Specified by:
getPropagateStorage
in interfaceLocalScopeHandler
- Returns:
- true if storage items get propagated
-
propagateStorageTipText
public String propagateStorageTipText()
Returns the tip text for this property.- Specified by:
propagateStorageTipText
in interfaceLocalScopeHandler
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setStorageRegExp
public void setStorageRegExp(BaseRegExp value)
Sets the regular expression that storage item names must match to get propagated.- Specified by:
setStorageRegExp
in interfaceLocalScopeHandler
- Parameters:
value
- the expression
-
getStorageRegExp
public BaseRegExp getStorageRegExp()
Returns the regular expression that storage item names must match to get propagated.- Specified by:
getStorageRegExp
in interfaceLocalScopeHandler
- Returns:
- the expression
-
storageRegExpTipText
public String storageRegExpTipText()
Returns the tip text for this property.- Specified by:
storageRegExpTipText
in interfaceLocalScopeHandler
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setEnforceCallableNameCheck
public void setEnforceCallableNameCheck(boolean value)
Sets whether to enforce the callable name check.- Specified by:
setEnforceCallableNameCheck
in interfaceScopeHandler
- Parameters:
value
- true if to enforce check
-
getEnforceCallableNameCheck
public boolean getEnforceCallableNameCheck()
Returns whether the check of callable names is enforced.- Specified by:
getEnforceCallableNameCheck
in interfaceScopeHandler
- Returns:
- true if check enforced
-
isCallableNameUsed
public boolean isCallableNameUsed(ActorHandler handler, Actor actor)
Checks whether a callable name is already in use.- Specified by:
isCallableNameUsed
in interfaceScopeHandler
- Parameters:
handler
- the handler for the actoractor
- the actor name to check- See Also:
getEnforceCallableNameCheck()
-
addCallableName
public String addCallableName(ActorHandler handler, Actor actor)
Adds the callable name to the list of used ones.- Specified by:
addCallableName
in interfaceScopeHandler
- Parameters:
handler
- the handler for the actoractor
- the actor name to add- Returns:
- null if successfully added, otherwise error message
- See Also:
getEnforceCallableNameCheck()
-
useLocalVariables
public void useLocalVariables(Variables variables)
The local variables to use.- Specified by:
useLocalVariables
in interfaceProgrammaticLocalScope
- Parameters:
variables
- the variables
-
useLocalStorage
public void useLocalStorage(Storage storage)
The local storage to use.- Specified by:
useLocalStorage
in interfaceProgrammaticLocalScope
- Parameters:
storage
- the storage
-
getStorage
public Storage getStorage()
Returns the storage container.- Specified by:
getStorage
in interfaceStorageHandler
- Returns:
- the container
-
getLocalVariables
public Variables getLocalVariables()
Returns the Variables instance to use.- Specified by:
getLocalVariables
in interfaceVariablesHandler
- Returns:
- the local variables
-
getVariables
public Variables getVariables()
Returns the Variables instance to use.- Specified by:
getVariables
in interfaceActor
- Overrides:
getVariables
in classAbstractActor
- Returns:
- the scope handler
-
forceVariables
protected void forceVariables(Variables value)
Updates the Variables instance in use.- Overrides:
forceVariables
in classAbstractTee
- Parameters:
value
- ignored
-
isRestrictingStops
public boolean isRestrictingStops()
Returns whether stops are being restricted.- Specified by:
isRestrictingStops
in interfaceStopRestrictor
- Returns:
- true if restricting stops
-
restrictedStopExecution
public void restrictedStopExecution()
Stops the (restricted) execution. No message set.- Specified by:
restrictedStopExecution
in interfaceStopRestrictor
-
restrictedStopExecution
public void restrictedStopExecution(String msg)
Stops the (restricted) execution.- Specified by:
restrictedStopExecution
in interfaceStopRestrictor
- Parameters:
msg
- the message to set as reason for stopping, can be null
-
isRestrictedStop
public boolean isRestrictedStop()
Returns whether the stop was a restricted one (that can be resumed).- Specified by:
isRestrictedStop
in interfaceStopRestrictor
- Returns:
- true if restricted stop occurred
-
preExecute
protected String preExecute()
Pre-execute hook.- Overrides:
preExecute
in classAbstractControlActor
- Returns:
- null if everything is fine, otherwise error message
- See Also:
SubFlowWrapUp.wrapUpSubFlow()
-
postExecute
protected String postExecute()
Post-execute hook.- Overrides:
postExecute
in classAbstractActor
- Returns:
- null if everything is fine, otherwise error message
- See Also:
AbstractActor.m_Executed
-
cleanUp
public void cleanUp()
Cleans up after the execution has finished. Also removes graphical components.- Specified by:
cleanUp
in interfaceActor
- Specified by:
cleanUp
in interfaceCleanUpHandler
- Overrides:
cleanUp
in classAbstractTee
-
-