org.opennms.netmgt.dao.support
Class NodeSnmpResourceType

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

public class NodeSnmpResourceType
extends Object
implements OnmsResourceType

NodeSnmpResourceType class.

Version:
$Id: $
Author:
ranger

Constructor Summary
NodeSnmpResourceType(ResourceDao resourceDao)
          Constructor for NodeSnmpResourceType.
 
Method Summary
 String getLabel()
          getLabel
 String getLinkForResource(OnmsResource resource)
          getLinkForResource
 String getName()
          getName
 File getResourceDirectory(int nodeId, boolean verify)
          getResourceDirectory
 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

NodeSnmpResourceType

public NodeSnmpResourceType(ResourceDao resourceDao)

Constructor for NodeSnmpResourceType.

Parameters:
resourceDao - a ResourceDao 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

getResourceDirectory

public File getResourceDirectory(int nodeId,
                                 boolean verify)

getResourceDirectory

Parameters:
nodeId - a int.
verify - a boolean.
Returns:
a File object.

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.