org.globus.cog.karajan.workflow.nodes.user
Class UserDefinedElement

java.lang.Object
  extended by org.globus.cog.karajan.workflow.nodes.FlowNode
      extended by org.globus.cog.karajan.workflow.nodes.FlowContainer
          extended by org.globus.cog.karajan.workflow.nodes.Sequential
              extended by org.globus.cog.karajan.workflow.nodes.AbstractSequentialWithArguments
                  extended by org.globus.cog.karajan.workflow.nodes.user.UserDefinedElement
All Implemented Interfaces:
LoadListener, NonCacheable, EventListener, ExtendedFlowElement, FlowElement
Direct Known Subclasses:
ExplicitExecutionUDE, ParallelImplicitExecutionUDE, SequentialImplicitExecutionUDE

public abstract class UserDefinedElement
extends AbstractSequentialWithArguments
implements NonCacheable


Nested Class Summary
 
Nested classes/interfaces inherited from class org.globus.cog.karajan.workflow.nodes.FlowNode
FlowNode.FNTP
 
Field Summary
static Arg A_ARGUMENTS
           
static Arg A_CHANNELS
           
static Arg A_NAME
           
static Arg A_NAMED
           
static Arg A_OPTARGS
           
static Arg A_VARGS
           
static String ARGUMENTS_THREAD
           
static String BODY_THREAD
           
static String FNARGS
           
static String KMODE
           
static String[] NO_ARGUMENTS
           
static List NO_CHANNELS
           
static String PREFIX
           
static String SKIP
           
static ControlEventType START_BODY
           
 
Fields inherited from class org.globus.cog.karajan.workflow.nodes.AbstractSequentialWithArguments
QUOTED
 
Fields inherited from class org.globus.cog.karajan.workflow.nodes.FlowNode
A_INLINE_TEXT, debug, startCount, STDERR, STDOUT, threadTracker
 
Fields inherited from interface org.globus.cog.karajan.workflow.nodes.FlowElement
ANNOTATION, CALLER, FILENAME, LINE, TEXT, UID
 
Constructor Summary
UserDefinedElement()
           
 
Method Summary
 void addStaticArgument(String name, Object value)
           
protected  void checkBothArgs(VariableStack stack)
           
protected  boolean checkFirstArg(VariableStack stack)
           
protected  void childCompleted(VariableStack stack)
           
protected  void controlEvent(ControlEvent e)
           
protected  void executeChildren(VariableStack stack)
           
 String[] getArguments()
           
 List getChannels()
           
protected  DefinitionEnvironment getEnv(VariableStack stack)
           
protected  boolean getKmode()
           
 String[] getOptargs()
           
 int getSkip()
           
 String getTextualName()
           
 boolean hasChannels()
           
 boolean hasNamed()
           
 boolean hasNestedArgs()
           
 boolean hasVargs()
           
protected  void initializeStatic()
           
protected  boolean isArgumentsThread(VariableStack stack)
           
 void pre(VariableStack stack)
           
protected  void prepareInstanceArguments(VariableStack stack, Arguments fnargs)
           
 void setProperties(Map properties)
           
 void setProperty(String name, Object value)
          Sets a property on this element.
protected  void setUDEArguments(List args)
           
protected  void startArguments(VariableStack stack, UDEWrapper wrapper)
           
 void startBody(VariableStack stack, Arguments fnargs)
           
abstract  void startInstance(VariableStack stack, UDEWrapper wrapper, DefinitionEnvironment env)
           
 
Methods inherited from class org.globus.cog.karajan.workflow.nodes.AbstractSequentialWithArguments
addChannel, argumentsEvaluated, checkArguments, getArgument, getArgumentCount, getArgumentIndex, getArgumentNames, getArguments, getMaxArgIndex, getNonpropargs, getOptionalArgs, getQuotedArgs, getSortedArgs, hasNestedArguments, hasVariableArguments, initializeArgs, newNameBindingVariableArguments, newVariableArguments, processArguments, setArguments, setHasVargs, setNestedArgs, setNonpropargs, setQuotedArgs, setVargs
 
Methods inherited from class org.globus.cog.karajan.workflow.nodes.Sequential
executeSingle, exit, getIndex, moreToExecute, notificationEvent, preDecIndex, preIncIndex, setIndex, startElement, startNext
 
Methods inherited from class org.globus.cog.karajan.workflow.nodes.FlowContainer
execute, getChildFailed, isOptimizable, post, setChildFailed, setOptimize
 
Methods inherited from class org.globus.cog.karajan.workflow.nodes.FlowNode
_finally, abort, abortEvent, acceptsInlineText, addElement, checkClass, checkCompleted, checkFailed, complete, copy, echo, echo, elementCount, elements, event, executeErrorHandler, executeSimple, fail, fail, failIfNotDefined, failIfNull, failIfNull, failImmediately, failImmediately, failImmediately, failImmediately, fireControlEvent, fireMonitoringEvent, fireNotificationEvent, fireStatusMonitoringEvent, get_locator, getBooleanProperty, getBooleanProperty, getCanonicalType, getElement, getElementType, getIntProperty, getIntProperty, getParent, getProperty, getStaticArguments, getStringProperty, getTreeProperty, getUID, hasFrame, hasProperty, isCheckpointable, isSimple, isSystemProperty, loadComplete, loadStarted, monitoringEvent, propertyNames, removeElement, removeElement, removeProperty, replaceElement, restart, restartElement, ret, set_locator, setAcceptsInlineText, setCheckpointable, setElements, setElementType, setFrame, setParent, setProperty, setProperty, setStaticArguments, start, startElement, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KMODE

public static final String KMODE
See Also:
Constant Field Values

SKIP

public static final String SKIP
See Also:
Constant Field Values

A_NAME

public static final Arg A_NAME

A_ARGUMENTS

public static final Arg A_ARGUMENTS

A_VARGS

public static final Arg A_VARGS

A_NAMED

public static final Arg A_NAMED

A_CHANNELS

public static final Arg A_CHANNELS

A_OPTARGS

public static final Arg A_OPTARGS

START_BODY

public static final ControlEventType START_BODY

FNARGS

public static final String FNARGS
See Also:
Constant Field Values

PREFIX

public static final String PREFIX
See Also:
Constant Field Values

ARGUMENTS_THREAD

public static final String ARGUMENTS_THREAD
See Also:
Constant Field Values

BODY_THREAD

public static final String BODY_THREAD
See Also:
Constant Field Values

NO_CHANNELS

public static final List NO_CHANNELS

NO_ARGUMENTS

public static final String[] NO_ARGUMENTS
Constructor Detail

UserDefinedElement

public UserDefinedElement()
Method Detail

initializeStatic

protected void initializeStatic()
Overrides:
initializeStatic in class AbstractSequentialWithArguments

pre

public void pre(VariableStack stack)
         throws ExecutionException
Overrides:
pre in class AbstractSequentialWithArguments
Throws:
ExecutionException

startInstance

public abstract void startInstance(VariableStack stack,
                                   UDEWrapper wrapper,
                                   DefinitionEnvironment env)
                            throws ExecutionException
Throws:
ExecutionException

startBody

public final void startBody(VariableStack stack,
                            Arguments fnargs)
                     throws ExecutionException
Throws:
ExecutionException

prepareInstanceArguments

protected void prepareInstanceArguments(VariableStack stack,
                                        Arguments fnargs)
                                 throws ExecutionException
Throws:
ExecutionException

controlEvent

protected void controlEvent(ControlEvent e)
                     throws ExecutionException
Overrides:
controlEvent in class FlowNode
Throws:
ExecutionException

childCompleted

protected void childCompleted(VariableStack stack)
                       throws ExecutionException
Overrides:
childCompleted in class AbstractSequentialWithArguments
Throws:
ExecutionException

checkFirstArg

protected boolean checkFirstArg(VariableStack stack)
                         throws ExecutionException
Throws:
ExecutionException

checkBothArgs

protected void checkBothArgs(VariableStack stack)
                      throws ExecutionException
Throws:
ExecutionException

startArguments

protected void startArguments(VariableStack stack,
                              UDEWrapper wrapper)
                       throws ExecutionException
Throws:
ExecutionException

isArgumentsThread

protected boolean isArgumentsThread(VariableStack stack)

executeChildren

protected void executeChildren(VariableStack stack)
                        throws ExecutionException
Overrides:
executeChildren in class Sequential
Throws:
ExecutionException

setUDEArguments

protected void setUDEArguments(List args)

getArguments

public String[] getArguments()

getOptargs

public String[] getOptargs()

hasNamed

public boolean hasNamed()

hasNestedArgs

public boolean hasNestedArgs()

hasVargs

public boolean hasVargs()

getChannels

public List getChannels()
Overrides:
getChannels in class AbstractSequentialWithArguments

hasChannels

public boolean hasChannels()
Overrides:
hasChannels in class AbstractSequentialWithArguments

getKmode

protected boolean getKmode()

getSkip

public int getSkip()

setProperty

public void setProperty(String name,
                        Object value)
Description copied from interface: FlowElement
Sets a property on this element. The value can be null

Specified by:
setProperty in interface FlowElement
Overrides:
setProperty in class FlowNode

setProperties

public void setProperties(Map properties)
Specified by:
setProperties in interface FlowElement
Overrides:
setProperties in class FlowNode

addStaticArgument

public void addStaticArgument(String name,
                              Object value)
Specified by:
addStaticArgument in interface FlowElement
Overrides:
addStaticArgument in class FlowNode

getEnv

protected DefinitionEnvironment getEnv(VariableStack stack)

getTextualName

public String getTextualName()
Overrides:
getTextualName in class FlowNode