Package com.atlassian.bamboo.process
Class ProcessContextImpl
- java.lang.Object
-
- com.atlassian.bamboo.process.ProcessContextImpl
-
- All Implemented Interfaces:
ProcessContext
public class ProcessContextImpl extends Object implements ProcessContext
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull List<String>
decorateProcessCommand(@NotNull List<String> command)
Modifies given command by executing command decorators available in the current context.@NotNull BuildKey
getBuildKey()
@NotNull BuildLogger
getBuildLogger()
@NotNull CommonContext
getCommonContext()
@NotNull Map<String,String>
getEnvironment()
@NotNull String
getJobDisplayName()
@NotNull List<String>
getPaths()
@NotNull ResultKey
getResultKey()
@Nullable CommonTaskContext
getTaskContext()
@NotNull String
getTaskDescription()
long
getTaskId()
Returns and id of the current task.@NotNull String
getTaskPluginKey()
@NotNull VariableContext
getVariableContext()
boolean
isVerboseLoggingOn()
Controls the amount of logging during the execution.
-
-
-
Method Detail
-
getBuildLogger
@NotNull public @NotNull BuildLogger getBuildLogger()
- Specified by:
getBuildLogger
in interfaceProcessContext
- Returns:
- a build logger for current executable.
-
getResultKey
@NotNull public @NotNull ResultKey getResultKey()
- Specified by:
getResultKey
in interfaceProcessContext
- Returns:
- result key of current execution
-
getJobDisplayName
@NotNull public @NotNull String getJobDisplayName()
- Specified by:
getJobDisplayName
in interfaceProcessContext
- Returns:
- display name of job or environment being executed
-
getTaskDescription
@NotNull public @NotNull String getTaskDescription()
- Specified by:
getTaskDescription
in interfaceProcessContext
- Returns:
- current task description or empty string if none
-
getVariableContext
@NotNull public @NotNull VariableContext 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
@NotNull public @NotNull String getTaskPluginKey()
- Specified by:
getTaskPluginKey
in interfaceProcessContext
- Returns:
- plugin key of current task or an empty string if none
-
getCommonContext
@NotNull public @NotNull CommonContext getCommonContext()
- Specified by:
getCommonContext
in interfaceProcessContext
- Returns:
- execution context of current job/environment
-
getTaskContext
@Nullable public @Nullable CommonTaskContext getTaskContext()
- Specified by:
getTaskContext
in interfaceProcessContext
- Returns:
- current task context or null if not in task context
-
getEnvironment
@NotNull public @NotNull Map<String,String> getEnvironment()
- Specified by:
getEnvironment
in interfaceProcessContext
- Returns:
- environment variables used for process execution
-
getPaths
@NotNull public @NotNull List<String> getPaths()
- Specified by:
getPaths
in interfaceProcessContext
- Returns:
- content of "PATH" variable used for process execution
-
getBuildKey
@NotNull public @NotNull BuildKey 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.
-
-