51Degrees Pipeline Node.js  4.1

51Degrees Pipeline for Node.js

PipelineBuilder Class Reference

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. More...
 buildFromConfigurationFile (configPath)
Helper that loads a JSON configuration file from the filesystem and calls pipelineBuilder.buildFromConfiguration. More...
 buildFromConfiguration (config)
Create a pipeline from a JSON configuration. More...
 getJavaScriptElements ()
Internal function used to first check if the JavaScript elements should be added to the pipeline and add them if requested. More...
 add (flowElement)
Add a single flowElement to be executed in series. More...
 addParallel (flowElements)
Add an array of flowElements to be executed in parallel. More...
 build ()
Build the pipeline from the flowElements that have been added. More...

Member Function Documentation

◆ add()

PipelineBuilder::add (   flowElement )
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()

PipelineBuilder::addParallel (   flowElements )
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.

◆ build()

PipelineBuilder::build ( )
inline

Build the pipeline from the flowElements that have been added.

Returns
{Pipeline} The constructed Pipeline

◆ buildFromConfiguration()

PipelineBuilder::buildFromConfiguration (   config )
inline

Create a pipeline from a JSON configuration.

Parameters
{object} - config a JSON configuration object
Returns
{Pipeline} the constructed pipeline

◆ buildFromConfigurationFile()

PipelineBuilder::buildFromConfigurationFile (   configPath )
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()

PipelineBuilder::constructor (   settings = {} )
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.
{object} - settings.javascriptBuilderSettings The settings to pass to the JavaScriptBuilder. See JavaScriptBuilder class for details.

◆ getJavaScriptElements()

PipelineBuilder::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