Package org.swisspush.gateleen.expansion
Class ResourceNode
- java.lang.Object
-
- org.swisspush.gateleen.expansion.ResourceNode
-
public class ResourceNode extends 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(String nodeName, Object object)Creates an instance of a ResourceNode.ResourceNode(String nodeName, Object object, String eTag)Creates an instance of a ResourceNode.ResourceNode(String nodeName, Object object, String eTag, String path)Creates an instance of a ResourceNode.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgeteTag()Returns the eTag for this resource or a collection of all eTags from this resource and their children.StringgetNodeName()Returns the name of this resource.ObjectgetObject()Returns a JsonObject, a JsonArray, a list with ResourceNodes, a byte array or an Exception.StringgetPath()Returns the path for the request.voidsetObject(Object object)Sets a JsonObject, a JsonArray, a list with ResourceNodes, a byte array or an Exception.
-
-
-
Constructor Detail
-
ResourceNode
public ResourceNode(String nodeName, Object object, String eTag, 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(String nodeName, Object object, 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
-
-
Method Detail
-
geteTag
public String geteTag()
Returns the eTag for this resource or a collection of all eTags from this resource and their children.- Returns:
- String
-
getNodeName
public String getNodeName()
Returns the name of this resource.- Returns:
- String
-
getObject
public 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 String getPath()
Returns the path for the request.- Returns:
- String
-
setObject
public void setObject(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
-
-