Class PropertyFromFileMacro
java.lang.Object
org.jenkinsci.plugins.tokenmacro.TokenMacro
org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
org.jenkinsci.plugins.tokenmacro.WorkspaceDependentMacro
org.jenkinsci.plugins.tokenmacro.impl.PropertyFromFileMacro
- All Implemented Interfaces:
ExtensionPoint
Expands to a property from a property file relative to the workspace root.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
DataBoundTokenMacro.ParameterNested 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 TypeMethodDescriptionbooleanacceptsMacroName(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
evaluateMethods inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
evaluate, evaluate, handlesHtmlEscapeInternally, hasNestedContentMethods inherited from class org.jenkinsci.plugins.tokenmacro.TokenMacro
all, expand, expand, expand, expand, expandAll, expandAll, expandAll, expandAll, getAutoCompleteList, getPreviousRun, getWorkspace
-
Field Details
-
file
-
property
-
-
Constructor Details
-
PropertyFromFileMacro
public PropertyFromFileMacro()
-
-
Method Details
-
acceptsMacroName
Description copied from class:TokenMacroReturns true if this object can evaluate the macro of the given name.- Overrides:
acceptsMacroNamein 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:
getAcceptedMacroNamesin classTokenMacro
-
evaluate
public String evaluate(AbstractBuild<?, ?> context, TaskListener listener, String macroName) throws MacroEvaluationException, IOException, InterruptedException- Overrides:
evaluatein classWorkspaceDependentMacro- Throws:
MacroEvaluationExceptionIOExceptionInterruptedException
-
getCallable
public hudson.remoting.Callable<String,IOException> getCallable(Run<?, ?> run, String root, TaskListener listener) - Specified by:
getCallablein classWorkspaceDependentMacro
-