Class XmlFileMacro
java.lang.Object
org.jenkinsci.plugins.tokenmacro.TokenMacro
org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
org.jenkinsci.plugins.tokenmacro.WorkspaceDependentMacro
org.jenkinsci.plugins.tokenmacro.impl.XmlFileMacro
- All Implemented Interfaces:
ExtensionPoint
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
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
FieldsFields inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
escapeHtml
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptsMacroName
(String macroName) Returns true if this object can evaluate the macro of the given name.evaluate
(AbstractBuild<?, ?> context, TaskListener listener, String macroName) hudson.remoting.Callable<String,
IOException> getCallable
(Run<?, ?> run, String root, TaskListener listener) Methods inherited from class org.jenkinsci.plugins.tokenmacro.WorkspaceDependentMacro
evaluate
Methods inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
evaluate, evaluate, handlesHtmlEscapeInternally, hasNestedContent
Methods inherited from class org.jenkinsci.plugins.tokenmacro.TokenMacro
all, expand, expand, expand, expand, expandAll, expandAll, expandAll, expandAll, getAutoCompleteList, getPreviousRun, getWorkspace
-
Field Details
-
LOGGER
-
file
-
xpath
-
-
Constructor Details
-
XmlFileMacro
public XmlFileMacro()
-
-
Method Details
-
acceptsMacroName
Description copied from class:TokenMacro
Returns true if this object can evaluate the macro of the given name.- Overrides:
acceptsMacroName
in classWorkspaceDependentMacro
- 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
- Overrides:
getAcceptedMacroNames
in classTokenMacro
-
evaluate
public String evaluate(AbstractBuild<?, ?> context, TaskListener listener, String macroName) throws MacroEvaluationException, IOException, InterruptedException- Overrides:
evaluate
in classWorkspaceDependentMacro
- Throws:
MacroEvaluationException
IOException
InterruptedException
-
getCallable
public hudson.remoting.Callable<String,IOException> getCallable(Run<?, ?> run, String root, TaskListener listener) - Specified by:
getCallable
in classWorkspaceDependentMacro
-