|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.dao.support.JdbcFilterDao
public class JdbcFilterDao
| Constructor Summary | |
|---|---|
JdbcFilterDao()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
DatabaseSchemaConfigFactory |
getDatabaseSchemaConfigFactory()
|
DataSource |
getDataSource()
|
protected String |
getInterfaceWithServiceStatement(String rule)
|
List<String> |
getIPList(String rule)
This method returns a list of all ip addresses that match the rule that is passed in. |
Map<String,Set<String>> |
getIPServiceMap(String rule)
|
protected String |
getIPServiceMappingStatement(String rule)
|
NodeDao |
getNodeDao()
|
SortedMap<Integer,String> |
getNodeMap(String rule)
This method returns a map of all nodeids and nodelabels that match the rule that is passed in, sorted by nodeid. |
protected String |
getNodeMappingStatement(String rule)
|
protected String |
getSQLStatement(String rule)
This method parses a rule and returns the SQL select statement equivalent of the rule. |
protected String |
getSQLStatement(String rule,
long nodeId,
String ipaddr,
String service)
|
boolean |
isRuleMatching(String rule)
Does this rule match anything in the database? In particular, does it return at least one record from the database? |
boolean |
isValid(String addr,
String rule)
This method verifies if an ip address adhers to a given rule. |
void |
setDatabaseSchemaConfigFactory(DatabaseSchemaConfigFactory factory)
|
void |
setDataSource(DataSource dataSource)
|
void |
setNodeDao(NodeDao nodeDao)
|
void |
validateRule(String rule)
|
void |
walkMatchingNodes(String rule,
org.opennms.netmgt.model.EntityVisitor visitor)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JdbcFilterDao()
| Method Detail |
|---|
public SortedMap<Integer,String> getNodeMap(String rule)
throws FilterParseException
getNodeMap in interface FilterDaorule - an expression rule to be parsed and executed.
FilterParseException - if a rule is syntactically incorrect or failed in
executing the SQL statementpublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic NodeDao getNodeDao()
public void setNodeDao(NodeDao nodeDao)
public DataSource getDataSource()
public void setDataSource(DataSource dataSource)
public void setDatabaseSchemaConfigFactory(DatabaseSchemaConfigFactory factory)
public DatabaseSchemaConfigFactory getDatabaseSchemaConfigFactory()
public Map<String,Set<String>> getIPServiceMap(String rule)
getIPServiceMap in interface FilterDao
public List<String> getIPList(String rule)
throws FilterParseException
getIPList in interface FilterDaorule - an expression rule to be parsed and executed.
FilterParseException - if a rule is syntactically incorrect or failed in
executing the SQL statement
public boolean isValid(String addr,
String rule)
throws FilterParseException
isValid in interface FilterDaoaddr - an octet string ip to be validated against a rule.rule - an expression rule to be parsed and executed.
FilterParseException - if a rule is syntactically incorrect or failed in
executing the SQL statement.
public void validateRule(String rule)
throws FilterParseException
validateRule in interface FilterDaoFilterParseExceptionprotected String getSQLStatement(String rule)
protected String getSQLStatement(String rule,
long nodeId,
String ipaddr,
String service)
protected String getIPServiceMappingStatement(String rule)
protected String getNodeMappingStatement(String rule)
protected String getInterfaceWithServiceStatement(String rule)
public boolean isRuleMatching(String rule)
FilterDao
isRuleMatching in interface FilterDaorule - rule to match on
public void walkMatchingNodes(String rule,
org.opennms.netmgt.model.EntityVisitor visitor)
walkMatchingNodes in interface FilterDao
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||