Class AbstractEvalContent
- java.lang.Object
-
- org.jenkinsci.plugins.tokenmacro.TokenMacro
-
- org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
-
- hudson.plugins.emailext.plugins.content.AbstractEvalContent
-
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
JellyScriptContent
,ScriptContent
,TemplateContent
public abstract class AbstractEvalContent extends org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
- Author:
- acearl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro.Parameter
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
EMAIL_TEMPLATES_DIRECTORY
protected String
macroName
-
Constructor Summary
Constructors Constructor Description AbstractEvalContent(String macroName)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
acceptsMacroName(String macroName)
String
evaluate(AbstractBuild<?,?> build, TaskListener listener, String macroName)
abstract String
evaluate(Run<?,?> run, FilePath workspace, TaskListener listener, String macroName)
protected String
generateMissingFile(String type, String fileName)
protected String
getCharset(Run<?,?> build)
protected InputStream
getFileInputStream(Run<?,?> run, FilePath workspace, String fileName, String extension)
protected abstract Class<? extends org.jenkinsci.lib.configprovider.ConfigProvider>
getProviderClass()
boolean
hasNestedContent()
static boolean
isApprovedScript(String script, org.jenkinsci.plugins.scriptsecurity.scripts.Language language)
static boolean
isChildOf(FilePath potentialChild, FilePath parent)
static File
scriptsFolder()
-
Methods inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
evaluate, evaluate, handlesHtmlEscapeInternally
-
-
-
-
Field Detail
-
EMAIL_TEMPLATES_DIRECTORY
protected static final String EMAIL_TEMPLATES_DIRECTORY
- See Also:
- Constant Field Values
-
macroName
protected final String macroName
-
-
Constructor Detail
-
AbstractEvalContent
public AbstractEvalContent(String macroName)
-
-
Method Detail
-
evaluate
public String evaluate(AbstractBuild<?,?> build, TaskListener listener, String macroName) throws org.jenkinsci.plugins.tokenmacro.MacroEvaluationException, IOException, InterruptedException
- Specified by:
evaluate
in classorg.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
- Throws:
org.jenkinsci.plugins.tokenmacro.MacroEvaluationException
IOException
InterruptedException
-
evaluate
public abstract String evaluate(Run<?,?> run, FilePath workspace, TaskListener listener, String macroName) throws org.jenkinsci.plugins.tokenmacro.MacroEvaluationException, IOException, InterruptedException
- Overrides:
evaluate
in classorg.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
- Throws:
org.jenkinsci.plugins.tokenmacro.MacroEvaluationException
IOException
InterruptedException
-
acceptsMacroName
public boolean acceptsMacroName(String macroName)
- Specified by:
acceptsMacroName
in classorg.jenkinsci.plugins.tokenmacro.TokenMacro
-
scriptsFolder
public static File scriptsFolder()
-
getProviderClass
protected abstract Class<? extends org.jenkinsci.lib.configprovider.ConfigProvider> getProviderClass()
-
hasNestedContent
public boolean hasNestedContent()
- Overrides:
hasNestedContent
in classorg.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
-
getFileInputStream
protected InputStream getFileInputStream(Run<?,?> run, FilePath workspace, String fileName, String extension) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
isChildOf
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean isChildOf(FilePath potentialChild, FilePath parent) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
isApprovedScript
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean isApprovedScript(String script, org.jenkinsci.plugins.scriptsecurity.scripts.Language language)
-
-