|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.web.vulnerability.VulnerabilityFactory
Encapsulates all querying functionality for vulnerabilities.
Nested Class Summary | |
static class |
VulnerabilityFactory.ResolutionType
Convenience class to determine what sort of events to include in a query. |
static class |
VulnerabilityFactory.SortStyle
Convenience class to determine sort style of a query. |
Field Summary | |
protected static org.apache.log4j.Category |
log
|
Constructor Summary | |
private |
VulnerabilityFactory()
Private constructor so this class cannot be instantiated. |
Method Summary | |
protected static java.lang.String |
getOrderByClause(VulnerabilityFactory.SortStyle sortStyle)
Convenience method for getting the SQL ORDER BY clause related to a given sort style. |
protected static java.lang.String |
getResolutionTypeClause(VulnerabilityFactory.ResolutionType resType)
Convenience method for getting the SQL WHERE clause related to a given resolution type. |
static Vulnerability[] |
getVulnerabilities()
Return all open vulnerabilities sorted by time. |
static Vulnerability[] |
getVulnerabilities(VulnerabilityFactory.ResolutionType resType)
Return all open or resolved vulnerabilities sorted by identifier. |
static Vulnerability[] |
getVulnerabilities(VulnerabilityFactory.SortStyle sortStyle)
Return all open vulnerabilities sorted by the given sort style. |
static Vulnerability[] |
getVulnerabilities(VulnerabilityFactory.SortStyle sortStyle,
VulnerabilityFactory.ResolutionType resType)
Return all vulnerabilities (optionally only open vulnerabilities) sorted by the given sort style. |
static Vulnerability[] |
getVulnerabilities(VulnerabilityFactory.SortStyle sortStyle,
VulnerabilityFactory.ResolutionType resType,
Filter[] filters)
Return all vulnerabilities (optionally only open vulnerabilities) sorted by the given sort style. |
static Vulnerability[] |
getVulnerabilities(VulnerabilityFactory.SortStyle sortStyle,
VulnerabilityFactory.ResolutionType resType,
Filter[] filters,
int limit,
int offset)
Return all vulnerabilities (optionally only open vulnerabilities) sorted by the given sort style. |
static Vulnerability[] |
getVulnerabilitiesForNode(int nodeId,
VulnerabilityFactory.SortStyle sortStyle,
VulnerabilityFactory.ResolutionType resType,
int throttle,
int offset)
Return some maximum number of vulnerabilities or less sorted by the given sort style for the given node. |
static Vulnerability |
getVulnerability(int vulId)
Return a specific vulnerability. |
static int |
getVulnerabilityCount()
Count all open vulnerabilities. |
static int |
getVulnerabilityCount(VulnerabilityFactory.ResolutionType resType,
Filter[] filters)
Count the number of vulnerabilities for a given resolution type and given filters.. |
static int |
getVulnerabilityCountForInterface(int nodeId,
java.lang.String ipAddress,
VulnerabilityFactory.ResolutionType resType)
Return the number of vulnerabilities for this IP address and the given resolution type. |
static int |
getVulnerabilityCountForNode(int nodeId,
VulnerabilityFactory.ResolutionType resType)
Return the number of vulnerabilities for this node and the given resolution type. |
static Vulnerability[] |
getVulnerablilitiesForInterface(int nodeId,
java.lang.String ipAddress,
VulnerabilityFactory.SortStyle sortStyle,
VulnerabilityFactory.ResolutionType resType,
int throttle,
int offset)
Return some maximum number of events or less (optionally only unacknowledged events) sorted by the given sort style for the given IP address. |
protected static Vulnerability[] |
rs2Vulnerabilities(java.sql.ResultSet rs)
Convenience method for translating a java.sql.ResultSet
containing vulnerability information into an array of
Vulnerability objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final org.apache.log4j.Category log
Constructor Detail |
private VulnerabilityFactory()
Method Detail |
public static int getVulnerabilityCount() throws java.sql.SQLException
java.sql.SQLException
public static int getVulnerabilityCount(VulnerabilityFactory.ResolutionType resType, Filter[] filters) throws java.sql.SQLException
java.sql.SQLException
public static Vulnerability getVulnerability(int vulId) throws java.sql.SQLException
java.sql.SQLException
public static Vulnerability[] getVulnerabilitiesForNode(int nodeId, VulnerabilityFactory.SortStyle sortStyle, VulnerabilityFactory.ResolutionType resType, int throttle, int offset) throws java.sql.SQLException
throttle
- a value less than one means no throttling
java.sql.SQLException
public static int getVulnerabilityCountForNode(int nodeId, VulnerabilityFactory.ResolutionType resType) throws java.sql.SQLException
java.sql.SQLException
public static Vulnerability[] getVulnerablilitiesForInterface(int nodeId, java.lang.String ipAddress, VulnerabilityFactory.SortStyle sortStyle, VulnerabilityFactory.ResolutionType resType, int throttle, int offset) throws java.sql.SQLException
throttle
- a value less than one means no throttlingoffset
- which row to start on in the result list
java.sql.SQLException
public static int getVulnerabilityCountForInterface(int nodeId, java.lang.String ipAddress, VulnerabilityFactory.ResolutionType resType) throws java.sql.SQLException
java.sql.SQLException
public static Vulnerability[] getVulnerabilities() throws java.sql.SQLException
java.sql.SQLException
public static Vulnerability[] getVulnerabilities(VulnerabilityFactory.ResolutionType resType) throws java.sql.SQLException
java.sql.SQLException
public static Vulnerability[] getVulnerabilities(VulnerabilityFactory.SortStyle sortStyle) throws java.sql.SQLException
java.sql.SQLException
public static Vulnerability[] getVulnerabilities(VulnerabilityFactory.SortStyle sortStyle, VulnerabilityFactory.ResolutionType resType) throws java.sql.SQLException
java.sql.SQLException
public static Vulnerability[] getVulnerabilities(VulnerabilityFactory.SortStyle sortStyle, VulnerabilityFactory.ResolutionType resType, Filter[] filters) throws java.sql.SQLException
java.sql.SQLException
public static Vulnerability[] getVulnerabilities(VulnerabilityFactory.SortStyle sortStyle, VulnerabilityFactory.ResolutionType resType, Filter[] filters, int limit, int offset) throws java.sql.SQLException
Note: This limit/offset code is Postgres specific! Per Shane , this is okay for now until we can come up with an Oracle alternative too.
limit
- if -1 or zero, no limit or offset is usedoffset
- if -1, no limit or offset if used
java.sql.SQLException
protected static Vulnerability[] rs2Vulnerabilities(java.sql.ResultSet rs) throws java.sql.SQLException
java.sql.ResultSet
containing vulnerability information into an array of
Vulnerability
objects.
java.sql.SQLException
protected static java.lang.String getOrderByClause(VulnerabilityFactory.SortStyle sortStyle)
protected static java.lang.String getResolutionTypeClause(VulnerabilityFactory.ResolutionType resType)
resType
- the resolution type to map to a clause
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |