Class JavaScriptBuilderElement

  • All Implemented Interfaces:
    fiftyone.pipeline.core.flowelements.FlowElement<JavaScriptBuilderData,​fiftyone.pipeline.core.data.ElementPropertyMetaData>, AutoCloseable

    public class JavaScriptBuilderElement
    extends fiftyone.pipeline.core.flowelements.FlowElementBase<JavaScriptBuilderData,​fiftyone.pipeline.core.data.ElementPropertyMetaData>
    JavaScript Builder Element generates a JavaScript include to be run on the client device.
    See Also:
    Specification
    • Field Detail

      • endpoint

        protected String endpoint
      • protocol

        protected String protocol
      • contextRoot

        protected String contextRoot
      • objName

        protected final String objName
      • enableCookies

        protected final boolean enableCookies
    • Constructor Detail

      • JavaScriptBuilderElement

        public JavaScriptBuilderElement​(org.slf4j.Logger logger,
                                        fiftyone.pipeline.core.data.factories.ElementDataFactory<JavaScriptBuilderData> elementDataFactory,
                                        String endpoint,
                                        String objName,
                                        boolean enableCookies,
                                        String host,
                                        String protocol)
        Default constructor.
        Parameters:
        logger - The logger.
        elementDataFactory - The element data factory.
        endpoint - Set the endpoint which will be queried on the host. e.g /api/v4/json
        objName - The default name of the object instantiated by the client JavaScript.
        enableCookies - Set whether the client JavaScript stored results of client side processing in cookies.
        host - The host that the client JavaScript should query for updates. If null or blank then the host from the request will be used
        protocol - The protocol (HTTP or HTTPS) that the client JavaScript will use when querying for updates. If null or blank then the protocol from the request will be used
      • JavaScriptBuilderElement

        public JavaScriptBuilderElement​(org.slf4j.Logger logger,
                                        fiftyone.pipeline.core.data.factories.ElementDataFactory<JavaScriptBuilderData> elementDataFactory,
                                        String endpoint,
                                        String objName,
                                        boolean enableCookies,
                                        String host,
                                        String protocol,
                                        String contextRoot)
        Default constructor.
        Parameters:
        logger - The logger.
        elementDataFactory - The element data factory.
        endpoint - Set the endpoint which will be queried on the host. e.g /api/v4/json
        objName - The default name of the object instantiated by the client JavaScript.
        enableCookies - Set whether the client JavaScript stored results of client side processing in cookies.
        host - The host that the client JavaScript should query for updates. If null or blank then the host from the request will be used
        protocol - The protocol (HTTP or HTTPS) that the client JavaScript will use when querying for updates. If null or blank then the protocol from the request will be used
        contextRoot - The <context-root> setting from the web.xml. This is needed when creating the callback URL.
    • Method Detail

      • processInternal

        protected void processInternal​(fiftyone.pipeline.core.data.FlowData data)
                                throws Exception
        Specified by:
        processInternal in class fiftyone.pipeline.core.flowelements.FlowElementBase<JavaScriptBuilderData,​fiftyone.pipeline.core.data.ElementPropertyMetaData>
        Throws:
        Exception
      • getElementDataKey

        public String getElementDataKey()
        Specified by:
        getElementDataKey in interface fiftyone.pipeline.core.flowelements.FlowElement<JavaScriptBuilderData,​fiftyone.pipeline.core.data.ElementPropertyMetaData>
        Specified by:
        getElementDataKey in class fiftyone.pipeline.core.flowelements.FlowElementBase<JavaScriptBuilderData,​fiftyone.pipeline.core.data.ElementPropertyMetaData>
      • getEvidenceKeyFilter

        public fiftyone.pipeline.core.data.EvidenceKeyFilter getEvidenceKeyFilter()
        Specified by:
        getEvidenceKeyFilter in interface fiftyone.pipeline.core.flowelements.FlowElement<JavaScriptBuilderData,​fiftyone.pipeline.core.data.ElementPropertyMetaData>
        Specified by:
        getEvidenceKeyFilter in class fiftyone.pipeline.core.flowelements.FlowElementBase<JavaScriptBuilderData,​fiftyone.pipeline.core.data.ElementPropertyMetaData>
      • getProperties

        public List<fiftyone.pipeline.core.data.ElementPropertyMetaData> getProperties()
        Specified by:
        getProperties in interface fiftyone.pipeline.core.flowelements.FlowElement<JavaScriptBuilderData,​fiftyone.pipeline.core.data.ElementPropertyMetaData>
        Specified by:
        getProperties in class fiftyone.pipeline.core.flowelements.FlowElementBase<JavaScriptBuilderData,​fiftyone.pipeline.core.data.ElementPropertyMetaData>
      • managedResourcesCleanup

        protected void managedResourcesCleanup()
        Specified by:
        managedResourcesCleanup in class fiftyone.pipeline.core.flowelements.FlowElementBase<JavaScriptBuilderData,​fiftyone.pipeline.core.data.ElementPropertyMetaData>
      • unmanagedResourcesCleanup

        protected void unmanagedResourcesCleanup()
        Specified by:
        unmanagedResourcesCleanup in class fiftyone.pipeline.core.flowelements.FlowElementBase<JavaScriptBuilderData,​fiftyone.pipeline.core.data.ElementPropertyMetaData>