Class QueryCreationUtils

java.lang.Object
com.illumon.iris.console.utils.QueryCreationUtils

public class QueryCreationUtils
extends Object
Utility class to help with query creation
  • Constructor Details

  • Method Details

    • createMergeConfiguration

      public static PersistentQueryConfiguration createMergeConfiguration​(com.fishlib.io.logger.Logger log, PersistentQueryConfiguration config, IrisWidgetSupport widgetSupport, JComponent parent, String[] definedScheduling, boolean saveConfig)
      Create a new merge configuration from an import configuration
      Parameters:
      log - the Logger for logging
      config - an import configuration to use as the base
      widgetSupport - for editing and saving
      parent - the parent JComponent
      definedScheduling - if not null, this will be used for scheduling; if null, then scheduling from the parent will be copied in with dependent scheduling set
      saveConfig - if true, the config will be saved
      Returns:
      the new configuration, or null if the user cancelled
    • createMergeConfiguration

      public static void createMergeConfiguration​(com.fishlib.io.logger.Logger log, PersistentQueryConfiguration config, IrisWidgetSupport widgetSupport, JComponent parent)
      Create a new merge configuration from an import configuration
      Parameters:
      log - the Logger for logging
      config - an import configuration to use as the base
      widgetSupport - for editing and saving
      parent - the parent JComponent
    • saveQueryConfiguration

      public static void saveQueryConfiguration​(IrisWidgetSupport widgetSupport, Component parent, PersistentQueryConfiguration newConfig, boolean updateExisting, Consumer<PersistentQueryInfo> onSuccess)
      Save a query configuration to the controller
      Parameters:
      widgetSupport - for editing and saving
      parent - the parent JComponent
      newConfig - the configuration to be saved
      updateExisting - if true then update the existing configuration if it exists, otherwise throw an exception
      onSuccess - a Consumer to be called if the save is successful
    • createValidateConfiguration

      public static PersistentQueryConfiguration createValidateConfiguration​(com.fishlib.io.logger.Logger log, PersistentQueryConfiguration config, IrisWidgetSupport widgetSupport, JComponent parent, String[] definedScheduling, boolean saveConfig)
      Create a new validate configuration from a merge or import configuration
      Parameters:
      log - the Logger for logging
      config - an import configuration to use as the base
      widgetSupport - for editing and saving
      parent - the parent JComponent
      definedScheduling - if not null, this will be used for scheduling; if null, then scheduling from the parent will be copied in with dependent scheduling set
      saveConfig - if true, the config will be saved
      Returns:
      the new configuration, or null if the user cancelled
    • createValidateConfiguration

      public static void createValidateConfiguration​(com.fishlib.io.logger.Logger log, PersistentQueryConfiguration config, IrisWidgetSupport widgetSupport, JComponent parent)
      Create a new validate configuration from a merge or import configuration
      Parameters:
      log - the Logger for logging
      config - an import configuration to use as the base
      widgetSupport - for editing and saving
      parent - the parent JComponent
    • defineTemporaryScheduling

      public static String[] defineTemporaryScheduling​(PersistentQueryConfiguration config, IrisWidgetSupport widgetSupport)
      Create a string array defining valid temporary scheduling from the provided query
      Parameters:
      config - an import configuration to use as the base
      widgetSupport - for editing and saving
      Returns:
      a valid temporary scheduler's string array