Package com.atlassian.bamboo.process
Class ProcessContextImpl
java.lang.Object
com.atlassian.bamboo.process.ProcessContextImpl
- All Implemented Interfaces:
ProcessContext
-
Method Summary
Modifier and TypeMethodDescriptiondecorateProcessCommand
(@NotNull List<String> command) Modifies given command by executing command decorators available in the current context.@NotNull BuildKey
@NotNull BuildLogger
@NotNull CommonContext
@NotNull String
getPaths()
@NotNull ResultKey
@Nullable CommonTaskContext
@NotNull String
long
Returns and id of the current task.@NotNull String
@NotNull VariableContext
boolean
Controls the amount of logging during the execution.
-
Method Details
-
getBuildLogger
- Specified by:
getBuildLogger
in interfaceProcessContext
- Returns:
- a build logger for current executable.
-
getResultKey
- Specified by:
getResultKey
in interfaceProcessContext
- Returns:
- result key of current execution
-
getJobDisplayName
- Specified by:
getJobDisplayName
in interfaceProcessContext
- Returns:
- display name of job or environment being executed
-
getTaskDescription
- Specified by:
getTaskDescription
in interfaceProcessContext
- Returns:
- current task description or empty string if none
-
getVariableContext
- Specified by:
getVariableContext
in interfaceProcessContext
- Returns:
- variable context of current execution
-
getTaskId
public long getTaskId()Description copied from interface:ProcessContext
Returns and id of the current task. If not a scope of a task returns a unique number that will not clash with id of any task.- Specified by:
getTaskId
in interfaceProcessContext
-
getTaskPluginKey
- Specified by:
getTaskPluginKey
in interfaceProcessContext
- Returns:
- plugin key of current task or an empty string if none
-
getCommonContext
- Specified by:
getCommonContext
in interfaceProcessContext
- Returns:
- execution context of current job/environment
-
getTaskContext
- Specified by:
getTaskContext
in interfaceProcessContext
- Returns:
- current task context or null if not in task context
-
getEnvironment
- Specified by:
getEnvironment
in interfaceProcessContext
- Returns:
- environment variables used for process execution
-
getPaths
- Specified by:
getPaths
in interfaceProcessContext
- Returns:
- content of "PATH" variable used for process execution
-
getBuildKey
- Specified by:
getBuildKey
in interfaceProcessContext
- Returns:
- unique key of the current context
-
decorateProcessCommand
@NotNull public @NotNull List<String> decorateProcessCommand(@NotNull @NotNull List<String> command) Description copied from interface:ProcessContext
Modifies given command by executing command decorators available in the current context.- Specified by:
decorateProcessCommand
in interfaceProcessContext
- Returns:
-
isVerboseLoggingOn
public boolean isVerboseLoggingOn()Description copied from interface:ProcessContext
Controls the amount of logging during the execution. Some of the logging is only output in verbose mode.- Specified by:
isVerboseLoggingOn
in interfaceProcessContext
- Returns:
- true if verbose logging is enabled.
-