Bug 39051 - WebDAV Prototype
Summary: WebDAV Prototype
Status: NEW
Alias: None
Product: Lenya
Classification: Unclassified
Component: Miscellaneous (show other bugs)
Version: Trunk
Hardware: Other other
: P2 enhancement
Target Milestone: 2.0.1
Assignee: Lenya Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-21 18:18 UTC by Felix R
Modified: 2007-07-16 02:59 UTC (History)
0 users



Attachments
Patch for WebDAV prototype. (160.58 KB, patch)
2006-03-21 18:22 UTC, Felix R
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix R 2006-03-21 18:18:25 UTC
The following patch contains a WebDAV prototype done in January 2005,
but not finished yet because of lack of time. I want to contribute
it to the lenya community as there seems to be some effort to bring WebDAV
integration a step ahead.

The following modifications/enhancements are included:

- Replacement method for isCheckedOutByUser() with a more meaningful
  method which returns the user name who checked out the document
  or null if the document is not checked out at the moment.
  Redefinition in src/java/org/apache/lenya/cms/repository/Node.java
  
  Unfortunately, it was not possible to reconcile my implementation with
  the current head revision (LCR 387571) because there is a class
  implementing this interface, org.apache.lenya.cms.repo.adapter.RepoNode,
  which does not have a getter method for the RevisionController to get
  the identity of the user who checked out the document.

- Refactoring of the method getMimeType() in
  src/java/org/apache/lenya/cms/repository/SourceNode.java.
  The mimetype of a document is saved in Dublin-Core format field.
  Every document should have its mime-type defined in this (mandatory) field as
  it is used to determine the document's extension (needed for proper
  WebDAV handling; uses the newly added class
  src/java/org/apache/lenya/util/MimeTypeHelper.java for mapping mime-types
  to extensions).

- Refactoring of
 
src/java/org/apache/lenya/cms/cocoon/components/modules/input/CustomMetaDataModule.java
  Uses a different call syntax, defined as follows:
 
{custom-metadata:{attribute-name}:{publication-id}:{area}:{document-language}:{document-id}}

- Refactoring of getExtension() method of
  src/java/org/apache/lenya/cms/publication/DefaultDocument.java
  Uses the MimeTypeHelper class to deduce the extension from the document's
  mime-type. Used for WebDAV file names.
  
- Refactoring of resource-type modules' sitemaps. Uses a new call syntax
  defined as follows:
  /format:{publication-id}:{area}:{docid}:{doc-lang}:{format}:{rendertype}
  whereas format may be xhtml, text, webdav, etc.
  This is an nice solution to get documents in different formats independent
  of the current publication. The WebDAV prototype makes use of this.

- WebDAV Prototype in module webdav2.
  Implements a WebDAVPropfindGenerator to return results on a PROPFIND request.
  The generator is implemented in pure Java as opposed to the existing solution
  based on jxtemplates. The generator is feature complete according to the
  WebDAV standard (e.g. considering depth header, etc.),
  there might be a need to implement some additional
  legacy properties (e.g. for OpenOffice, Konqueror, etc.) for documents.
  As of the time of writing the code the get request worked for all existing
  example docment types as well as for the resource types.
  
  There are two matchers, one for documents and one for resources. The URL
  space is handled differently from how it is done in the existing WebDAV
  implementation. Each document is a collection containing the content and
  its resources.
  
  WebDAVRequest parses a WebDAV request (currently PROPFIND requests only) and
  dispatches the request to the right instance.
  
  To access the webdav2 prototype, use webdav2 instead of webdav in
  the Lenya WebDAV URL.
  
- All document's meta files are enriched with the documents mime-type
  (mandatory field).
  
The WebDAV prototype is based on Doug Chestnut's WebDAV implementation and I
wish to thank him for his great effort. I will not commit the prototype
into the repository but rather submit a patch for the ones who are interested
in this topic. If there are any questions, I'm happy to answer them.
Comment 1 Felix R 2006-03-21 18:22:04 UTC
Created attachment 17931 [details]
Patch for WebDAV prototype.