Class ResourceNode


  • public class ResourceNode
    extends java.lang.Object
    A helper model class for representing a resource. Describes the resource by name and the content as a JsonObject.
    Author:
    https://github.com/ljucam [Mario Ljuca]
    • Constructor Summary

      Constructors 
      Constructor Description
      ResourceNode​(java.lang.String nodeName, java.lang.Object object)
      Creates an instance of a ResourceNode.
      ResourceNode​(java.lang.String nodeName, java.lang.Object object, java.lang.String eTag)
      Creates an instance of a ResourceNode.
      ResourceNode​(java.lang.String nodeName, java.lang.Object object, java.lang.String eTag, java.lang.String path)
      Creates an instance of a ResourceNode.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String geteTag()
      Returns the eTag for this resource or a collection of all eTags from this resource and their children.
      java.lang.String getNodeName()
      Returns the name of this resource.
      java.lang.Object getObject()
      Returns a JsonObject, a JsonArray, a list with ResourceNodes, a byte array or an Exception.
      java.lang.String getPath()
      Returns the path for the request.
      void setObject​(java.lang.Object object)
      Sets a JsonObject, a JsonArray, a list with ResourceNodes, a byte array or an Exception.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResourceNode

        public ResourceNode​(java.lang.String nodeName,
                            java.lang.Object object,
                            java.lang.String eTag,
                            java.lang.String path)
        Creates an instance of a ResourceNode.
        Parameters:
        nodeName - - name of the resource
        object - - JsonObject, JsonArray or an Exception
        eTag - - eTag of the request leading to this resource
        path - - the request path
      • ResourceNode

        public ResourceNode​(java.lang.String nodeName,
                            java.lang.Object object,
                            java.lang.String eTag)
        Creates an instance of a ResourceNode.
        Parameters:
        nodeName - - name of the resource
        object - - JsonObject, JsonArray or an Exception
        eTag - - eTag of the request leading to this resource
      • ResourceNode

        public ResourceNode​(java.lang.String nodeName,
                            java.lang.Object object)
        Creates an instance of a ResourceNode.
        Parameters:
        nodeName - - name of the resource
        object - - JsonObject, JsonArray or an Exception
    • Method Detail

      • geteTag

        public java.lang.String geteTag()
        Returns the eTag for this resource or a collection of all eTags from this resource and their children.
        Returns:
        String
      • getNodeName

        public java.lang.String getNodeName()
        Returns the name of this resource.
        Returns:
        String
      • getObject

        public java.lang.Object getObject()
        Returns a JsonObject, a JsonArray, a list with ResourceNodes, a byte array or an Exception. The object can be null!
        Returns:
        Object
      • getPath

        public java.lang.String getPath()
        Returns the path for the request.
        Returns:
        String
      • setObject

        public void setObject​(java.lang.Object object)
        Sets a JsonObject, a JsonArray, a list with ResourceNodes, a byte array or an Exception. The object can be null!
        Parameters:
        object - object