terp - the ANT Tasks
v1.3.309

com.codemesh.terp.ant
Class TerpProjectHelper

java.lang.Object
  extended by com.codemesh.terp.ant.TerpProjectHelper
All Implemented Interfaces:
java.util.EventListener, org.apache.tools.ant.BuildListener

public class TerpProjectHelper
extends java.lang.Object
implements org.apache.tools.ant.BuildListener

A utility class that associates a terp evaluation context with an ANT project. The evaluation context maintains the terp state that needs to be communicated between different tasks.


Method Summary
 void buildFinished(org.apache.tools.ant.BuildEvent event)
           
 void buildStarted(org.apache.tools.ant.BuildEvent event)
           
 TerpContext getContext()
           
 TerpContext getContext(org.apache.tools.ant.Project project)
          Acquire a context to be used with the given ANT project.
static TerpProjectHelper getInstance()
           
 boolean isTerpProperty(java.lang.String name)
           
 void messageLogged(org.apache.tools.ant.BuildEvent event)
           
 void putContext(org.apache.tools.ant.Project project, TerpContext ctx)
          Use this method if you already have a context that you wish to use with an ANT project.
 void registerTerpProperty(java.lang.String name)
           
 void targetFinished(org.apache.tools.ant.BuildEvent event)
           
 void targetStarted(org.apache.tools.ant.BuildEvent event)
           
 void taskFinished(org.apache.tools.ant.BuildEvent event)
           
 void taskStarted(org.apache.tools.ant.BuildEvent event)
           
 void unregisterTerpProperty(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static TerpProjectHelper getInstance()

isTerpProperty

public boolean isTerpProperty(java.lang.String name)

registerTerpProperty

public void registerTerpProperty(java.lang.String name)

unregisterTerpProperty

public void unregisterTerpProperty(java.lang.String name)

putContext

public void putContext(org.apache.tools.ant.Project project,
                       TerpContext ctx)
Use this method if you already have a context that you wish to use with an ANT project. This method is mainly intended for cases where ANT is embedded in a calling application and the context has already been created for other purposes.

Parameters:
project - the ANT project.
ctx - the context to associate with the ANT project.

getContext

public TerpContext getContext(org.apache.tools.ant.Project project)
Acquire a context to be used with the given ANT project.

Parameters:
project - the ANT project.
Returns:
a terp context.

getContext

public TerpContext getContext()
                       throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException

buildFinished

public void buildFinished(org.apache.tools.ant.BuildEvent event)
Specified by:
buildFinished in interface org.apache.tools.ant.BuildListener

buildStarted

public void buildStarted(org.apache.tools.ant.BuildEvent event)
Specified by:
buildStarted in interface org.apache.tools.ant.BuildListener

messageLogged

public void messageLogged(org.apache.tools.ant.BuildEvent event)
Specified by:
messageLogged in interface org.apache.tools.ant.BuildListener

targetFinished

public void targetFinished(org.apache.tools.ant.BuildEvent event)
Specified by:
targetFinished in interface org.apache.tools.ant.BuildListener

targetStarted

public void targetStarted(org.apache.tools.ant.BuildEvent event)
Specified by:
targetStarted in interface org.apache.tools.ant.BuildListener

taskFinished

public void taskFinished(org.apache.tools.ant.BuildEvent event)
Specified by:
taskFinished in interface org.apache.tools.ant.BuildListener

taskStarted

public void taskStarted(org.apache.tools.ant.BuildEvent event)
Specified by:
taskStarted in interface org.apache.tools.ant.BuildListener

terp - the ANT Tasks
v1.3.309

Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.