Class AbstractWebdavServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.apache.jackrabbit.webdav.server.AbstractWebdavServlet
-
- All Implemented Interfaces:
Serializable
,Servlet
,ServletConfig
,DavConstants
public abstract class AbstractWebdavServlet extends HttpServlet implements DavConstants
AbstractWebdavServlet
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_AUTHENTICATE_HEADER
Default value for the 'WWW-Authenticate' header, that is set, if request results in a401 (Unauthorized)
error.static String
INIT_PARAM_AUTHENTICATE_HEADER
Name of the optional init parameter that defines the value of the 'WWW-Authenticate' header.static String
INIT_PARAM_CREATE_ABSOLUTE_URI
Name of the 'createAbsoluteURI' init parameter that defines whether hrefs should be created with a absolute URI or as absolute Path (ContextPath).static String
INIT_PARAM_CSRF_PROTECTION
Name of the parameter that specifies the configuration of the CSRF protection.static String
INIT_PARAM_MISSING_AUTH_MAPPING
the 'missing-auth-mapping' init parameter-
Fields inherited from interface org.apache.jackrabbit.webdav.DavConstants
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 Summary
Constructors Constructor Description AbstractWebdavServlet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
getAuthenticateHeaderValue()
Returns the value of the 'WWW-Authenticate' header, that is returned in case of 401 error: the value is retrireved from the corresponding init param or defaults toDEFAULT_AUTHENTICATE_HEADER
.abstract DavSessionProvider
getDavSessionProvider()
Returns theDavSessionProvider
.abstract DavLocatorFactory
getLocatorFactory()
Returns theDavLocatorFactory
.abstract DavResourceFactory
getResourceFactory()
Returns theDavResourceFactory
.void
init()
A convenience method which can be overridden so that there's no need to callsuper.init(config)
.abstract void
setDavSessionProvider(DavSessionProvider davSessionProvider)
Returns theDavSessionProvider
.abstract void
setLocatorFactory(DavLocatorFactory locatorFactory)
Sets theDavLocatorFactory
.abstract void
setResourceFactory(DavResourceFactory resourceFactory)
Sets theDavResourceFactory
.-
Methods inherited from class javax.servlet.http.HttpServlet
service
-
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
-
-
-
Field Detail
-
INIT_PARAM_MISSING_AUTH_MAPPING
public static final String INIT_PARAM_MISSING_AUTH_MAPPING
the 'missing-auth-mapping' init parameter- See Also:
- Constant Field Values
-
INIT_PARAM_AUTHENTICATE_HEADER
public static final String INIT_PARAM_AUTHENTICATE_HEADER
Name of the optional init parameter that defines the value of the 'WWW-Authenticate' header.If the parameter is omitted the default value
"Basic Realm=Jackrabbit Webdav Server"
is used.
-
DEFAULT_AUTHENTICATE_HEADER
public static final String DEFAULT_AUTHENTICATE_HEADER
Default value for the 'WWW-Authenticate' header, that is set, if request results in a401 (Unauthorized)
error.
-
INIT_PARAM_CSRF_PROTECTION
public static final String INIT_PARAM_CSRF_PROTECTION
Name of the parameter that specifies the configuration of the CSRF protection. May contain a comma-separated list of allowed referrer hosts. If the parameter is omitted or left empty the behaviour is to only allow requests which have an empty referrer or a referrer host equal to the server host. If the parameter is set to 'disabled' no referrer checks will be performed at all.- See Also:
- Constant Field Values
-
INIT_PARAM_CREATE_ABSOLUTE_URI
public static final String INIT_PARAM_CREATE_ABSOLUTE_URI
Name of the 'createAbsoluteURI' init parameter that defines whether hrefs should be created with a absolute URI or as absolute Path (ContextPath). The value should be 'true' or 'false'. The default value if not set is true.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init() throws ServletException
Description copied from class:GenericServlet
A convenience method which can be overridden so that there's no need to callsuper.init(config)
.Instead of overriding
GenericServlet.init(ServletConfig)
, simply override this method and it will be called byGenericServlet.init(ServletConfig config)
. TheServletConfig
object can still be retrieved viaGenericServlet.getServletConfig()
.- Overrides:
init
in classGenericServlet
- Throws:
ServletException
- if an exception occurs that interrupts the servlet's normal operation
-
getDavSessionProvider
public abstract DavSessionProvider getDavSessionProvider()
Returns theDavSessionProvider
.- Returns:
- the session provider
-
setDavSessionProvider
public abstract void setDavSessionProvider(DavSessionProvider davSessionProvider)
Returns theDavSessionProvider
.- Parameters:
davSessionProvider
-
-
getLocatorFactory
public abstract DavLocatorFactory getLocatorFactory()
Returns theDavLocatorFactory
.- Returns:
- the locator factory
-
setLocatorFactory
public abstract void setLocatorFactory(DavLocatorFactory locatorFactory)
Sets theDavLocatorFactory
.- Parameters:
locatorFactory
-
-
getResourceFactory
public abstract DavResourceFactory getResourceFactory()
Returns theDavResourceFactory
.- Returns:
- the resource factory
-
setResourceFactory
public abstract void setResourceFactory(DavResourceFactory resourceFactory)
Sets theDavResourceFactory
.- Parameters:
resourceFactory
-
-
getAuthenticateHeaderValue
public String getAuthenticateHeaderValue()
Returns the value of the 'WWW-Authenticate' header, that is returned in case of 401 error: the value is retrireved from the corresponding init param or defaults toDEFAULT_AUTHENTICATE_HEADER
.- Returns:
- corresponding init parameter or
DEFAULT_AUTHENTICATE_HEADER
. - See Also:
INIT_PARAM_AUTHENTICATE_HEADER
-
-