org.apache.maven.continuum.notification
Class AbstractContinuumNotifier

java.lang.Object
  extended by org.apache.maven.continuum.notification.AbstractContinuumNotifier
All Implemented Interfaces:
Notifier
Direct Known Subclasses:
ConsoleNotifier, IrcContinuumNotifier, JabberContinuumNotifier, MailContinuumNotifier, MsnContinuumNotifier, WagonContinuumNotifier

public abstract class AbstractContinuumNotifier
extends Object
implements Notifier


Field Summary
static String ADDRESS_FIELD
           
static String COMMITTER_FIELD
           
static String DEVELOPER_FIELD
           
 
Constructor Summary
AbstractContinuumNotifier()
           
 
Method Summary
protected  String generateMessage(Project project, BuildResult build, ConfigurationService configurationService)
           
protected  String generateMessage(ProjectScmRoot projectScmRoot, ConfigurationService configurationService)
           
protected  String getBuildOutput(Project project, BuildResult buildResult)
           
protected  BuildResult getPreviousBuild(Project project, BuildDefinition buildDef, BuildResult currentBuild)
           
 String getReportUrl(Project project, BuildResult build, ConfigurationService configurationService)
          Returns url of the last build
 String getReportUrl(ProjectGroup projectGroup, ProjectScmRoot projectScmRoot, ConfigurationService configurationService)
           
 boolean shouldNotify(BuildResult build, BuildResult previousBuild, ProjectNotifier projectNotifier)
          Determine if message must be sent
 boolean shouldNotify(ProjectScmRoot projectScmRoot, ProjectNotifier projectNotifier)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.continuum.notification.Notifier
getType, sendMessage
 

Field Detail

ADDRESS_FIELD

public static final String ADDRESS_FIELD
See Also:
Constant Field Values

COMMITTER_FIELD

public static final String COMMITTER_FIELD
See Also:
Constant Field Values

DEVELOPER_FIELD

public static final String DEVELOPER_FIELD
See Also:
Constant Field Values
Constructor Detail

AbstractContinuumNotifier

public AbstractContinuumNotifier()
Method Detail

getBuildOutput

protected String getBuildOutput(Project project,
                                BuildResult buildResult)

getReportUrl

public String getReportUrl(Project project,
                           BuildResult build,
                           ConfigurationService configurationService)
                    throws ContinuumException
Returns url of the last build

Parameters:
project - The project
build - The build
configurationService - The configuration Service
Returns:
The report URL
Throws:
ContinuumException - whne the configuration can't be loaded

getReportUrl

public String getReportUrl(ProjectGroup projectGroup,
                           ProjectScmRoot projectScmRoot,
                           ConfigurationService configurationService)
                    throws ContinuumException
Throws:
ContinuumException

shouldNotify

public boolean shouldNotify(BuildResult build,
                            BuildResult previousBuild,
                            ProjectNotifier projectNotifier)
Determine if message must be sent

Parameters:
build - The current build result
previousBuild - The previous build result
projectNotifier - The project notifier
Returns:
True if a message must be sent

shouldNotify

public boolean shouldNotify(ProjectScmRoot projectScmRoot,
                            ProjectNotifier projectNotifier)

getPreviousBuild

protected BuildResult getPreviousBuild(Project project,
                                       BuildDefinition buildDef,
                                       BuildResult currentBuild)
                                throws NotificationException
Throws:
NotificationException

generateMessage

protected String generateMessage(Project project,
                                 BuildResult build,
                                 ConfigurationService configurationService)
                          throws NotificationException
Throws:
NotificationException

generateMessage

protected String generateMessage(ProjectScmRoot projectScmRoot,
                                 ConfigurationService configurationService)
                          throws NotificationException
Throws:
NotificationException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.