Class NodeViewEnt


public final class NodeViewEnt extends NodeUIExtensionEnt<NodeWrapper>
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 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 for
      initialSelection - 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; null if 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 for
      initialSelection - 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 for
      initialSelection - 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

      public static NodeViewEnt create(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.
      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 new NodeViewEnt-instance and initializes associated EventSources. Associated event sources are SelectionEventSource and NodeViewStateEventSource.
      Parameters:
      nnc - the node to create the node view entity from
      eventConsumer - the event consumer that will receive the events emitted by the initialized event sources
      createNodeViewStateEventSource - if true the NodeViewStateEventSource will be initialized, too; otherwise it won't
      Returns:
      the new NodeViewEnt-instance and the initialized event source(s)
    • getNodeInfo

      public NodeInfoEnt getNodeInfo()
      Returns:
      additional info for the node providing the view
    • getInitialSelection

      public List<String> getInitialSelection()
      Returns:
      the initial selection (e.g. a list of row keys)
    • getGeneratedImageActionId

      public String 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
      In case of report generation, the (absence/presence) of the id is used as indication whether this view is able to generate a report (i.e. can contribute to the report). In both cases (report and image generation) the presence of this property also indicates that support for any kind of interactivity is not needed. TODO report and image generation properties should be separated as part of UIEXT-1031
      Returns:
      the action-id or null if view is not used for image generation nor report generation
    • getColorModels

      public Map<String,ColorModelEnt> 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

      public ColorModelEnt 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.