|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openoss.opennms.spring.dao.OnmsAlarmOssjMapper
public class OnmsAlarmOssjMapper
| Field Summary | |
|---|---|
static int |
SPECIFY_OUTSTATION
if alarmUpdateBehaviour is set to SPECIFY_OUTSTATION
the receiver name will be used as the node name which will be updated with
alarms from this receiver. |
static int |
USE_TYPE_INSTANCE
if alarmUpdateBehaviour is set to USE_TYPE_INSTANCE
the alarm will be created with the node name corrsponding to a concatenation
of the ManagedObjectID and ManagedObjectType. |
| Constructor Summary | |
|---|---|
OnmsAlarmOssjMapper()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getAlarmUpdateBehaviourForInt(java.lang.Integer aub)
REturns string value of alarmUpdateBehaviour |
static java.lang.Integer |
getalarmUpdateBehaviourForString(java.lang.String _alarmUpdateBehaviour)
Used to convert alarmUpdateBehaviour string to a valid Integer |
short |
onmsSeverityToOssjSeverity(java.lang.Integer onmsSeverity)
convenience method to map OpenNMS to OSS/J severities From OpenNMS code; public static final int INDETERMINATE_SEVERITY = 1; public static final int CLEARED_SEVERITY = 2; public static final int NORMAL_SEVERITY = 3; public static final int WARNING_SEVERITY = 4; public static final int MINOR_SEVERITY = 5; public static final int MAJOR_SEVERITY = 6; public static final int CRITICAL_SEVERITY = 7; NOTE org.opennms.web.alarm.Alarm.NORMAL_SEVERITY has no equivilent in OSS/J X733 |
java.lang.String |
ossjAlarmTypeToUei(java.lang.String alarmType)
Maps OSS/J alarm types to OpenNMS uei types |
java.lang.Integer |
ossjSeveritytoOnmsSeverity(short ossjseverity)
convenience method to map OSS/J to OpenNMS severities A switch statement converts the OSS/J severity qualifier over to one compatible with OpenNMS From OpenNMS code; public static final int INDETERMINATE_SEVERITY = 1; public static final int CLEARED_SEVERITY = 2; public static final int NORMAL_SEVERITY = 3; public static final int WARNING_SEVERITY = 4; public static final int MINOR_SEVERITY = 5; public static final int MAJOR_SEVERITY = 6; public static final int CRITICAL_SEVERITY = 7; NOTE org.opennms.web.alarm.Alarm.NORMAL_SEVERITY has no equivilent in OSS/J X733 |
org.opennms.netmgt.model.OnmsAlarm |
populateOnmsAlarmFromOssjAlarm(org.opennms.netmgt.model.OnmsAlarm onmsAlarm,
javax.oss.fm.monitor.AlarmValue alarmValue,
java.lang.Integer almUpdateBehaviour,
java.lang.String defaultUpdateNodeLabel)
This method maps an OSS/J AlarmValue to OpenNMS alarm |
javax.oss.fm.monitor.AlarmValue |
populateOssjAlarmFromOpenNMSAlarm(javax.oss.fm.monitor.AlarmValue alarmValueSpecification,
org.opennms.netmgt.model.OnmsAlarm _openNMSalarm)
This method maps OpenNMS alarm to an OSS/J alarms and adds additional information |
void |
setassetRecordDao(org.opennms.netmgt.dao.AssetRecordDao ar)
Used by Spring Application context to pass in AssetRecordDao |
void |
setdistPollerDao(org.opennms.netmgt.dao.DistPollerDao _distPollerDao)
Used by Spring Application context to pass in distPollerDao; |
void |
setnodeDao(org.opennms.netmgt.dao.NodeDao nodedao)
Used by Spring Application context to pass in NodeDaof |
void |
setossDao(OssDaoOpenNMSImpl _ossDao)
provides an interface to OpenNMS which provides a unified api |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int SPECIFY_OUTSTATION
alarmUpdateBehaviour is set to SPECIFY_OUTSTATION
the receiver name will be used as the node name which will be updated with
alarms from this receiver. Usually this is set to the name of the node
associated with the outstation but it can be set to a node which is a
catch all for received alarms ( i.e. the local host perhaps )
public static int USE_TYPE_INSTANCE
alarmUpdateBehaviour is set to USE_TYPE_INSTANCE
the alarm will be created with the node name corrsponding to a concatenation
of the ManagedObjectID and ManagedObjectType. If these cannot be found
then the alarm will default to the outstation node
| Constructor Detail |
|---|
public OnmsAlarmOssjMapper()
| Method Detail |
|---|
public void setdistPollerDao(org.opennms.netmgt.dao.DistPollerDao _distPollerDao)
public void setassetRecordDao(org.opennms.netmgt.dao.AssetRecordDao ar)
ar - public void setnodeDao(org.opennms.netmgt.dao.NodeDao nodedao)
nodedao - public void setossDao(OssDaoOpenNMSImpl _ossDao)
ossDao - the ossDao to setpublic static java.lang.String getAlarmUpdateBehaviourForInt(java.lang.Integer aub)
aub - valid value for alarmUpdateBehaviour
SPECIFY_OUTSTATION, or USE_TYPE_INSTANCE
public static java.lang.Integer getalarmUpdateBehaviourForString(java.lang.String _alarmUpdateBehaviour)
alarmUpdateBehaviour - must be
"USE_TYPE_INSTANCE"
or
"SPECIFY_OUTSTATION"
public org.opennms.netmgt.model.OnmsAlarm populateOnmsAlarmFromOssjAlarm(org.opennms.netmgt.model.OnmsAlarm onmsAlarm,
javax.oss.fm.monitor.AlarmValue alarmValue,
java.lang.Integer almUpdateBehaviour,
java.lang.String defaultUpdateNodeLabel)
throws java.lang.IllegalArgumentException,
javax.oss.UnsupportedAttributeException
onmsAlarm - OnmsAlarm object to be populatedav - OSS/J AlarmValue data to use to populate OnmsAlarmalmUpdateBehaviour - - determines how to treat the node name of the new alarm must be of value;
USE_TYPE_INSTANCE - populate nodeID with node having same asset type and instance data as alarm
or SPECIFY_OUTSTATION - populate nodeID with node having same nodeLabel as defaultUpdateNodeLabeldefaultUpdateNodeLabel - name of node to be updated if almUpdateBehaviour==SPECIFY_OUTSTATION
java.lang.IllegalArgumentException
javax.oss.UnsupportedAttributeException
public javax.oss.fm.monitor.AlarmValue populateOssjAlarmFromOpenNMSAlarm(javax.oss.fm.monitor.AlarmValue alarmValueSpecification,
org.opennms.netmgt.model.OnmsAlarm _openNMSalarm)
throws java.lang.IllegalArgumentException,
javax.oss.UnsupportedAttributeException
_openNMSalarm - data to use to populate the OSS/J alarmalarmValueSpecification - AlarmValue object to be populated - Invariant (Specifcation) values should be already populated
java.lang.IllegalArgumentException
javax.oss.UnsupportedAttributeException
public java.lang.Integer ossjSeveritytoOnmsSeverity(short ossjseverity)
throws java.lang.IllegalArgumentException
ossjseverity - the severity value according to ossj / X733
java.lang.IllegalArgumentException
public short onmsSeverityToOssjSeverity(java.lang.Integer onmsSeverity)
throws java.lang.IllegalArgumentException
onmsSeverity - the severity value according to opennms
java.lang.IllegalArgumentExceptionpublic java.lang.String ossjAlarmTypeToUei(java.lang.String alarmType)
alarmType - String representing OSS/J alarm Type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||