Detailed Description
A PipelineBuilder generates a Pipeline object Before construction of the Pipeline, FlowElements are added to it There are also options for how JavaScript is output from the Pipeline.
- Examples
- pipelines.js.
Public Member Functions | |
| constructor (settings={}) | |
| Constructor for pipeline builder. | |
| buildFromConfigurationFile (configPath) | |
| Helper that loads a JSON configuration file from the filesystem and calls pipelineBuilder.buildFromConfiguration. | |
| buildFromConfiguration (config) | |
| Create a pipeline from a JSON configuration. | |
| addRequiredElements (flowElements) | |
| Add required elements to an existing FlowElement array. | |
| getJavaScriptElements () | |
| Internal function used to first check if the JavaScript elements should be added to the pipeline and add them if requested. | |
| getHttpElements () | |
| Internal function used to first check if the HTTP elements should be added to the pipeline and add them if requested. | |
| add (flowElement) | |
| Add a single flowElement to be executed in series. | |
| addParallel (flowElements) | |
| Add an array of flowElements to be executed in parallel. | |
| build () | |
| Build the pipeline from the flowElements that have been added. | |
Member Function Documentation
◆ add()
|
inline |
Add a single flowElement to be executed in series.
- Parameters
-
{FlowElement} flowElement flowElement to add to the Pipeline
- Returns
- {PipelineBuilder} Pipeline builder for easy chaining
- Examples
- pipelines.js.
◆ addParallel()
|
inline |
Add an array of flowElements to be executed in parallel.
- Parameters
-
{FlowElement[]} flowElements array of FlowElements to add to the Pipeline (to be exeuted in parallel)
- Returns
- {PipelineBuilder} Pipeline builder for easy chaining
- Examples
- pipelines.js.
◆ addRequiredElements()
|
inline |
Add required elements to an existing FlowElement array.
- Parameters
-
{FlowElement[]} flowElements array of elements to add to
- Returns
- {FlowElement[]} resulting array with required elements
◆ build()
|
inline |
◆ buildFromConfiguration()
|
inline |
Create a pipeline from a JSON configuration.
- Parameters
-
{object} config a JSON configuration object
- Returns
- {Pipeline} the constructed pipeline
◆ buildFromConfigurationFile()
|
inline |
Helper that loads a JSON configuration file from the filesystem and calls pipelineBuilder.buildFromConfiguration.
- Parameters
-
{string} configPath path to a JSON configuration file
- Returns
- {Pipeline} the constructed pipeline
◆ constructor()
|
inline |
Constructor for pipeline builder.
- Parameters
-
{object} settings settings for the pipeline being constructed {boolean} settings.addJavaScriptBuilder Whether to automatically add the JSONBundler, JavaScriptBuilder and Sequence elements needed to output JavaScript from the system and generate an endpoint for fetching the properties generated by a pipeline from the client side. This is true by default. {boolean} settings.useSetHeaderProperties Whether to automatically add the SetHeadersElement needed to request additional HTTP headers from the client side. This is true by default. {typeof import('./javascriptbuilder').prototype.settings} settings.javascriptBuilderSettings The settings to pass to the JavaScriptBuilder. See JavaScriptBuilder class for details.
@type {FlowElement[]}
◆ getHttpElements()
|
inline |
Internal function used to first check if the HTTP elements should be added to the pipeline and add them if requested.
- Returns
- {FlowElement[]} list of HTTP related FlowElements
◆ getJavaScriptElements()
|
inline |
Internal function used to first check if the JavaScript elements should be added to the pipeline and add them if requested.
- Returns
- {FlowElement[]} list of JavaScript related FlowElements
