jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Moseley <...@osafoundation.org>
Subject Re: webdav configuration api
Date Fri, 08 Apr 2005 15:35:04 GMT
Tobias Strasser wrote:

> well, i guess, this is a bit overkill and we would need 2 more
> libraries. maybe its just my personal feeling. how would a typical
> chain configuration look like?

why do you think it's overkill? it implements almost exactly what you 
described in your earlier message :)

the config might look something like this:

<catalog name="simple-webdav">
   <chain name="import-content">
     <command id="import-file"
              className="org.apache.jackrabbit...FileImportHandler">
     <command id="import-xml"
              className="...XmlImportHandler">
   </chain>
   <chain name="export-content">
     <command id="export-file"
              className="...FileExportHandler">
     <command id="export-html-collection"
              className="...HtmlCollectionExportHandler">
     <command id="export-ics-collection"
              className="...IcsCollectionExportHandler">
     <command id="export-xml-collection"
              className="...XmlCollectionExportHandler">
   </chain>
</catalog>

concise but expressive.

here's a very good article on commons chain that might help you become 
more comfortable with the idea:

<http://www.onjava.com/pub/a/onjava/2005/03/02/commonchains.html>

surprisingly, new requirements for my project came to light yesterday 
which almost mandate a chain of responsibility approach. i need to be 
able to offer different views (xml, html, ics) of the same collection 
based on the request's content type, user agent, and possibly other 
dimensions. so i'm motivated to work on this in the short term (probably 
the next couple weeks).

Mime
View raw message