Class DroolsEngine
- java.lang.Object
-
- org.opennms.netmgt.alarmd.northbounder.drools.DroolsEngine
-
- All Implemented Interfaces:
Serializable,Destination
public class DroolsEngine extends 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.StringgetAppContext()Gets the application context.StringgetAssertBehaviour()Gets the assert behaviour.StringgetFilter()Gets the filter.List<Global>getGlobals()Gets the globals.StringgetName()Gets the destination name.List<String>getRuleFiles()Gets the rule files.booleanisFirstOccurrenceOnly()Checks if is first occurrence only.voidsetAppContext(String appContext)Sets the application context.voidsetAssertBehaviour(String assertBehaviour)Sets the assert behaviour.voidsetFilter(String filter)Sets the filter.voidsetGlobals(List<Global> globals)Sets the globals.voidsetName(String name)Sets the name.voidsetRuleFiles(List<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 String getName()
Description copied from interface:DestinationGets the destination name.- Specified by:
getNamein interfaceDestination- Returns:
- the destination name
-
setName
public void setName(String name)
Sets the name.- Parameters:
name- the new name
-
getFilter
public String getFilter()
Gets the filter.- Returns:
- the filter
-
setFilter
public void setFilter(String filter)
Sets the filter.- Parameters:
filter- the new filter
-
getAssertBehaviour
public String getAssertBehaviour()
Gets the assert behaviour.- Returns:
- the assert behaviour
-
setAssertBehaviour
public void setAssertBehaviour(String assertBehaviour)
Sets the assert behaviour.- Parameters:
assertBehaviour- the new assert behaviour
-
getAppContext
public String getAppContext()
Gets the application context.- Returns:
- the application context
-
setAppContext
public void setAppContext(String appContext)
Sets the application context.- Parameters:
appContext- the new application context
-
setGlobals
public void setGlobals(List<Global> globals)
Sets the globals.- Parameters:
globals- the new globals
-
setRuleFiles
public void setRuleFiles(List<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
-
-