Package org.opennms.netmgt.eventd
Interface EventUtil
-
- All Known Implementing Classes:
AbstractEventUtil
,EventUtilDaoImpl
public interface EventUtil
EventUtil is used primarily for the event parm expansion - has methods used by all the event components to send in the event and the element to expanded and have the 'expanded' value sent back- Author:
- Sowmya Kumaraswamy , Brain Weaver , OpenNMS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Date
decodeSnmpV2TcDateAndTime(BigInteger octetStringValue)
void
expandMapValues(Map<String,String> parmMap, Event event)
String
expandParms(String string, Event event)
String
expandParms(String inp, Event event, Map<String,Map<String,String>> decode)
String
getAssetFieldValue(String parm, long nodeId)
Helper method.String
getEventHost(Event event)
String
getForeignId(long nodeId)
Retrieve foreign id from the node table of the database given a particular nodeId.String
getForeignSource(long nodeId)
Retrieve foreign source from the node table of the database given a particular nodeId.String
getHardwareFieldValue(String parm, long nodeId)
String
getHostName(int nodeId, String hostip)
String
getIfAlias(long nodeId, String ipAddr)
Retrieve ifAlias from the snmpinterface table of the database given a particular nodeId and ipAddr.String
getNamedParmValue(String string, Event event)
String
getNodeLabel(long nodeId)
Retrieve nodeLabel from the node table of the database given a particular nodeId.String
getNodeLocation(long nodeId)
Retrieve nodeLocation from the node table of the database given a particular nodeId.String
getPrimaryInterface(long nodeId)
ExpandableParameterResolver
getResolver(String token)
-
-
-
Method Detail
-
getHostName
String getHostName(int nodeId, String hostip) throws SQLException
- Throws:
SQLException
-
getIfAlias
String getIfAlias(long nodeId, String ipAddr) throws SQLException
Retrieve ifAlias from the snmpinterface table of the database given a particular nodeId and ipAddr.- Parameters:
nodeId
- Node identifieripAddr
- Interface IP address- Returns:
- ifAlias Retreived ifAlias
- Throws:
SQLException
- if database error encountered
-
getAssetFieldValue
String getAssetFieldValue(String parm, long nodeId)
Helper method.- Parameters:
parm
-nodeId
-- Returns:
- The value of an asset field based on the nodeid of the event
-
getForeignId
String getForeignId(long nodeId) throws SQLException
Retrieve foreign id from the node table of the database given a particular nodeId.- Parameters:
nodeId
- Node identifier- Returns:
- foreignId Retrieved foreign id
- Throws:
SQLException
- if database error encountered
-
getForeignSource
String getForeignSource(long nodeId) throws SQLException
Retrieve foreign source from the node table of the database given a particular nodeId.- Parameters:
nodeId
- Node identifier- Returns:
- foreignSource Retrieved foreign source
- Throws:
SQLException
- if database error encountered
-
getNodeLabel
String getNodeLabel(long nodeId) throws SQLException
Retrieve nodeLabel from the node table of the database given a particular nodeId.- Parameters:
nodeId
- Node identifier- Returns:
- nodeLabel Retreived nodeLabel
- Throws:
SQLException
- if database error encountered
-
getNodeLocation
String getNodeLocation(long nodeId) throws SQLException
Retrieve nodeLocation from the node table of the database given a particular nodeId.- Parameters:
nodeId
- Node identifier- Returns:
- nodeLocation Retrieved nodeLocation
- Throws:
SQLException
- if database error encountered
-
getResolver
ExpandableParameterResolver getResolver(String token)
-
decodeSnmpV2TcDateAndTime
Date decodeSnmpV2TcDateAndTime(BigInteger octetStringValue)
-
getPrimaryInterface
String getPrimaryInterface(long nodeId) throws SQLException
- Throws:
SQLException
-
-