|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.jackrabbit.webdav.server.AbstractWebdavServlet
org.apache.jackrabbit.webdav.jcr.JCRWebdavServerServlet
org.apache.jackrabbit.server.remoting.davex.JcrRemotingServlet
public abstract class JcrRemotingServlet
JcrRemotingServlet
is an extended version of the
JCR Remoting Servlet
that provides improved
- Nodes are represented as JSON objects. - Each Node has its properties included as JSON key/value pairs. - Single valued Properties are simple key/value pairs. - Multi valued Properties are represented as JSON array. - Each Node has its child nodes included as long a maximal depths is not reached. - Nodes without any child nodes get a special JSON member named ::NodeIteratorSize, whose value is zero. - If the maximal depth is reached only name, index and unique id of the direct child are included (incomplete node info). In order to obtain the complete information the client sends another GET with .json extension.Same name sibling nodes and properties whose type cannot be unambiguously be extracted from the JSON on the client side need some special handling:
- Node with index > 1, get a JSON key consisting of Node.getName() + "[" + Node.getIndex() + "]" - Binary Property JSON value = length of the JCR value. The JCR value must be retrieved separately. - Name, Path, Reference and Date Property The JSON member representing the Property (name, value) is preceeded by a special member consisting of JSON key = ":" + Property.getName() JSON value = PropertyType.nameFromValue(Property.getType()) - Multi valued properties with Property.getValues().length == 0 will be treated as special property types above (extra property indicating the type of the property). - Double Property JSON value must not have any trailing ".0" removed.
diff ::= members members ::= pair | pairs pair ::= key " : " value pairs ::= pair line-end pair | pair line-end pairs line-end ::= "\r\n" | "\n" | "\r" key ::= diffchar path diffchar ::= "+" | "^" | "-" | ">" path ::= abspath | relpath abspath ::= * absolute path to an item * relpath ::= * relpath from item at request URI to an item * value ::= value+ | value- | value^ | value> value+ ::= * a JSON object * value- ::= "" value^ ::= * any JSON value except JSON object * value> ::= path | path "#before" | path "#after" | "#first" | "#last"In other words:
"+" addNode "^" setProperty / setValue / removeProperty "-" remove Item ">" move / reorder Nodes
Field Summary | |
---|---|
static String |
ATTR_TMP_DIRECTORY
temp-dir attribute to be set to the servlet-context |
static String |
INIT_PARAM_BATCHREAD_CONFIG
the 'temp-directory' init parameter |
static String |
INIT_PARAM_HOME
the home init parameter. |
static String |
INIT_PARAM_TMP_DIRECTORY
the 'temp-directory' init parameter |
Fields inherited from class org.apache.jackrabbit.webdav.jcr.JCRWebdavServerServlet |
---|
CTX_ATTR_RESOURCE_PATH_PREFIX, INIT_PARAM_AUTHENTICATE_HEADER, INIT_PARAM_MISSING_AUTH_MAPPING, INIT_PARAM_RESOURCE_PATH_PREFIX, subscriptionMgr, txMgr |
Fields inherited from class org.apache.jackrabbit.webdav.server.AbstractWebdavServlet |
---|
DEFAULT_AUTHENTICATE_HEADER |
Constructor Summary | |
---|---|
JcrRemotingServlet()
|
Method Summary | |
---|---|
protected void |
doGet(WebdavRequest webdavRequest,
WebdavResponse webdavResponse,
DavResource davResource)
The GET method |
protected void |
doPost(WebdavRequest webdavRequest,
WebdavResponse webdavResponse,
DavResource davResource)
The POST method. |
DavResourceFactory |
getResourceFactory()
Returns the DavResourceFactory . |
void |
init()
Initializes the servlet set reads the following parameter from the servlet configuration: resource-path-prefix: optional prefix for all resources. |
Methods inherited from class org.apache.jackrabbit.webdav.jcr.JCRWebdavServerServlet |
---|
getAuthenticateHeaderValue, getDavSessionProvider, getLocatorFactory, getPathPrefix, getRepository, isPreconditionValid, setDavSessionProvider, setLocatorFactory, setResourceFactory |
Methods inherited from class org.apache.jackrabbit.webdav.server.AbstractWebdavServlet |
---|
doAcl, doBaselineControl, doBind, doCheckin, doCheckout, doCopy, doDelete, doHead, doLabel, doLock, doMerge, doMkActivity, doMkCol, doMkWorkspace, doMove, doOptions, doOrderPatch, doPoll, doPropFind, doPropPatch, doPut, doRebind, doReport, doSearch, doSubscribe, doUnbind, doUncheckout, doUnlock, doUnsubscribe, doUpdate, doVersionControl, execute, getInputContext, getOutputContext, service |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String INIT_PARAM_HOME
public static final String INIT_PARAM_TMP_DIRECTORY
public static final String ATTR_TMP_DIRECTORY
public static final String INIT_PARAM_BATCHREAD_CONFIG
Constructor Detail |
---|
public JcrRemotingServlet()
Method Detail |
---|
public void init() throws javax.servlet.ServletException
JCRWebdavServerServlet
init
in class JCRWebdavServerServlet
javax.servlet.ServletException
public DavResourceFactory getResourceFactory()
JCRWebdavServerServlet
DavResourceFactory
.
getResourceFactory
in class JCRWebdavServerServlet
AbstractWebdavServlet.getResourceFactory()
protected void doGet(WebdavRequest webdavRequest, WebdavResponse webdavResponse, DavResource davResource) throws IOException, DavException
AbstractWebdavServlet
doGet
in class AbstractWebdavServlet
IOException
DavException
protected void doPost(WebdavRequest webdavRequest, WebdavResponse webdavResponse, DavResource davResource) throws IOException, DavException
AbstractWebdavServlet
doPost
in class AbstractWebdavServlet
IOException
DavException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |