public class MockResourceType extends Object implements OnmsResourceType
Constructor and Description |
---|
MockResourceType() |
Modifier and Type | Method and Description |
---|---|
OnmsResource |
getChildByName(OnmsResource parent,
String name)
Retrieves a child resource with the given name from the parent.
|
String |
getLabel()
Provides a human-friendly label for this resource type.
|
String |
getLinkForResource(OnmsResource resource)
getLinkForResource
|
String |
getName()
Provides a unique name for this resource type.
|
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.
|
void |
setLabel(String label) |
void |
setLink(String link) |
void |
setName(String name) |
public String getLabel()
OnmsResourceType
getLabel
in interface OnmsResourceType
public String getLinkForResource(OnmsResource resource)
OnmsResourceType
getLinkForResource
getLinkForResource
in interface OnmsResourceType
resource
- a OnmsResource
object.String
object.public String getName()
OnmsResourceType
getName
in interface OnmsResourceType
public boolean isResourceTypeOnParent(OnmsResource parent)
OnmsResourceType
isResourceTypeOnParent
in interface OnmsResourceType
public List<OnmsResource> getResourcesForParent(OnmsResource parent)
OnmsResourceType
getResourcesForParent
in interface OnmsResourceType
public OnmsResource getChildByName(OnmsResource parent, String name)
OnmsResourceType
getChildByName
in interface OnmsResourceType
public void setLink(String link)
public void setLabel(String label)
public void setName(String name)
Copyright © 2016. All rights reserved.