Package org.opennms.netmgt.dao.support
Class InterfaceSnmpByIfIndexResourceType
- java.lang.Object
-
- org.opennms.netmgt.dao.support.InterfaceSnmpByIfIndexResourceType
-
- All Implemented Interfaces:
OnmsResourceType
public class InterfaceSnmpByIfIndexResourceType extends java.lang.Object implements OnmsResourceType
This resource type provides an alias for theInterfaceSnmpResourceType, allowing SNMP interfaces to be queried using the ifIndex instead of the interface name as stored in the metric repository. i.e. interfaceSnmpByIfIndex[2] vs interfaceSnmp[em1-74867ad4b828]
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTYPE_NAME
-
Constructor Summary
Constructors Modifier Constructor Description protectedInterfaceSnmpByIfIndexResourceType(InterfaceSnmpResourceType interfaceSnmpResourceType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OnmsResourcegetChildByName(OnmsResource parent, java.lang.String name)Retrieves a child resource with the given name from the parent.java.lang.StringgetLabel()Provides a human-friendly label for this resource type.java.lang.StringgetLinkForResource(OnmsResource resource)getLinkForResourcejava.lang.StringgetName()Provides a unique name for this resource type.java.util.List<OnmsResource>getResourcesForParent(OnmsResource parent)Returns the set of resources that are available on the given parent.booleanisResourceTypeOnParent(OnmsResource parent)Returns true if one on more instances of the resource type are present on the parent resource.
-
-
-
Field Detail
-
TYPE_NAME
public static final java.lang.String TYPE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InterfaceSnmpByIfIndexResourceType
protected InterfaceSnmpByIfIndexResourceType(InterfaceSnmpResourceType interfaceSnmpResourceType)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:OnmsResourceTypeProvides a unique name for this resource type.- Specified by:
getNamein interfaceOnmsResourceType- Returns:
- unique name
-
getLabel
public java.lang.String getLabel()
Description copied from interface:OnmsResourceTypeProvides a human-friendly label for this resource type. It is particularly used in the webUI to describe this resource type.- Specified by:
getLabelin interfaceOnmsResourceType- Returns:
- human-friendly label
-
getLinkForResource
public java.lang.String getLinkForResource(OnmsResource resource)
getLinkForResource
- Specified by:
getLinkForResourcein interfaceOnmsResourceType- Parameters:
resource- aOnmsResourceobject.- Returns:
- a
Stringobject.
-
isResourceTypeOnParent
public boolean isResourceTypeOnParent(OnmsResource parent)
Description copied from interface:OnmsResourceTypeReturns 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:
isResourceTypeOnParentin interfaceOnmsResourceType
-
getResourcesForParent
public java.util.List<OnmsResource> getResourcesForParent(OnmsResource parent)
Description copied from interface:OnmsResourceTypeReturns 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:
getResourcesForParentin interfaceOnmsResourceType
-
getChildByName
public OnmsResource getChildByName(OnmsResource parent, java.lang.String name)
Retrieves a child resource with the given name from the parent.- Specified by:
getChildByNamein interfaceOnmsResourceType- Returns:
- null if no resource with the given name was found
-
-