Package org.opennms.netmgt.dao.support
Class NodeSnmpResourceType
- java.lang.Object
-
- org.opennms.netmgt.dao.support.NodeSnmpResourceType
-
- All Implemented Interfaces:
OnmsResourceType
public final class NodeSnmpResourceType extends java.lang.Object implements OnmsResourceType
Node SNMP resources point to the resources stored in the root of the node path i.e. snmp/${nodeId}/ds1.rrd snmp/${nodeId}/ds2.rrd
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NODE_RESOURCE_TYPE_NAME
static java.lang.String
PARENT_RESOURCE_TYPE_FOR_STORE_BY_FOREIGN_SOURCE
-
Constructor Summary
Constructors Constructor Description NodeSnmpResourceType(ResourceStorageDao resourceStorageDao)
Constructor for NodeSnmpResourceType.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OnmsResource
getChildByName(OnmsResource parent, java.lang.String name)
Retrieves a child resource with the given name from the parent.java.lang.String
getLabel()
getLabeljava.lang.String
getLinkForResource(OnmsResource resource)
getLinkForResourcejava.lang.String
getName()
getNamejava.util.List<OnmsResource>
getResourcesForParent(OnmsResource parent)
Returns the set of resources that are available on the given parent.boolean
isResourceTypeOnParent(OnmsResource parent)
Returns true if one on more instances of the resource type are present on the parent resource.
-
-
-
Field Detail
-
NODE_RESOURCE_TYPE_NAME
public static final java.lang.String NODE_RESOURCE_TYPE_NAME
- See Also:
- Constant Field Values
-
PARENT_RESOURCE_TYPE_FOR_STORE_BY_FOREIGN_SOURCE
public static final java.lang.String PARENT_RESOURCE_TYPE_FOR_STORE_BY_FOREIGN_SOURCE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NodeSnmpResourceType
public NodeSnmpResourceType(ResourceStorageDao resourceStorageDao)
Constructor for NodeSnmpResourceType.
- Parameters:
resourceStorageDao
- aResourceStorageDao
object.
-
-
Method Detail
-
getName
public java.lang.String getName()
getName
- Specified by:
getName
in interfaceOnmsResourceType
- Returns:
- a
String
object.
-
getLabel
public java.lang.String getLabel()
getLabel
- Specified by:
getLabel
in interfaceOnmsResourceType
- Returns:
- a
String
object.
-
getLinkForResource
public java.lang.String getLinkForResource(OnmsResource resource)
Description copied from interface:OnmsResourceType
getLinkForResource
- Specified by:
getLinkForResource
in interfaceOnmsResourceType
- Parameters:
resource
- aOnmsResource
object.- Returns:
- a
String
object.
-
isResourceTypeOnParent
public boolean isResourceTypeOnParent(OnmsResource parent)
Returns true if one on more instances of the resource type are present on the parent resource. Top-level resource types should always return false.- Specified by:
isResourceTypeOnParent
in interfaceOnmsResourceType
-
getResourcesForParent
public java.util.List<OnmsResource> getResourcesForParent(OnmsResource parent)
Returns the set of resources that are available on the given parent. If none are available, i.e. isResourceTypeOnParent() would return false, then an empty list should be returned. Top-level resource types should return the set of top-level resources when parent is null.- Specified by:
getResourcesForParent
in interfaceOnmsResourceType
-
getChildByName
public OnmsResource getChildByName(OnmsResource parent, java.lang.String name)
Retrieves a child resource with the given name from the parent.- Specified by:
getChildByName
in interfaceOnmsResourceType
- Returns:
- null if no resource with the given name was found
-
-