Apache Wink : 5.6 WebDAV Extension
This page last changed on Oct 13, 2009 by michael.
Apache Wink provides an extension module for supporting the WebDAV protocol. The extension contains the complete WebDAV XML model and a WebDAV response builder for easing the process of creating a WebDAV multistatus response.
The WebDAV extension provides a Java data model that reflects the WebDAV XMLs defined in the WebDAV RFC. All classes of the data model are located in the org.apache.wink.webdav.model package.
The WebDAV extension provides several classes that applications can use in order to receive basic support for common WebDAV methods.
The WebDAVModelHelper class provides helper methods for XML marshaling and unmarshaling of the WebDAV data model classes. It also provides helper methods for creating generic properties as DOM element classes to populate the WebDAV Prop element.
The WebDAVResponseBuilder class is used in order to create responses to WebDAV PROPFIND requests. It takes a SyndEntry or SyndFeed as input in order to create the response.
A resource method is defined to handle the desired WebDAV method by annotating it with one of the WebDAV method designators defined in the WebDAVMethod enum.
In order to create a MULTISTATUS response to a PROPFIND request the user can use the WebDAVResponseBuilder class, or create the response manually.
In order to create a multistatus response using the WebDAVResponseBuilder class, call one of the propfind() methods.
The WebDAVResponseBuilder class also enables the user to provide the properties to include in the response by extending the PropertyProvider class, overriding the setPropertyValue() method and passing the property provider instance to the response builder propfind() method.
The propfindDefect() method is associated with the PROPFIND WebDAV Http method using the @WebDAVMethod.PROPFIND annotation.
When the propfindDefect() method is invoked, an instance of a org.apache.wink.common.model.synd.SyndFeed is created and passed to the WebDAVResponseBuilder.propfind() method in order to create the actual response.
In order to create a Multistatus response manually, perform the following steps:
Return the Response instance from the resource method
|Document generated by Confluence on Nov 11, 2009 06:57|