org.opennms.netmgt.dao.support
Class NodeResourceType

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

public class NodeResourceType
extends Object
implements OnmsResourceType

NodeResourceType class.

Version:
$Id: $
Author:
ranger

Field Summary
protected  ResourceDao m_resourceDao
           
protected static Set<OnmsAttribute> s_emptyAttributeSet
          Constant s_emptyAttributeSet
 
Constructor Summary
NodeResourceType(ResourceDao resourceDao)
          Constructor for NodeResourceType.
 
Method Summary
 OnmsResource createChildResource(OnmsNode node)
          createChildResource
 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
 

Field Detail

s_emptyAttributeSet

protected static final Set<OnmsAttribute> s_emptyAttributeSet
Constant s_emptyAttributeSet


m_resourceDao

protected ResourceDao m_resourceDao
Constructor Detail

NodeResourceType

public NodeResourceType(ResourceDao resourceDao)

Constructor for NodeResourceType.

Parameters:
resourceDao - a ResourceDao object.
Method Detail

getLabel

public String getLabel()

getLabel

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

getName

public String getName()

getName

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

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

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).

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

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

getLinkForResource

public String getLinkForResource(OnmsResource resource)

getLinkForResource

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

createChildResource

public OnmsResource createChildResource(OnmsNode node)

createChildResource

Parameters:
node - a OnmsNode object.
Returns:
a OnmsResource object.


Copyright © 2011. All Rights Reserved.