|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.web.jcr.rest.QueryHandler
@Immutable public class QueryHandler
Resource handler that implements REST methods for items.
Field Summary | |
---|---|
protected static String |
BASE64_ENCODING_SUFFIX
|
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 | |
---|---|
QueryHandler()
|
Method Summary | |
---|---|
protected Session |
getSession(HttpServletRequest request,
String rawRepositoryName,
String rawWorkspaceName)
Returns an active session for the given workspace name in the named repository. |
protected String |
jsonEncodedStringFor(Value value)
Return the JSON-compatible string representation of the given property value. |
String |
postItem(HttpServletRequest request,
String rawRepositoryName,
String rawWorkspaceName,
String language,
String statement,
long offset,
long limit)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String BASE64_ENCODING_SUFFIX
protected static final UrlEncoder URL_ENCODER
public static final String EMPTY_REPOSITORY_NAME
"//"
is not a valid path.
public static final String EMPTY_WORKSPACE_NAME
"//"
is not a valid path.
Constructor Detail |
---|
public QueryHandler()
Method Detail |
---|
public String postItem(HttpServletRequest request, String rawRepositoryName, String rawWorkspaceName, String language, String statement, long offset, long limit) throws RepositoryException, org.codehaus.jettison.json.JSONException
RepositoryException
org.codehaus.jettison.json.JSONException
protected Session getSession(HttpServletRequest request, String rawRepositoryName, String rawWorkspaceName) throws RepositoryException
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
RepositoryException
- if any other error occursprotected String jsonEncodedStringFor(Value value) throws RepositoryException
binary
value, then this method returns the Base-64 encoding of that value. Otherwise, it just returns the string
representation of the value.
value
- the property value; may not be null
RepositoryException
- if there is a problem accessing the value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |