org.modeshape.web.jcr.rest
Class AbstractJcrResource

java.lang.Object
  extended by org.modeshape.web.jcr.rest.AbstractJcrResource
Direct Known Subclasses:
ItemsResource, JcrResources, RepositoryResource, ServerResource

public abstract class AbstractJcrResource
extends Object


Field Summary
static String EMPTY_REPOSITORY_NAME
          Name to be used when the repository name is empty string as "//" is not a valid path.
static String EMPTY_WORKSPACE_NAME
          Name to be used when the workspace name is empty string as "//" is not a valid path.
protected static UrlEncoder URL_ENCODER
           
 
Constructor Summary
AbstractJcrResource()
           
 
Method Summary
protected  javax.jcr.Session getSession(HttpServletRequest request, String rawRepositoryName, String rawWorkspaceName)
          Returns an active session for the given workspace name in the named repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URL_ENCODER

protected static final UrlEncoder URL_ENCODER

EMPTY_REPOSITORY_NAME

public static final String EMPTY_REPOSITORY_NAME
Name to be used when the repository name is empty string as "//" is not a valid path.

See Also:
Constant Field Values

EMPTY_WORKSPACE_NAME

public static final String EMPTY_WORKSPACE_NAME
Name to be used when the workspace name is empty string as "//" is not a valid path.

See Also:
Constant Field Values
Constructor Detail

AbstractJcrResource

public AbstractJcrResource()
Method Detail

getSession

protected javax.jcr.Session getSession(HttpServletRequest request,
                                       String rawRepositoryName,
                                       String rawWorkspaceName)
                                throws javax.jcr.RepositoryException
Returns an active session for the given workspace name in the named repository.

Parameters:
request - the servlet request; may not be null or unauthenticated
rawRepositoryName - the URL-encoded name of the repository in which the session is created
rawWorkspaceName - the URL-encoded name of the workspace to which the session should be connected
Returns:
an active session with the given workspace in the named repository
Throws:
javax.jcr.RepositoryException - if any other error occurs


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