Class OnmsResource

    • Constructor Detail

      • OnmsResource

        public OnmsResource​(java.lang.String name,
                            java.lang.String label,
                            OnmsResourceType resourceType,
                            java.util.Set<OnmsAttribute> attributes,
                            ResourcePath path)

        Constructor for OnmsResource.

        Parameters:
        name - a String object.
        label - a String object.
        resourceType - a OnmsResourceType object.
        attributes - a Set object.
      • OnmsResource

        public OnmsResource​(java.lang.String name,
                            java.lang.String label,
                            OnmsResourceType resourceType,
                            java.util.Set<OnmsAttribute> attributes,
                            java.util.List<OnmsResource> resources,
                            ResourcePath path)

        Constructor for OnmsResource.

        Parameters:
        name - a String object.
        label - a String object.
        resourceType - a OnmsResourceType object.
        attributes - a Set object.
        resources - a List object.
    • Method Detail

      • getName

        public java.lang.String getName()

        getName

        Returns:
        a String object.
      • getLabel

        public java.lang.String getLabel()

        getLabel

        Returns:
        a String object.
      • setLabel

        public void setLabel​(java.lang.String label)

        setLabel

        Parameters:
        label - a String object.
      • getAttributes

        public java.util.Set<OnmsAttribute> getAttributes()

        getAttributes

        Returns:
        a Set object.
      • getChildResources

        public java.util.List<OnmsResource> getChildResources()

        getChildResources

        Returns:
        a List object.
      • compareTo

        public int compareTo​(OnmsResource o)

        compareTo

        Specified by:
        compareTo in interface java.lang.Comparable<OnmsResource>
        Parameters:
        o - a OnmsResource object.
        Returns:
        a int.
      • 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
      • getId

        public ResourceId getId()

        getId

        Returns:
        a String object.
      • getLink

        public java.lang.String getLink()

        getLink

        Returns:
        a String object.
      • setLink

        public void setLink​(java.lang.String link)

        setLink

        Parameters:
        link - a String object.
      • getRrdGraphAttributes

        public java.util.Map<java.lang.String,​RrdGraphAttribute> getRrdGraphAttributes()
        Get the RRD graph attributes for this resource, if any.
        Returns:
        a Map object.
      • getStringPropertyAttributes

        public java.util.Map<java.lang.String,​java.lang.String> getStringPropertyAttributes()
        Get the string property attributes for this resource, if any.
        Returns:
        a Map object.
      • getExternalValueAttributes

        public java.util.Map<java.lang.String,​java.lang.String> getExternalValueAttributes()
        Get the external value attributes for this resource, if any.
        Returns:
        a Map object.
      • toString

        public java.lang.String toString()

        toString

        Overrides:
        toString in class java.lang.Object
        Returns:
        a String object.
      • setEntity

        public void setEntity​(OnmsEntity entity)

        setEntity

        Parameters:
        entity - a OnmsEntity object.