Package com.ibm.dbb.task.variables
Interface TypableVariable
-
- All Known Implementing Classes:
AbstractVariables,BuildContext,TaskVariables
public interface TypableVariable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.BooleangetBooleanVariable(java.lang.String key)Retrieves the first match for the specified key or null if there is no match and casts it to a Boolean type.default java.lang.BooleangetBooleanVariable(java.lang.String key, java.lang.Boolean defaultValue)Retrieves the first match for the specified key or the default value if there is no match and casts it to a Boolean type.default BuildGroupgetBuildGroup(java.lang.String key)Retrieves the first match for the specified key or null if there is no match and casts it to a BuildGroup type.default BuildResultgetBuildResult(java.lang.String key)Retrieves the first match for the specified key or null if there is no match and casts it to a BuildResult type.default org.apache.commons.cli.CommandLinegetCommandLine(java.lang.String key)Retrieves the first match for the specified key or null if there is no match and casts it to a CommandLine type.default java.lang.DoublegetDoubleVariable(java.lang.String key)Retrieves the first match for the specified key or null if there is no match and casts it to a Double type.default java.lang.DoublegetDoubleVariable(java.lang.String key, java.lang.Double defaultValue)Retrieves the first match for the specified key or the default value if there is no match and casts it to a Double type.default java.lang.IntegergetIntegerVariable(java.lang.String key)Retrieves the first match for the specified key or null if there is no match and casts it to a Integer type.default java.lang.IntegergetIntegerVariable(java.lang.String key, java.lang.Integer defaultValue)Retrieves the first match for the specified key or the default value if there is no match and casts it to a Integer type.default java.util.List<java.lang.String>getListStringVariable(java.lang.String key)Retrieves the first match for the specified key or null if there is no match and casts it to a Listtype. default java.util.List<java.lang.String>getListStringVariable(java.lang.String key, java.util.List<java.lang.String> defaultValue)Retrieves the first match for the specified key or the default value if there is no match and casts it to a Listtype. default java.util.List<java.lang.Object>getListVariable(java.lang.String key)Retrieves the first match for the specified key or null if there is no match and casts it to a Listdefault java.util.List<java.lang.Object>getListVariable(java.lang.String key, java.util.List<java.lang.Object> defaultValue)Retrieves the first match for the specified key or the default value if there is no match and casts it to a Listdefault java.util.Map<java.lang.String,java.lang.Object>getMapVariable(java.lang.String key)Retrieves the first match for the specified key or null if there is no match and casts it to a Maptype. default java.util.Map<java.lang.String,java.lang.Object>getMapVariable(java.lang.String key, java.util.Map<java.lang.String,java.lang.Object> defaultValue)Retrieves the first match for the specified key or the default value if there is no match and casts it to a Maptype. default java.util.Set<java.lang.String>getSetStringVariable(java.lang.String key)Retrieves the first match for the specified key or null if there is no match and casts it to a Settype. default java.util.Set<java.lang.String>getSetStringVariable(java.lang.String key, java.util.Set<java.lang.String> defaultValue)Retrieves the first match for the specified key or the default value if there is no match and casts it to a Settype. default java.util.Set<java.lang.Object>getSetVariable(java.lang.String key)Retrieves the first match for the specified key or null if there is no match and casts it to a Setdefault java.lang.StringgetStringVariable(java.lang.String key)Retrieves the first match for the specified key or null if there is no match and casts it to a String type.default java.lang.StringgetStringVariable(java.lang.String key, java.lang.String defaultValue)Retrieves the first match for the specified key or the default value if there is no match and casts it to a String type.java.lang.ObjectgetVariable(java.lang.String key)Retrieves the first match for the specified key or null if there is no match found.
-
-
-
Method Detail
-
getVariable
java.lang.Object getVariable(java.lang.String key) throws BuildExceptionRetrieves the first match for the specified key or null if there is no match found.- Parameters:
key- the key to match.- Returns:
- Object or null if no match is found.
- Throws:
BuildException
-
getBooleanVariable
default java.lang.Boolean getBooleanVariable(java.lang.String key, java.lang.Boolean defaultValue) throws BuildExceptionRetrieves the first match for the specified key or the default value if there is no match and casts it to a Boolean type. Replacing all references in the process.- Parameters:
key- the key to match.defaultValue- the default value to return if there is no match.- Returns:
- Boolean or defaultValue if no match is found.
- Throws:
BuildException- if the typecast fails
-
getBooleanVariable
default java.lang.Boolean getBooleanVariable(java.lang.String key) throws BuildExceptionRetrieves the first match for the specified key or null if there is no match and casts it to a Boolean type. Replacing all references in the process.- Parameters:
key- the key to match.- Returns:
- Boolean or null if no match is found.
- Throws:
BuildException- if the typecast fails
-
getStringVariable
default java.lang.String getStringVariable(java.lang.String key, java.lang.String defaultValue) throws BuildExceptionRetrieves the first match for the specified key or the default value if there is no match and casts it to a String type. Replacing all references in the process.- Parameters:
key- the key to match.defaultValue- the default value to return if there is no match.- Returns:
- String or defaultValue if no match is found.
- Throws:
BuildException- if the typecast fails
-
getStringVariable
default java.lang.String getStringVariable(java.lang.String key) throws BuildExceptionRetrieves the first match for the specified key or null if there is no match and casts it to a String type. Replacing all references in the process.- Parameters:
key- the key to match.- Returns:
- String or null if no match is found.
- Throws:
BuildException- if the typecast fails
-
getIntegerVariable
default java.lang.Integer getIntegerVariable(java.lang.String key, java.lang.Integer defaultValue) throws BuildExceptionRetrieves the first match for the specified key or the default value if there is no match and casts it to a Integer type. Replacing all references in the process.- Parameters:
key- the key to match.defaultValue- the default value to return if there is no match.- Returns:
- Integer or defaultValue if no match is found.
- Throws:
BuildException- if the typecast fails
-
getIntegerVariable
default java.lang.Integer getIntegerVariable(java.lang.String key) throws BuildExceptionRetrieves the first match for the specified key or null if there is no match and casts it to a Integer type. Replacing all references in the process.- Parameters:
key- the key to match.- Returns:
- Integer or null if no match is found.
- Throws:
BuildException- if the typecast fails
-
getDoubleVariable
default java.lang.Double getDoubleVariable(java.lang.String key, java.lang.Double defaultValue) throws BuildExceptionRetrieves the first match for the specified key or the default value if there is no match and casts it to a Double type. Replacing all references in the process.- Parameters:
key- the key to match.defaultValue- the default value to return if there is no match.- Returns:
- Double or defaultValue if no match is found.
- Throws:
BuildException- if the typecast fails
-
getDoubleVariable
default java.lang.Double getDoubleVariable(java.lang.String key) throws BuildExceptionRetrieves the first match for the specified key or null if there is no match and casts it to a Double type. Replacing all references in the process.- Parameters:
key- the key to match.- Returns:
- Double or null if no match is found.
- Throws:
BuildException- if the typecast fails
-
getListVariable
default java.util.List<java.lang.Object> getListVariable(java.lang.String key, java.util.List<java.lang.Object> defaultValue) throws BuildExceptionRetrieves the first match for the specified key or the default value if there is no match and casts it to a List- Parameters:
key- the key to match.defaultValue- the default value to return if there is no match.- Returns:
- List
- Throws:
BuildException- if the typecast fails
-
getListVariable
default java.util.List<java.lang.Object> getListVariable(java.lang.String key) throws BuildExceptionRetrieves the first match for the specified key or null if there is no match and casts it to a List- Parameters:
key- the key to match.- Returns:
- List
- Throws:
BuildException- if the typecast fails
-
getListStringVariable
default java.util.List<java.lang.String> getListStringVariable(java.lang.String key, java.util.List<java.lang.String> defaultValue) throws BuildExceptionRetrieves the first match for the specified key or the default value if there is no match and casts it to a Listtype. Replacing all references in the process. - Parameters:
key- the key to match.defaultValue- the default value to return if there is no match.- Returns:
- List
or defaultValue if no match is found. - Throws:
BuildException- if the typecast fails
-
getListStringVariable
default java.util.List<java.lang.String> getListStringVariable(java.lang.String key) throws BuildExceptionRetrieves the first match for the specified key or null if there is no match and casts it to a Listtype. Replacing all references in the process. - Parameters:
key- the key to match.- Returns:
- List
or null if no match is found. - Throws:
BuildException- if the typecast fails
-
getSetVariable
default java.util.Set<java.lang.Object> getSetVariable(java.lang.String key) throws BuildExceptionRetrieves the first match for the specified key or null if there is no match and casts it to a Set- Parameters:
key- the key to match.- Returns:
- Set
- Throws:
BuildException- if the typecast fails
-
getSetStringVariable
default java.util.Set<java.lang.String> getSetStringVariable(java.lang.String key, java.util.Set<java.lang.String> defaultValue) throws BuildExceptionRetrieves the first match for the specified key or the default value if there is no match and casts it to a Settype. Replacing all references in the process. - Parameters:
key- the key to match.defaultValue- the default value to return if there is no match.- Returns:
- Set
or defaultValue if no match is found. - Throws:
BuildException- if the typecast fails
-
getSetStringVariable
default java.util.Set<java.lang.String> getSetStringVariable(java.lang.String key) throws BuildExceptionRetrieves the first match for the specified key or null if there is no match and casts it to a Settype. Replacing all references in the process. - Parameters:
key- the key to match.- Returns:
- Set
or null if no match is found. - Throws:
BuildException- if the typecast fails
-
getMapVariable
default java.util.Map<java.lang.String,java.lang.Object> getMapVariable(java.lang.String key, java.util.Map<java.lang.String,java.lang.Object> defaultValue) throws BuildExceptionRetrieves the first match for the specified key or the default value if there is no match and casts it to a Maptype. Replacing all references in the process. - Parameters:
key- the key to match.defaultValue- the default value to return if there is no match.- Returns:
- Map
or defaultValue if no match is found. - Throws:
BuildException- if the typecast fails
-
getMapVariable
default java.util.Map<java.lang.String,java.lang.Object> getMapVariable(java.lang.String key) throws BuildExceptionRetrieves the first match for the specified key or null if there is no match and casts it to a Maptype. Replacing all references in the process. - Parameters:
key- the key to match.- Returns:
- Map
or null if no match is found. - Throws:
BuildException- if the typecast fails
-
getBuildResult
default BuildResult getBuildResult(java.lang.String key) throws BuildException
Retrieves the first match for the specified key or null if there is no match and casts it to a BuildResult type.- Parameters:
key- the key to match.- Returns:
- BuildResult or null if no match is found.
- Throws:
BuildException- if the typecast fails
-
getBuildGroup
default BuildGroup getBuildGroup(java.lang.String key) throws BuildException
Retrieves the first match for the specified key or null if there is no match and casts it to a BuildGroup type.- Parameters:
key- the key to match.- Returns:
- BuildGroup or null if no match is found.
- Throws:
BuildException- if the typecast fails
-
getCommandLine
default org.apache.commons.cli.CommandLine getCommandLine(java.lang.String key) throws BuildExceptionRetrieves the first match for the specified key or null if there is no match and casts it to a CommandLine type.- Parameters:
key- the key to match.- Returns:
- CommandLine or null if no match is found.
- Throws:
BuildException- if the typecast fails
-
-