org.opennms.netmgt.model
Class OnmsResource
java.lang.Object
org.opennms.netmgt.model.OnmsResource
- All Implemented Interfaces:
- java.lang.Comparable<OnmsResource>
public class OnmsResource
- extends java.lang.Object
- implements java.lang.Comparable<OnmsResource>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OnmsResource
public OnmsResource(java.lang.String name,
java.lang.String label,
OnmsResourceType resourceType,
java.util.Set<OnmsAttribute> attributes)
OnmsResource
public OnmsResource(java.lang.String name,
java.lang.String label,
OnmsResourceType resourceType,
java.util.Set<OnmsAttribute> attributes,
java.util.List<OnmsResource> resources)
getName
public java.lang.String getName()
getLabel
public java.lang.String getLabel()
getResourceType
public OnmsResourceType getResourceType()
getAttributes
public java.util.Set<OnmsAttribute> getAttributes()
getChildResources
public java.util.List<OnmsResource> getChildResources()
compareTo
public int compareTo(OnmsResource o)
- Specified by:
compareTo in interface java.lang.Comparable<OnmsResource>
sortIntoResourceList
public static java.util.List<OnmsResource> sortIntoResourceList(java.util.List<OnmsResource> resources)
- Sorts the List of Resources and returns a new List of the
generic type Resource.
- Parameters:
resources - list of Resource objects. This will be
sorted using Collections.sort, and note that this will modify
the provided list.
- Returns:
- a sorted list
setParent
public void setParent(OnmsResource parent)
getParent
public OnmsResource getParent()
getId
public java.lang.String getId()
getLink
public java.lang.String getLink()
createResourceId
public static java.lang.String createResourceId(java.lang.String... resources)
Copyright © 2007. All Rights Reserved.