hudson.plugins.emailext
Class ExtendedEmailPublisher

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Publisher
          extended by hudson.tasks.Notifier
              extended by hudson.plugins.emailext.ExtendedEmailPublisher
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Publisher>, hudson.tasks.BuildStep

public class ExtendedEmailPublisher
extends hudson.tasks.Notifier

Publisher that sends notification e-mail.

Author:
kyle.sweeney@valtech.com

Nested Class Summary
static class ExtendedEmailPublisher.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.tasks.Publisher
hudson.tasks.Publisher.DescriptorExtensionListImpl
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Field Summary
static java.lang.String COMMA_SEPARATED_SPLIT_REGEXP
           
 java.lang.String contentType
          The contentType of the emails for this project.
static java.lang.String DEFAULT_BODY_TEXT
           
static java.lang.String DEFAULT_SUBJECT_TEXT
           
 java.lang.String defaultContent
          The default body of the emails for this project.
 java.lang.String defaultSubject
          The default subject of the emails for this project.
static ExtendedEmailPublisher.DescriptorImpl DESCRIPTOR
           
static java.lang.String PROJECT_DEFAULT_BODY_TEXT
           
static java.lang.String PROJECT_DEFAULT_SUBJECT_TEXT
           
 java.lang.String recipientList
          A comma-separated list of email recipient that will be used for every trigger.
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
ExtendedEmailPublisher()
           
 
Method Summary
<P extends hudson.model.AbstractProject<P,B>,B extends hudson.model.AbstractBuild<P,B>>
boolean
_perform(B build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
static void addEmailTriggerType(EmailTriggerDescriptor triggerType)
           
 boolean getConfigured()
          Return true if the project has been configured, otherwise returns false
 java.util.List<EmailTrigger> getConfiguredTriggers()
          Get the list of configured email triggers for this project.
 hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher> getDescriptor()
           
static java.util.Collection<java.lang.String> getEmailTriggerNames()
           
static java.util.Collection<EmailTriggerDescriptor> getEmailTriggers()
           
static EmailTriggerDescriptor getEmailTriggerType(java.lang.String mailerId)
           
 java.util.List<EmailTrigger> getNonConfiguredTriggers()
          Get the list of non-configured email triggers for this project.
 hudson.tasks.BuildStepMonitor getRequiredMonitorService()
           
static java.util.List<EmailTrigger> getTriggersForNonConfiguredInstance()
           
 boolean isConfigured()
          Return true if the project has been configured, otherwise returns false
 boolean needsToRunAfterFinalized()
           
 boolean perform(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
static void removeEmailTriggerType(EmailTriggerDescriptor triggerType)
           
<P extends hudson.model.AbstractProject<P,B>,B extends hudson.model.AbstractBuild<P,B>>
boolean
sendMail(EmailType mailType, B build, hudson.model.BuildListener listener)
           
 
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, perform, prebuild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, prebuild
 

Field Detail

COMMA_SEPARATED_SPLIT_REGEXP

public static final java.lang.String COMMA_SEPARATED_SPLIT_REGEXP
See Also:
Constant Field Values

DEFAULT_SUBJECT_TEXT

public static final java.lang.String DEFAULT_SUBJECT_TEXT
See Also:
Constant Field Values

DEFAULT_BODY_TEXT

public static final java.lang.String DEFAULT_BODY_TEXT
See Also:
Constant Field Values

PROJECT_DEFAULT_SUBJECT_TEXT

public static final java.lang.String PROJECT_DEFAULT_SUBJECT_TEXT
See Also:
Constant Field Values

PROJECT_DEFAULT_BODY_TEXT

public static final java.lang.String PROJECT_DEFAULT_BODY_TEXT
See Also:
Constant Field Values

recipientList

public java.lang.String recipientList
A comma-separated list of email recipient that will be used for every trigger.


contentType

public java.lang.String contentType
The contentType of the emails for this project.


defaultSubject

public java.lang.String defaultSubject
The default subject of the emails for this project. ($PROJECT_DEFAULT_SUBJECT)


defaultContent

public java.lang.String defaultContent
The default body of the emails for this project. ($PROJECT_DEFAULT_BODY)


DESCRIPTOR

@Extension
public static final ExtendedEmailPublisher.DescriptorImpl DESCRIPTOR
Constructor Detail

ExtendedEmailPublisher

public ExtendedEmailPublisher()
Method Detail

addEmailTriggerType

public static void addEmailTriggerType(EmailTriggerDescriptor triggerType)
                                throws EmailExtException
Throws:
EmailExtException

removeEmailTriggerType

public static void removeEmailTriggerType(EmailTriggerDescriptor triggerType)

getEmailTriggerType

public static EmailTriggerDescriptor getEmailTriggerType(java.lang.String mailerId)

getEmailTriggers

public static java.util.Collection<EmailTriggerDescriptor> getEmailTriggers()

getEmailTriggerNames

public static java.util.Collection<java.lang.String> getEmailTriggerNames()

getTriggersForNonConfiguredInstance

public static java.util.List<EmailTrigger> getTriggersForNonConfiguredInstance()

getConfiguredTriggers

public java.util.List<EmailTrigger> getConfiguredTriggers()
Get the list of configured email triggers for this project.


getNonConfiguredTriggers

public java.util.List<EmailTrigger> getNonConfiguredTriggers()
Get the list of non-configured email triggers for this project.


isConfigured

public boolean isConfigured()
Return true if the project has been configured, otherwise returns false


getConfigured

public boolean getConfigured()
Return true if the project has been configured, otherwise returns false


perform

public boolean perform(hudson.model.AbstractBuild build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
                throws java.lang.InterruptedException,
                       java.io.IOException
Specified by:
perform in interface hudson.tasks.BuildStep
Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
Throws:
java.lang.InterruptedException
java.io.IOException

_perform

public <P extends hudson.model.AbstractProject<P,B>,B extends hudson.model.AbstractBuild<P,B>> boolean _perform(B build,
                                                                                                                hudson.Launcher launcher,
                                                                                                                hudson.model.BuildListener listener)
                 throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

sendMail

public <P extends hudson.model.AbstractProject<P,B>,B extends hudson.model.AbstractBuild<P,B>> boolean sendMail(EmailType mailType,
                                                                                                                B build,
                                                                                                                hudson.model.BuildListener listener)

needsToRunAfterFinalized

public boolean needsToRunAfterFinalized()
Overrides:
needsToRunAfterFinalized in class hudson.tasks.Publisher

getRequiredMonitorService

public hudson.tasks.BuildStepMonitor getRequiredMonitorService()

getDescriptor

public hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher> getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tasks.Publisher>
Overrides:
getDescriptor in class hudson.tasks.Notifier


Copyright © 2010. All Rights Reserved.