Re: RFC822Marshaller for all content uploaded with FTP/Webdav

Roché Compaan <roche-kb4xc5yObU3kQYj/0HfcvhBnub05S5/[email protected]>
Newsgroups gmane.comp.web.zope.plone.archetypes.devel
Message-ID <1146593914.28403.60.camel@kwaaitjie>
On Tue, 2006-05-02 at 15:14 -0300, Sidnei da Silva wrote:
> On Tue, May 02, 2006 at 08:09:48PM +0200, Roché Compaan wrote:
> | On Tue, 2006-05-02 at 14:50 -0300, Sidnei da Silva wrote:
> | > On Tue, May 02, 2006 at 07:35:16PM +0200, Roché Compaan wrote:
> | > | I won't have time to write a PLIP and I need to fix this for the client
> | > | now. I'd like to fix this in a way that might be usable by you.
> | > | 
> | > | I am hoping for an implementation that is a bit more intelligent as
> | > | opposed to just having good defaults. IMO a very simple fix would be to
> | > | not try to demarshall a file using RFC822Marshaller if it is not
> | > | appropriate. Maybe even better would be to have an über marshaller that
> | > | uses RFC882 when appropriate and upload files that are clearly not
> | > | RFC822 compliant as files, not Plone documents.
> | > 
> | > That is exactly what I have in mind.
> | 
> | Actually, thinking about it more, I am more inclined to not have
> | Marshallers handle more than their name suggest. Would it not be clearer
> | to decide which marshaller to use in the PUT factory? In addition to
> | this, all that is needed is to define new marshallers for unknown text
> | files and binary files.
> | 
> | The decision made in the PUT factory can be made configurable TTW per
> | mimetype in the mimetypes registry or in an altogether different tool.
> 
> That's what Marshall does. It has a 'ControlledMarshaller' that looks
> at a tool 'marshaller_registry' and evaluates a set of predicates to
> decide which marshaller to use. One such predicate could 'sniff' if
> the file looks like rfc822.

Great! So one basically needs to develop the sniffer predicate and use
the ControlledMarshaller in Archetypes?

-- 
Roché Compaan
Upfront Systems                   http://www.upfrontsystems.co.za



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.