Class WidgetSocketUtils
- java.lang.Object
-
- com.hybris.cockpitng.core.util.impl.WidgetSocketUtils
-
public final class WidgetSocketUtils extends java.lang.ObjectUtility 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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<WidgetSocket>getAllInputs(Widget widget, WidgetDefinition definition)Returns all input sockets for the given widget.static java.util.List<WidgetSocket>getAllOutputs(Widget widget, WidgetDefinition definition)Returns all output sockets for the given widget.static WidgetSocketgetOutputSocketWithId(Widget widget, WidgetDefinition definition, java.lang.String socketOutputId)Returns WidgetSocket instance with given socketOutputId from widget.static booleanhasOutputSocketWithId(Widget widget, WidgetDefinition definition, java.lang.String socketOutputId)
-
-
-
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 fordefinition- 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 fordefinition- 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 iddefinition- the widget definitionsocketOutputId- 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.
-
-