Interface IClientHandlerService

  • All Known Implementing Classes:
    ClientHandlerLocatorBean

    public interface IClientHandlerService
    Interface for an object that is able to locate the resources required by a flowchart element (node or trigger). An instance of this interface is usually passed to the FlowchartBase.getClientHandlerService() attribute. This is used to load the client side resources dynamically as new node and trigger types are added to the flowchart.

    Note on JavaScript resources: The JavaScript is executed in a local function scope. The variable Flowchart is available in that scope and contains the public client-side API of the flowchart. The JavaScript must (synchronously!) register the appropriate node and trigger handlers via Flowchart.registerNode(nodeKind, nodeHandler) and Flowchart.registerTrigger(eventName, triggerHandler).

    Note on CSS resources: The CSS resources are added globally to the current document.

    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • getNodeResources

        FlowchartElementResource getNodeResources​(Set<String> nodeTypes,
                                                  Set<String> triggerTypes)
                                           throws IOException
        Finds the JavaScript and CSS resources required by the given nodes and trigger. When more than one node or trigger is given, the individual JavaScript and CSS resources should be concatenated together.
        Parameters:
        nodeTypes - List of node types for which resources are required.
        triggerTypes - List of node types for which resources are required.
        Returns:
        The JavaScript and CSS resources required by the given nodes and triggers.
        Throws:
        IOException - When the resources could not be retrieved.