hudson.plugins.analysis.tokens
Class AbstractTokenMacro
java.lang.Object
org.jenkinsci.plugins.tokenmacro.TokenMacro
org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
hudson.plugins.analysis.tokens.AbstractTokenMacro
- All Implemented Interfaces:
- hudson.ExtensionPoint
- Direct Known Subclasses:
- AbstractAnnotationsCountTokenMacro, AbstractFixedAnnotationsTokenMacro, AbstractNewAnnotationsTokenMacro, AbstractResultTokenMacro
public abstract class AbstractTokenMacro
- extends org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
Provides a token that evaluates to the plug-in build result.
- Author:
- Ulli Hafner
| 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 |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Methods inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro |
evaluate |
| Methods inherited from class org.jenkinsci.plugins.tokenmacro.TokenMacro |
all, expand, expandAll, hasNestedContent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTokenMacro
public AbstractTokenMacro(String tokenName,
Class<? extends ResultAction<? extends BuildResult>>... resultActions)
- Creates a new instance of
AbstractTokenMacro.
- Parameters:
tokenName - the name of the tokenresultActions - associated action types containing the build result
evaluate
public String evaluate(hudson.model.AbstractBuild<?,?> context,
hudson.model.TaskListener listener,
String macroName)
throws org.jenkinsci.plugins.tokenmacro.MacroEvaluationException,
IOException,
InterruptedException
- Specified by:
evaluate in class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
- Throws:
org.jenkinsci.plugins.tokenmacro.MacroEvaluationException
IOException
InterruptedException
evaluate
protected abstract String evaluate(BuildResult result)
- Evaluates the build result and returns the string value of the token.
- Parameters:
result - the result to evaluate
- Returns:
- the string value of the token
acceptsMacroName
public boolean acceptsMacroName(String macroName)
- Specified by:
acceptsMacroName in class org.jenkinsci.plugins.tokenmacro.TokenMacro
Copyright © 2004-2012 Hudson. All Rights Reserved.