Package com.illumon.iris.controller
Class PersistentQueryControllerTool
java.lang.Object
com.illumon.iris.controller.PersistentQueryControllerTool
-
Constructor Summary
ConstructorsConstructorDescriptionPersistentQueryControllerTool
(com.fishlib.io.logger.Logger log) Create an instance of the class to allow for multiple action calls. -
Method Summary
Modifier and TypeMethodDescriptionAllow the client to be used to obtain event updatesstatic void
void
Perform an action defined by the Consumer passed in.performImportAction
(String xmlFile, boolean keepSerials) Run an import action.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
Run a restart action.void
performRestartAction
(List<Long> serials) Run a restart action for the specified serials.void
performStopAction
(List<Long> serials) Run a stop 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
- from controller link.
-
-
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
public Map<Long,Exception> performImportAction(String xmlFile, boolean keepSerials) throws IOException 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.- Returns:
- a map from serial number to "null" for a successfully imported query or an Exception for a query that was not successfully imported (only when set to continue on error)
- Throws:
IOException
-
performImportAction
public Map<Long,Exception> 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 usedryRunBasic
- do a "dry run", go through the motions without actually changing anythingdryRunFull
- a more complete "dry run" mode, checks for structural errors- 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
-
performStopAction
Run a stop 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:
- the client
-