org.modeshape.web.jcr.rest
Class AbstractJcrResource
java.lang.Object
org.modeshape.web.jcr.rest.AbstractJcrResource
- Direct Known Subclasses:
- ItemsResource, JcrResources, RepositoryResource, ServerResource
public abstract class AbstractJcrResource
- extends Object
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 |
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
AbstractJcrResource
public AbstractJcrResource()
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 unauthenticatedrawRepositoryName
- the URL-encoded name of the repository in which the session is createdrawWorkspaceName
- 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.