Class SnmpInterfaceUpgrade
- java.lang.Object
-
- org.opennms.upgrade.implementations.SnmpInterface
-
- org.opennms.upgrade.implementations.SnmpInterfaceUpgrade
-
public class SnmpInterfaceUpgrade extends SnmpInterface
The Class SnmpInterfaceUpgrade.- Author:
- Alejandro Galue
-
-
Constructor Summary
Constructors Constructor Description SnmpInterfaceUpgrade(int nodeId, String foreignSource, String foreignId, String ifDescr, String ifName, String physAddr, boolean storeByForeignSource)
Instantiates a new SNMP interface upgrade.SnmpInterfaceUpgrade(ResultSet rs, boolean storeByForeignSource)
Instantiates a new SNMP interface upgrade.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getNewInterfaceDir()
Gets the new interface directory.File
getNodeDir()
Gets the node directory.protected File
getNodeDirectory(int nodeId, String foreignSource, String foreignId)
Gets the node directory.File
getOldInterfaceDir()
Gets the old interface directory.protected void
initialize()
Initialize.boolean
shouldMerge()
Checks if the interface directories should be merged.String
toString()
-
Methods inherited from class org.opennms.upgrade.implementations.SnmpInterface
getForeignId, getForeignSource, getIfDescr, getIfName, getNewResourceId, getNewRrdLabel, getNodeId, getOldResourceId, getOldRrdLabel, getPhysAddr, shouldUpdate
-
-
-
-
Constructor Detail
-
SnmpInterfaceUpgrade
public SnmpInterfaceUpgrade(int nodeId, String foreignSource, String foreignId, String ifDescr, String ifName, String physAddr, boolean storeByForeignSource)
Instantiates a new SNMP interface upgrade.- Parameters:
nodeId
- the node idforeignSource
- the foreign sourceforeignId
- the foreign idifDescr
- the SNMP interface descriptionifName
- the SNMP interface namephysAddr
- the SNMP physical addressstoreByForeignSource
- true, if store by foreign source is enabled
-
SnmpInterfaceUpgrade
public SnmpInterfaceUpgrade(ResultSet rs, boolean storeByForeignSource) throws SQLException
Instantiates a new SNMP interface upgrade.- Parameters:
rs
- the ResultSetstoreByForeignSource
- true, if the store by foreign source is enabled- Throws:
SQLException
- the SQL exception
-
-
Method Detail
-
initialize
protected void initialize()
Description copied from class:SnmpInterface
Initialize.- Overrides:
initialize
in classSnmpInterface
-
getNodeDir
public File getNodeDir()
Gets the node directory.- Returns:
- the node directory
-
getOldInterfaceDir
public File getOldInterfaceDir()
Gets the old interface directory.- Returns:
- the old interface directory
-
getNewInterfaceDir
public File getNewInterfaceDir()
Gets the new interface directory.- Returns:
- the new interface directory
-
shouldMerge
public boolean shouldMerge()
Checks if the interface directories should be merged.- Returns:
- true, if the interface directory should be merged
-
getNodeDirectory
protected File getNodeDirectory(int nodeId, String foreignSource, String foreignId)
Gets the node directory.- Parameters:
nodeId
- the node idforeignSource
- the foreign sourceforeignId
- the foreign id- Returns:
- the node directory
-
toString
public String toString()
- Overrides:
toString
in classSnmpInterface
-
-