Class InitialDataService<D>

java.lang.Object
org.knime.core.webui.data.InitialDataService<D>
Type Parameters:
D - the data type this initial data service returns
All Implemented Interfaces:
DataService

public final class InitialDataService<D> extends Object implements DataService
Service to provide the data required to initialize an UI extension.
Since:
4.5
Author:
Martin Horn, KNIME GmbH, Konstanz, Germany
  • Method Details

    • getInitialData

      public String getInitialData()
      Returns:
      the initial data serialized into a string
    • 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
    • builder

      public static <D> InitialDataService.InitialDataServiceBuilder<D> builder(Supplier<D> dataSupplier)
      Type Parameters:
      D -
      Parameters:
      dataSupplier - supplies the initial data. A DataServiceContext is available whenever the supplier is being called.
      Returns:
      the builder to create an InitialDataService-instance