public abstract class SimpleWebdavServlet extends AbstractWebdavServlet
1
,
2
,
3
and
bind
compliant) for
repository resources.
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_MIME_INFO
Name of the parameter that specifies the servlet resource path of
a custom <mime-info/> configuration file.
|
static String |
INIT_PARAM_RESOURCE_CONFIG
Name of the init parameter that specify a separate configuration used
for filtering the resources displayed.
|
static String |
INIT_PARAM_RESOURCE_PATH_PREFIX
init param name of the repository prefix
|
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 |
---|
SimpleWebdavServlet() |
Modifier and Type | Method and Description |
---|---|
protected CredentialsProvider |
getCredentialsProvider()
Factory method for creating the credentials provider to be used for
accessing the credentials associated with a request.
|
DavSessionProvider |
getDavSessionProvider()
Returns the
DavSessionProvider . |
DavLocatorFactory |
getLocatorFactory()
Returns the
DavLocatorFactory . |
LockManager |
getLockManager()
Returns the
LockManager . |
String |
getPathPrefix()
Returns the configured path prefix
|
static String |
getPathPrefix(javax.servlet.ServletContext ctx)
Returns the configured path prefix
|
abstract Repository |
getRepository()
Returns the
Repository . |
ResourceConfig |
getResourceConfig()
Returns the resource configuration to be applied
|
DavResourceFactory |
getResourceFactory()
Returns the
DavResourceFactory . |
SessionProvider |
getSessionProvider()
Returns the
SessionProvider . |
void |
init()
Init this servlet
|
protected boolean |
isPreconditionValid(WebdavRequest request,
DavResource resource)
Checks if the precondition for this request and resource is valid.
|
void |
setDavSessionProvider(DavSessionProvider sessionProvider)
Sets the
DavSessionProvider . |
void |
setLocatorFactory(DavLocatorFactory locatorFactory)
Sets the
DavLocatorFactory . |
void |
setLockManager(LockManager lockManager)
Sets the
LockManager . |
void |
setResourceConfig(ResourceConfig config)
Set the resource configuration
|
void |
setResourceFactory(DavResourceFactory resourceFactory)
Sets the
DavResourceFactory . |
void |
setSessionProvider(SessionProvider sessionProvider)
Sets the
SessionProvider . |
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, getInputContext, getOutputContext, isCreateAbsoluteURI, sendUnauthorized, service, validateDestination
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
public static final String INIT_PARAM_RESOURCE_PATH_PREFIX
public static final String INIT_PARAM_RESOURCE_CONFIG
public static final String INIT_PARAM_MIME_INFO
public static final String CTX_ATTR_RESOURCE_PATH_PREFIX
public void init() throws javax.servlet.ServletException
init
in class AbstractWebdavServlet
javax.servlet.ServletException
protected boolean isPreconditionValid(WebdavRequest request, DavResource resource)
isPreconditionValid
in class AbstractWebdavServlet
public String getPathPrefix()
INIT_PARAM_RESOURCE_PATH_PREFIX
public static String getPathPrefix(javax.servlet.ServletContext ctx)
ctx
- The servlet context.INIT_PARAM_RESOURCE_PATH_PREFIX
public DavLocatorFactory getLocatorFactory()
DavLocatorFactory
. If no locator factory has
been set or created a new instance of LocatorFactoryImpl
is
returned.getLocatorFactory
in class AbstractWebdavServlet
AbstractWebdavServlet.getLocatorFactory()
public void setLocatorFactory(DavLocatorFactory locatorFactory)
DavLocatorFactory
.setLocatorFactory
in class AbstractWebdavServlet
locatorFactory
- The DavLocatorFactory
to use.AbstractWebdavServlet.setLocatorFactory(DavLocatorFactory)
public LockManager getLockManager()
LockManager
. If no lock manager has
been set or created a new instance of SimpleLockManager
is
returned.public void setLockManager(LockManager lockManager)
LockManager
.lockManager
- The LockManager
to be used.public DavResourceFactory getResourceFactory()
DavResourceFactory
. If no request factory has
been set or created a new instance of ResourceFactoryImpl
is
returned.getResourceFactory
in class AbstractWebdavServlet
AbstractWebdavServlet.getResourceFactory()
public void setResourceFactory(DavResourceFactory resourceFactory)
DavResourceFactory
.setResourceFactory
in class AbstractWebdavServlet
resourceFactory
- The DavResourceFactory
to use.AbstractWebdavServlet.setResourceFactory(org.apache.jackrabbit.webdav.DavResourceFactory)
public SessionProvider getSessionProvider()
SessionProvider
. If no session provider has been
set or created a new instance of SessionProviderImpl
that extracts
credentials from the Authorization
request header is
returned.protected CredentialsProvider getCredentialsProvider()
BasicCredentialsProvider
instance,
but subclasses can override this method to add support for other
types of credentials.public void setSessionProvider(SessionProvider sessionProvider)
SessionProvider
.sessionProvider
- The SessionProvider
to use.public DavSessionProvider getDavSessionProvider()
DavSessionProvider
. If no session provider has
been set or created a new instance of DavSessionProviderImpl
is returned.getDavSessionProvider
in class AbstractWebdavServlet
AbstractWebdavServlet.getDavSessionProvider()
public void setDavSessionProvider(DavSessionProvider sessionProvider)
DavSessionProvider
.setDavSessionProvider
in class AbstractWebdavServlet
sessionProvider
- The DavSessionProvider
to use.AbstractWebdavServlet.setDavSessionProvider(org.apache.jackrabbit.webdav.DavSessionProvider)
public ResourceConfig getResourceConfig()
public void setResourceConfig(ResourceConfig config)
config
- The resource configuration.public abstract Repository getRepository()
Repository
. If no repository has been set or
created the repository initialized by RepositoryAccessServlet
is returned.Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.