org.apache.commons.jelly.tags.ant
Class AntTagLibrary

java.lang.Object
  extended byorg.apache.commons.jelly.TagLibrary
      extended byorg.apache.commons.jelly.tags.ant.AntTagLibrary

public class AntTagLibrary
extends org.apache.commons.jelly.TagLibrary

A Jelly custom tag library that allows Ant tasks to be called from inside Jelly.

Version:
$Revision: 155991 $
Author:
James Strachan, bob mcwhirter

Field Summary
static java.lang.String PROJECT_CONTEXT_HANDLE
           
 
Constructor Summary
AntTagLibrary()
           
 
Method Summary
 org.apache.commons.jelly.impl.TagScript createCustomTagScript(java.lang.String name, org.xml.sax.Attributes attributes)
           
static org.apache.tools.ant.Project createProject(org.apache.commons.jelly.JellyContext context)
          A helper method to create a new project #### this method could move to an AntUtils class.
 org.apache.commons.jelly.Tag createTag(java.lang.String name, org.xml.sax.Attributes attributes)
          A helper method which creates an AntTag instance for the given element name
 org.apache.commons.jelly.impl.TagScript createTagScript(java.lang.String name, org.xml.sax.Attributes attributes)
          Creates a new script to execute the given tag name and attributes
static org.apache.tools.ant.Project getProject(org.apache.commons.jelly.JellyContext context)
          A helper method which will attempt to find a project in the current context or install one if need be. #### this method could move to an AntUtils class.
static void setProject(org.apache.commons.jelly.JellyContext context, org.apache.tools.ant.Project project)
          Sets the Ant Project to be used for this JellyContext. #### this method could move to an AntUtils class.
 
Methods inherited from class org.apache.commons.jelly.TagLibrary
createExpression, getExpressionFactory, getTagClasses, registerTag, registerTagFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROJECT_CONTEXT_HANDLE

public static final java.lang.String PROJECT_CONTEXT_HANDLE
See Also:
Constant Field Values
Constructor Detail

AntTagLibrary

public AntTagLibrary()
Method Detail

getProject

public static org.apache.tools.ant.Project getProject(org.apache.commons.jelly.JellyContext context)
A helper method which will attempt to find a project in the current context or install one if need be. #### this method could move to an AntUtils class.


setProject

public static void setProject(org.apache.commons.jelly.JellyContext context,
                              org.apache.tools.ant.Project project)
Sets the Ant Project to be used for this JellyContext. #### this method could move to an AntUtils class.


createProject

public static org.apache.tools.ant.Project createProject(org.apache.commons.jelly.JellyContext context)
A helper method to create a new project #### this method could move to an AntUtils class.


createTagScript

public org.apache.commons.jelly.impl.TagScript createTagScript(java.lang.String name,
                                                               org.xml.sax.Attributes attributes)
                                                        throws org.apache.commons.jelly.JellyException
Creates a new script to execute the given tag name and attributes

Throws:
org.apache.commons.jelly.JellyException

createCustomTagScript

public org.apache.commons.jelly.impl.TagScript createCustomTagScript(java.lang.String name,
                                                                     org.xml.sax.Attributes attributes)
Returns:
a new TagScript for any custom, statically defined tags, like 'fileScanner'

createTag

public org.apache.commons.jelly.Tag createTag(java.lang.String name,
                                              org.xml.sax.Attributes attributes)
                                       throws org.apache.commons.jelly.JellyException
A helper method which creates an AntTag instance for the given element name

Throws:
org.apache.commons.jelly.JellyException


Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.