Class DroolsEngine
- java.lang.Object
-
- org.opennms.netmgt.alarmd.northbounder.drools.DroolsEngine
-
- All Implemented Interfaces:
java.io.Serializable,Destination
public class DroolsEngine extends java.lang.Object implements Destination
Configuration for the Drools engine.- Author:
- Alejandro Galue
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DroolsEngine()Instantiates a new Drools engine handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccepts(NorthboundAlarm alarm)Accepts.java.lang.StringgetAppContext()Gets the application context.java.lang.StringgetAssertBehaviour()Gets the assert behaviour.java.lang.StringgetFilter()Gets the filter.java.util.List<Global>getGlobals()Gets the globals.java.lang.StringgetName()Gets the destination name.java.util.List<java.lang.String>getRuleFiles()Gets the rule files.booleanisFirstOccurrenceOnly()Checks if is first occurrence only.voidsetAppContext(java.lang.String appContext)Sets the application context.voidsetAssertBehaviour(java.lang.String assertBehaviour)Sets the assert behaviour.voidsetFilter(java.lang.String filter)Sets the filter.voidsetGlobals(java.util.List<Global> globals)Sets the globals.voidsetName(java.lang.String name)Sets the name.voidsetRuleFiles(java.util.List<java.lang.String> ruleFiles)Sets the rule files.
-
-
-
Method Detail
-
isFirstOccurrenceOnly
public boolean isFirstOccurrenceOnly()
Description copied from interface:DestinationChecks if is first occurrence only.- Specified by:
isFirstOccurrenceOnlyin interfaceDestination- Returns:
- true, if is first occurrence only
-
getName
public java.lang.String getName()
Description copied from interface:DestinationGets the destination name.- Specified by:
getNamein interfaceDestination- Returns:
- the destination name
-
setName
public void setName(java.lang.String name)
Sets the name.- Parameters:
name- the new name
-
getFilter
public java.lang.String getFilter()
Gets the filter.- Returns:
- the filter
-
setFilter
public void setFilter(java.lang.String filter)
Sets the filter.- Parameters:
filter- the new filter
-
getAssertBehaviour
public java.lang.String getAssertBehaviour()
Gets the assert behaviour.- Returns:
- the assert behaviour
-
setAssertBehaviour
public void setAssertBehaviour(java.lang.String assertBehaviour)
Sets the assert behaviour.- Parameters:
assertBehaviour- the new assert behaviour
-
getAppContext
public java.lang.String getAppContext()
Gets the application context.- Returns:
- the application context
-
setAppContext
public void setAppContext(java.lang.String appContext)
Sets the application context.- Parameters:
appContext- the new application context
-
getGlobals
public java.util.List<Global> getGlobals()
Gets the globals.- Returns:
- the globals
-
setGlobals
public void setGlobals(java.util.List<Global> globals)
Sets the globals.- Parameters:
globals- the new globals
-
getRuleFiles
public java.util.List<java.lang.String> getRuleFiles()
Gets the rule files.- Returns:
- the rule files
-
setRuleFiles
public void setRuleFiles(java.util.List<java.lang.String> ruleFiles)
Sets the rule files.- Parameters:
ruleFiles- the new rule files
-
accepts
public boolean accepts(NorthboundAlarm alarm)
Accepts.If the engine doesn't have filter, the method will return true.
If the method has a filter, it will be evaluated.
- Parameters:
alarm- the alarm- Returns:
- true, if successful
-
-