org.opennms.netmgt.model
Interface OnmsResourceType


public interface OnmsResourceType


Method Summary
 String getLabel()
          Provides a human-friendly label for this resource type.
 String getLinkForResource(OnmsResource resource)
           
 String getName()
          Provides a unique name for this resource type.
 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.
 

Method Detail

getName

String getName()
Provides a unique name for this resource type.

Returns:
unique name

getLabel

String getLabel()
Provides a human-friendly label for this resource type. It is particularly used in the webUI to describe this resource type.

Returns:
human-friendly label

isResourceTypeOnNode

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

Parameters:
nodeId - node ID to check
Returns:
true if this resource type is on this node, false otherwise

getResourcesForNode

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

Parameters:
nodeId - node ID for which to get resources
Returns:
list of resources

isResourceTypeOnDomain

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

Parameters:
domain - domain to check
Returns:
true if this resource type is on this domain, false otherwise

getResourcesForDomain

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

Parameters:
domain - domain for which to get resources
Returns:
list of resources

getLinkForResource

String getLinkForResource(OnmsResource resource)


Copyright © 2009. All Rights Reserved.