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 boolean
accepts(NorthboundAlarm alarm)
Accepts.java.lang.String
getAppContext()
Gets the application context.java.lang.String
getAssertBehaviour()
Gets the assert behaviour.java.lang.String
getFilter()
Gets the filter.java.util.List<Global>
getGlobals()
Gets the globals.java.lang.String
getName()
Gets the destination name.java.util.List<java.lang.String>
getRuleFiles()
Gets the rule files.boolean
isFirstOccurrenceOnly()
Checks if is first occurrence only.void
setAppContext(java.lang.String appContext)
Sets the application context.void
setAssertBehaviour(java.lang.String assertBehaviour)
Sets the assert behaviour.void
setFilter(java.lang.String filter)
Sets the filter.void
setGlobals(java.util.List<Global> globals)
Sets the globals.void
setName(java.lang.String name)
Sets the name.void
setRuleFiles(java.util.List<java.lang.String> ruleFiles)
Sets the rule files.
-
-
-
Method Detail
-
isFirstOccurrenceOnly
public boolean isFirstOccurrenceOnly()
Description copied from interface:Destination
Checks if is first occurrence only.- Specified by:
isFirstOccurrenceOnly
in interfaceDestination
- Returns:
- true, if is first occurrence only
-
getName
public java.lang.String getName()
Description copied from interface:Destination
Gets the destination name.- Specified by:
getName
in 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
-
-