|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.dao.support.DefaultResourceDao
public class DefaultResourceDao
Encapsulates all SNMP performance reporting for the web user interface.
| Field Summary | |
|---|---|
static String |
INTERFACE_GRAPH_TYPE
Constant INTERFACE_GRAPH_TYPE="interface" |
static String |
RESPONSE_DIRECTORY
Constant RESPONSE_DIRECTORY="response" |
static String |
SNMP_DIRECTORY
Constant SNMP_DIRECTORY="snmp" |
static String |
STRINGS_PROPERTIES_FILE_NAME
File name to look for in a resource directory for string attributes. |
| Constructor Summary | |
|---|---|
DefaultResourceDao()
Constructor for DefaultResourceDao. |
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
afterPropertiesSet |
static String |
decode(String string)
Encapsulate the deprecated decode method to fix it in one place. |
List<OnmsResource> |
findDomainResources()
Returns a list of resources for domains. |
List<OnmsResource> |
findNodeResources()
Returns a list of resources for a node. |
List<OnmsResource> |
findTopLevelResources()
findTopLevelResources |
protected OnmsResource |
getChildResource(OnmsResource parentResource,
String resourceType,
String resource)
getChildResource |
protected List<OnmsResource> |
getChildResourceList(OnmsResource parentResource)
getChildResourceList |
CollectdConfigFactory |
getCollectdConfig()
getCollectdConfig |
DataCollectionConfig |
getDataCollectionConfig()
getDataCollectionConfig |
protected OnmsResource |
getDomainEntityResource(String domain)
getDomainEntityResource |
protected OnmsResource |
getForeignSourceNodeEntityResource(String resource)
getForeignSourceNodeEntityResource |
LocationMonitorDao |
getLocationMonitorDao()
getLocationMonitorDao |
NodeDao |
getNodeDao()
getNodeDao |
protected OnmsResource |
getNodeEntityResource(String resource)
getNodeEntityResource |
OnmsResource |
getResourceById(String id)
Fetch a specific resource by string ID. |
OnmsResource |
getResourceForIpInterface(OnmsIpInterface ipInterface)
getResourceForIpInterface |
OnmsResource |
getResourceForIpInterface(OnmsIpInterface ipInterface,
OnmsLocationMonitor locMon)
getResourceForIpInterface |
OnmsResource |
getResourceForNode(OnmsNode node)
getResourceForNode |
List<OnmsResource> |
getResourceListById(String id)
Fetch a specific list of resources by string ID. |
Collection<OnmsResourceType> |
getResourceTypes()
getResourceTypes |
File |
getRrdDirectory()
getRrdDirectory |
File |
getRrdDirectory(boolean verify)
getRrdDirectory |
protected OnmsResource |
getTopLevelResource(String resourceType,
String resource)
getTopLevelResource |
void |
setCollectdConfig(CollectdConfigFactory collectdConfig)
setCollectdConfig |
void |
setDataCollectionConfig(DataCollectionConfig dataCollectionConfig)
setDataCollectionConfig |
void |
setLocationMonitorDao(LocationMonitorDao locationMonitorDao)
setLocationMonitorDao |
void |
setNodeDao(NodeDao nodeDao)
setNodeDao |
void |
setRrdDirectory(File rrdDirectory)
setRrdDirectory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String STRINGS_PROPERTIES_FILE_NAME
public static final String INTERFACE_GRAPH_TYPE
INTERFACE_GRAPH_TYPE="interface"
public static final String RESPONSE_DIRECTORY
RESPONSE_DIRECTORY="response"
public static final String SNMP_DIRECTORY
SNMP_DIRECTORY="snmp"
| Constructor Detail |
|---|
public DefaultResourceDao()
Constructor for DefaultResourceDao.
| Method Detail |
|---|
public void setRrdDirectory(File rrdDirectory)
setRrdDirectory
rrdDirectory - a File object.public File getRrdDirectory()
getRrdDirectory
getRrdDirectory in interface ResourceDaoFile object.public File getRrdDirectory(boolean verify)
getRrdDirectory
getRrdDirectory in interface ResourceDaoverify - a boolean.
File object.public DataCollectionConfig getDataCollectionConfig()
getDataCollectionConfig
DataCollectionConfig object.public void setDataCollectionConfig(DataCollectionConfig dataCollectionConfig)
setDataCollectionConfig
dataCollectionConfig - a DataCollectionConfig object.public NodeDao getNodeDao()
getNodeDao
NodeDao object.public void setNodeDao(NodeDao nodeDao)
setNodeDao
nodeDao - a NodeDao object.public CollectdConfigFactory getCollectdConfig()
getCollectdConfig
CollectdConfigFactory object.public void setCollectdConfig(CollectdConfigFactory collectdConfig)
setCollectdConfig
collectdConfig - a CollectdConfigFactory object.public LocationMonitorDao getLocationMonitorDao()
getLocationMonitorDao
LocationMonitorDao object.public void setLocationMonitorDao(LocationMonitorDao locationMonitorDao)
setLocationMonitorDao
locationMonitorDao - a LocationMonitorDao object.
public void afterPropertiesSet()
throws IOException
afterPropertiesSet
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanIOException - if any.public Collection<OnmsResourceType> getResourceTypes()
getResourceTypes
getResourceTypes in interface ResourceDaoCollection object.public OnmsResource getResourceById(String id)
getResourceById in interface ResourceDaoid - a String object.
IllegalArgumentException - When the resource ID string does not match the expected regex pattern
org.springframework.orm.ObjectRetrievalFailureException - If any exceptions are thrown while searching for the resource
public List<OnmsResource> getResourceListById(String id)
throws IllegalArgumentException,
org.springframework.orm.ObjectRetrievalFailureException
getResourceListById in interface ResourceDaoid - a String object.
IllegalArgumentException - When the resource ID string does not match the expected regex pattern
org.springframework.orm.ObjectRetrievalFailureException - If any exceptions are thrown while searching for the resource
protected OnmsResource getTopLevelResource(String resourceType,
String resource)
throws org.springframework.orm.ObjectRetrievalFailureException
getTopLevelResource
resourceType - a String object.resource - a String object.
OnmsResource object.
org.springframework.orm.ObjectRetrievalFailureException
protected OnmsResource getChildResource(OnmsResource parentResource,
String resourceType,
String resource)
getChildResource
parentResource - a OnmsResource object.resourceType - a String object.resource - a String object.
OnmsResource object.protected List<OnmsResource> getChildResourceList(OnmsResource parentResource)
getChildResourceList
parentResource - a OnmsResource object.
List object.public List<OnmsResource> findNodeResources()
findNodeResources in interface ResourceDaoList object.public List<OnmsResource> findDomainResources()
findDomainResources in interface ResourceDaoList object.protected OnmsResource getNodeEntityResource(String resource)
getNodeEntityResource
resource - a String object.
OnmsResource object.protected OnmsResource getForeignSourceNodeEntityResource(String resource)
getForeignSourceNodeEntityResource
resource - a String object.
OnmsResource object.protected OnmsResource getDomainEntityResource(String domain)
getDomainEntityResource
domain - a String object.
OnmsResource object.public static String decode(String string)
string - string to be decoded
public OnmsResource getResourceForNode(OnmsNode node)
getResourceForNode
getResourceForNode in interface ResourceDaonode - a OnmsNode object.
OnmsResource object.public OnmsResource getResourceForIpInterface(OnmsIpInterface ipInterface)
ResourceDaogetResourceForIpInterface
getResourceForIpInterface in interface ResourceDaoipInterface - a OnmsIpInterface object.
responseTime resource on the interface or
null if the responseTime resource cannot be found for the given IP interface.
public OnmsResource getResourceForIpInterface(OnmsIpInterface ipInterface,
OnmsLocationMonitor locMon)
ResourceDaogetResourceForIpInterface
getResourceForIpInterface in interface ResourceDaoipInterface - a OnmsIpInterface object.locMon - a OnmsLocationMonitor object.
distributedStatus resource on the interface or
null if the distributedStatus resource cannot be found for the given IP interface.public List<OnmsResource> findTopLevelResources()
findTopLevelResources
findTopLevelResources in interface ResourceDaoList object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||