|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.jettison.json.JSONObject org.modeshape.web.jcr.rest.client.json.JsonNode org.modeshape.web.jcr.rest.client.json.NodeTypeNode
@Immutable public final class NodeTypeNode
The NodeTypeNode
class is responsible for knowing how to obtain a NodeType based
on the Workspace.
An example URL
to obtain all the node types would look like:
{context root}/{repository name}/{workspace name}/items/jcr:system/jcr:nodeTypes"
And an example url to obtain a specific node type would look like:
{context root}/{repository name}/{workspace name}/items/jcr:system/jcr:nodeTypes/{node type name}
Field Summary |
---|
Fields inherited from class org.codehaus.jettison.json.JSONObject |
---|
NULL |
Constructor Summary | |
---|---|
NodeTypeNode(Workspace workspace,
String relative_path,
String nodeDepth)
Use this constructor if wanting all node types for a workspace |
Method Summary | |
---|---|
NodeType |
getNodeType(String jsonResponse)
|
Collection<NodeType> |
getNodeTypes(String jsonResponse)
|
String |
getPath()
|
URL |
getUrl()
The URL will NOT end in '/'. |
protected void |
processBody(org.codehaus.jettison.json.JSONObject body,
Collection<NodeType> nodetypes,
NodeType parentNodeType)
|
Methods inherited from class org.modeshape.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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NodeTypeNode(Workspace workspace, String relative_path, String nodeDepth) throws Exception
workspace
- the workspace being used (never null
)relative_path
- is the relative location after the workspacenodeDepth
- , nullable, can specify the depth of the node types to be returned
Exception
- if there is a problem creating the folder nodeMethod Detail |
---|
public String getPath()
public URL getUrl() throws Exception
The URL will NOT end in '/'.
getUrl
in class JsonNode
Exception
- if there is a problem constructing the URLJsonNode.getUrl()
public Collection<NodeType> getNodeTypes(String jsonResponse) throws Exception
jsonResponse
- the HTTP connection JSON response (never null
) containing the NodeTypes
null
)
Exception
- if there is a problem obtaining the node typesprotected void processBody(org.codehaus.jettison.json.JSONObject body, Collection<NodeType> nodetypes, NodeType parentNodeType) throws Exception
Exception
public NodeType getNodeType(String jsonResponse) throws Exception
jsonResponse
- the HTTP connection JSON response (never null
) containing the NodeTypes
null
)
Exception
- if there is a problem obtaining the node types
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |