|
||||||||||
| 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
OnmsAlarmOssjMapper class.
| 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 String |
ossjAlarmTypeToUei(String alarmType)
Maps OSS/J alarm types to OpenNMS uei types |
static OnmsSeverity |
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 |
OnmsAlarm |
populateOnmsAlarmFromOssjAlarm(OnmsAlarm onmsAlarm,
AlarmValue alarmValue,
Integer almUpdateBehaviour,
String defaultUpdateNodeLabel)
This method maps an OSS/J AlarmValue to OpenNMS alarm |
AlarmValue |
populateOssjAlarmFromOpenNMSAlarm(AlarmValue alarmValueSpecification,
OnmsAlarm _openNMSalarm)
This method maps OpenNMS alarm to an OSS/J alarms and adds additional information |
void |
setAssetRecordDao(AssetRecordDao ar)
Used by Spring Application context to pass in AssetRecordDao |
void |
setDistPollerDao(DistPollerDao _distPollerDao)
Used by Spring Application context to pass in distPollerDao; |
void |
setNodeDao(NodeDao nodedao)
Used by Spring Application context to pass in NodeDaof |
void |
setOssDao(OssDao _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(DistPollerDao _distPollerDao)
_distPollerDao - a DistPollerDao object.public void setAssetRecordDao(AssetRecordDao ar)
ar - a AssetRecordDao object.public void setNodeDao(NodeDao nodedao)
nodedao - a NodeDao object.public void setOssDao(OssDao _ossDao)
_ossDao - the ossDao to set
public OnmsAlarm populateOnmsAlarmFromOssjAlarm(OnmsAlarm onmsAlarm,
AlarmValue alarmValue,
Integer almUpdateBehaviour,
String defaultUpdateNodeLabel)
throws IllegalArgumentException,
UnsupportedAttributeException
onmsAlarm - OnmsAlarm object to be populatedalarmValue - 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
IllegalArgumentException - if any.
javax.oss.UnsupportedAttributeException - if any.
UnsupportedAttributeException
public AlarmValue populateOssjAlarmFromOpenNMSAlarm(AlarmValue alarmValueSpecification,
OnmsAlarm _openNMSalarm)
throws IllegalArgumentException,
UnsupportedAttributeException
_openNMSalarm - data to use to populate the OSS/J alarmalarmValueSpecification - AlarmValue object to be populated - Invariant (Specifcation) values should be already populated
IllegalArgumentException - if any.
javax.oss.UnsupportedAttributeException - if any.
UnsupportedAttributeException
public static OnmsSeverity ossjSeveritytoOnmsSeverity(short ossjseverity)
throws IllegalArgumentException
ossjseverity - the severity value according to ossj / X733
IllegalArgumentException - if any.public static String ossjAlarmTypeToUei(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 | |||||||||