|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.bamboo.variable.CustomVariableContextImpl
public class CustomVariableContextImpl
Constructor Summary | |
---|---|
CustomVariableContextImpl()
|
Method Summary | |
---|---|
void |
addCustomData(java.lang.String key,
java.lang.String value)
Adds a VariableType.MANUAL variable to ThreadLocal state. |
void |
clearContext()
Clear ThreadLocal state. |
java.util.Set<java.lang.String> |
findAllVariables(java.lang.String variable)
Given a string, and a Map of variables (variable -> value), all patterns in the string array
matching ${bamboo. |
java.util.Map<java.lang.String,VariableSubstitutionContext> |
getSubstitutedVariables()
Get all the variables that have previously been substituted in this thread. |
java.util.Map<java.lang.String,java.lang.String> |
getVariables(BuildContext buildContext)
Get all variables from context. |
java.util.Map<java.lang.String,java.lang.String> |
getVariables(CommonContext buildContext)
Get all variables from context. |
java.lang.String |
removeAllVariables(java.lang.String value)
Given a string array, remove all variable patterns. |
void |
setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor)
|
void |
setAgentContext(AgentContext agentContext)
|
void |
setBuildContext(BuildContext buildContext)
Set buildContext reference in ThreadLocal state. |
void |
setBuildDirectoryManager(BuildDirectoryManager buildDirectoryManager)
|
void |
setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
|
void |
setCapabilityContext(CapabilityContext capabilityContext)
|
void |
setCommonContext(CommonContext commonContext)
Set context reference in ThreadLocal state. |
void |
setPlan(PlanIdentifier planIdentifier,
java.util.Map<java.lang.String,VariableDefinitionContext> variablesContextMap)
Sets Plan reference and variable definitions in ThreadLocal state. |
void |
setVariables(java.util.Map<java.lang.String,VariableDefinitionContext> variablesContextMap)
Set variable definitions in ThreadLocal state. |
java.lang.String |
substituteString(java.lang.String value)
Substitutes variables in the input string with their values using data from existing ThreadLocal state. |
java.lang.String |
substituteString(java.lang.String value,
BuildContext buildContext,
BuildLogger buildLogger)
Substitutes variables in the input string with their values using provided data, i.e. |
java.lang.String |
substituteString(java.lang.String value,
CommonContext commonContext,
BuildLogger buildLogger)
Substitutes variables in the input string with their values using provided data, i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CustomVariableContextImpl()
Method Detail |
---|
public void setPlan(@NotNull PlanIdentifier planIdentifier, @Nullable java.util.Map<java.lang.String,VariableDefinitionContext> variablesContextMap)
CustomVariableContext
ThreadLocal
state.
Clears history of substituted variables (CustomVariableContext.getSubstitutedVariables()
setPlan
in interface CustomVariableContext
planIdentifier
- plan identifiervariablesContextMap
- variable definitions (including plan variables)public void setVariables(java.util.Map<java.lang.String,VariableDefinitionContext> variablesContextMap)
CustomVariableContext
ThreadLocal
state.
Clears history of substituted variables (CustomVariableContext.getSubstitutedVariables()
setVariables
in interface CustomVariableContext
variablesContextMap
- variable definitionspublic void setBuildContext(BuildContext buildContext)
CustomVariableContext
ThreadLocal
state.
Sets the variable definitions to those contained in the context.
BuildContext has priority over Plan when resolving the variables.
setBuildContext
in interface CustomVariableContext
public void setCommonContext(CommonContext commonContext)
CustomVariableContext
ThreadLocal
state.
Sets the variable definitions to those contained in the context.
context has priority over Plans and Deployment Jobs when resolving the variables.
setCommonContext
in interface CustomVariableContext
public void clearContext()
CustomVariableContext
ThreadLocal
state.
clearContext
in interface CustomVariableContext
@NotNull public java.util.Map<java.lang.String,VariableSubstitutionContext> getSubstitutedVariables()
CustomVariableContext
getSubstitutedVariables
in interface CustomVariableContext
public void addCustomData(java.lang.String key, java.lang.String value)
CustomVariableContext
VariableType.MANUAL
variable to ThreadLocal
state.
addCustomData
in interface CustomVariableContext
key
- name of the variablevalue
- value of the variablepublic java.lang.String substituteString(java.lang.String value)
CustomVariableContext
ThreadLocal
state.
substituteString
in interface CustomVariableContext
value
- input string
public java.lang.String substituteString(java.lang.String value, @Nullable CommonContext commonContext, BuildLogger buildLogger)
CustomVariableContext
ThreadLocal
state.
substituteString
in interface CustomVariableContext
value
- input stringcommonContext
- build contextbuildLogger
- build logger
@Nullable public java.lang.String substituteString(@Nullable java.lang.String value, @Nullable BuildContext buildContext, @Nullable BuildLogger buildLogger)
CustomVariableContext
ThreadLocal
state.
substituteString
in interface CustomVariableContext
value
- input stringbuildContext
- build contextbuildLogger
- build logger
@NotNull public java.lang.String removeAllVariables(@NotNull java.lang.String value)
removeAllVariables
in interface CustomVariableContext
value
- string values to be analyzed
@NotNull public java.util.Set<java.lang.String> findAllVariables(@Nullable java.lang.String variable)
Map
of variables (variable -> value), all patterns in the string array
matching ${bamboo.
findAllVariables
in interface CustomVariableContext
variable
- String value to be analyzed
@NotNull public java.util.Map<java.lang.String,java.lang.String> getVariables(@Nullable CommonContext buildContext)
CustomVariableContext
getVariables
in interface CustomVariableContext
buildContext
- Build or Deployment context
@NotNull public java.util.Map<java.lang.String,java.lang.String> getVariables(@Nullable BuildContext buildContext)
CustomVariableContext
getVariables
in interface CustomVariableContext
buildContext
- Build or Deployment context
public void setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
public void setCapabilityContext(CapabilityContext capabilityContext)
public void setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor)
public void setAgentContext(AgentContext agentContext)
public void setBuildDirectoryManager(BuildDirectoryManager buildDirectoryManager)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |