The JavaScriptBuilder aggregates JavaScript properties from FlowElements in the pipeline.
This JavaScript also (when needed) generates a fetch request to retrieve additional properties populated with data from the client side It depends on the JSON Bundler element (both are automatically added to a pipeline unless specifically removed) for its list of properties. The results of the JSON Bundler should also be used in a user-specified endpoint which retrieves the JSON from the client side. The JavaScriptBuilder is constructed with a url for this endpoint.
|
| | constructor ({ objName='fod', protocol='', host='', endPoint='', enableCookies=true, minify=false }={}) |
| | Constructor for JavaScriptBuilder.
|
| | processInternal (flowData) |
| | Internal process function of the JavaScript builder Gets JSON from the JSONBundler and constructs JavaScript to place on the client side.
|
| | constructor ({ processInternal, dataKey, properties={}, evidenceKeyFilter }={}) |
| | Constructor for flowElement class.
|
| | onRegistration (pipeline, flowElement) |
| | Internal function to be called when a FlowElement is added to pipeline, runs through any registrationCallbacks on the FlowElement.
|
| | ready () |
| | Function called to check if a FlowElement is ready Used when there are asynchronous initialisation steps.
|
| | processInternal (flowData) |
| | Internal process function for a particular flowElement called (via the flowElement.process() method) when flowData generated by a pipleline is processsed.
|
| | process (flowData) |
| | To allow actions to take place before and after a FlowElement's processInternal function runs, a process wrapper is run first.
|
| | updateProperties () |
| | Call this function to update the properties meta database in all the pipelines this flowElement has been added to.
|
| | getProperties () |
| | Get a flowElement's properties.
|
| | _log (type, message) |
| | Internal log.
|
| JavaScriptBuilderElement::constructor |
( |
| { objName='fod', protocol='', host='', endPoint='', enableCookies=true, minify=false } = {} | ) |
|
|
inline |
Constructor for JavaScriptBuilder.
- Parameters
-
| {object} | options options object |
| {string} | options.objName the name of the client side object with the JavaScript properties in it |
| {string} | options.protocol The protocol ("http" or "https") used by the client side callback url. This can be overriden with header.protocol evidence |
| {string} | options.host The host of the client side callback url. This can be overriden with header.host evidence. |
| {string} | options.endPoint The endpoint of the client side callback url |
| {boolean} | options.enableCookies Whether the client JavaScript stored results of client side processing in cookies. This can also be set per request, using the "query.fod-js-enable-cookies" evidence key. For more details on personal data policy, see /terms/client-services-privacy-policy/ |
| {boolean} | options.minify Whether to minify the JavaScript |
| JavaScriptBuilderElement::processInternal |
( |
| flowData | ) |
|
|
inline |
Internal process function of the JavaScript builder Gets JSON from the JSONBundler and constructs JavaScript to place on the client side.
- Parameters
-
| {FlowData} | flowData to process |
- Returns
- {undefined}