Package com.illumon.iris.controller
Class PersistentQueryControllerTool
java.lang.Object
com.illumon.iris.controller.PersistentQueryControllerTool
public final class PersistentQueryControllerTool extends Object
-
Constructor Summary
Constructors Constructor Description PersistentQueryControllerTool(com.fishlib.io.logger.Logger log)
Create an instance of the class to allow for multiple action calls. -
Method Summary
Modifier and Type Method Description PersistentQueryControllerClient
getControllerClient()
Allow the client to be used to obtain event updatesstatic void
main(String[] args)
void
performGlobalLambdaAction(Consumer<PersistentQueryControllerClient> consumer)
Perform an action defined by the Consumer passed in.void
performImportAction(String xmlFile, boolean keepSerials)
Run an import action.void
performImportAction(String xmlFile, String overrideXmlFile, String queryOwner, String queryName, String newOwner, boolean keepSerials, boolean includeTemporary, boolean includeNonDisplayable, Map<String,String> serverOverrideMap, boolean dryRunBasic, boolean dryRunFull)
Run an import action.void
performRestartAction()
Run a restart action.void
performRestartAction(List<Long> serials)
Run a restart action for the specified serials.
-
Constructor Details
-
PersistentQueryControllerTool
Create an instance of the class to allow for multiple action calls. This is used in testing automation.- Parameters:
log
- The logger you want to use.- Throws:
IOException
-
-
Method Details
-
main
- Throws:
IOException
-
performGlobalLambdaAction
Perform an action defined by the Consumer passed in. This is a function to allow testing automation to access information in the PersistentQueryControllerClient. Specifically used to pull out query status and language.- Parameters:
consumer
- The function you want to be preformed.
-
performImportAction
Run an import action. This is used by testing automation.- Parameters:
xmlFile
- The xml file you want to import.keepSerials
- True if you want to keep serials. False if you want them to be replaced.- Throws:
IOException
-
performImportAction
public void performImportAction(String xmlFile, String overrideXmlFile, String queryOwner, String queryName, String newOwner, boolean keepSerials, boolean includeTemporary, boolean includeNonDisplayable, Map<String,String> serverOverrideMap, boolean dryRunBasic, boolean dryRunFull) throws IOExceptionRun an import action. This is used by testing automation.- Parameters:
xmlFile
- The xml file containing a<PersistentQueryRoot>
you want to import.overrideXmlFile
- The xml file containing a<PersistentQueryOverrideRoot>
you want to apply to the imported queries.keepSerials
- True if you want to keep serials. False if you want them to be replaced.queryOwner
- if not null, the owner of the queries to importqueryName
- if not null, the name of the query to importnewOwner
- if not null, a new owner to use for the imported queryincludeTemporary
- if true, import temporary queriesincludeNonDisplayable
- if true, import non-displayable queries such as the helper queriesserverOverrideMap
- the mapping of server overrides to use- Throws:
IOException
-
performRestartAction
Run a restart action. This is used by testing automation.- Throws:
IOException
-
performRestartAction
Run a restart action for the specified serials. This is used by testing automation.- Throws:
IOException
-
getControllerClient
Allow the client to be used to obtain event updates- Returns:
-