public abstract class JCRWebdavServerServlet extends AbstractWebdavServlet
Implementations of this abstract class must implement the
getRepository()
method to access the repository.
Modifier and Type | Field and Description |
---|---|
static String |
CTX_ATTR_RESOURCE_PATH_PREFIX
Servlet context attribute used to store the path prefix instead of
having a static field with this servlet.
|
static String |
INIT_PARAM_CONCURRENCY_LEVEL
Optional 'concurrency-level' parameter defining the concurrency level
within the jcr-server.
|
static String |
INIT_PARAM_RESOURCE_PATH_PREFIX
Init parameter specifying the prefix used with the resource path.
|
protected SubscriptionManager |
subscriptionMgr |
protected TxLockManagerImpl |
txMgr |
DEFAULT_AUTHENTICATE_HEADER, INIT_PARAM_AUTHENTICATE_HEADER, INIT_PARAM_CREATE_ABSOLUTE_URI, INIT_PARAM_CSRF_PROTECTION, INIT_PARAM_MISSING_AUTH_MAPPING
creationDateFormat, DEPTH_0, DEPTH_1, DEPTH_INFINITY, DEPTH_INFINITY_S, HEADER_AUTHORIZATION, HEADER_CONTENT_LANGUAGE, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_DAV, HEADER_DEPTH, HEADER_DESTINATION, HEADER_ETAG, HEADER_IF, HEADER_LAST_MODIFIED, HEADER_LOCK_TOKEN, HEADER_OVERWRITE, HEADER_TIMEOUT, INFINITE_TIMEOUT, modificationDateFormat, NAMESPACE, OPAQUE_LOCK_TOKEN_PREFIX, PROPERTY_CREATIONDATE, PROPERTY_DISPLAYNAME, PROPERTY_GETCONTENTLANGUAGE, PROPERTY_GETCONTENTLENGTH, PROPERTY_GETCONTENTTYPE, PROPERTY_GETETAG, PROPERTY_GETLASTMODIFIED, PROPERTY_LOCKDISCOVERY, PROPERTY_RESOURCETYPE, PROPERTY_SOURCE, PROPERTY_SUPPORTEDLOCK, PROPFIND_ALL_PROP, PROPFIND_ALL_PROP_INCLUDE, PROPFIND_BY_PROPERTY, PROPFIND_PROPERTY_NAMES, TIMEOUT_INFINITE, UNDEFINED_TIME, UNDEFINED_TIMEOUT, XML_ACTIVELOCK, XML_ALLPROP, XML_COLLECTION, XML_DEPTH, XML_DST, XML_EXCLUSIVE, XML_HREF, XML_INCLUDE, XML_KEEPALIVE, XML_LINK, XML_LOCKENTRY, XML_LOCKINFO, XML_LOCKROOT, XML_LOCKSCOPE, XML_LOCKTOKEN, XML_LOCKTYPE, XML_MULTISTATUS, XML_OMIT, XML_OWNER, XML_PROP, XML_PROPERTYBEHAVIOR, XML_PROPERTYUPDATE, XML_PROPFIND, XML_PROPNAME, XML_PROPSTAT, XML_REMOVE, XML_RESPONSE, XML_RESPONSEDESCRIPTION, XML_SET, XML_SHARED, XML_SOURCE, XML_STATUS, XML_TIMEOUT, XML_WRITE
Constructor and Description |
---|
JCRWebdavServerServlet() |
Modifier and Type | Method and Description |
---|---|
protected CredentialsProvider |
getCredentialsProvider()
Returns a new instanceof
BasicCredentialsProvider . |
DavSessionProvider |
getDavSessionProvider()
Returns the
DavSessionProvider |
DavLocatorFactory |
getLocatorFactory()
Returns the
DavLocatorFactory |
static String |
getPathPrefix(javax.servlet.ServletContext ctx)
Returns the configured path prefix
|
protected abstract Repository |
getRepository()
Returns the repository to be used by this servlet.
|
DavResourceFactory |
getResourceFactory()
Returns the
DavResourceFactory . |
protected SessionProvider |
getSessionProvider()
Returns a new instanceof
SessionProviderImpl . |
void |
init()
Initializes the servlet set reads the following parameter from the
servlet configuration:
resource-path-prefix: optional prefix for all resources.
|
protected boolean |
isPreconditionValid(WebdavRequest request,
DavResource resource)
Returns true if the preconditions are met.
|
void |
setDavSessionProvider(DavSessionProvider davSessionProvider)
Throws
UnsupportedOperationException . |
void |
setLocatorFactory(DavLocatorFactory locatorFactory)
Sets the
DavLocatorFactory |
void |
setResourceFactory(DavResourceFactory resourceFactory)
Sets the
DavResourceFactory . |
protected int |
validateDestination(DavResource destResource,
WebdavRequest request,
boolean checkHeader)
Modified variant needed for JCR move and copy that isn't compliant to
WebDAV.
|
doAcl, doBaselineControl, doBind, doCheckin, doCheckout, doCopy, doDelete, doGet, doHead, doLabel, doLock, doMerge, doMkActivity, doMkCol, doMkWorkspace, doMove, doOptions, doOrderPatch, doPoll, doPost, doPropFind, doPropPatch, doPut, doRebind, doReport, doSearch, doSubscribe, doUnbind, doUncheckout, doUnlock, doUnsubscribe, doUpdate, doVersionControl, execute, getAuthenticateHeaderValue, getContentCodings, getInputContext, getOutputContext, getSingletonField, isCreateAbsoluteURI, sendUnauthorized, service
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
public static final String INIT_PARAM_RESOURCE_PATH_PREFIX
public static final String INIT_PARAM_CONCURRENCY_LEVEL
public static final String CTX_ATTR_RESOURCE_PATH_PREFIX
protected TxLockManagerImpl txMgr
protected SubscriptionManager subscriptionMgr
public void init() throws javax.servlet.ServletException
init
in class AbstractWebdavServlet
javax.servlet.ServletException
protected boolean isPreconditionValid(WebdavRequest request, DavResource resource)
If header
and validation
of TransactionId header
. This method will also return false if the requested
resource resides within a different workspace as is assigned to the repository
session attached to the given request.isPreconditionValid
in class AbstractWebdavServlet
AbstractWebdavServlet.isPreconditionValid(WebdavRequest, DavResource)
public DavSessionProvider getDavSessionProvider()
DavSessionProvider
getDavSessionProvider
in class AbstractWebdavServlet
AbstractWebdavServlet.getDavSessionProvider()
public void setDavSessionProvider(DavSessionProvider davSessionProvider)
UnsupportedOperationException
.setDavSessionProvider
in class AbstractWebdavServlet
AbstractWebdavServlet.setDavSessionProvider(DavSessionProvider)
public DavLocatorFactory getLocatorFactory()
DavLocatorFactory
getLocatorFactory
in class AbstractWebdavServlet
AbstractWebdavServlet.getLocatorFactory()
public void setLocatorFactory(DavLocatorFactory locatorFactory)
DavLocatorFactory
setLocatorFactory
in class AbstractWebdavServlet
AbstractWebdavServlet.setLocatorFactory(DavLocatorFactory)
public DavResourceFactory getResourceFactory()
DavResourceFactory
.getResourceFactory
in class AbstractWebdavServlet
AbstractWebdavServlet.getResourceFactory()
public void setResourceFactory(DavResourceFactory resourceFactory)
DavResourceFactory
.setResourceFactory
in class AbstractWebdavServlet
AbstractWebdavServlet.setResourceFactory(org.apache.jackrabbit.webdav.DavResourceFactory)
protected int validateDestination(DavResource destResource, WebdavRequest request, boolean checkHeader) throws DavException
validateDestination
in class AbstractWebdavServlet
destResource
- destination resource to be validated.request
- The webdav requestcheckHeader
- flag indicating if the destination header must be present.DavException
public static String getPathPrefix(javax.servlet.ServletContext ctx)
ctx
- The servlet context.INIT_PARAM_RESOURCE_PATH_PREFIX
protected abstract Repository getRepository()
protected CredentialsProvider getCredentialsProvider()
BasicCredentialsProvider
.protected SessionProvider getSessionProvider()
SessionProviderImpl
.Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.