|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.process.EnvironmentVariableAccessorImpl
public class EnvironmentVariableAccessorImpl
Field Summary |
---|
Fields inherited from interface com.atlassian.bamboo.process.EnvironmentVariableAccessor |
---|
MAX_SAFE_ENVIRONMENT_LENGTH, MAX_SAFE_INDIVIDUAL_VARIABLE_LENGTH |
Constructor Summary | |
---|---|
EnvironmentVariableAccessorImpl(CapabilityContext capabilityContext)
|
Method Summary | |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
getEnvironment()
|
java.util.Map<java.lang.String,java.lang.String> |
getEnvironment(TaskContext taskContext)
Use TaskContext as a source of environment settings. |
java.util.List<java.lang.String> |
getPaths(TaskContext taskContext)
Use TaskContext as a source of additional PATH settings. |
java.lang.String |
joinEnvironmentVariables(java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>> environmentVariables)
Concatenate environment variables into string. |
java.lang.String |
joinEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environmentVariables)
Concatenate environment variables into string. |
java.util.Map<java.lang.String,java.lang.String> |
splitEnvironmentAssignments(java.lang.String environmentAssignments)
Splits "Environment settings" string into array of separate strings. |
java.util.Map<java.lang.String,java.lang.String> |
splitEnvironmentAssignments(java.lang.String environmentAssignments,
boolean processBackslashes)
Splits "Environment settings" string into array of separate strings. |
void |
validateEnvironmentVariables(java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>> environmentVariables)
Perform basic validation of environment settings before passing it to process-utils |
void |
validateEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environmentVariables)
Perform basic validation of environment settings before passing it to process-utils |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnvironmentVariableAccessorImpl(CapabilityContext capabilityContext)
Method Detail |
---|
@NotNull public java.util.Map<java.lang.String,java.lang.String> getEnvironment()
getEnvironment
in interface EnvironmentVariableAccessor
@NotNull public java.util.Map<java.lang.String,java.lang.String> getEnvironment(@NotNull TaskContext taskContext)
EnvironmentVariableAccessor
TaskContext
as a source of environment settings. The following variables will be returned
- variables for variable definitions from taskContext
- JAVA_HOME (if defined in task configuration and appropriate capability exists)
getEnvironment
in interface EnvironmentVariableAccessor
taskContext
- TaskContext
object
@NotNull public java.util.List<java.lang.String> getPaths(@NotNull TaskContext taskContext)
EnvironmentVariableAccessor
TaskContext
as a source of additional PATH settings. The following values might be returned
- $JAVA_HOME/bin (if defined in task configuration and appropriate capability exists)
getPaths
in interface EnvironmentVariableAccessor
taskContext
- TaskContext
object
@NotNull public java.lang.String joinEnvironmentVariables(@NotNull java.util.Map<java.lang.String,java.lang.String> environmentVariables)
EnvironmentVariableAccessor
joinEnvironmentVariables
in interface EnvironmentVariableAccessor
environmentVariables
- Map of key-value pairs to be concatenated
@NotNull public java.lang.String joinEnvironmentVariables(@NotNull java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>> environmentVariables)
EnvironmentVariableAccessor
joinEnvironmentVariables
in interface EnvironmentVariableAccessor
environmentVariables
- Map.Entry iterable of key-value pairs to be concatenated
@NotNull public java.util.Map<java.lang.String,java.lang.String> splitEnvironmentAssignments(@NotNull java.lang.String environmentAssignments, boolean processBackslashes)
EnvironmentVariableAccessor
splitEnvironmentAssignments
in interface EnvironmentVariableAccessor
environmentAssignments
- the string containing KEY=VALUE assignments separated with white charactersprocessBackslashes
- whether to treat a backslash as an ordinary or quoting character
@NotNull public java.util.Map<java.lang.String,java.lang.String> splitEnvironmentAssignments(@NotNull java.lang.String environmentAssignments)
EnvironmentVariableAccessor
splitEnvironmentAssignments
in interface EnvironmentVariableAccessor
environmentAssignments
- string containing KEY=VALUE assignments separated with white characters
public void validateEnvironmentVariables(@NotNull java.util.Map<java.lang.String,java.lang.String> environmentVariables)
EnvironmentVariableAccessor
validateEnvironmentVariables
in interface EnvironmentVariableAccessor
environmentVariables
- Map.Entry iterable of key-value pairs to be concatenatedpublic void validateEnvironmentVariables(@NotNull java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>> environmentVariables)
EnvironmentVariableAccessor
validateEnvironmentVariables
in interface EnvironmentVariableAccessor
environmentVariables
- Map.Entry iterable of key-value pairs to be concatenated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |