org.opennms.netmgt.importer.operations
Class AbstractSaveOrUpdateOperation
java.lang.Object
org.opennms.netmgt.importer.operations.AbstractImportOperation
org.opennms.netmgt.importer.operations.AbstractSaveOrUpdateOperation
- All Implemented Interfaces:
- ImportOperation, SaveOrUpdateOperation
- Direct Known Subclasses:
- InsertOperation, UpdateOperation
public abstract class AbstractSaveOrUpdateOperation
- extends AbstractImportOperation
- implements SaveOrUpdateOperation
|
Constructor Summary |
AbstractSaveOrUpdateOperation(Integer nodeId,
String foreignSource,
String foreignId,
String nodeLabel,
String building,
String city,
Boolean nonIpInterfaces,
String nonIpSnmpPrimary)
|
AbstractSaveOrUpdateOperation(String foreignSource,
String foreignId,
String nodeLabel,
String building,
String city,
Boolean nonIpInterfaces,
String nonIpSnmpPrimary)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_nonIpInterfaces
protected Boolean m_nonIpInterfaces
m_nonIpSnmpPrimary
protected String m_nonIpSnmpPrimary
AbstractSaveOrUpdateOperation
public AbstractSaveOrUpdateOperation(String foreignSource,
String foreignId,
String nodeLabel,
String building,
String city,
Boolean nonIpInterfaces,
String nonIpSnmpPrimary)
AbstractSaveOrUpdateOperation
public AbstractSaveOrUpdateOperation(Integer nodeId,
String foreignSource,
String foreignId,
String nodeLabel,
String building,
String city,
Boolean nonIpInterfaces,
String nonIpSnmpPrimary)
foundInterface
public void foundInterface(String ipAddr,
Object descr,
String snmpPrimary,
boolean managed,
int status)
- Specified by:
foundInterface in interface SaveOrUpdateOperation
gatherAdditionalData
public void gatherAdditionalData()
- Specified by:
gatherAdditionalData in interface ImportOperation
persist
public List<Event> persist()
- Specified by:
persist in interface ImportOperation
doPersist
protected abstract List<Event> doPersist()
updateSnmpData
protected void updateSnmpData()
isSnmpDataForNodeUpToDate
protected boolean isSnmpDataForNodeUpToDate()
isSnmpDataForInterfacesUpToDate
protected boolean isSnmpDataForInterfacesUpToDate()
getAdminStatus
protected Integer getAdminStatus(int ifIndex)
getIfType
protected Integer getIfType(int ifIndex)
getNetMask
protected String getNetMask(int ifIndex)
foundMonitoredService
public void foundMonitoredService(String serviceName)
- Specified by:
foundMonitoredService in interface SaveOrUpdateOperation
foundCategory
public void foundCategory(String name)
- Specified by:
foundCategory in interface SaveOrUpdateOperation
getNode
protected OnmsNode getNode()
getNodeDao
protected NodeDao getNodeDao()
getDistPollerDao
protected DistPollerDao getDistPollerDao()
getIpAddrToInterfaceMap
protected Map<String,OnmsIpInterface> getIpAddrToInterfaceMap(OnmsNode imported)
getCategoryDao
public CategoryDao getCategoryDao()
setCategoryDao
public void setCategoryDao(CategoryDao categoryDao)
setServiceTypeDao
public void setServiceTypeDao(ServiceTypeDao svcTypeDao)
setNodeDao
public void setNodeDao(NodeDao nodeDao)
setDistPollerDao
public void setDistPollerDao(DistPollerDao distPollerDao)
setTypeCache
public void setTypeCache(ThreadLocal<HashMap<String,OnmsServiceType>> typeCache)
setCategoryCache
public void setCategoryCache(ThreadLocal<HashMap<String,OnmsCategory>> categoryCache)
setNonIpInterfaces
public void setNonIpInterfaces(Boolean nonIpInterfaces)
getNonIpInterfaces
public Boolean getNonIpInterfaces()
setNonIpSnmpPrimary
public void setNonIpSnmpPrimary(String nonIpSnmpPrimary)
getNonIpSnmpPrimary
public String getNonIpSnmpPrimary()
log
protected Category log()
nullSafeEquals
public boolean nullSafeEquals(Object o1,
Object o2)
Copyright © 2009. All Rights Reserved.