Package com.xebialabs.xlrelease.variable
Class VariableHelper
java.lang.Object
com.xebialabs.xlrelease.variable.VariableHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckVariable(Variable variable) static voidcheckVariableIdsAreTheSame(String requestVariableId, String bodyVariableId) static voidcheckVariables(List<Variable> variables) static VariablecloneVariable(Variable variable, String newKey) collectVariables(Object input) static scala.collection.immutable.Set<String> collectVariablesFromValue(Object value) static voidcollectVariablesInScope(Map<String, Variable> allUsedVariablesMap, Map<String, Variable> scope, String variableKeyToResolve) static booleancontainsOnlyVariable(String input) static booleancontainsVariables(String input) fillVariableValues(List<Variable> target, List<Variable> source) filterOutBlankStringVariables(Map<String, String> variables) static Map<String, ValueWithInterpolation> filterOutBlankValues(Map<String, ValueWithInterpolation> variables) static StringformatVariableIfNeeded(String variableName) static StringfreezeUnresolvedVariable(String input, String variableName) getAllReleaseVariablesByKeys(Release release) static Map<String, PasswordStringVariable> getExternalVariables(List<Variable> variables) static Map<String, PasswordStringVariable> getUsedExternalPasswordVariables(Release release) getUsedStringVariables(PlanItem planItem) indexByKey(List<Variable> variables) static booleanisCiPropertyVariable(String variableName) Shows if a variable looks like a ${release.something}.static booleanisFolderVariable(String variableName) static booleanisGlobalOrFolderVariable(String variableName) static booleanisGlobalVariable(String variableName) static booleanstatic StringreplaceAll(String raw, Map<String, String> replacements) static <T> TreplaceAll(T raw, Map<String, String> replacements, Set<String> unresolvedVariables, boolean freezeEvenIfUnresolved) static <T> TreplaceAllWithInterpolation(T raw, Map<String, ValueWithInterpolation> replacements, Set<String> unresolvedVariables, boolean freezeEvenIfUnresolved) static StringsafeReplace(String input, String key, String replacement) static Stringstatic Patternstatic StringwithoutVariableSyntax(String variableKey) static StringwithVariableSyntax(String variableName)
-
Constructor Details
-
VariableHelper
public VariableHelper()
-
-
Method Details
-
VARIABLE_NAME_PATTERN
-
safeReplace
-
isCiPropertyVariable
Shows if a variable looks like a ${release.something}. Note that it will return "true" also for names like ${release.custom} for whichcom.xebialabs.xlrelease.domain.variables.reference.ReleasePropertyVariableKey.isReleasePropertyVariableKey()would return "false". We discourage using such variables but they may exist in older installations.- Parameters:
variableName- (undocumented)- Returns:
- (undocumented)
-
isGlobalVariable
-
isFolderVariable
-
isGlobalOrFolderVariable
-
containsVariables
-
formatVariableIfNeeded
-
containsOnlyVariable
-
withVariableSyntax
-
withoutVariableSyntax
-
checkVariable
-
checkVariables
-
getExternalVariables
-
indexByKey
-
checkVariableIdsAreTheSame
-
isGlobalVariableId
-
fillVariableValues
-
cloneVariable
-
filterOutBlankStringVariables
-
filterOutBlankValues
public static Map<String,ValueWithInterpolation> filterOutBlankValues(Map<String, ValueWithInterpolation> variables) -
getAllReleaseVariablesByKeys
-
toString
-
replaceAll
-
replaceAll
-
replaceAllWithInterpolation
public static <T> T replaceAllWithInterpolation(T raw, Map<String, ValueWithInterpolation> replacements, Set<String> unresolvedVariables, boolean freezeEvenIfUnresolved) -
getVariableValuesAsStrings
-
getPasswordVariableValuesAsStrings
-
freezeUnresolvedVariable
-
collectVariables
-
collectVariablesFromValue
-
getUsedExternalPasswordVariables
-
getUsedStringVariables
-
collectVariablesInScope
-