public class AutomationProcessor extends Object implements ReadyRunnable
Constructor and Description |
---|
AutomationProcessor(Automation automation)
Public constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsTokens(String targetString)
Simple helper method to determine if the targetString contains
any '${token}'s.
|
int |
countRows(ResultSet rs)
Method used to count the rows in a ResultSet.
|
org.opennms.netmgt.vacuumd.AutomationProcessor.ActionProcessor |
getAction()
getAction
|
Automation |
getAutomation()
getAutomation
|
Schedule |
getSchedule()
getSchedule
|
org.opennms.netmgt.vacuumd.AutomationProcessor.TriggerProcessor |
getTrigger()
getTrigger
|
boolean |
isReady()
isReady
|
void |
run()
run
|
boolean |
runAutomation()
Called by the run method to execute the sql statements
of triggers and actions defined for an automation.
|
void |
setReady(boolean ready)
setReady
|
void |
setSchedule(Schedule schedule)
setSchedule
|
protected boolean |
verifyRowCount(ResultSet triggerResultSet)
verifyRowCount
|
public AutomationProcessor(Automation automation)
automation
- a Automation
object.public org.opennms.netmgt.vacuumd.AutomationProcessor.ActionProcessor getAction()
getAction
AutomationProcessor.ActionProcessor
object.public org.opennms.netmgt.vacuumd.AutomationProcessor.TriggerProcessor getTrigger()
getTrigger
AutomationProcessor.TriggerProcessor
object.public boolean runAutomation() throws SQLException
SQLException
- if any.protected boolean verifyRowCount(ResultSet triggerResultSet) throws SQLException
verifyRowCount
triggerResultSet
- a ResultSet
object.SQLException
- if any.public int countRows(ResultSet rs) throws SQLException
rs
- a ResultSet
object.SQLException
- if any.public boolean containsTokens(String targetString)
targetString
- a String
object.public Automation getAutomation()
getAutomation
public boolean isReady()
isReady
isReady
in interface ReadyRunnable
public Schedule getSchedule()
getSchedule
public void setSchedule(Schedule schedule)
setSchedule
schedule
- The schedule to set.public void setReady(boolean ready)
setReady
ready
- a boolean.Copyright © 2021. All rights reserved.