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 BuildKeygetBuildKey()@NotNull BuildLoggergetBuildLogger()@NotNull CommonContextgetCommonContext()@NotNull Map<String,String>getEnvironment()@NotNull StringgetJobDisplayName()@NotNull List<String>getPaths()@NotNull ResultKeygetResultKey()@Nullable CommonTaskContextgetTaskContext()@NotNull StringgetTaskDescription()longgetTaskId()Returns and id of the current task.@NotNull StringgetTaskPluginKey()@NotNull VariableContextgetVariableContext()booleanisVerboseLoggingOn()Controls the amount of logging during the execution.
-
-
-
Method Detail
-
getBuildLogger
@NotNull public @NotNull BuildLogger getBuildLogger()
- Specified by:
getBuildLoggerin interfaceProcessContext- Returns:
- a build logger for current executable.
-
getResultKey
@NotNull public @NotNull ResultKey getResultKey()
- Specified by:
getResultKeyin interfaceProcessContext- Returns:
- result key of current execution
-
getJobDisplayName
@NotNull public @NotNull String getJobDisplayName()
- Specified by:
getJobDisplayNamein interfaceProcessContext- Returns:
- display name of job or environment being executed
-
getTaskDescription
@NotNull public @NotNull String getTaskDescription()
- Specified by:
getTaskDescriptionin interfaceProcessContext- Returns:
- current task description or empty string if none
-
getVariableContext
@NotNull public @NotNull VariableContext getVariableContext()
- Specified by:
getVariableContextin interfaceProcessContext- Returns:
- variable context of current execution
-
getTaskId
public long getTaskId()
Description copied from interface:ProcessContextReturns 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:
getTaskIdin interfaceProcessContext
-
getTaskPluginKey
@NotNull public @NotNull String getTaskPluginKey()
- Specified by:
getTaskPluginKeyin interfaceProcessContext- Returns:
- plugin key of current task or an empty string if none
-
getCommonContext
@NotNull public @NotNull CommonContext getCommonContext()
- Specified by:
getCommonContextin interfaceProcessContext- Returns:
- execution context of current job/environment
-
getTaskContext
@Nullable public @Nullable CommonTaskContext getTaskContext()
- Specified by:
getTaskContextin interfaceProcessContext- Returns:
- current task context or null if not in task context
-
getEnvironment
@NotNull public @NotNull Map<String,String> getEnvironment()
- Specified by:
getEnvironmentin interfaceProcessContext- Returns:
- environment variables used for process execution
-
getPaths
@NotNull public @NotNull List<String> getPaths()
- Specified by:
getPathsin interfaceProcessContext- Returns:
- content of "PATH" variable used for process execution
-
getBuildKey
@NotNull public @NotNull BuildKey getBuildKey()
- Specified by:
getBuildKeyin interfaceProcessContext- Returns:
- unique key of the current context
-
decorateProcessCommand
@NotNull public @NotNull List<String> decorateProcessCommand(@NotNull @NotNull List<String> command)
Description copied from interface:ProcessContextModifies given command by executing command decorators available in the current context.- Specified by:
decorateProcessCommandin interfaceProcessContext- Returns:
-
isVerboseLoggingOn
public boolean isVerboseLoggingOn()
Description copied from interface:ProcessContextControls the amount of logging during the execution. Some of the logging is only output in verbose mode.- Specified by:
isVerboseLoggingOnin interfaceProcessContext- Returns:
- true if verbose logging is enabled.
-
-