+ *
+ * URI Pattern |
+ * Description |
+ * Supported Methods |
+ *
+ *
+ * /resources |
+ * returns a list of accessible repositories |
+ * GET |
+ *
+ *
+ * /resources/repositories |
+ * returns a list of accessible repositories |
+ * GET |
+ *
+ *
+ * /resources/{repositoryName} |
+ * returns a list of accessible workspaces within that repository |
+ * GET |
+ *
+ *
+ * /resources/{repositoryName}/workspaces |
+ * returns a list of accessible workspaces within that repository |
+ * GET |
+ *
+ *
+ * /resources/{repositoryName}/{workspaceName} |
+ * returns a list of operations within the workspace |
+ * GET |
+ *
+ *
+ * /resources/{repositoryName}/{workspaceName}/item/{path} |
+ * accesses the node at the path |
+ * ALL |
+ *
+ *
+ * /resources/{repositoryName}/{workspaceName}/item/{path}/@{propertyName} |
+ * accesses the named property at the path |
+ * ALL (except PUT) |
+ *
+ *
+ * /resources/{repositoryName}/{workspaceName}/item/{path}/@{propertyName} |
+ * adds the value from the body to the named property at the path |
+ * PUT |
+ *
+ *
+ * /resources/{repositoryName}/{workspaceName}/uuid/{uuid} |
+ * accesses the node with the given UUID |
+ * ALL |
+ *
+ *
+ * /resources/{repositoryName}/{workspaceName}/lock/{path} |
+ * locks the node at the path |
+ * GET |
+ *
+ *
+ * /resources/{repositoryName}/{workspaceName}/lock/{path} |
+ * unlocks the node at the path |
+ * PUT |
+ *
+ *
+ */
+@Path( "/" )
+public class JcrResources {
+
+ /**
+ * Returns the list of JCR repositories available on this server
+ * @return the list of JCR repositories available on this server
+ */
+ @GET
+ @Path( "/repositories" )
+ public String repositories() {
+ return "Hello, DNA!";
+ }
+
+ /**
+ * Returns the list of workspaces available to this user within the named repository.
+ * @param repositoryName the name of the repository
+ * @return the list of workspaces available to this user within the named repository.
+ */
+ @GET
+ @Path( "/{repositoryName}/workspaces" )
+ public String workspaces( @PathParam( "repositoryName" ) String repositoryName ) {
+ return repositoryName;
+ }
+
+}
Property changes on: extensions\dna-web-jcr-rest\src\main\java\org\jboss\dna\web\jcr\rest\JcrResources.java
___________________________________________________________________
Added: svn:keywords
+ Id Revision
Added: svn:eol-style
+ LF
Index: extensions/dna-web-jcr-rest/src/main/webapp/WEB-INF/web.xml
===================================================================
--- extensions/dna-web-jcr-rest/src/main/webapp/WEB-INF/web.xml (revision 0)
+++ extensions/dna-web-jcr-rest/src/main/webapp/WEB-INF/web.xml (revision 0)
@@ -0,0 +1,54 @@
+
+
+
+