Package org.knime.gateway.api.entity
Class NodeViewEnt
java.lang.Object
org.knime.gateway.api.entity.NodeUIExtensionEnt<NodeWrapper>
org.knime.gateway.api.entity.NodeViewEnt
Node view entity containing the info required by the UI (i.e. frontend) to be able display a node view.
- Author:
- Martin Horn, KNIME GmbH, Konstanz, Germany
-
Method Summary
Modifier and TypeMethodDescriptionstatic NodeViewEntcreate(org.knime.core.node.workflow.NativeNodeContainer nnc) Creates a new instances without a initial selection and without the underlying node being registered with the selection event source.static NodeViewEntcreate(org.knime.core.node.workflow.NativeNodeContainer nnc, Supplier<List<String>> initialSelection) static NodeViewEntcreate(org.knime.core.node.workflow.NativeNodeContainer nnc, Supplier<List<String>> initialSelection, boolean isUsedForReportGeneration) static NodeViewEntcreate(org.knime.core.node.workflow.NativeNodeContainer nnc, Supplier<List<String>> initialSelection, String generatedImageActionId) static org.knime.core.util.Pair<NodeViewEnt,EventSource[]> createNodeViewEntAndEventSources(org.knime.core.node.workflow.NativeNodeContainer nnc, BiConsumer<String, Object> eventConsumer, boolean createNodeViewStateEventSource) Creates a newNodeViewEnt-instance and initializes associatedEventSources.If the view represented by this view entity is used for the purpose of image or report generation via an image or report output port.Methods inherited from class org.knime.gateway.api.entity.NodeUIExtensionEnt
getExtensionType, getInitialData, getNodeId, getProjectId, getResourceInfo, getWorkflowId
-
Method Details
-
create
public static NodeViewEnt create(org.knime.core.node.workflow.NativeNodeContainer nnc, Supplier<List<String>> initialSelection, String generatedImageActionId) - Parameters:
nnc- the Native node container to create the node view entity forinitialSelection- the initial selection (e.g. a list of row keys or something else), supplied lazily (will not be called, if the node is not executed)generatedImageActionId- if the view is to be used for image generation, it specified a unique action-id used to communicate the image back to the java-side;nullif this view is not used for image generation- Returns:
- a new instance
-
create
public static NodeViewEnt create(org.knime.core.node.workflow.NativeNodeContainer nnc, Supplier<List<String>> initialSelection) - Parameters:
nnc- the Native node container to create the node view entity forinitialSelection- the initial selection (e.g. a list of row keys or something else), supplied lazily (will not be called, if the node is not executed)- Returns:
- a new instance
-
create
public static NodeViewEnt create(org.knime.core.node.workflow.NativeNodeContainer nnc, Supplier<List<String>> initialSelection, boolean isUsedForReportGeneration) - Parameters:
nnc- the Native node container to create the node view entity forinitialSelection- the initial selection (e.g. a list of row keys or something else), supplied lazily (will not be called, if the node is not executed)isUsedForReportGeneration- indicates whether this view-ent is used for report generation- Returns:
- a new instance
-
create
Creates a new instances without a initial selection and without the underlying node being registered with the selection event source.- Parameters:
nnc- the node to create the node view entity for- Returns:
- a new instance
-
createNodeViewEntAndEventSources
public static org.knime.core.util.Pair<NodeViewEnt,EventSource[]> createNodeViewEntAndEventSources(org.knime.core.node.workflow.NativeNodeContainer nnc, BiConsumer<String, Object> eventConsumer, boolean createNodeViewStateEventSource) Creates a newNodeViewEnt-instance and initializes associatedEventSources. Associated event sources areSelectionEventSourceandNodeViewStateEventSource.- Parameters:
nnc- the node to create the node view entity fromeventConsumer- the event consumer that will receive the events emitted by the initialized event sourcescreateNodeViewStateEventSource- iftruetheNodeViewStateEventSourcewill be initialized, too; otherwise it won't- Returns:
- the new
NodeViewEnt-instance and the initialized event source(s)
-
getNodeInfo
- Returns:
- additional info for the node providing the view
-
getInitialSelection
- Returns:
- the initial selection (e.g. a list of row keys)
-
getGeneratedImageActionId
If the view represented by this view entity is used for the purpose of image or report generation via an image or report output port. In case of image generation- this action-id is used to uniquely communicate the image back to the java-side
- indicates that the node view may already be generated while the node is in executing state
- Returns:
- the action-id or
nullif view is not used for image generation nor report generation
-
getColorModels
- Returns:
- the representation to the color model to be used by the frontend to translate numeric or nominal values to hex colors. Can be null if no color model was provided.
-
getColumnNamesColorModel
- Returns:
- the color model to be used by the frontend to translate column names to hex colors. Can be null if no color model was provided.
-