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 Thu, 07 Apr 2005 19:24:14 GMT
Tobias Strasser wrote:

> i suggest to introduce some sort of resource importer and exporter
> that handle the
> specific import/export into/from jcr. for example a: PlainFileImporter
> just stores
> the file as binary property, whereas a XmlImporter can store it as
> deserialized xml.
> additional parameters can 'configure' the importers (eg: make node
> versionable, etc.)
> 
> the importers and exporters are regitered and asked sequencly, if they
> want to handle
> a specific Webdav Resource/JCR Item:
> 
> boolean ResourceImporter.canImport(DavResource, Node parent);
> boolean ResourceImporter.import(DavResource, InputStream in, Node parent);
> 
> boolean ResourceExporter.canExport(DavResource resource, Node node);
> NodeResource ResourceExporter.export(DavResource resource, Node node);

i like the idea, tho i suggest we call them import/export handlers.

would the jcr server benefit from this approach as well as the simple 
server?

how about using commons-chain to provide a chain of responsibility for 
importers and exporters?

this pattern, and commons-chain's implementation (including its 
xml-based configuration) are used in several projects and consequently 
are well understood by the larger developer community.

Mime
View raw message