org.opennms.web.svclayer.support
Class DefaultResourceService

java.lang.Object
  extended by org.opennms.web.svclayer.support.DefaultResourceService
All Implemented Interfaces:
ResourceService, org.springframework.beans.factory.InitializingBean

public class DefaultResourceService
extends Object
implements ResourceService, org.springframework.beans.factory.InitializingBean

DefaultResourceService class.

Author:
DJ Gregor, Mathew Brozowski

Constructor Summary
DefaultResourceService()
           
 
Method Summary
 void afterPropertiesSet()
          afterPropertiesSet
 List<OnmsResource> findChildResources(OnmsResource resource, String... resourceTypeMatches)
          findChildResources
 List<OnmsResource> findDomainChildResources(String domain)
          findDomainChildResources
 List<OnmsResource> findDomainResources()
          findDomainResources
 List<OnmsResource> findNodeChildResources(int nodeId)
          findNodeChildResources
 List<OnmsResource> findNodeResources()
          findNodeResources
 PrefabGraph[] findPrefabGraphsForChildResources(OnmsResource resource, String... resourceTypeMatches)
          findPrefabGraphsForChildResources
 PrefabGraph[] findPrefabGraphsForResource(OnmsResource resource)
          findPrefabGraphsForResource
 List<OnmsResource> findTopLevelResources()
          findTopLevelResources
 GraphDao getGraphDao()
          getGraphDao
 PrefabGraph getPrefabGraph(String name)
          getPrefabGraph
 OnmsResource getResourceById(String id)
          getResourceById
 ResourceDao getResourceDao()
          getResourceDao
 List<OnmsResource> getResourceListById(String resourceId)
          getResourceListById
 File getRrdDirectory()
          getRrdDirectory
 void promoteGraphAttributesForResource(OnmsResource resource)
          promoteGraphAttributesForResource
 void promoteGraphAttributesForResource(String resourceId)
          promoteGraphAttributesForResource
 void setEventProxy(EventProxy eventProxy)
          setEventProxy
 void setGraphDao(GraphDao graphDao)
          setGraphDao
 void setResourceDao(ResourceDao resourceDao)
          setResourceDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultResourceService

public DefaultResourceService()
Method Detail

getResourceDao

public ResourceDao getResourceDao()

getResourceDao

Returns:
a ResourceDao object.

setResourceDao

public void setResourceDao(ResourceDao resourceDao)

setResourceDao

Parameters:
resourceDao - a ResourceDao object.

getGraphDao

public GraphDao getGraphDao()

getGraphDao

Returns:
a GraphDao object.

setGraphDao

public void setGraphDao(GraphDao graphDao)

setGraphDao

Parameters:
graphDao - a GraphDao object.

setEventProxy

public void setEventProxy(EventProxy eventProxy)

setEventProxy

Parameters:
eventProxy - a EventProxy object.

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception

afterPropertiesSet

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception - if any.

getRrdDirectory

public File getRrdDirectory()

getRrdDirectory

Specified by:
getRrdDirectory in interface ResourceService
Returns:
a File object.

findDomainResources

public List<OnmsResource> findDomainResources()

findDomainResources

Specified by:
findDomainResources in interface ResourceService
Returns:
a List object.

findNodeResources

public List<OnmsResource> findNodeResources()

findNodeResources

Specified by:
findNodeResources in interface ResourceService
Returns:
a List object.

findTopLevelResources

public List<OnmsResource> findTopLevelResources()

findTopLevelResources

Specified by:
findTopLevelResources in interface ResourceService
Returns:
a List object.

findNodeChildResources

public List<OnmsResource> findNodeChildResources(int nodeId)

findNodeChildResources

Specified by:
findNodeChildResources in interface ResourceService
Parameters:
nodeId - a int.
Returns:
a List object.

findDomainChildResources

public List<OnmsResource> findDomainChildResources(String domain)

findDomainChildResources

Specified by:
findDomainChildResources in interface ResourceService
Parameters:
domain - a String object.
Returns:
a List object.

findChildResources

public List<OnmsResource> findChildResources(OnmsResource resource,
                                             String... resourceTypeMatches)

findChildResources

Specified by:
findChildResources in interface ResourceService
Parameters:
resource - a OnmsResource object.
resourceTypeMatches - a String object.
Returns:
a List object.

getResourceById

public OnmsResource getResourceById(String id)

getResourceById

Specified by:
getResourceById in interface ResourceService
Parameters:
id - a String object.
Returns:
a OnmsResource object.

getResourceListById

public List<OnmsResource> getResourceListById(String resourceId)

getResourceListById

Specified by:
getResourceListById in interface ResourceService
Parameters:
resourceId - a String object.
Returns:
a List object.

findPrefabGraphsForResource

public PrefabGraph[] findPrefabGraphsForResource(OnmsResource resource)

findPrefabGraphsForResource

Specified by:
findPrefabGraphsForResource in interface ResourceService
Parameters:
resource - a OnmsResource object.
Returns:
an array of PrefabGraph objects.

promoteGraphAttributesForResource

public void promoteGraphAttributesForResource(OnmsResource resource)

promoteGraphAttributesForResource

Specified by:
promoteGraphAttributesForResource in interface ResourceService
Parameters:
resource - a OnmsResource object.

promoteGraphAttributesForResource

public void promoteGraphAttributesForResource(String resourceId)

promoteGraphAttributesForResource

Specified by:
promoteGraphAttributesForResource in interface ResourceService
Parameters:
resourceId - a String object.

findPrefabGraphsForChildResources

public PrefabGraph[] findPrefabGraphsForChildResources(OnmsResource resource,
                                                       String... resourceTypeMatches)

findPrefabGraphsForChildResources

Specified by:
findPrefabGraphsForChildResources in interface ResourceService
Parameters:
resource - a OnmsResource object.
resourceTypeMatches - a String object.
Returns:
an array of PrefabGraph objects.

getPrefabGraph

public PrefabGraph getPrefabGraph(String name)

getPrefabGraph

Specified by:
getPrefabGraph in interface ResourceService
Parameters:
name - a String object.
Returns:
a PrefabGraph object.


Copyright © 2011. All Rights Reserved.