Package org.opennms.netmgt.dao.support
Class ServiceResourceType
- java.lang.Object
-
- org.opennms.netmgt.dao.support.ServiceResourceType
-
- All Implemented Interfaces:
OnmsResourceType
- Direct Known Subclasses:
ResponseTimeResourceType
,ServiceStatusResourceType
public abstract class ServiceResourceType extends java.lang.Object implements OnmsResourceType
-
-
Constructor Summary
Constructors Constructor Description ServiceResourceType(ResourceStorageDao resourceStorageDao, IpInterfaceDao ipInterfaceDao)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description OnmsResource
getChildByName(OnmsResource parent, java.lang.String ipAddress)
Retrieves a child resource with the given name from the parent.protected abstract java.lang.String
getDirectory()
ResourcePath
getInterfacePath(java.lang.String location, java.lang.String ipAddr)
java.lang.String
getLinkForResource(OnmsResource resource)
getLinkForResourcejava.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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.model.OnmsResourceType
getLabel, getName
-
-
-
-
Constructor Detail
-
ServiceResourceType
public ServiceResourceType(ResourceStorageDao resourceStorageDao, IpInterfaceDao ipInterfaceDao)
-
-
Method Detail
-
getDirectory
protected abstract java.lang.String getDirectory()
-
getLinkForResource
public java.lang.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 java.util.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, java.lang.String ipAddress)
Description copied from interface:OnmsResourceType
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
-
getInterfacePath
public ResourcePath getInterfacePath(java.lang.String location, java.lang.String ipAddr)
-
-