Class ApplyDataService<D>

java.lang.Object
org.knime.core.webui.data.ApplyDataService<D>
Type Parameters:
D -
All Implemented Interfaces:
DataService

public final class ApplyDataService<D> extends Object implements DataService
A data service that applies the data to the underlying model (usually the NodeModel). Applying the data often implies persisting it.
Since:
4.5
Author:
Martin Horn, KNIME GmbH, Konstanz, Germany
  • Method Details

    • validateData

      public Optional<String> validateData(String data) throws IOException
      Checks whether the data in the input stream is valid.
      Parameters:
      data - the data to validate
      Returns:
      an empty optional if the validation was successful otherwise a validation error string
      Throws:
      IOException
    • applyData

      public void applyData(String dataString) throws IOException
      Applies the data from a string.
      Parameters:
      dataString - the data to apply
      Throws:
      IOException
    • dispose

      public void dispose()
      Description copied from interface: DataService
      Called whenever the data service won't be used anymore. I.e. resources can be freed-up such as clearing caches or shutting down external processes etc.
      Specified by:
      dispose in interface DataService
    • deactivate

      public void deactivate()
      Description copied from interface: DataService
      Called whenever the data service can free-up resources. E.g. clearing caches or shutting down external processes etc. Though, it does not necessarily mean, that the data service instance is not used anymore some time later.
      Specified by:
      deactivate in interface DataService
    • shallReExecute

      public boolean shallReExecute()
      Returns:
      whether a re-execution of the respective node is required on apply
    • reExecute

      public void reExecute(String data) throws IOException
      Re-executes the underlying node in order to apply new data.
      Parameters:
      data - the data to execute the node with
      Throws:
      IOException
    • builder

      Parameters:
      dataApplier -
      Returns:
      the builder for this data service
    • builder

      public static ApplyDataService.ApplyDataServiceBuilder<String> builder(org.knime.core.node.interactive.ReExecutable<String> reExecutable)
      Parameters:
      reExecutable -
      Returns:
      the builder for this data service