net.sourceforge.cruisecontrol.publishers
Class ConditionalPublisher

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.publishers.ConditionalPublisher
All Implemented Interfaces:
Publisher, java.io.Serializable
Direct Known Subclasses:
OnFailurePublisher, OnSuccessPublisher

public abstract class ConditionalPublisher
extends java.lang.Object
implements Publisher

An abstract base class for any publisher which wishes to conditionally execute a set of contained Publishers.

See Also:
Serialized Form

Constructor Summary
ConditionalPublisher()
           
 
Method Summary
 void add(Publisher publisher)
          Adds a nested publisher
 void publish(org.jdom.Element log)
          Define the publishing.
abstract  boolean shouldPublish(org.jdom.Element log)
          Determines if the nested publishers should be executed.
 void validate()
          Called after the configuration is read to make sure that all the mandatory parameters were specified..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionalPublisher

public ConditionalPublisher()
Method Detail

publish

public void publish(org.jdom.Element log)
             throws CruiseControlException
Description copied from interface: Publisher
Define the publishing.

Specified by:
publish in interface Publisher
Parameters:
log - JDOM Element representation of the main cruisecontrol build log
Throws:
CruiseControlException

validate

public void validate()
              throws CruiseControlException
Description copied from interface: Publisher
Called after the configuration is read to make sure that all the mandatory parameters were specified..

Specified by:
validate in interface Publisher
Throws:
CruiseControlException - if there was a configuration error.

add

public void add(Publisher publisher)
Adds a nested publisher

Parameters:
publisher - The publisher to add

shouldPublish

public abstract boolean shouldPublish(org.jdom.Element log)
Determines if the nested publishers should be executed. This method must be implemented by all derived classes.

Parameters:
log - The build log
Returns:
true if the nested publishers should be executed, false otherwise