Class WidgetSocketUtils


  • public final class WidgetSocketUtils
    extends java.lang.Object
    Utility class to get the list of all widget sockets - those from the widget definition as well as the virtual ones defined on the widget.
    • Method Detail

      • getAllInputs

        public static java.util.List<WidgetSocket> getAllInputs​(Widget widget,
                                                                WidgetDefinition definition)
        Returns all input sockets for the given widget. Includes input sockets from the widget definition as well as the virtual ones defined on the widget.
        Parameters:
        widget - the widget to get all input sockets for
        definition - the widget definition
        Returns:
        all input sockets for the given widget. Includes input sockets from the widget definition as well as the virtual ones defined on the widget.
      • getAllOutputs

        public static java.util.List<WidgetSocket> getAllOutputs​(Widget widget,
                                                                 WidgetDefinition definition)
        Returns all output sockets for the given widget. Includes output sockets from the widget definition as well as the virtual ones defined on the widget.
        Parameters:
        widget - the widget to get all output sockets for
        definition - the widget definition
        Returns:
        all output sockets for the given widget. Includes output sockets from the widget definition as well as the virtual ones defined on the widget.
      • hasOutputSocketWithId

        public static boolean hasOutputSocketWithId​(Widget widget,
                                                    WidgetDefinition definition,
                                                    java.lang.String socketOutputId)
        Parameters:
        widget - the widget to get the output socket with a specific id
        definition - the widget definition
        socketOutputId - the socket output id to verify
        Returns:
      • getOutputSocketWithId

        public static WidgetSocket getOutputSocketWithId​(Widget widget,
                                                         WidgetDefinition definition,
                                                         java.lang.String socketOutputId)
        Returns WidgetSocket instance with given socketOutputId from widget. Returns null if no instance found.
        Parameters:
        widget -
        definition -
        socketOutputId -
        Returns:
        WidgetSocket instance with given socketOutputId from widget. Returns null if no instance found.