\r\n

51Degrees Pipeline Python  4.4

51Degrees Pipeline for Python

fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement Class Reference

Detailed Description

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.

Inheritance diagram for fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement:

[legend]

Collaboration diagram for fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement:

[legend]

Public Member Functions

def  __init__ (self, settings={})
JavaScriptBuilder constructor. More...
def  get_evidence_key_filter (self)
The JavaScriptBuilder captures query string evidence and headers for detecting whether the request is http or https. More...
def  process_internal (self, flowdata)
The JavaScriptBundler collects client side javascript to serve. More...

Public Member Functions inherited from fiftyone_pipeline_core.flowelement.FlowElement

def  __init__ (self)
List of Pipelines the FlowElement has been added to. More...
def  process (self, flowdata)
Function for getting the FlowElement's EvidenceKeyFilter Used by the filterEvidence method. More...
def  on_registration (self, pipeline)
Function called when an element is added to the pipeline. More...
def  filter_evidence (self, flowdata)
Filter FlowData evidence using the FlowElement's EvidenceKeyFilter. More...
def  filter_evidence_key (self, key)
Filter FlowData.evidence using the flowElement's EvidenceKeyFilter with the property key of evidence of interest. More...
def  get_properties (self)

Public Attributes

 minify
 datakey
 exclude_from_messages
 template

Public Attributes inherited from fiftyone_pipeline_core.flowelement.FlowElement

 pipelines  properties  datakey  exclude_from_messages

Constructor & Destructor Documentation

◆ __init__()

def fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement.__init__ (   self,
  settings = {}  
)

JavaScriptBuilder constructor.

  • Parameters
    {dict} - options options object
  • Parameters
    {string} - options.obj_name the name of the client
  • side object with the JavaScript properties in it ('fod' by default)
  • Parameters
    {string} - options.protocol The protocol ("http" or "https")
  • used by the client side callback url.
  • This can be overriden with header.protocol evidence
  • Parameters
    {string} - options.host The host of the client side
  • callback url. This can be overriden with header.host evidence.
  • Parameters
    {string} - options.endpoint The endpoint of the client side
  • callback url
  • Parameters
    {boolean} - options.enable_cookies whether cookies should be enabled
  • Parameters
    {boolean} - options.minify Whether to minify the JavaScript

Member Function Documentation

◆ get_evidence_key_filter()

def fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement.get_evidence_key_filter (   self )

The JavaScriptBuilder captures query string evidence and headers for detecting whether the request is http or https.

Reimplemented from fiftyone_pipeline_core.flowelement.FlowElement.

◆ process_internal()

def fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement.process_internal (   self,
  flowdata  
)

The JavaScriptBundler collects client side javascript to serve.

@type flowdata: FlowData

Parameters
flowdata - The FlowData

Reimplemented from fiftyone_pipeline_core.flowelement.FlowElement.

Member Data Documentation

◆ datakey

fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement.datakey

◆ exclude_from_messages

fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement.exclude_from_messages

◆ minify

fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement.minify

◆ settings

fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement.settings

◆ template

fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement.template
On This Page