Class XmlFileMacro
- java.lang.Object
-
- org.jenkinsci.plugins.tokenmacro.TokenMacro
-
- org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
-
- org.jenkinsci.plugins.tokenmacro.impl.XmlFileMacro
-
- All Implemented Interfaces:
hudson.ExtensionPoint
@Extension public class XmlFileMacro extends DataBoundTokenMacro
Expands to a xml value(s) from a xml file relative to the workspace root. If xpath evaluates to more than one value then a semicolon separted string is returned.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
DataBoundTokenMacro.Parameter
-
-
Constructor Summary
Constructors Constructor Description XmlFileMacro()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsMacroName(String macroName)Returns true if this object can evaluate the macro of the given name.Stringevaluate(hudson.model.AbstractBuild<?,?> context, hudson.model.TaskListener listener, String macroName)Stringevaluate(hudson.model.Run<?,?> run, hudson.FilePath workspace, hudson.model.TaskListener listener, String macroName)List<String>getAcceptedMacroNames()-
Methods inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
evaluate, evaluate, hasNestedContent
-
Methods inherited from class org.jenkinsci.plugins.tokenmacro.TokenMacro
all, expand, expand, expand, expand, expandAll, expandAll, expandAll, expandAll, getAutoCompleteList, getPreviousRun, getWorkspace
-
-
-
-
Method Detail
-
acceptsMacroName
public boolean acceptsMacroName(String macroName)
Description copied from class:TokenMacroReturns true if this object can evaluate the macro of the given name.- Specified by:
acceptsMacroNamein classTokenMacro- Parameters:
macroName- By convention we encourage all caps name.- Returns:
- true
... to claim the macro of the given name and have
TokenMacro.evaluate(AbstractBuild, TaskListener, String, Map, ListMultimap)called.
-
getAcceptedMacroNames
public List<String> getAcceptedMacroNames()
- Overrides:
getAcceptedMacroNamesin classTokenMacro
-
evaluate
public String evaluate(hudson.model.AbstractBuild<?,?> context, hudson.model.TaskListener listener, String macroName) throws MacroEvaluationException, IOException, InterruptedException
- Specified by:
evaluatein classDataBoundTokenMacro- Throws:
MacroEvaluationExceptionIOExceptionInterruptedException
-
evaluate
public String evaluate(hudson.model.Run<?,?> run, hudson.FilePath workspace, hudson.model.TaskListener listener, String macroName) throws MacroEvaluationException, IOException, InterruptedException
- Overrides:
evaluatein classDataBoundTokenMacro- Throws:
MacroEvaluationExceptionIOExceptionInterruptedException
-
-