org.jboss.dna.web.jcr.rest.client.json
Class FolderNode

java.lang.Object
  extended by org.codehaus.jettison.json.JSONObject
      extended by org.jboss.dna.web.jcr.rest.client.json.JsonNode
          extended by org.jboss.dna.web.jcr.rest.client.json.FolderNode

@Immutable
public final class FolderNode
extends JsonNode

The FolderNode class is responsible for knowing how to create a URL for a folder, create a JSON representation of a folder, and create the appropriate JCR nodes for a folder.


Field Summary
 
Fields inherited from class org.codehaus.jettison.json.JSONObject
NULL
 
Constructor Summary
FolderNode(Workspace workspace, String fullPath)
           
 
Method Summary
 String getPath()
           
 URL getUrl()
           The URL will NOT end in '/'.
 
Methods inherited from class org.jboss.dna.web.jcr.rest.client.json.JsonNode
getContent, getId, toString
 
Methods inherited from class org.codehaus.jettison.json.JSONObject
accumulate, append, doubleToString, get, getBoolean, getDouble, getInt, getJSONArray, getJSONObject, getLong, getString, has, isNull, keys, length, names, numberToString, opt, optBoolean, optBoolean, optDouble, optDouble, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putOpt, quote, remove, toJSONArray, toString, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FolderNode

public FolderNode(Workspace workspace,
                  String fullPath)
           throws Exception
Parameters:
workspace - the workspace being used (never null)
fullPath - the full path of the folder within the workspace (never null)
Throws:
Exception - if there is a problem creating the folder node
Method Detail

getPath

public String getPath()
Returns:
the full path of folder within the workspace

getUrl

public URL getUrl()
           throws Exception

The URL will NOT end in '/'.

Specified by:
getUrl in class JsonNode
Returns:
an HTTP URL representing this node
Throws:
Exception - if there is a problem constructing the URL
See Also:
JsonNode.getUrl()


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.