@Extension public class BuildLogMacro extends DataBoundTokenMacro
DataBoundTokenMacro.Parameter
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
static String |
MACRO_NAME |
static int |
MAX_LINE_LENGTH_DEFAULT_VALUE |
static int |
MAX_LINES_DEFAULT_VALUE |
int |
maxLineLength |
int |
maxLines |
int |
truncTailLines |
escapeHtml
Constructor and Description |
---|
BuildLogMacro() |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsMacroName(String macroName)
Returns true if this object can evaluate the macro of the given name.
|
String |
evaluate(AbstractBuild<?,?> build,
TaskListener listener,
String macroName) |
String |
evaluate(Run<?,?> run,
FilePath workspace,
TaskListener listener,
String macroName) |
List<String> |
getAcceptedMacroNames() |
boolean |
handlesHtmlEscapeInternally()
Indicates whether this macro handles
DataBoundTokenMacro.escapeHtml on its own inside the evaluate methods. |
evaluate, evaluate, hasNestedContent
all, expand, expand, expand, expand, expandAll, expandAll, expandAll, expandAll, getAutoCompleteList, getPreviousRun, getWorkspace
public static final String MACRO_NAME
public static final int MAX_LINES_DEFAULT_VALUE
public static final int MAX_LINE_LENGTH_DEFAULT_VALUE
public int maxLines
public int truncTailLines
public int maxLineLength
public boolean acceptsMacroName(String macroName)
TokenMacro
acceptsMacroName
in class TokenMacro
macroName
- By convention we encourage all caps name.TokenMacro.evaluate(AbstractBuild, TaskListener, String, Map, ListMultimap)
called.public List<String> getAcceptedMacroNames()
getAcceptedMacroNames
in class TokenMacro
public String evaluate(AbstractBuild<?,?> build, TaskListener listener, String macroName) throws MacroEvaluationException, IOException, InterruptedException
evaluate
in class DataBoundTokenMacro
MacroEvaluationException
IOException
InterruptedException
public String evaluate(Run<?,?> run, FilePath workspace, TaskListener listener, String macroName) throws MacroEvaluationException, IOException, InterruptedException
evaluate
in class DataBoundTokenMacro
MacroEvaluationException
IOException
InterruptedException
public boolean handlesHtmlEscapeInternally()
DataBoundTokenMacro
DataBoundTokenMacro.escapeHtml
on its own inside the evaluate
methods.
If this method returns false
and DataBoundTokenMacro.escapeHtml
is true
then the returned value from
DataBoundTokenMacro.evaluate(AbstractBuild, TaskListener, String)
and DataBoundTokenMacro.evaluate(Run, FilePath, TaskListener, String)
will be escaped. If this method returns true
no escaping will be performed,
and it is assumed the escaping will be handled internally by the implementing class. It is then also assumed that
the help.jelly
file for that class mentions the DataBoundTokenMacro.escapeHtml
parameter.handlesHtmlEscapeInternally
in class DataBoundTokenMacro
Copyright © 2016–2022. All rights reserved.