Package org.opennms.netmgt.dao.support
Class InterfaceSnmpResourceType
- java.lang.Object
-
- org.opennms.netmgt.dao.support.InterfaceSnmpResourceType
-
- All Implemented Interfaces:
OnmsResourceType
public class InterfaceSnmpResourceType extends Object implements OnmsResourceType
Interface SNMP resources are stored in paths like: snmp/1/${IfName}/ds.rrd
-
-
Field Summary
Fields Modifier and Type Field Description static String
INTERFACE_RESOURCE_TYPE_NAME
-
Constructor Summary
Constructors Constructor Description InterfaceSnmpResourceType(ResourceStorageDao resourceStorageDao)
Constructor for InterfaceSnmpResourceType.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OnmsResource
getChildByName(OnmsResource parent, String name)
Retrieves a child resource with the given name from the parent.protected static String[]
getKeysFor(OnmsSnmpInterface snmpInterface)
String
getLabel()
getLabelString
getLinkForResource(OnmsResource resource)
getLinkForResourceString
getName()
getNameprotected Set<String>
getQueryableInterfaces(OnmsResource parent)
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
-
INTERFACE_RESOURCE_TYPE_NAME
public static final String INTERFACE_RESOURCE_TYPE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InterfaceSnmpResourceType
public InterfaceSnmpResourceType(ResourceStorageDao resourceStorageDao)
Constructor for InterfaceSnmpResourceType.
- Parameters:
resourceStorageDao
- aResourceStorageDao
object.
-
-
Method Detail
-
getName
public String getName()
getName
- Specified by:
getName
in interfaceOnmsResourceType
- Returns:
- a
String
object.
-
getLabel
public String getLabel()
getLabel
- Specified by:
getLabel
in interfaceOnmsResourceType
- Returns:
- a
String
object.
-
getLinkForResource
public String getLinkForResource(OnmsResource resource)
getLinkForResource
- Specified by:
getLinkForResource
in interfaceOnmsResourceType
- Parameters:
resource
- aOnmsResource
object.- Returns:
- a
String
object.
-
isResourceTypeOnParent
public boolean isResourceTypeOnParent(OnmsResource parent)
Description copied from interface:OnmsResourceType
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 List<OnmsResource> getResourcesForParent(OnmsResource parent)
Description copied from interface:OnmsResourceType
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, 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
-
getKeysFor
protected static String[] getKeysFor(OnmsSnmpInterface snmpInterface)
-
getQueryableInterfaces
protected Set<String> getQueryableInterfaces(OnmsResource parent)
-
-