|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CustomVariableContext
Bean maintaining ThreadLocal
state of available variables.
The state contains (if applicable):
- current Plan
- variable definitions (including Plan variables when applicable)
- BuildContext
- BuildLogger
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.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 buildContext. |
java.lang.String |
removeAllVariables(java.lang.String unparsedString)
Given a string, remove all variable patterns. |
void |
setBuildContext(BuildContext buildContext)
Set buildContext 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. |
Method Detail |
---|
void addCustomData(java.lang.String key, java.lang.String value)
VariableType.MANUAL
variable to ThreadLocal
state.
key
- name of the variablevalue
- value of the variable@Nullable java.lang.String substituteString(@Nullable java.lang.String value)
ThreadLocal
state.
value
- input string
@Nullable java.lang.String substituteString(@Nullable java.lang.String value, @Nullable BuildContext buildContext, @Nullable BuildLogger buildLogger)
ThreadLocal
state.
value
- input stringbuildContext
- build contextbuildLogger
- build logger
@NotNull java.util.Map<java.lang.String,java.lang.String> getVariables(@Nullable BuildContext buildContext)
buildContext
-
@NotNull java.lang.String removeAllVariables(@NotNull java.lang.String unparsedString)
unparsedString
- string values to be analyzed
@NotNull java.util.Map<java.lang.String,VariableSubstitutionContext> getSubstitutedVariables()
void setBuildContext(BuildContext buildContext)
ThreadLocal
state.
Sets the variable definitions to those contained in the context.
BuildContext has priority over Plan when resolving the variables.
buildContext
- void clearContext()
ThreadLocal
state.
void setPlan(@NotNull PlanIdentifier planIdentifier, @Nullable java.util.Map<java.lang.String,VariableDefinitionContext> variablesContextMap)
ThreadLocal
state.
Clears history of substituted variables (getSubstitutedVariables()
planIdentifier
- plan identifiervariablesContextMap
- variable definitions (including plan variables)void setVariables(java.util.Map<java.lang.String,VariableDefinitionContext> variablesContextMap)
ThreadLocal
state.
Clears history of substituted variables (getSubstitutedVariables()
variablesContextMap
- variable definitions
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |