[Zope-Coders] Better Put Handling

Jeffrey P Shell jeffrey@cuemedia.com
Fri, 7 Dec 2001 11:55:39 -0700


You might want to check out the ContentTypeRegistry in the CMF 
(CMFCore/ContentTypeRegistry).  It's a rule based system, with 
different rule types -- 'major_minor' - ie, mapping everything 
text/* to Document; 'extension' - ie, mapping .url and .link to the 
CMF link object; and two regex ones - 'mimetype_regex' and 
'name_regex'.  The rules can be reordered, so that special text 
based items can come ahead of the catch-all major/minor handler for 
text/*.


On Friday, December 7, 2001, at 11:47  AM, Casey Duncan wrote:

> I am going to take this on if no one else is. Somebody mentioned 
> yesterday to
> me that a placeholder is there for it. In the current Zope 2.5 
> branch or the
> trunk? Anyone care to tell me where?
>
> Also, I can think of two ways to implement this interface-wise. Maybe
> somebody has a better idea:
>
> 1. Add a tab to ObjectManager (I loathe to do this, but...) where 
> you can map
> file extensions and mime types to meta_types. Everything at or 
> below that
> folder would be affected. I belive this is the method advocated in the
> proposal.
>
> 2. Create a "Put Handler" object that infects everything that 
> acquires it,
> using the PUT_Factory model, but gui configurable.
>
> 3. Do something altogether different and much better than either 
> of these
> suggestions.
>
> I notice a comment about Folder creation. I think this can be 
> handled as a
> special case. such as:
>
> Creating a directory creates a ---> Folder, CMFFolder, Squishdot,
> FrankZappaFolder, etc. That would be very cool...
>
> Thoughts?
>
> /---------------------------------------------------\
>   Casey Duncan, Sr. Web Developer
>   National Legal Aid and Defender Association
>   c.duncan@nlada.org
> \---------------------------------------------------/
>
> _______________________________________________
> Zope-Coders mailing list
> Zope-Coders@zope.org
> http://lists.zope.org/mailman/listinfo/zope-coders
>
Jeffrey P Shell, jeffrey@cuemedia.com