org.opennms.netmgt.dao.support
Class DistributedStatusResourceType

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

public class DistributedStatusResourceType
extends Object
implements OnmsResourceType

DistributedStatusResourceType class.

Version:
$Id: $
Author:
ranger

Nested Class Summary
 class DistributedStatusResourceType.AttributeLoader
           
 
Field Summary
static String DISTRIBUTED_DIRECTORY
          Constant DISTRIBUTED_DIRECTORY="distributed"
 
Constructor Summary
DistributedStatusResourceType(ResourceDao resourceDao, LocationMonitorDao locationMonitorDao)
          Constructor for DistributedStatusResourceType.
 
Method Summary
 File getInterfaceDirectory(int id, String ipAddr)
          getInterfaceDirectory
 String getLabel()
          getLabel
 String getLinkForResource(OnmsResource resource)
          getLinkForResource
 String getName()
          getName
 String getRelativeInterfacePath(int id, String ipAddr)
          getRelativeInterfacePath
 List<OnmsResource> getResourcesForDomain(String domain)
          Gets a list of resources on a specific domain.
 List<OnmsResource> getResourcesForLocationMonitor(int locationMonitorId)
          getResourcesForLocationMonitor
 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

DISTRIBUTED_DIRECTORY

public static final String DISTRIBUTED_DIRECTORY
Constant DISTRIBUTED_DIRECTORY="distributed"

See Also:
Constant Field Values
Constructor Detail

DistributedStatusResourceType

public DistributedStatusResourceType(ResourceDao resourceDao,
                                     LocationMonitorDao locationMonitorDao)

Constructor for DistributedStatusResourceType.

Parameters:
resourceDao - a ResourceDao object.
locationMonitorDao - a LocationMonitorDao 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

getResourcesForLocationMonitor

public List<OnmsResource> getResourcesForLocationMonitor(int locationMonitorId)

getResourcesForLocationMonitor

Parameters:
locationMonitorId - a int.
Returns:
a List object.

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

getInterfaceDirectory

public File getInterfaceDirectory(int id,
                                  String ipAddr)

getInterfaceDirectory

Parameters:
id - a int.
ipAddr - a String object.
Returns:
a File object.

getRelativeInterfacePath

public String getRelativeInterfacePath(int id,
                                       String ipAddr)

getRelativeInterfacePath

Parameters:
id - a int.
ipAddr - a String object.
Returns:
a String object.

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.