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 CHARSET
           
 java.lang.String contentType
          The contentType of the emails for this project (text/html, text/plain, etc).
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
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)
           
 boolean prebuild(hudson.model.AbstractBuild<?,?> build, hudson.model.BuildListener listener)
           
static void removeEmailTriggerType(EmailTriggerDescriptor triggerType)
           
 
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform
 
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, getProjectActions
 

Field Detail

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

CHARSET

public static final java.lang.String CHARSET
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 (text/html, text/plain, etc).


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


prebuild

public boolean prebuild(hudson.model.AbstractBuild<?,?> build,
                        hudson.model.BuildListener listener)
Specified by:
prebuild in interface hudson.tasks.BuildStep
Overrides:
prebuild in class hudson.tasks.BuildStepCompatibilityLayer

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

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.