org.opennms.netmgt.model
Class OnmsResource

java.lang.Object
  extended by org.opennms.netmgt.model.OnmsResource
All Implemented Interfaces:
java.lang.Comparable<OnmsResource>

public class OnmsResource
extends java.lang.Object
implements java.lang.Comparable<OnmsResource>


Constructor Summary
OnmsResource(java.lang.String name, java.lang.String label, OnmsResourceType resourceType, java.util.Set<OnmsAttribute> attributes)
           
OnmsResource(java.lang.String name, java.lang.String label, OnmsResourceType resourceType, java.util.Set<OnmsAttribute> attributes, java.util.List<OnmsResource> resources)
           
 
Method Summary
 int compareTo(OnmsResource o)
           
static java.lang.String createResourceId(java.lang.String... resources)
           
 java.util.Set<OnmsAttribute> getAttributes()
           
 java.util.List<OnmsResource> getChildResources()
           
 OnmsEntity getEntity()
           
 java.util.Map<java.lang.String,java.lang.String> getExternalValueAttributes()
          Get the external value attributes for this resource, if any.
 java.lang.String getId()
           
 java.lang.String getLabel()
           
 java.lang.String getLink()
           
 java.lang.String getName()
           
 OnmsResource getParent()
           
 OnmsResourceType getResourceType()
           
 java.util.Map<java.lang.String,RrdGraphAttribute> getRrdGraphAttributes()
          Get the RRD graph attributes for this resource, if any.
 java.util.Map<java.lang.String,java.lang.String> getStringPropertyAttributes()
          Get the string property attributes for this resource, if any.
 void setEntity(OnmsEntity entity)
           
 void setLink(java.lang.String link)
           
 void setParent(OnmsResource parent)
           
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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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()

setLink

public void setLink(java.lang.String link)

createResourceId

public static java.lang.String createResourceId(java.lang.String... resources)

getRrdGraphAttributes

public java.util.Map<java.lang.String,RrdGraphAttribute> getRrdGraphAttributes()
Get the RRD graph attributes for this resource, if any.


getStringPropertyAttributes

public java.util.Map<java.lang.String,java.lang.String> getStringPropertyAttributes()
Get the string property attributes for this resource, if any.


getExternalValueAttributes

public java.util.Map<java.lang.String,java.lang.String> getExternalValueAttributes()
Get the external value attributes for this resource, if any.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getEntity

public OnmsEntity getEntity()

setEntity

public void setEntity(OnmsEntity entity)


Copyright © 2007. All Rights Reserved.