[Zope-CMF] portal metadata tool policy enforcement
kapil thangavelu
kthangavelu@earthlink.net
Sun, 14 Jul 2002 17:22:41 -0700
On Sunday 14 July 2002 03:35 pm, Tres Seaver wrote:
> On Sun, 2002-07-14 at 18:01, kapil thangavelu wrote:
> > hi folks,
> >
> > i'm embarking on my first cmf based project, and i had a question about
> > the portal_metadata tool.
> >
> > it seems that the portal metadata tool can setup default content metadata
> > values, and handle enforcement of those values. but it doesn't appear to
> > be wired into content creation or editing. am i missing something?
> >
> I have avoided wiring enforcement of the metadata tool in anywhere
> specific because it feels to me like a policy choice: some sites will
> want to defer enforcement, e.g. until the author is "done" with the
> object and wants to submit it. Providing defaults at creation time
> seems rather less problematic, however.
i totally agree that enforcement of metadata is a policy choice, i'd even
extended policy choice uses to any content 'writes' by the metadata tool. but
the problem in my mind is that if a site to chooses to enact a metadata
enforcement and default policy, they need to make changes to code on a type
constructor/edit basis. which i find to be an anomaly considering that the
cmf generally does an excellent job of generically handling/managing content
types without programming. a better approach imo, would be to have generic
content creation and edit hooks call the portal_metadata tool, and then have
flags on the element policies that activate enforcement, with the tool's
setInitialMetadata and validateMetadata filtering accordingly.
which harkens back to my original questions of the best places to add such a
hook. of which the one that still concerns me is the best place to
generically hook the edit process? reindex_object?
cheers,
kapil