Package com.hybris.cockpitng.core
Interface SocketConnectionService
-
- All Known Implementing Classes:
DefaultSocketConnectionService
public interface SocketConnectionServiceProvides methods dealing with widget sockets and connections.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSOCKET_DATA_TYPE_PREFIX
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancanReceiveFrom(WidgetSocket inputSocket, Widget targetWidget, WidgetSocket outputSocket, Widget srcWidget)Checks if outputSocket from srcWidget can be connected with inputSocket from targetWidget according to data type.default booleancanResolveGenericType(WidgetSocket socket, Widget widget)Checks if the generic type for the specified socket and widget can be resolved to concrete type.booleancheckVisibilityRestrictions(WidgetSocket inputSocket, Widget targetWidget, WidgetSocket outputSocket, Widget srcWidget)Checks if outputSocket from srcWidget can be connected with inputSocket from targetWidget according to socket visibility.default booleanhasGenericType(WidgetSocket socket)Checks if socket data type definition has generic typedefault booleanisCollectionTypeAssignable(WidgetSocket.Multiplicity source, WidgetSocket.Multiplicity target)Checks if target is compatible with source basing on WidgetSocket.Multiplicityjava.lang.StringresolveGenericType(WidgetSocket socket, Widget widget)Resolves the generic type for the specified socket and widget if any.
-
-
-
Field Detail
-
SOCKET_DATA_TYPE_PREFIX
static final java.lang.String SOCKET_DATA_TYPE_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
canReceiveFrom
boolean canReceiveFrom(WidgetSocket inputSocket, Widget targetWidget, WidgetSocket outputSocket, Widget srcWidget)
Checks if outputSocket from srcWidget can be connected with inputSocket from targetWidget according to data type.- Parameters:
inputSocket- -WidgetSocketrepresents input socketoutputSocket- -WidgetSocketrepresents output socketsrcWidget- -Widgetrepresents source widgettargetWidget- -Widgetrepresents target widget- Returns:
- whether outputSocket from srcWidget can be connected with inputSocket from targetWidget according to data type
-
checkVisibilityRestrictions
boolean checkVisibilityRestrictions(WidgetSocket inputSocket, Widget targetWidget, WidgetSocket outputSocket, Widget srcWidget)
Checks if outputSocket from srcWidget can be connected with inputSocket from targetWidget according to socket visibility.- Parameters:
inputSocket- -WidgetSocketrepresents input socketoutputSocket- -WidgetSocketrepresents output socketsrcWidget- -Widgetrepresents source widgettargetWidget- -Widgetrepresents target widget- Returns:
- whether outputSocket from srcWidget can be connected with inputSocket from targetWidget according to socket
-
canResolveGenericType
default boolean canResolveGenericType(WidgetSocket socket, Widget widget)
Checks if the generic type for the specified socket and widget can be resolved to concrete type.- Parameters:
socket- -WidgetSocketrepresents socketwidget- -Widgetrepresents widget- Returns:
trueif a widget socket does not have generic type or the type can be resolved
-
resolveGenericType
java.lang.String resolveGenericType(WidgetSocket socket, Widget widget)
Resolves the generic type for the specified socket and widget if any.- Parameters:
socket- -WidgetSocketrepresents socketwidget- -Widgetrepresents widget- Returns:
- the generic type for the specified socket and widget if any.
-
isCollectionTypeAssignable
default boolean isCollectionTypeAssignable(WidgetSocket.Multiplicity source, WidgetSocket.Multiplicity target)
Checks if target is compatible with source basing on WidgetSocket.Multiplicity- Parameters:
source- multiplicity to checktarget- multiplicity to check- Returns:
- whether target is compatible with source basing on WidgetSocket.Multiplicity
-
hasGenericType
default boolean hasGenericType(WidgetSocket socket)
Checks if socket data type definition has generic type- Parameters:
socket- -WidgetSocketrepresents socket- Returns:
- whether socket data type definition has generic type
-
-