Package com.illumon.iris.console.utils
Class QueryCreationUtils
java.lang.Object
com.illumon.iris.console.utils.QueryCreationUtils
public class QueryCreationUtils extends Object
Utility class to help with query creation
-
Constructor Summary
Constructors Constructor Description QueryCreationUtils()
-
Method Summary
Modifier and Type Method Description static void
createMergeConfiguration(com.fishlib.io.logger.Logger log, PersistentQueryConfiguration config, IrisWidgetSupport widgetSupport, JComponent parent)
Create a new merge configuration from an import configurationstatic 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 configurationstatic void
createValidateConfiguration(com.fishlib.io.logger.Logger log, PersistentQueryConfiguration config, IrisWidgetSupport widgetSupport, JComponent parent)
Create a new validate configuration from a merge or import configurationstatic 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 configurationstatic String[]
defineTemporaryScheduling(PersistentQueryConfiguration config, IrisWidgetSupport widgetSupport)
Create a string array defining valid temporary scheduling from the provided querystatic void
saveQueryConfiguration(IrisWidgetSupport widgetSupport, Component parent, PersistentQueryConfiguration newConfig, boolean updateExisting, Consumer<PersistentQueryInfo> onSuccess)
Save a query configuration to the controller
-
Constructor Details
-
QueryCreationUtils
public QueryCreationUtils()
-
-
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 loggingconfig
- an import configuration to use as the basewidgetSupport
- for editing and savingparent
- the parent JComponentdefinedScheduling
- if not null, this will be used for scheduling; if null, then scheduling from the parent will be copied in with dependent scheduling setsaveConfig
- 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 loggingconfig
- an import configuration to use as the basewidgetSupport
- for editing and savingparent
- 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 savingparent
- the parent JComponentnewConfig
- the configuration to be savedupdateExisting
- if true then update the existing configuration if it exists, otherwise throw an exceptiononSuccess
- 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 loggingconfig
- an import configuration to use as the basewidgetSupport
- for editing and savingparent
- the parent JComponentdefinedScheduling
- if not null, this will be used for scheduling; if null, then scheduling from the parent will be copied in with dependent scheduling setsaveConfig
- 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 loggingconfig
- an import configuration to use as the basewidgetSupport
- for editing and savingparent
- 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 basewidgetSupport
- for editing and saving- Returns:
- a valid temporary scheduler's string array
-