org.apache.maven.continuum.notification
Class AbstractContinuumNotifier

Package class diagram package AbstractContinuumNotifier
java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.codehaus.plexus.notification.notifier.AbstractNotifier
          extended by org.apache.maven.continuum.notification.AbstractContinuumNotifier
All Implemented Interfaces:
org.codehaus.plexus.logging.LogEnabled, org.codehaus.plexus.notification.notifier.Notifier

public abstract class AbstractContinuumNotifier
extends org.codehaus.plexus.notification.notifier.AbstractNotifier


Field Summary
 
Fields inherited from interface org.codehaus.plexus.notification.notifier.Notifier
ROLE
 
Constructor Summary
AbstractContinuumNotifier()
           
 
Method Summary
protected  org.apache.maven.continuum.model.project.BuildResult getPreviousBuild(org.apache.maven.continuum.model.project.Project project, org.apache.maven.continuum.model.project.BuildDefinition buildDef, org.apache.maven.continuum.model.project.BuildResult currentBuild)
           
 java.lang.String getReportUrl(org.apache.maven.continuum.model.project.Project project, org.apache.maven.continuum.model.project.BuildResult build, org.apache.maven.continuum.configuration.ConfigurationService configurationService)
          Returns url of the last build
 boolean shouldNotify(org.apache.maven.continuum.model.project.BuildResult build, org.apache.maven.continuum.model.project.BuildResult previousBuild, org.apache.maven.continuum.model.project.ProjectNotifier projectNotifier)
          Determine if message must be sent
 
Methods inherited from class org.codehaus.plexus.notification.notifier.AbstractNotifier
sendNotification, sendNotification
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.plexus.notification.notifier.Notifier
sendNotification, sendNotification
 

Constructor Detail

AbstractContinuumNotifier

public AbstractContinuumNotifier()
Method Detail

getReportUrl

public java.lang.String getReportUrl(org.apache.maven.continuum.model.project.Project project,
                                     org.apache.maven.continuum.model.project.BuildResult build,
                                     org.apache.maven.continuum.configuration.ConfigurationService configurationService)
                              throws org.apache.maven.continuum.ContinuumException
Returns url of the last build

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

shouldNotify

public boolean shouldNotify(org.apache.maven.continuum.model.project.BuildResult build,
                            org.apache.maven.continuum.model.project.BuildResult previousBuild,
                            org.apache.maven.continuum.model.project.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

getPreviousBuild

protected org.apache.maven.continuum.model.project.BuildResult getPreviousBuild(org.apache.maven.continuum.model.project.Project project,
                                                                                org.apache.maven.continuum.model.project.BuildDefinition buildDef,
                                                                                org.apache.maven.continuum.model.project.BuildResult currentBuild)
                                                                         throws org.codehaus.plexus.notification.NotificationException
Throws:
org.codehaus.plexus.notification.NotificationException