net.ggtools.grand.ant
Class AntTaskLink

java.lang.Object
  extended by net.ggtools.grand.graph.AttributeManager
      extended by net.ggtools.grand.graph.LinkImpl
          extended by net.ggtools.grand.ant.AntLink
              extended by net.ggtools.grand.ant.AntTaskLink
All Implemented Interfaces:
GraphObject, Link
Direct Known Subclasses:
SubantTaskLink

public class AntTaskLink
extends AntLink

A link representing a call by a task such like ant, runtarget, etc. Instances of the class will have a mandatory task name and may have some definited parameters.

Author:
Christophe Labouisse

Field Summary
 
Fields inherited from interface net.ggtools.grand.graph.Link
ATTR_CONDITIONAL_LINK, ATTR_WEAK_LINK
 
Fields inherited from interface net.ggtools.grand.graph.GraphObject
ATTR_ALL, ATTR_NONE
 
Constructor Summary
AntTaskLink(java.lang.String name, Graph graph, Node startNode, Node endNode, java.lang.String taskName)
           
 
Method Summary
 void accept(LinkVisitor visitor)
          Accepts a visitor.
 java.lang.String getParameter(java.lang.String key)
          Return the value of a parameter or null if not defined.
 java.util.Map getParameterMap()
          Returns a readonly version of the parameter map.
 java.lang.String getTaskName()
           
 void setParameter(java.lang.String key, java.lang.String value)
          Sets an attribute for the link.
 
Methods inherited from class net.ggtools.grand.graph.LinkImpl
getEndNode, getGraph, getName, getStartNode, toString
 
Methods inherited from class net.ggtools.grand.graph.AttributeManager
clearAttributes, getAttributes, hasAttributes, setAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.ggtools.grand.graph.GraphObject
clearAttributes, getAttributes, hasAttributes, setAttributes
 

Constructor Detail

AntTaskLink

public AntTaskLink(java.lang.String name,
                   Graph graph,
                   Node startNode,
                   Node endNode,
                   java.lang.String taskName)
Parameters:
name -
graph -
startNode -
endNode -
Method Detail

accept

public void accept(LinkVisitor visitor)
Description copied from interface: Link
Accepts a visitor. The implementation must call the appropriate visitLink method.

Specified by:
accept in interface Link
Overrides:
accept in class AntLink

getTaskName

public java.lang.String getTaskName()
Returns:
Returns the taskName.

setParameter

public void setParameter(java.lang.String key,
                         java.lang.String value)
Sets an attribute for the link.

Parameters:
key -
value -

getParameter

public java.lang.String getParameter(java.lang.String key)
Return the value of a parameter or null if not defined.

Parameters:
key -
Returns:

getParameterMap

public java.util.Map getParameterMap()
Returns a readonly version of the parameter map.

Returns:
a read only map of the parameters.


Copyright © 2004-2005 ggTools. All Rights Reserved.