Constructor
new BuilderNode(parent, processId, processArgsopt, processDescriptionopt, nullable, processNamespaceopt, nullable)
Creates a new process node for the builder.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
parent |
Builder | |||
processId |
string | |||
processArgs |
object.<string, *> |
<optional> |
{} | |
processDescription |
string |
<optional> <nullable> |
null | |
processNamespace |
string |
<optional> <nullable> |
null |
- Source:
Members
arguments :object.<string, *>
The arguments for the process.
Type:
- object.<string, *>
- Source:
id :string
The unique identifier for the node (not the process ID!).
Type:
- string
- Source:
namespace :string
The namespace of the process - EXPERIMENTAL!
Type:
- string
- Source:
parent :Builder
The parent builder.
Type:
- Source:
result :boolean
Is this the result node?
Type:
- boolean
- Source:
(readonly) spec :Process
The specification of the process associated with this node.
Type:
- Source:
Methods
addParametersToProcess(processArgs)
Checks the arguments given for parameters and add them to the process.
Parameters:
Name | Type | Description |
---|---|---|
processArgs |
object.<string, *> | Array |
- Source:
(protected) createBuilder(parentNodeopt, nullable, parentParameteropt, nullable) → {BuilderNode}
Creates a new Builder, usually for a callback.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
parentNode |
BuilderNode |
<optional> <nullable> |
null | |
parentParameter |
string |
<optional> <nullable> |
null |
- Source:
Returns:
- Type
- BuilderNode
description(description) → {string|BuilderNode}
Gets/Sets a description for the node.
Can be used in a variety of ways:
By default, this is a function:
node.description()
- Returns the description.
node.description("foo")
- Sets the description to "foo". Returns the node itself for method chaining.
You can also "replace" the function (not supported in TypeScript!),
then it acts as normal property and the function is not available any longer:
node.description = "foo"
- Sets the description to "foo".
Afterwards you can call node.description
as normal object property.
Parameters:
Name | Type | Description |
---|---|---|
description |
string | undefined | Optional: If given, set the value. |
- Source:
Returns:
- Type
- string | BuilderNode
(protected) exportArgument(arg, name) → {*}
Converts the given argument into something serializable...
Parameters:
Name | Type | Description |
---|---|---|
arg |
* | Argument |
name |
string | Parameter name |
- Source:
Returns:
- Type
- *
(protected) exportCallback(arg, name) → {object.<string, *>}
Returns the serializable process for the callback function given.
Parameters:
Name | Type | Description |
---|---|---|
arg |
function | callback function |
name |
string | Parameter name |
- Source:
Throws:
Returns:
- Type
- object.<string, *>
namedArguments(processArgs) → {object.<string, *>}
Converts a sorted array of arguments to an object with the respective parameter names.
Parameters:
Name | Type | Description |
---|---|---|
processArgs |
Array.<object.<string, *>> |
- Source:
Throws:
Returns:
- Type
- object.<string, *>
ref() → {FromNode}
Returns the reference object for this node.
- Source:
Returns:
- Type
- FromNode
toJSON() → {object.<string, *>}
Returns a JSON serializable representation of the data that is API compliant.
- Source:
Returns:
- Type
- object.<string, *>