Package org.knime.core.webui.node
Interface NodeWrapper
- All Known Subinterfaces:
NodePortWrapper
public interface NodeWrapper
Wrapper for a node (
NodeContainer). The only purpose is to be able to represent a node and optionally
something else together with that node (e.g. a node and a port idx) at the same time such that the
AbstractNodeUIManager can operate on both (e.g. node and port).
Implementations must also implement the #equals(Object) and #hashCode() methods.- Author:
- Martin Horn, KNIME GmbH, Konstanz, Germany
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceImplemented byNodeFactoriesin order to provide a custom node-wrapper-type-id as returned bygetNodeWrapperTypeId(). -
Method Summary
Modifier and TypeMethodDescriptionorg.knime.core.node.workflow.NodeContainerget()<T> TgetWithContext(Supplier<T> supplier) Runs an operation within the context 'compatible' with this node wrapper (e.g.static NodeWrapperof(org.knime.core.node.workflow.NodeContainer nc) Convenience method to create aNodeWrapper-instance.
-
Method Details
-
get
org.knime.core.node.workflow.NodeContainer get()- Returns:
- the wrapped node
-
getNodeWrapperTypeId
String getNodeWrapperTypeId()- Returns:
- a id representing the type of the node wrapper (which is independent from the node wrapper-instance). E.g. the node type (~'data generator') or the port type (~'table').
-
getWithContext
Runs an operation within the context 'compatible' with this node wrapper (e.g.NodeContextorPortContext)- Type Parameters:
T-- Parameters:
supplier- the operation to run- Returns:
- the object the supplier returns
-
of
Convenience method to create aNodeWrapper-instance.- Parameters:
nc-- Returns:
- a new instance
-