org.apache.cactus.integration.maven
Class CactusScannerTag

java.lang.Object
  extended by org.apache.commons.jelly.TagSupport
      extended by org.apache.cactus.integration.maven.CactusScannerTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag, org.apache.commons.jelly.tags.ant.TaskSource

public class CactusScannerTag
extends org.apache.commons.jelly.TagSupport
implements org.apache.commons.jelly.tags.ant.TaskSource

Cactus Jelly Tag that scans Ant FileSets and return a list of qualified class name that are Cactus TestCases (i.e. ServletTestCase, JspTestCase or FilterTestCase) or subclasses of Cactus TestCases. Note: This is useful when used with the <junit> Ant task for example, in order to find out the list of tests to execute.

Version:
$Id: CactusScannerTag.java 239180 2005-07-12 01:50:53Z felipeal $

Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
CactusScannerTag()
          Initializations.
 
Method Summary
 void addFileset(org.apache.tools.ant.types.FileSet theSet)
          Adds a set of files (nested fileset attribute).
 org.apache.tools.ant.types.Path createClasspath()
           
 void doTag(org.apache.commons.jelly.XMLOutput theXmlOutput)
           
 CactusScanner getCactusScanner()
           
 org.apache.tools.ant.types.Path getClasspath()
           
 java.lang.Object getTaskObject()
          This method is called internally by Jelly to know on which object to call the TaskSource.setTaskProperty(java.lang.String, java.lang.Object) method.
 void setClasspath(org.apache.tools.ant.types.Path theClasspath)
          Sets the classapth in which we will look for Cactus test cases.
 void setClasspathRef(org.apache.tools.ant.types.Reference theReference)
          Sets the classpath in which we will look for Cactus test cases, using a reference.
 void setClasspathref(java.lang.String theClasspathref)
          Sets the classpath in which we will look for Cactus test cases, using a String reference.
 void setTaskProperty(java.lang.String theName, java.lang.Object theValue)
          
 void setVar(java.lang.String theVar)
          Sets the name of the variable exported by this tag.
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setContext, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CactusScannerTag

public CactusScannerTag()
Initializations.

Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput theXmlOutput)
           throws org.apache.commons.jelly.JellyTagException
Specified by:
doTag in interface org.apache.commons.jelly.Tag
Parameters:
theXmlOutput - the xml to hold the tag being made
Throws:
org.apache.commons.jelly.JellyTagException - when proccess fails
See Also:
Tag.doTag(XMLOutput)

getTaskObject

public java.lang.Object getTaskObject()
This method is called internally by Jelly to know on which object to call the TaskSource.setTaskProperty(java.lang.String, java.lang.Object) method.

Specified by:
getTaskObject in interface org.apache.commons.jelly.tags.ant.TaskSource
See Also:
TaskSource.getTaskObject()

setTaskProperty

public void setTaskProperty(java.lang.String theName,
                            java.lang.Object theValue)
                     throws org.apache.commons.jelly.JellyTagException

Specified by:
setTaskProperty in interface org.apache.commons.jelly.tags.ant.TaskSource
Throws:
org.apache.commons.jelly.JellyTagException
See Also:
TaskSource.setTaskProperty(String, Object)

addFileset

public void addFileset(org.apache.tools.ant.types.FileSet theSet)
Adds a set of files (nested fileset attribute). This method is called dynamically by setTaskProperty(java.lang.String, java.lang.Object).

Parameters:
theSet - the Ant fileset to add

createClasspath

public org.apache.tools.ant.types.Path createClasspath()
Returns:
a newly created and empty Path object

getClasspath

public org.apache.tools.ant.types.Path getClasspath()
Returns:
the classpath in which we will look for Cactus test cases.

setClasspath

public void setClasspath(org.apache.tools.ant.types.Path theClasspath)
Sets the classapth in which we will look for Cactus test cases.

Parameters:
theClasspath - the classapth to set

setClasspathRef

public void setClasspathRef(org.apache.tools.ant.types.Reference theReference)
Sets the classpath in which we will look for Cactus test cases, using a reference.

Parameters:
theReference - the classpath reference

getCactusScanner

public CactusScanner getCactusScanner()
Returns:
the Cactus scanner object

setVar

public void setVar(java.lang.String theVar)
Sets the name of the variable exported by this tag.

Parameters:
theVar - the variable that will be exported by this tag and which will contain the list of Cactus test cases

setClasspathref

public void setClasspathref(java.lang.String theClasspathref)
Sets the classpath in which we will look for Cactus test cases, using a String reference.

Parameters:
theClasspathref - the classpath reference


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.