|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openoss.opennms.spring.dao.OssDaoOpenNMSImpl
public class OssDaoOpenNMSImpl
OssDaoOpenNMSImpl class.
| Field Summary | |
|---|---|
protected AlarmDao |
_alarmDao
Used to search and update opennms alarm list |
protected AssetRecordDao |
_assetRecordDao
Used to obtain opennms asset information for inclusion in alarms |
protected DataSource |
_dataSource
Used to create new Lazy objects |
protected NodeDao |
_nodeDao
Used to obtain opennms node information for inclusion in alarms |
protected org.springframework.transaction.support.TransactionTemplate |
transTemplate
Used to ensure that objects retreived from OpenNMS through Hibernate contain all of their internal objects populated with values |
| Constructor Summary | |
|---|---|
OssDaoOpenNMSImpl()
|
|
| Method Summary | |
|---|---|
OnmsAlarm |
addCurrentAlarmForUniqueKey(OnmsAlarm alarm)
Adds Current alarm to OpenNMS database with a new alarmID as an AlarmType= 'raise' ( type 1 ) alarm. |
static String |
alarmToString(OnmsAlarm alarm)
Debug method to print out opennms alarms |
OnmsNode |
findNodeByID(Integer nodeid)
Returns the OnmsNode for the supplied node id |
OnmsNode |
findNodeByInstanceAndType(String managedObjectInstance,
String managedObjectType)
This will return the first node with entry in Assets table having matching managedObjectInstance and managedObjectType. |
OnmsNode |
findNodeByLabel(String label)
This will return the first node in nodes table with nodeLable entry matching label Note for this to work, the configuration of OpenNMS must ensure that the node label is unique otherwise only the first instance will be returned |
OnmsAlarm[] |
getAlarmCache()
getAlarmCache |
OnmsAlarm |
getCurrentAlarmForUniqueKey(String applicationDN,
String ossPrimaryKey)
getCurrentAlarmForUniqueKey |
void |
init()
init |
void |
setAlarmDao(AlarmDao alarmDao)
Used by Spring Application context to pass in AlarmDao. |
void |
setAssetRecordDao(AssetRecordDao ar)
Used by Spring Application context to pass in AssetRecordDao. |
void |
setDataSource(DataSource dataSource)
setDataSource |
void |
setNodeDao(NodeDao nodedao)
Used by Spring Application context to pass in NodeDao. |
void |
setQoSD(QoSD _qoSD)
Used by running QoSD to set up OssDao to call back alarm list updates |
void |
setTransTemplate(org.springframework.transaction.support.TransactionTemplate _transTemplate)
Used by Spring Application context to pass in a Spring transaction manager |
void |
updateAlarmCache()
updateAlarmCache |
void |
updateAlarmCacheAndSendAlarms()
updateAlarmCacheAndSendAlarms |
OnmsAlarm |
updateCurrentAlarmForUniqueKey(OnmsAlarm alarm)
Updates Current alarm in OpenNMS database with a new alarmID as an AlarmType= 'raise' ( type 1 ) alarm. |
void |
updateNodeCaches()
updateNodeCaches |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DataSource _dataSource
protected AssetRecordDao _assetRecordDao
AssetRecordDaoprotected NodeDao _nodeDao
NodeDaoprotected AlarmDao _alarmDao
AlarmDaoprotected org.springframework.transaction.support.TransactionTemplate transTemplate
| Constructor Detail |
|---|
public OssDaoOpenNMSImpl()
| Method Detail |
|---|
public void setDataSource(DataSource dataSource)
setDataSource
setDataSource in interface OssDaodataSource - The dataSource to setpublic void setAssetRecordDao(AssetRecordDao ar)
AssetRecordDao.
setAssetRecordDao in interface OssDaoar - a AssetRecordDao object.public void setNodeDao(NodeDao nodedao)
NodeDao.
setNodeDao in interface OssDaonodedao - a NodeDao object.public void setAlarmDao(AlarmDao alarmDao)
AlarmDao.
setAlarmDao in interface OssDaoalarmDao - a AlarmDao object.public void setTransTemplate(org.springframework.transaction.support.TransactionTemplate _transTemplate)
setTransTemplate in interface OssDao_transTemplate - a TransactionTemplate object.public void setQoSD(QoSD _qoSD)
setQoSD in interface OssDao_qoSD - a QoSD object.public void init()
init
init in interface OssDaopublic OnmsAlarm addCurrentAlarmForUniqueKey(OnmsAlarm alarm)
addCurrentAlarmForUniqueKey in interface OssDaoalarm - - alarm to add.
public OnmsAlarm updateCurrentAlarmForUniqueKey(OnmsAlarm alarm)
updateCurrentAlarmForUniqueKey in interface OssDaoalarm - - alarm to add.
public OnmsAlarm getCurrentAlarmForUniqueKey(String applicationDN,
String ossPrimaryKey)
getCurrentAlarmForUniqueKey
getCurrentAlarmForUniqueKey in interface OssDaoapplicationDN - a String object.ossPrimaryKey - a String object.
public void updateAlarmCache()
throws IllegalStateException
updateAlarmCache
updateAlarmCache in interface OssDaoIllegalStateException - if any.
public void updateAlarmCacheAndSendAlarms()
throws IllegalStateException
updateAlarmCacheAndSendAlarms
updateAlarmCacheAndSendAlarms in interface OssDaoIllegalStateException - if any.public OnmsAlarm[] getAlarmCache()
getAlarmCache
getAlarmCache in interface OssDaoOnmsAlarm objects.public static String alarmToString(OnmsAlarm alarm)
alarm - a OnmsAlarm object.
public OnmsNode findNodeByLabel(String label)
findNodeByLabel in interface OssDaolabel - NodeLabel of node to look for
null if not found
Note: Accesses the Node Cache
public OnmsNode findNodeByInstanceAndType(String managedObjectInstance,
String managedObjectType)
throws IllegalArgumentException
findNodeByInstanceAndType in interface OssDaomanagedObjectInstance - a String object.managedObjectType - a String object.
IllegalArgumentException - Note: Accesses the Node Cachepublic OnmsNode findNodeByID(Integer nodeid)
findNodeByID in interface OssDaonodeid - a Integer object.
OnmsNode object.public void updateNodeCaches()
updateNodeCaches
updateNodeCaches in interface OssDao
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||