org.opennms.netmgt.dao
Interface FilterDao

All Known Implementing Classes:
JdbcFilterDao

public interface FilterDao


Method Summary
 java.util.List<java.lang.String> getIPList(java.lang.String rule)
           
 java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getIPServiceMap(java.lang.String rule)
           
 java.util.SortedMap<java.lang.Integer,java.lang.String> getNodeMap(java.lang.String rule)
          This method returns a map of all node IDs and node labels that match the rule that is passed in, sorted by node ID.
 boolean isRuleMatching(java.lang.String rule)
          Does this rule match anything in the database? In particular, does it return at least one record from the database?
 boolean isValid(java.lang.String addr, java.lang.String rule)
           
 void validateRule(java.lang.String rule)
           
 void walkMatchingNodes(java.lang.String rule, org.opennms.netmgt.model.EntityVisitor visitor)
           
 

Method Detail

getNodeMap

java.util.SortedMap<java.lang.Integer,java.lang.String> getNodeMap(java.lang.String rule)
                                                                   throws FilterParseException
This method returns a map of all node IDs and node labels that match the rule that is passed in, sorted by node ID.

Parameters:
rule - an expression rule to be parsed and executed.
Returns:
SortedMap containing all node IDs and node labels selected by the rule.
Throws:
FilterParseException - if a rule is syntactically incorrect or failed in executing the SQL statement

getIPServiceMap

java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getIPServiceMap(java.lang.String rule)
                                                                                throws FilterParseException
Throws:
FilterParseException

getIPList

java.util.List<java.lang.String> getIPList(java.lang.String rule)
                                           throws FilterParseException
Throws:
FilterParseException

isValid

boolean isValid(java.lang.String addr,
                java.lang.String rule)
                throws FilterParseException
Throws:
FilterParseException

isRuleMatching

boolean isRuleMatching(java.lang.String rule)
Does this rule match anything in the database? In particular, does it return at least one record from the database?

Parameters:
rule - rule to match on
Returns:
true if there is at least one match, false otherwise

validateRule

void validateRule(java.lang.String rule)
                  throws FilterParseException
Throws:
FilterParseException

walkMatchingNodes

void walkMatchingNodes(java.lang.String rule,
                       org.opennms.netmgt.model.EntityVisitor visitor)


Copyright © 2007. All Rights Reserved.