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:


Collaboration diagram for fiftyone_pipeline_core.javascriptbuilder.JavascriptBuilderElement:


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


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 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 http://51degrees.com/terms/client-services-privacy-policy/
  • 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,

The JavaScriptBundler collects client side javascript to serve.

@type flowdata: FlowData

flowdata - The FlowData

Reimplemented from fiftyone_pipeline_core.flowelement.FlowElement.

Member Data Documentation

◆ datakey


◆ exclude_from_messages


◆ minify


◆ settings


◆ template

On This Page