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 java.util.Date
decodeSnmpV2TcDateAndTime(java.math.BigInteger octetStringValue)
void
expandMapValues(java.util.Map<java.lang.String,java.lang.String> parmMap, Event event)
java.lang.String
expandParms(java.lang.String string, Event event)
java.lang.String
expandParms(java.lang.String inp, Event event, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> decode)
java.lang.String
getAssetFieldValue(java.lang.String parm, long nodeId)
Helper method.java.lang.String
getEventHost(Event event)
java.lang.String
getForeignId(long nodeId)
Retrieve foreign id from the node table of the database given a particular nodeId.java.lang.String
getForeignSource(long nodeId)
Retrieve foreign source from the node table of the database given a particular nodeId.java.lang.String
getHardwareFieldValue(java.lang.String parm, long nodeId)
java.lang.String
getHostName(int nodeId, java.lang.String hostip)
java.lang.String
getIfAlias(long nodeId, java.lang.String ipAddr)
Retrieve ifAlias from the snmpinterface table of the database given a particular nodeId and ipAddr.java.lang.String
getNamedParmValue(java.lang.String string, Event event)
java.lang.String
getNodeLabel(long nodeId)
Retrieve nodeLabel from the node table of the database given a particular nodeId.java.lang.String
getNodeLocation(long nodeId)
Retrieve nodeLocation from the node table of the database given a particular nodeId.java.lang.String
getPrimaryInterface(long nodeId)
ExpandableParameterResolver
getResolver(java.lang.String token)
-
-
-
Method Detail
-
getHardwareFieldValue
java.lang.String getHardwareFieldValue(java.lang.String parm, long nodeId)
-
expandParms
java.lang.String expandParms(java.lang.String string, Event event)
-
expandParms
java.lang.String expandParms(java.lang.String inp, Event event, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> decode)
-
getNamedParmValue
java.lang.String getNamedParmValue(java.lang.String string, Event event)
-
expandMapValues
void expandMapValues(java.util.Map<java.lang.String,java.lang.String> parmMap, Event event)
-
getHostName
java.lang.String getHostName(int nodeId, java.lang.String hostip) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getEventHost
java.lang.String getEventHost(Event event)
-
getIfAlias
java.lang.String getIfAlias(long nodeId, java.lang.String ipAddr) throws java.sql.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:
java.sql.SQLException
- if database error encountered
-
getAssetFieldValue
java.lang.String getAssetFieldValue(java.lang.String parm, long nodeId)
Helper method.- Parameters:
parm
-nodeId
-- Returns:
- The value of an asset field based on the nodeid of the event
-
getForeignId
java.lang.String getForeignId(long nodeId) throws java.sql.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:
java.sql.SQLException
- if database error encountered
-
getForeignSource
java.lang.String getForeignSource(long nodeId) throws java.sql.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:
java.sql.SQLException
- if database error encountered
-
getNodeLabel
java.lang.String getNodeLabel(long nodeId) throws java.sql.SQLException
Retrieve nodeLabel from the node table of the database given a particular nodeId.- Parameters:
nodeId
- Node identifier- Returns:
- nodeLabel Retreived nodeLabel
- Throws:
java.sql.SQLException
- if database error encountered
-
getNodeLocation
java.lang.String getNodeLocation(long nodeId) throws java.sql.SQLException
Retrieve nodeLocation from the node table of the database given a particular nodeId.- Parameters:
nodeId
- Node identifier- Returns:
- nodeLocation Retrieved nodeLocation
- Throws:
java.sql.SQLException
- if database error encountered
-
getResolver
ExpandableParameterResolver getResolver(java.lang.String token)
-
decodeSnmpV2TcDateAndTime
java.util.Date decodeSnmpV2TcDateAndTime(java.math.BigInteger octetStringValue)
-
getPrimaryInterface
java.lang.String getPrimaryInterface(long nodeId) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-