hudson.plugins.emailext.plugins
Interface EmailContent

All Superinterfaces:
hudson.ExtensionPoint
All Known Implementing Classes:
AbstractChangesSinceContent, BuildLogContent, BuildLogExcerptContent, BuildLogRegexContent, BuildNumberContent, BuildStatusContent, BuildURLContent, CauseContent, ChangesSinceLastBuildContent, ChangesSinceLastSuccessfulBuildContent, ChangesSinceLastUnstableBuildContent, EnvContent, FailedTestsContent, HudsonURLContent, JellyScriptContent, JenkinsURLContent, ProjectNameContent, ProjectURLContent, ScriptContent, SVNRevisionContent, TestCountsContent, WorkspaceFileContent

public interface EmailContent
extends hudson.ExtensionPoint

Content token, which is a macro that the user can use like "${FOOBAR,param=arg,param=arg,...}" in the template that expands to a real content.


Nested Class Summary
static class EmailContent.Args
           
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Method Summary
 List<String> getArguments()
          These are the arguments accepted when generating the content for this token.
<P extends hudson.model.AbstractProject<P,B>,B extends hudson.model.AbstractBuild<P,B>>
String
getContent(hudson.model.AbstractBuild<P,B> build, ExtendedEmailPublisher publisher, EmailType emailType, Map<String,?> args)
          This method returns the generated content that should replace the token.
 String getHelpText()
          This is a string that will be rendered in the help section of the plugin.
 String getToken()
          This is the token that will be replaced by the content when the email is sent.
 boolean hasNestedContent()
          Specifies whether or not the content returned by this object can have nested tokens in it that need to be resolved before sending the email.
 

Method Detail

getToken

String getToken()
This is the token that will be replaced by the content when the email is sent. If the email has a string like "$REPLACE_ME", then the implementation of this method should return "REPLACE_ME".


getArguments

List<String> getArguments()
These are the arguments accepted when generating the content for this token.


getHelpText

String getHelpText()
This is a string that will be rendered in the help section of the plugin. It describes what the content does and what it puts in the email.


getContent

<P extends hudson.model.AbstractProject<P,B>,B extends hudson.model.AbstractBuild<P,B>> String getContent(hudson.model.AbstractBuild<P,B> build,
                                                                                                          ExtendedEmailPublisher publisher,
                                                                                                          EmailType emailType,
                                                                                                          Map<String,?> args)
                  throws IOException,
                         InterruptedException
This method returns the generated content that should replace the token.

Parameters:
publisher - TODO
args - the arguments for generating the content
Throws:
IOException
InterruptedException

hasNestedContent

boolean hasNestedContent()
Specifies whether or not the content returned by this object can have nested tokens in it that need to be resolved before sending the email.



Copyright © 2004-2012. All Rights Reserved.