org.globus.cog.karajan.workflow.nodes
Class FlowNode

java.lang.Object
  extended byorg.globus.cog.karajan.workflow.nodes.FlowNode
All Implemented Interfaces:
EventListener, ExtendedFlowElement, FlowElement, LoadListener
Direct Known Subclasses:
Break, Continue, ElementList, FlowContainer, PassiveNode

public class FlowNode
extends Object
implements ExtendedFlowElement, LoadListener


Nested Class Summary
static class FlowNode.FNTP
           
 
Field Summary
static boolean debug
           
static long startCount
           
static String TEXT
           
static Hashtable threadTracker
           
 
Constructor Summary
FlowNode()
           
 
Method Summary
protected  void abort(VariableStack stack)
           
 boolean acceptsInlineText()
           
 void addElement(FlowElement element)
           
 Object checkClass(Object value, Class cls, String name)
           
protected  void checkCompleted(VariableStack stack)
           
protected  void checkFailed(VariableStack stack)
           
 void complete(VariableStack stack)
           
protected  void controlEvent(ControlEvent e)
           
 FlowElement copy()
           
protected  void echo(String message)
           
protected  void echo(String message, boolean nl)
           
 int elementCount()
           
 List elements()
           
 void end(VariableStack stack)
           
 void event(Event e)
           
 void execute(VariableStack stack)
           
protected  boolean executeErrorHandler(VariableStack stack, NotificationEvent error)
           
 void executeSimple(VariableStack stack)
           
 Object expandProperty(VariableStack stack, String name)
           
 String expandProperty(VariableStack stack, String name, String defaultValue)
           
 String expandPropertyAsString(VariableStack stack, String name)
           
 void fail(VariableStack stack, String message)
           
 void fail(VariableStack stack, String message, Throwable cause)
           
 void failIfNotDefined(VariableStack stack, String var, String message)
           
 void failIfNull(VariableStack stack, String name)
           
 void failIfNull(VariableStack stack, String name, String message)
           
 void failImmediately(VariableStack stack, Exception exception)
           
 void failImmediately(VariableStack stack, FailureNotificationEvent e)
           
 void failImmediately(VariableStack stack, String message)
           
 void fireControlEvent(FlowElement target, FlowEvent event)
           
 void fireMonitoringEvent(MonitoringEvent event)
           
 void fireNotificationEvent(FlowEvent event, VariableStack stack)
          Notification events notify callers of the status of the execution (completed, failed, aborted, ...)
 void fireStatusMonitoringEvent(MonitoringEventType type, VariableStack stack, String message)
           
 String get_locator()
           
 boolean getBooleanProperty(String name)
           
 boolean getBooleanProperty(String name, boolean defaultValue)
           
 Object getCanonicalType()
           
 FlowElement getElement(int index)
           
 String getElementType()
           
 int getIntProperty(String name)
           
 int getIntProperty(String name, int defaultValue)
           
 FlowElement getParent()
           
 ProjectNode getProjectNode()
           
 Object getProperty(String name)
           
 String getStringProperty(String name)
           
static Object getTreeProperty(String name, FlowElement element)
           
 Object getVar(VariableStack stack, String name)
           
protected  boolean hasFrame()
           
 int hashCode()
           
 boolean hasProperty(String name)
           
protected  void initializeStatic()
           
 boolean isCheckpointable()
           
 boolean isSimple()
           
protected  boolean isSystemProperty(String name)
           
 void loadComplete()
           
 void loadStarted()
           
protected  void monitoringEvent(MonitoringEvent e)
           
protected  void notificationEvent(NotificationEvent e)
           
 Set propertyNames()
           
 void removeProperty(String name)
           
 void restart(VariableStack stack)
           
 void restartElement(FlowElement c, VariableStack stack)
           
protected  void ret(VariableStack stack, Object value)
           
protected  void ret(VariableStack stack, String channel, Object value)
           
 void set_locator(String locator)
           
protected  void setAcceptsInlineText(boolean inlineText)
           
 void setCheckpointable(boolean checkpointable)
           
 void setElementType(String string)
           
protected  void setFrame(boolean frame)
           
 void setParent(FlowElement element)
           
 void setProperty(String name, boolean value)
           
 void setProperty(String name, int value)
           
 void setProperty(String name, Object value)
           
 void start(VariableStack stack)
           
 void startElement(FlowElement c, VariableStack stack)
           
 void startElement(int index, VariableStack stack)
           
 String toString()
           
 void verify(VariableStack stack)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TEXT

public static final String TEXT
See Also:
Constant Field Values

threadTracker

public static Hashtable threadTracker

startCount

public static long startCount

debug

public static boolean debug
Constructor Detail

FlowNode

public FlowNode()
Method Detail

executeErrorHandler

protected boolean executeErrorHandler(VariableStack stack,
                                      NotificationEvent error)
                               throws ExecutionException
Throws:
ExecutionException

failImmediately

public void failImmediately(VariableStack stack,
                            FailureNotificationEvent e)
                     throws ExecutionException
Throws:
ExecutionException

failImmediately

public void failImmediately(VariableStack stack,
                            String message)
                     throws ExecutionException
Specified by:
failImmediately in interface FlowElement
Throws:
ExecutionException

failImmediately

public void failImmediately(VariableStack stack,
                            Exception exception)
                     throws ExecutionException
Throws:
ExecutionException

expandProperty

public String expandProperty(VariableStack stack,
                             String name,
                             String defaultValue)
                      throws ExecutionException
Throws:
ExecutionException

expandProperty

public Object expandProperty(VariableStack stack,
                             String name)
                      throws ExecutionException
Throws:
ExecutionException

expandPropertyAsString

public String expandPropertyAsString(VariableStack stack,
                                     String name)
                              throws ExecutionException
Throws:
ExecutionException

getVar

public Object getVar(VariableStack stack,
                     String name)
              throws VariableNotFoundException
Throws:
VariableNotFoundException

fireNotificationEvent

public void fireNotificationEvent(FlowEvent event,
                                  VariableStack stack)
Notification events notify callers of the status of the execution (completed, failed, aborted, ...)


fireControlEvent

public void fireControlEvent(FlowElement target,
                             FlowEvent event)

fireMonitoringEvent

public void fireMonitoringEvent(MonitoringEvent event)

fireStatusMonitoringEvent

public void fireStatusMonitoringEvent(MonitoringEventType type,
                                      VariableStack stack,
                                      String message)

verify

public void verify(VariableStack stack)
            throws ExecutionException
Throws:
ExecutionException

checkFailed

protected final void checkFailed(VariableStack stack)

checkCompleted

protected final void checkCompleted(VariableStack stack)

restart

public final void restart(VariableStack stack)
                   throws ExecutionException
Throws:
ExecutionException

abort

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

start

public final void start(VariableStack stack)
                 throws ExecutionException
Throws:
ExecutionException

execute

public void execute(VariableStack stack)
             throws ExecutionException
Throws:
ExecutionException

end

public final void end(VariableStack stack)
               throws ExecutionException
Throws:
ExecutionException

copy

public FlowElement copy()

event

public void event(Event e)
           throws ExecutionException
Specified by:
event in interface EventListener
Throws:
ExecutionException

notificationEvent

protected void notificationEvent(NotificationEvent e)
                          throws ExecutionException
Throws:
ExecutionException

controlEvent

protected void controlEvent(ControlEvent e)
                     throws ExecutionException
Throws:
ExecutionException

monitoringEvent

protected void monitoringEvent(MonitoringEvent e)
                        throws ExecutionException
Throws:
ExecutionException

fail

public void fail(VariableStack stack,
                 String message,
                 Throwable cause)
          throws ExecutionException
Throws:
ExecutionException

fail

public void fail(VariableStack stack,
                 String message)
          throws ExecutionException
Throws:
ExecutionException

failIfNotDefined

public void failIfNotDefined(VariableStack stack,
                             String var,
                             String message)
                      throws ExecutionException
Throws:
ExecutionException

failIfNull

public void failIfNull(VariableStack stack,
                       String name)
                throws ExecutionException
Throws:
ExecutionException

failIfNull

public void failIfNull(VariableStack stack,
                       String name,
                       String message)
                throws ExecutionException
Throws:
ExecutionException

startElement

public void startElement(int index,
                         VariableStack stack)
                  throws ExecutionException
Throws:
ExecutionException

startElement

public void startElement(FlowElement c,
                         VariableStack stack)
                  throws ExecutionException
Throws:
ExecutionException

restartElement

public void restartElement(FlowElement c,
                           VariableStack stack)

complete

public void complete(VariableStack stack)
              throws ExecutionException
Throws:
ExecutionException

ret

protected void ret(VariableStack stack,
                   Object value)
            throws ExecutionException
Throws:
ExecutionException

ret

protected void ret(VariableStack stack,
                   String channel,
                   Object value)
            throws ExecutionException
Throws:
ExecutionException

get_locator

public String get_locator()

set_locator

public void set_locator(String locator)

toString

public String toString()

elements

public List elements()
Specified by:
elements in interface FlowElement

setCheckpointable

public void setCheckpointable(boolean checkpointable)

isCheckpointable

public boolean isCheckpointable()

addElement

public void addElement(FlowElement element)
Specified by:
addElement in interface FlowElement

getElement

public FlowElement getElement(int index)
Specified by:
getElement in interface FlowElement

elementCount

public int elementCount()
Specified by:
elementCount in interface FlowElement

setProperty

public void setProperty(String name,
                        Object value)
Specified by:
setProperty in interface FlowElement

removeProperty

public void removeProperty(String name)
Specified by:
removeProperty in interface FlowElement

getProperty

public Object getProperty(String name)
Specified by:
getProperty in interface FlowElement

hasProperty

public boolean hasProperty(String name)
Specified by:
hasProperty in interface FlowElement

setProperty

public void setProperty(String name,
                        int value)

getIntProperty

public int getIntProperty(String name)

getIntProperty

public int getIntProperty(String name,
                          int defaultValue)

getStringProperty

public String getStringProperty(String name)

setProperty

public void setProperty(String name,
                        boolean value)

getBooleanProperty

public boolean getBooleanProperty(String name)

getBooleanProperty

public boolean getBooleanProperty(String name,
                                  boolean defaultValue)

getElementType

public String getElementType()
Specified by:
getElementType in interface FlowElement

setElementType

public void setElementType(String string)
Specified by:
setElementType in interface FlowElement

getCanonicalType

public Object getCanonicalType()

getParent

public FlowElement getParent()
Specified by:
getParent in interface FlowElement

setParent

public void setParent(FlowElement element)
Specified by:
setParent in interface FlowElement

propertyNames

public Set propertyNames()
Specified by:
propertyNames in interface FlowElement

getProjectNode

public ProjectNode getProjectNode()
Specified by:
getProjectNode in interface FlowElement

echo

protected void echo(String message)

echo

protected void echo(String message,
                    boolean nl)

setAcceptsInlineText

protected void setAcceptsInlineText(boolean inlineText)

acceptsInlineText

public boolean acceptsInlineText()
Specified by:
acceptsInlineText in interface FlowElement

checkClass

public Object checkClass(Object value,
                         Class cls,
                         String name)
                  throws ExecutionException
Throws:
ExecutionException

getTreeProperty

public static Object getTreeProperty(String name,
                                     FlowElement element)

hasFrame

protected boolean hasFrame()

setFrame

protected void setFrame(boolean frame)

loadStarted

public void loadStarted()
Specified by:
loadStarted in interface LoadListener

loadComplete

public void loadComplete()
Specified by:
loadComplete in interface LoadListener

initializeStatic

protected void initializeStatic()

isSystemProperty

protected boolean isSystemProperty(String name)

hashCode

public int hashCode()

isSimple

public boolean isSimple()
Specified by:
isSimple in interface ExtendedFlowElement

executeSimple

public void executeSimple(VariableStack stack)
                   throws ExecutionException
Specified by:
executeSimple in interface ExtendedFlowElement
Throws:
ExecutionException