Package org.swisspush.gateleen.expansion
Class ResourceNode
- java.lang.Object
-
- org.swisspush.gateleen.expansion.ResourceNode
-
public class ResourceNode extends java.lang.ObjectA 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.StringgeteTag()Returns the eTag for this resource or a collection of all eTags from this resource and their children.java.lang.StringgetNodeName()Returns the name of this resource.java.lang.ObjectgetObject()Returns a JsonObject, a JsonArray, a list with ResourceNodes, a byte array or an Exception.java.lang.StringgetPath()Returns the path for the request.voidsetObject(java.lang.Object object)Sets a JsonObject, a JsonArray, a list with ResourceNodes, a byte array or an Exception.
-
-
-
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 resourceobject- - JsonObject, JsonArray or an ExceptioneTag- - eTag of the request leading to this resourcepath- - 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 resourceobject- - JsonObject, JsonArray or an ExceptioneTag- - 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 resourceobject- - 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
-
-