org.modeshape.web.jcr.rest
Class RepositoryResource

java.lang.Object
  extended by org.modeshape.web.jcr.rest.AbstractJcrResource
      extended by org.modeshape.web.jcr.rest.RepositoryResource

@Immutable
public class RepositoryResource
extends AbstractJcrResource

RESTEasy handler to provide the JCR repository at the URI below. Please note that the URI assumes a context of /resources for the web application.

URI Pattern Description Supported Methods
/resources/{repositoryName} returns a list of accessible workspaces within that repository GET


Field Summary
 
Fields inherited from class org.modeshape.web.jcr.rest.AbstractJcrResource
EMPTY_REPOSITORY_NAME, EMPTY_WORKSPACE_NAME, URL_ENCODER
 
Constructor Summary
RepositoryResource()
           
 
Method Summary
 Map<String,WorkspaceEntry> getWorkspaces(HttpServletRequest request, String rawRepositoryName)
          Returns the list of workspaces available to this user within the named repository.
 
Methods inherited from class org.modeshape.web.jcr.rest.AbstractJcrResource
getSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryResource

public RepositoryResource()
Method Detail

getWorkspaces

public Map<String,WorkspaceEntry> getWorkspaces(@Context
                                                HttpServletRequest request,
                                                String rawRepositoryName)
                                         throws RepositoryException,
                                                IOException
Returns the list of workspaces available to this user within the named repository.

Parameters:
rawRepositoryName - the name of the repository; may not be null
request - the servlet request; may not be null
Returns:
the list of workspaces available to this user within the named repository.
Throws:
IOException - if the given repository name does not map to any repositories and there is an error writing the error code to the response.
RepositoryException - if there is any other error accessing the list of available workspaces for the repository


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