Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.web.jcr.rest.client.json
Class RepositoryNode

    java.lang.Object
      org.codehaus.jettison.json.JSONObject
          org.modeshape.web.jcr.rest.client.json.JsonNode
              org.modeshape.web.jcr.rest.client.json.RepositoryNode

    public final class RepositoryNode

extends JsonNode

The `RepositoryNode` class is responsible for knowing how to create a URL for a repository and to parse a JSON response into `workspace` objects.

Field Summary

Fields inherited from class org.codehaus.jettison.json.JSONObject
`NULL`

Constructor Summary
`RepositoryNode(Repository repository)`

Method Summary
`URL` | `getUrl()` This URL can be used to obtain the workspaces contained in this repository.
`Collection<Workspace>` | `getWorkspaces(String jsonResponse)`

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

### RepositoryNode

    public RepositoryNode(Repository repository)

Parameters:
  `repository` - the ModeShape repository (never `null`)

Method Detail

### getUrl

    public URL getUrl()
               throws Exception

  This URL can be used to obtain the workspaces contained in this repository. 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()`

### getWorkspaces

    public Collection<Workspace> getWorkspaces(String jsonResponse)
                                        throws Exception

  Parameters:
    `jsonResponse` - the HTTP connection JSON response (never `null`) containing the workspaces
  Returns:
    the workspaces for this repository (never `null`)
  Throws:
    `Exception` - if there is a problem obtaining the workspaces

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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