org.codehaus.groovy.grails.cli.support
Class GrailsBuildEventListener

java.lang.Object
  extended by org.codehaus.groovy.grails.cli.support.GrailsBuildEventListener
All Implemented Interfaces:
EventListener, org.apache.tools.ant.BuildListener

public class GrailsBuildEventListener
extends Object
implements org.apache.tools.ant.BuildListener

Since:
1.1
Author:
Graeme Rocher

Field Summary
protected  Map<String,List<groovy.lang.Closure>> globalEventHooks
           
 
Constructor Summary
GrailsBuildEventListener(groovy.lang.GroovyClassLoader scriptClassLoader, groovy.lang.Binding binding, BuildSettings buildSettings)
           
 
Method Summary
protected  void addGrailsBuildListener(Class listenerClass)
           
 void addGrailsBuildListener(GrailsBuildListener listener)
           
protected  void addGrailsBuildListener(String listenerClassName)
           
 void buildFinished(org.apache.tools.ant.BuildEvent buildEvent)
           
 void buildStarted(org.apache.tools.ant.BuildEvent buildEvent)
           
protected  File findEventsScript(File dir)
           
 void initialize()
           
protected  void loadEventHooks(BuildSettings buildSettings)
           
 void loadEventsScript(File eventScript)
           
protected  void loadGrailsBuildListeners()
           
 void messageLogged(org.apache.tools.ant.BuildEvent buildEvent)
           
 void setClassLoader(groovy.lang.GroovyClassLoader classLoader)
           
 void setGlobalEventHooks(Map<String,List<groovy.lang.Closure>> globalEventHooks)
           
 void targetFinished(org.apache.tools.ant.BuildEvent buildEvent)
           
 void targetStarted(org.apache.tools.ant.BuildEvent buildEvent)
           
 void taskFinished(org.apache.tools.ant.BuildEvent buildEvent)
           
 void taskStarted(org.apache.tools.ant.BuildEvent buildEvent)
           
 void triggerEvent(String eventName)
          Triggers and event for the given name and binding
 void triggerEvent(String eventName, Object... arguments)
          Triggers an event for the given name and arguments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

globalEventHooks

protected Map<String,List<groovy.lang.Closure>> globalEventHooks
Constructor Detail

GrailsBuildEventListener

public GrailsBuildEventListener(groovy.lang.GroovyClassLoader scriptClassLoader,
                                groovy.lang.Binding binding,
                                BuildSettings buildSettings)
Method Detail

initialize

public void initialize()

setClassLoader

public void setClassLoader(groovy.lang.GroovyClassLoader classLoader)

setGlobalEventHooks

public void setGlobalEventHooks(Map<String,List<groovy.lang.Closure>> globalEventHooks)

loadEventHooks

protected void loadEventHooks(BuildSettings buildSettings)

loadGrailsBuildListeners

protected void loadGrailsBuildListeners()

loadEventsScript

public void loadEventsScript(File eventScript)

findEventsScript

protected File findEventsScript(File dir)

buildStarted

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

buildFinished

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

targetStarted

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

triggerEvent

public void triggerEvent(String eventName)
Triggers and event for the given name and binding

Parameters:
eventName - The name of the event

triggerEvent

public void triggerEvent(String eventName,
                         Object... arguments)
Triggers an event for the given name and arguments

Parameters:
eventName - The name of the event
arguments - The arguments

targetFinished

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

taskStarted

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

taskFinished

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

messageLogged

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

addGrailsBuildListener

protected void addGrailsBuildListener(String listenerClassName)

addGrailsBuildListener

protected void addGrailsBuildListener(Class listenerClass)

addGrailsBuildListener

public void addGrailsBuildListener(GrailsBuildListener listener)


Copyright (c) 2005-2009 The Grails project