org.opennms.netmgt.dao.support
Class DefaultResourceDao
java.lang.Object
org.opennms.netmgt.dao.support.DefaultResourceDao
- All Implemented Interfaces:
- ResourceDao, org.springframework.beans.factory.InitializingBean
public class DefaultResourceDao
- extends Object
- implements ResourceDao, org.springframework.beans.factory.InitializingBean
Encapsulates all SNMP performance reporting for the web user interface.
- Author:
- Seth Leger , Lawrence Karnowski , OpenNMS , DJ Gregor
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STRINGS_PROPERTIES_FILE_NAME
public static final String STRINGS_PROPERTIES_FILE_NAME
- File name to look for in a resource directory for string attributes.
- See Also:
- Constant Field Values
INTERFACE_GRAPH_TYPE
public static final String INTERFACE_GRAPH_TYPE
- See Also:
- Constant Field Values
RESPONSE_DIRECTORY
public static final String RESPONSE_DIRECTORY
- See Also:
- Constant Field Values
SNMP_DIRECTORY
public static final String SNMP_DIRECTORY
- See Also:
- Constant Field Values
DefaultResourceDao
public DefaultResourceDao()
setRrdDirectory
public void setRrdDirectory(File rrdDirectory)
getRrdDirectory
public File getRrdDirectory()
- Specified by:
getRrdDirectory in interface ResourceDao
getRrdDirectory
public File getRrdDirectory(boolean verify)
- Specified by:
getRrdDirectory in interface ResourceDao
getDataCollectionConfig
public DataCollectionConfig getDataCollectionConfig()
setDataCollectionConfig
public void setDataCollectionConfig(DataCollectionConfig dataCollectionConfig)
getNodeDao
public NodeDao getNodeDao()
setNodeDao
public void setNodeDao(NodeDao nodeDao)
getCollectdConfig
public CollectdConfigFactory getCollectdConfig()
setCollectdConfig
public void setCollectdConfig(CollectdConfigFactory collectdConfig)
getLocationMonitorDao
public LocationMonitorDao getLocationMonitorDao()
setLocationMonitorDao
public void setLocationMonitorDao(LocationMonitorDao locationMonitorDao)
afterPropertiesSet
public void afterPropertiesSet()
throws IOException
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
IOException
getResourceTypes
public Collection<OnmsResourceType> getResourceTypes()
- Specified by:
getResourceTypes in interface ResourceDao
getResourceById
public OnmsResource getResourceById(String id)
- Specified by:
getResourceById in interface ResourceDao
loadResourceById
public OnmsResource loadResourceById(String id)
- Specified by:
loadResourceById in interface ResourceDao
getResourceListById
public List<OnmsResource> getResourceListById(String id)
- Specified by:
getResourceListById in interface ResourceDao
getTopLevelResource
protected OnmsResource getTopLevelResource(String resourceType,
String resource)
getChildResource
protected OnmsResource getChildResource(OnmsResource parentResource,
String resourceType,
String resource)
getChildResourceList
protected List<OnmsResource> getChildResourceList(OnmsResource parentResource)
findNodeResources
public List<OnmsResource> findNodeResources()
- Returns a list of resources for a node.
XXX It does not currently fully check that an IP address that is found to have
distributed response time data is in the database on the proper node so it can have false positives.
- Specified by:
findNodeResources in interface ResourceDao
findDomainResources
public List<OnmsResource> findDomainResources()
- Returns a list of resources for domains.
- Specified by:
findDomainResources in interface ResourceDao
getNodeEntityResource
protected OnmsResource getNodeEntityResource(String resource)
getForeignSourceNodeEntityResource
protected OnmsResource getForeignSourceNodeEntityResource(String resource)
getDomainEntityResource
protected OnmsResource getDomainEntityResource(String domain)
decode
public static String decode(String string)
- Encapsulate the deprecated decode method to fix it in one place.
- Parameters:
string - string to be decoded
- Returns:
- decoded string
getResourceForNode
public OnmsResource getResourceForNode(OnmsNode node)
- Specified by:
getResourceForNode in interface ResourceDao
getResourceForIpInterface
public OnmsResource getResourceForIpInterface(OnmsIpInterface ipInterface)
- Specified by:
getResourceForIpInterface in interface ResourceDao
getResourceForIpInterface
public OnmsResource getResourceForIpInterface(OnmsIpInterface ipInterface,
OnmsLocationMonitor locMon)
- Specified by:
getResourceForIpInterface in interface ResourceDao
findTopLevelResources
public List<OnmsResource> findTopLevelResources()
- Specified by:
findTopLevelResources in interface ResourceDao
Copyright © 2009. All Rights Reserved.