be.re.webdav
Interface Context


public interface Context

This is the WebDAV-repository context.

Author:
Werner Donné

Method Summary
 Connection getConnection()
          The connection to the database.
 String getContextUrl()
          The URL up to the context path specified in the request.
 XMLStreamWriter getDavResponseWriter()
          An alternative DAV response message writer.
 boolean getDebug()
          Returns true if debug mode is on, false otherwise.
 String getDefaultLanguage()
          The language attributed to the request when none was specified.
 String getDestinationView()
          The view specified in the Destination header.
 String[] getLanguages()
          The preferred languages from most to least preferred or an empty array.
 String getLocalPath(String href)
          Returns the path without the server context.
 Map<String,String[]> getLockTokens()
          The keys in the result are local paths and the values are arrays of UUID strings.
 Context getNamingContext()
          The naming context that was initialized for the containing web application.
 long getQuota()
          Returns the maximum total logical space in bytes the system is allowed to occupy.
 HttpServletRequest getRequest()
          The servlet request.
 Object getRequestContext(Object key)
           
 String getRequestLanguage()
          The language set with the lang URL parameter.
 HttpServletResponse getResponse()
          The servlet response.
 ServletContext getServletContext()
          The servlet context.
 int getStatusCode()
          The status code set by the server or -1 if it was not set or isn't supported by the implementation.
 File getTemporaryDirectory()
          The directory where temporary files may be created.
 String getView()
          If no view is selected by the request, null is returned.
 void setDavResponseWriter(XMLStreamWriter writer)
           
 void setRequestContext(Object key, Object context)
          An implementation may attach additional data which travels along with the context.
 void setRollbackOnly()
          After a call to this method the transaction can no longer be committed.
 void setView(String view)
          The implementation can switch to another view.
 

Method Detail

getConnection

Connection getConnection()
The connection to the database.


getContextUrl

String getContextUrl()
The URL up to the context path specified in the request.


getDavResponseWriter

XMLStreamWriter getDavResponseWriter()
An alternative DAV response message writer. An implementation should use it instead of writing directly to the response stream when the returned value is not null. Modules can set it in the context of a request.


getDebug

boolean getDebug()
Returns true if debug mode is on, false otherwise.


getDefaultLanguage

String getDefaultLanguage()
The language attributed to the request when none was specified.


getDestinationView

String getDestinationView()
The view specified in the Destination header. This is only relevant for the COPY and MOVE methods.


getLanguages

String[] getLanguages()
The preferred languages from most to least preferred or an empty array.


getLocalPath

String getLocalPath(String href)
Returns the path without the server context. If href is null, null is returned. If href is not in the same server context as the repository, null is returned.


getLockTokens

Map<String,String[]> getLockTokens()
The keys in the result are local paths and the values are arrays of UUID strings.


getNamingContext

Context getNamingContext()
The naming context that was initialized for the containing web application.


getQuota

long getQuota()
Returns the maximum total logical space in bytes the system is allowed to occupy. The value -1 indicates there is no limit.


getRequest

HttpServletRequest getRequest()
The servlet request.


getRequestContext

Object getRequestContext(Object key)
See Also:
setRequestContext(java.lang.Object, java.lang.Object)

getRequestLanguage

String getRequestLanguage()
The language set with the lang URL parameter. If it isn't specified the Content-Language is considered. This preceeds over getLanguages, i.e. the latter should only be consulted if the request language isn't set.


getResponse

HttpServletResponse getResponse()
The servlet response.


getServletContext

ServletContext getServletContext()
The servlet context.


getStatusCode

int getStatusCode()
The status code set by the server or -1 if it was not set or isn't supported by the implementation.


getView

String getView()
If no view is selected by the request, null is returned.


getTemporaryDirectory

File getTemporaryDirectory()
The directory where temporary files may be created. This may be somewhere else than the system temporary directory, for example, because of security reasons.


setDavResponseWriter

void setDavResponseWriter(XMLStreamWriter writer)

setRequestContext

void setRequestContext(Object key,
                       Object context)
An implementation may attach additional data which travels along with the context.


setRollbackOnly

void setRollbackOnly()
After a call to this method the transaction can no longer be committed.


setView

void setView(String view)
The implementation can switch to another view.