Class AbstractWebdavServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.apache.jackrabbit.webdav.server.AbstractWebdavServlet
-
- All Implemented Interfaces:
java.io.Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig,DavConstants
public abstract class AbstractWebdavServlet extends javax.servlet.http.HttpServlet implements DavConstants
AbstractWebdavServlet- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_AUTHENTICATE_HEADERDefault value for the 'WWW-Authenticate' header, that is set, if request results in a401 (Unauthorized)error.static java.lang.StringINIT_PARAM_AUTHENTICATE_HEADERName of the optional init parameter that defines the value of the 'WWW-Authenticate' header.static java.lang.StringINIT_PARAM_CREATE_ABSOLUTE_URIName of the 'createAbsoluteURI' init parameter that defines whether hrefs should be created with a absolute URI or as absolute Path (ContextPath).static java.lang.StringINIT_PARAM_CSRF_PROTECTIONName of the parameter that specifies the configuration of the CSRF protection.static java.lang.StringINIT_PARAM_MISSING_AUTH_MAPPINGthe '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 Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAuthenticateHeaderValue()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.static java.util.List<java.lang.String>getContentCodings(javax.servlet.http.HttpServletRequest request)Obtain the (ordered!) list of content codings that have been used in the requestabstract DavSessionProvidergetDavSessionProvider()Returns theDavSessionProvider.abstract DavLocatorFactorygetLocatorFactory()Returns theDavLocatorFactory.abstract DavResourceFactorygetResourceFactory()Returns theDavResourceFactory.voidinit()abstract voidsetDavSessionProvider(DavSessionProvider davSessionProvider)Returns theDavSessionProvider.abstract voidsetLocatorFactory(DavLocatorFactory locatorFactory)Sets theDavLocatorFactory.abstract voidsetResourceFactory(DavResourceFactory resourceFactory)Sets theDavResourceFactory.
-
-
-
Field Detail
-
INIT_PARAM_MISSING_AUTH_MAPPING
public static final java.lang.String INIT_PARAM_MISSING_AUTH_MAPPING
the 'missing-auth-mapping' init parameter- See Also:
- Constant Field Values
-
INIT_PARAM_AUTHENTICATE_HEADER
public static final java.lang.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 java.lang.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 java.lang.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 java.lang.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 javax.servlet.ServletException- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
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 java.lang.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
-
getContentCodings
public static java.util.List<java.lang.String> getContentCodings(javax.servlet.http.HttpServletRequest request)
Obtain the (ordered!) list of content codings that have been used in the request
-
-