org.opennms.netmgt.dao.support
Class InterfaceSnmpResourceType

java.lang.Object
  extended by org.opennms.netmgt.dao.support.InterfaceSnmpResourceType
All Implemented Interfaces:
OnmsResourceType

public class InterfaceSnmpResourceType
extends Object
implements OnmsResourceType

XXX Note: We should remove any graphs from the list that have external values. See bug #1703.

Version:
$Id: $
Author:
ranger

Nested Class Summary
 class InterfaceSnmpResourceType.AttributeLoader
           
 
Constructor Summary
InterfaceSnmpResourceType(ResourceDao resourceDao, NodeDao nodeDao)
          Constructor for InterfaceSnmpResourceType.
 
Method Summary
 String getLabel()
          getLabel
 String getLinkForResource(OnmsResource resource)
          getLinkForResource
 String getName()
          getName
 List<OnmsResource> getResourcesForDomain(String domain)
          Gets a list of resources on a specific domain.
 List<OnmsResource> getResourcesForNode(int nodeId)
          Gets a list of resources on a specific node.
 boolean isResourceTypeOnDomain(String domain)
          Checks whether this resource type is on a specific domain.
 boolean isResourceTypeOnNode(int nodeId)
          Checks whether this resource type is on a specific node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterfaceSnmpResourceType

public InterfaceSnmpResourceType(ResourceDao resourceDao,
                                 NodeDao nodeDao)

Constructor for InterfaceSnmpResourceType.

Parameters:
resourceDao - a ResourceDao object.
nodeDao - a NodeDao object.
Method Detail

getName

public String getName()

getName

Specified by:
getName in interface OnmsResourceType
Returns:
a String object.

getLabel

public String getLabel()

getLabel

Specified by:
getLabel in interface OnmsResourceType
Returns:
a String object.

isResourceTypeOnNode

public boolean isResourceTypeOnNode(int nodeId)
Checks whether this resource type is on a specific node. If possible, this should have less overhead than calling #getResourcesForNode(int).

Specified by:
isResourceTypeOnNode in interface OnmsResourceType
Parameters:
nodeId - node ID to check
Returns:
true if this resource type is on this node, false otherwise

getResourcesForNode

public List<OnmsResource> getResourcesForNode(int nodeId)
Gets a list of resources on a specific node.

Specified by:
getResourcesForNode in interface OnmsResourceType
Parameters:
nodeId - node ID for which to get resources
Returns:
list of resources

isResourceTypeOnDomain

public boolean isResourceTypeOnDomain(String domain)
Checks whether this resource type is on a specific domain. If possible, this should have less overhead than calling #getResourcesForDomain(String). This resource type is never available for domains. Only the interface resource type is available for domains.

Specified by:
isResourceTypeOnDomain in interface OnmsResourceType
Parameters:
domain - domain to check
Returns:
true if this resource type is on this domain, false otherwise

getResourcesForDomain

public List<OnmsResource> getResourcesForDomain(String domain)
Gets a list of resources on a specific domain.

Specified by:
getResourcesForDomain in interface OnmsResourceType
Parameters:
domain - domain for which to get resources
Returns:
list of resources

getLinkForResource

public String getLinkForResource(OnmsResource resource)

getLinkForResource

Specified by:
getLinkForResource in interface OnmsResourceType
Parameters:
resource - a OnmsResource object.
Returns:
a String object.


Copyright © 2011. All Rights Reserved.