com.xmlcalabash.drivers
Class CalabashTask.Port

java.lang.Object
  extended by com.xmlcalabash.drivers.CalabashTask.Port
Enclosing class:
CalabashTask

public static class CalabashTask.Port
extends java.lang.Object

The Port inner class used to represent input and output ports.


Constructor Summary
CalabashTask.Port()
           
 
Method Summary
 void add(org.apache.tools.ant.util.FileNameMapper fileNameMapper)
          Adds a nested filenamemapper.
 void add(org.apache.tools.ant.types.ResourceCollection rc)
          Adds a collection of resources to process in addition to the given file or the implicit fileset.
 void addMapper(org.apache.tools.ant.types.Mapper mapper)
          Defines the mapper to map source to destination files.
 org.apache.tools.ant.util.FileNameMapper getMapper()
          Get the port's Mapper element, if any
 java.lang.String getPort()
          Get the port name
 org.apache.tools.ant.types.resources.Union getResources()
          Get the port's resources
 void setIf(java.lang.Object ifCond)
          Set whether this input should be used.
 void setIf(java.lang.String ifProperty)
          Set whether this input should be used.
 void setPort(java.lang.String port)
          Set the input port.
 void setProject(org.apache.tools.ant.Project project)
          Set the current project
 void setUnless(java.lang.Object unlessCond)
          Set whether this input should NOT be used.
 void setUnless(java.lang.String unlessProperty)
          Set whether this input should NOT be used.
 boolean shouldUse()
          Ensures that the input passes the conditions placed on it with if and unless properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalabashTask.Port

public CalabashTask.Port()
Method Detail

setProject

public void setProject(org.apache.tools.ant.Project project)
Set the current project

Parameters:
project - the current project

setPort

public void setPort(java.lang.String port)
Set the input port.

Parameters:
port - the name of the port.

add

public void add(org.apache.tools.ant.types.ResourceCollection rc)
Adds a collection of resources to process in addition to the given file or the implicit fileset.

Parameters:
rc - the collection of resources to use

addMapper

public void addMapper(org.apache.tools.ant.types.Mapper mapper)
               throws org.apache.tools.ant.BuildException
Defines the mapper to map source to destination files.

Parameters:
mapper - the mapper to use
Throws:
org.apache.tools.ant.BuildException - if more than one mapper is defined

add

public void add(org.apache.tools.ant.util.FileNameMapper fileNameMapper)
         throws org.apache.tools.ant.BuildException
Adds a nested filenamemapper.

Parameters:
fileNameMapper - the mapper to add
Throws:
org.apache.tools.ant.BuildException - if more than one mapper is defined

getPort

public java.lang.String getPort()
Get the port name

Returns:
the port name

getResources

public org.apache.tools.ant.types.resources.Union getResources()
Get the port's resources

Returns:
the port's resources

getMapper

public org.apache.tools.ant.util.FileNameMapper getMapper()
Get the port's Mapper element, if any

Returns:
the ports's mapper

setIf

public void setIf(java.lang.Object ifCond)
Set whether this input should be used. It will be used if the expression evalutes to true or the name of a property which has been set, otherwise it won't.

Parameters:
ifCond - evaluated expression

setIf

public void setIf(java.lang.String ifProperty)
Set whether this input should be used. It will be used if the expression evalutes to true or the name of a property which has been set, otherwise it won't.

Parameters:
ifProperty - evaluated expression

setUnless

public void setUnless(java.lang.Object unlessCond)
Set whether this input should NOT be used. It will not be used if the expression evaluates to true or the name of a property which has been set, otherwise it will be used.

Parameters:
unlessCond - evaluated expression

setUnless

public void setUnless(java.lang.String unlessProperty)
Set whether this input should NOT be used. It will not be used if the expression evaluates to true or the name of a property which has been set, otherwise it will be used.

Parameters:
unlessProperty - evaluated expression

shouldUse

public boolean shouldUse()
Ensures that the input passes the conditions placed on it with if and unless properties.

Returns:
true if the task passes the "if" and "unless" parameters