Class EnvironmentVariable.BulkBuilder
java.lang.Object
com.inductiveautomation.ignition.common.config.EnvironmentVariable.BulkBuilder
- Enclosing class:
- EnvironmentVariable
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for BulkBuilder.BulkBuilder
(Pattern envKeyPattern) Constructor for BulkBuilder that registers a single pattern. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a list of EnvironmentVariables with all the variables that match the supplied pattern.withCustom
(Consumer<EnvironmentVariable.Builder> builderFunction) Use this to apply variable logic to customize each Env Var Builder that is accumulated by the Bulk Builder.withPattern
(Pattern envKeyPattern) Use this to apply a regex pattern for matching environment variables to be retrieved.
-
Constructor Details
-
BulkBuilder
public BulkBuilder()Default constructor for BulkBuilder. You must register at least one pattern before calling build(). -
BulkBuilder
Constructor for BulkBuilder that registers a single pattern. You can register additional patterns withwithPattern(Pattern)
.- Parameters:
envKeyPattern
- RegEx Pattern object that will be used to match available Env Vars
-
-
Method Details
-
withPattern
Use this to apply a regex pattern for matching environment variables to be retrieved. You must have at least one registered pattern for this builder. The first pattern to match will include a given environment variable.- Parameters:
envKeyPattern
- RegEx Pattern object that will be used to match available Env Vars- Returns:
- BulkBuilder object
-
withCustom
public EnvironmentVariable.BulkBuilder withCustom(Consumer<EnvironmentVariable.Builder> builderFunction) Use this to apply variable logic to customize each Env Var Builder that is accumulated by the Bulk Builder. This might be useful if you are retrieving a set of EnvironmentVariables that may need different properties applied to their Builders.- Parameters:
builderFunction
- Custom Function that can apply additional customizations to EnvironmentVariable.Builder objects before build()- Returns:
- BulkBuilder object
-
build
Build a list of EnvironmentVariables with all the variables that match the supplied pattern.- Returns:
- List of resolved EnvironmentVariable objects
-