Griffon 1.2.0

org.codehaus.griffon.cli.support
[Java] Class GriffonBuildEventListener

java.lang.Object
  org.codehaus.griffon.cli.support.BuildListenerAdapter
      org.codehaus.griffon.cli.support.GriffonBuildEventListener

public class GriffonBuildEventListener
extends BuildListenerAdapter

Authors:
Graeme Rocher (Grails 1.1)


Field Summary
private static Pattern EVENT_NAME_PATTERN

private static Logger LOG

private Binding binding

private List buildListeners

The objects that are listening for build events

private BuildSettings buildSettings

private GroovyClassLoader classLoader

protected Map globalEventHooks

private Map timings

 
Constructor Summary
GriffonBuildEventListener(GroovyClassLoader scriptClassLoader, Binding binding, BuildSettings buildSettings)

 
Method Summary
protected void addGriffonBuildListener(String listenerClassName)

protected void addGriffonBuildListener(Class listenerClass)

void addGriffonBuildListener(GriffonBuildListener listener)

protected File findEventsScript(File dir)

void initialize()

protected void loadEventHooks(BuildSettings buildSettings)

private void loadEventsFromPlugins(Map projectPlugins)

void loadEventsScript(File eventScript)

protected void loadGriffonBuildListeners()

void setClassLoader(GroovyClassLoader classLoader)

void setGlobalEventHooks(Map globalEventHooks)

void targetFinished(BuildEvent buildEvent)

void targetStarted(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 BuildListenerAdapter
buildFinished, buildStarted, messageLogged, targetFinished, targetStarted, taskFinished, taskStarted
 

Field Detail

EVENT_NAME_PATTERN

private static final Pattern EVENT_NAME_PATTERN


LOG

private static final Logger LOG


binding

private Binding binding


buildListeners

private List buildListeners
The objects that are listening for build events


buildSettings

private BuildSettings buildSettings


classLoader

private GroovyClassLoader classLoader


globalEventHooks

protected Map globalEventHooks


timings

private final Map timings


 
Constructor Detail

GriffonBuildEventListener

public GriffonBuildEventListener(GroovyClassLoader scriptClassLoader, Binding binding, BuildSettings buildSettings)


 
Method Detail

addGriffonBuildListener

protected void addGriffonBuildListener(String listenerClassName)


addGriffonBuildListener

protected void addGriffonBuildListener(Class listenerClass)


addGriffonBuildListener

public void addGriffonBuildListener(GriffonBuildListener listener)


findEventsScript

protected File findEventsScript(File dir)


initialize

public void initialize()


loadEventHooks

protected void loadEventHooks(BuildSettings buildSettings)


loadEventsFromPlugins

private void loadEventsFromPlugins(Map projectPlugins)


loadEventsScript

public void loadEventsScript(File eventScript)


loadGriffonBuildListeners

protected void loadGriffonBuildListeners()


setClassLoader

public void setClassLoader(GroovyClassLoader classLoader)


setGlobalEventHooks

public void setGlobalEventHooks(Map globalEventHooks)


targetFinished

public void targetFinished(BuildEvent buildEvent)


targetStarted

public void targetStarted(BuildEvent buildEvent)


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


 

Groovy Documentation