public class OnmsResource extends Object implements Comparable<OnmsResource>
OnmsResource class.
Constructor and Description |
---|
OnmsResource(String name,
String label,
OnmsResourceType resourceType,
Set<OnmsAttribute> attributes,
List<OnmsResource> resources,
ResourcePath path)
Constructor for OnmsResource.
|
OnmsResource(String name,
String label,
OnmsResourceType resourceType,
Set<OnmsAttribute> attributes,
ResourcePath path)
Constructor for OnmsResource.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(OnmsResource o)
compareTo
|
Set<OnmsAttribute> |
getAttributes()
getAttributes
|
List<OnmsResource> |
getChildResources()
getChildResources
|
OnmsEntity |
getEntity()
getEntity
|
Map<String,String> |
getExternalValueAttributes()
Get the external value attributes for this resource, if any.
|
ResourceId |
getId()
getId
|
String |
getLabel()
getLabel
|
String |
getLink()
getLink
|
String |
getName()
getName
|
OnmsResource |
getParent()
getParent
|
ResourcePath |
getPath() |
OnmsResourceType |
getResourceType()
getResourceType
|
Map<String,RrdGraphAttribute> |
getRrdGraphAttributes()
Get the RRD graph attributes for this resource, if any.
|
Map<String,String> |
getStringPropertyAttributes()
Get the string property attributes for this resource, if any.
|
void |
setEntity(OnmsEntity entity)
setEntity
|
void |
setLabel(String label)
setLabel
|
void |
setLink(String link)
setLink
|
void |
setParent(OnmsResource parent)
setParent
|
static List<OnmsResource> |
sortIntoResourceList(List<OnmsResource> resources)
Sorts the List of Resources and returns a new List of the
generic type Resource.
|
String |
toString()
toString
|
public OnmsResource(String name, String label, OnmsResourceType resourceType, Set<OnmsAttribute> attributes, ResourcePath path)
Constructor for OnmsResource.
name
- a String
object.label
- a String
object.resourceType
- a OnmsResourceType
object.attributes
- a Set
object.public OnmsResource(String name, String label, OnmsResourceType resourceType, Set<OnmsAttribute> attributes, List<OnmsResource> resources, ResourcePath path)
Constructor for OnmsResource.
name
- a String
object.label
- a String
object.resourceType
- a OnmsResourceType
object.attributes
- a Set
object.resources
- a List
object.public OnmsResourceType getResourceType()
getResourceType
OnmsResourceType
object.public Set<OnmsAttribute> getAttributes()
getAttributes
Set
object.public List<OnmsResource> getChildResources()
getChildResources
List
object.public int compareTo(OnmsResource o)
compareTo
compareTo
in interface Comparable<OnmsResource>
o
- a OnmsResource
object.public static List<OnmsResource> sortIntoResourceList(List<OnmsResource> resources)
resources
- list of Resource objects. This will be
sorted using Collections.sort, and note that this will modify
the provided list.public void setParent(OnmsResource parent)
setParent
parent
- a OnmsResource
object.public OnmsResource getParent()
getParent
OnmsResource
object.public ResourceId getId()
getId
String
object.public Map<String,RrdGraphAttribute> getRrdGraphAttributes()
Map
object.public Map<String,String> getStringPropertyAttributes()
Map
object.public Map<String,String> getExternalValueAttributes()
Map
object.public String toString()
toString
public OnmsEntity getEntity()
getEntity
OnmsEntity
object.public void setEntity(OnmsEntity entity)
setEntity
entity
- a OnmsEntity
object.public ResourcePath getPath()
Copyright © 2021. All rights reserved.