Constructor and Description |
---|
MockFilterDao() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
flushActiveIpAddressListCache() |
List<InetAddress> |
getActiveIPAddressList(String rule)
Get the (non-deleted) IP addresses that match the specified rule.
|
List<InetAddress> |
getIPAddressList(String rule)
Get the IP addresses (including deleted) that match the specified rule.
|
Map<InetAddress,Set<String>> |
getIPAddressServiceMap(String rule)
getIPServiceMap
|
IpInterfaceDao |
getIpInterfaceDao() |
SortedMap<Integer,String> |
getNodeMap(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(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)
isValid
|
void |
setIpInterfaceDao(IpInterfaceDao dao) |
void |
validateRule(String rule)
validateRule
|
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public SortedMap<Integer,String> getNodeMap(String rule) throws FilterParseException
FilterDao
getNodeMap
in interface FilterDao
rule
- an expression rule to be parsed and executed.FilterParseException
- if a rule is syntactically incorrect or failed in
executing the SQL statementpublic Map<InetAddress,Set<String>> getIPAddressServiceMap(String rule) throws FilterParseException
FilterDao
getIPServiceMap
getIPAddressServiceMap
in interface FilterDao
rule
- a String
object.Map
object.FilterParseException
- if any.public void flushActiveIpAddressListCache()
flushActiveIpAddressListCache
in interface FilterDao
public List<InetAddress> getActiveIPAddressList(String rule) throws FilterParseException
FilterDao
getActiveIPAddressList
in interface FilterDao
rule
- the filter ruleList
of IP addresses.FilterParseException
- if a rule is syntactically incorrect or failed in executing the SQL statement.public List<InetAddress> getIPAddressList(String rule) throws FilterParseException
FilterDao
getIPAddressList
in interface FilterDao
rule
- the filter ruleList
of IP addresses.FilterParseException
- if a rule is syntactically incorrect or failed in executing the SQL statement.public boolean isValid(String addr, String rule) throws FilterParseException
FilterDao
isValid
isValid
in interface FilterDao
addr
- a String
object.rule
- a String
object.FilterParseException
- if any.public boolean isRuleMatching(String rule) throws FilterParseException
FilterDao
isRuleMatching
in interface FilterDao
rule
- rule to match onFilterParseException
- if any.public void validateRule(String rule) throws FilterParseException
FilterDao
validateRule
validateRule
in interface FilterDao
rule
- a String
object.FilterParseException
- if any.public IpInterfaceDao getIpInterfaceDao()
public void setIpInterfaceDao(IpInterfaceDao dao)
Copyright © 2020. All rights reserved.