Package org.opennms.netmgt.model
Interface OnmsResourceType
-
- All Known Implementing Classes:
AbstractTopLevelResourceType
,DomainResourceType
,GenericIndexResourceType
,InterfaceSnmpByIfIndexResourceType
,InterfaceSnmpResourceType
,MockResourceType
,NodeResourceType
,NodeSnmpResourceType
,PerspectiveResponseTimeResourceType
,ResponseTimeResourceType
public interface OnmsResourceType
OnmsResourceType interface.
-
-
Method Summary
All Methods Instance Methods Abstract 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()
Provides a human-friendly label for this resource type.java.lang.String
getLinkForResource(OnmsResource resource)
getLinkForResourcejava.lang.String
getName()
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.boolean
isResourceTypeOnParent(OnmsResource parent)
Returns true if one on more instances of the resource type are present on the parent resource.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Provides a unique name for this resource type.- Returns:
- unique name
-
getLabel
java.lang.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
-
isResourceTypeOnParent
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.
-
getResourcesForParent
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.
-
getChildByName
OnmsResource getChildByName(OnmsResource parent, java.lang.String name)
Retrieves a child resource with the given name from the parent.- Returns:
- null if no resource with the given name was found
- Throws:
ObjectRetrievalFailureException
- If any exceptions are thrown while searching for the resource
-
getLinkForResource
java.lang.String getLinkForResource(OnmsResource resource)
getLinkForResource
- Parameters:
resource
- aOnmsResource
object.- Returns:
- a
String
object.
-
-