public class VariableContext
extends java.lang.Object
| Constructor | Description |
|---|---|
VariableContext() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
containsKey(java.lang.String name) |
Check if a variable is part of the context.
|
java.lang.String |
get(java.lang.String name) |
Returns the value of a variable, null values are replaced with "".
|
java.util.Set<java.lang.String> |
getExtraDataset(java.lang.String name) |
Returns the dataset referenced by the name.
|
java.lang.String |
getOriginal(java.lang.String name) |
|
boolean |
isImmutable(java.lang.String name) |
Checks if the provided variable is immutable.
|
VariableContext |
put(java.lang.String name,
java.lang.String value) |
Adds a variable with value to the context or overrides an already existing
one.
|
VariableContext |
putConditional(java.lang.String name,
MappingRuleConditionalVariable variable) |
This method is used to add a conditional variable to the variable context.
|
void |
putExtraDataset(java.lang.String name,
java.util.Set<java.lang.String> set) |
Adds a set to the context, each name can only be added once.
|
void |
putOriginal(java.lang.String name,
java.lang.String value) |
|
java.lang.String |
replacePathVariables(java.lang.String input) |
This method will consider the input as a queue path, which is a String
separated by dot ('.') characters.
|
java.lang.String |
replaceVariables(java.lang.String input) |
This method replaces all variables in the provided string.
|
VariableContext |
setImmutables(java.lang.String... variableNames) |
Can be used to provide an array of strings which contains the names of the
variables which should be immutable.
|
VariableContext |
setImmutables(java.util.Set<java.lang.String> variableNames) |
Can be used to provide a set which contains the name of the variables which
should be immutable.
|
public boolean isImmutable(java.lang.String name)
name - Name of the variable to checkpublic VariableContext setImmutables(java.util.Set<java.lang.String> variableNames)
variableNames - Set containing the names of the immutable variablesjava.lang.IllegalStateException - if the immutable set is already provided.public VariableContext setImmutables(java.lang.String... variableNames)
variableNames - Set containing the names of the immutable variablesjava.lang.IllegalStateException - if the immutable set is already provided.public VariableContext put(java.lang.String name, java.lang.String value)
name - Name of the variable to be added to the contextvalue - Value of the variablejava.lang.IllegalStateException - if the variable is immutable and already setpublic void putOriginal(java.lang.String name,
java.lang.String value)
public VariableContext putConditional(java.lang.String name, MappingRuleConditionalVariable variable)
name - Name of the variablevariable - The conditional variable evaluatorpublic java.lang.String get(java.lang.String name)
name - Name of the variablepublic java.lang.String getOriginal(java.lang.String name)
public void putExtraDataset(java.lang.String name,
java.util.Set<java.lang.String> set)
name - Name which can be used to reference the collectionset - The dataset to be storedpublic java.util.Set<java.lang.String> getExtraDataset(java.lang.String name)
name - Name of the set to be returned.public boolean containsKey(java.lang.String name)
name - Name of the variable to be checkedpublic java.lang.String replaceVariables(java.lang.String input)
input - The string with variablespublic java.lang.String replacePathVariables(java.lang.String input)
input - The string with variablesCopyright © 2008–2025 Apache Software Foundation. All rights reserved.