History for PortalMetadataToolProposal
??changed:
-
Overview
This proposal advocates creation of a new standard 'portal_metadata'
tool, whose purpose would be to provide a PluggablePolicy for portal-wide
metadata.
Interface
The tool would have the following interface::
def validateMetadata( self, content ):
"""
Enforce portal-wide policies about DCI, e.g., requiring
non-empty title/description, etc. This method would be
called by the framework immediately before adding a
piece of content to a folder; it could also perform
some other housekeeping (setting unsupplied values to
defaults, etc.)
"""
def getFullName( self, userid ):
"""
Convert an internal userid to a "formal" name, if
possible, perhaps using the 'portal_membership' tool.
"""
def listAllowedSubjects( self, meta_type=None ):
"""
List allowed keywords for a given meta_type, or all
possible keywords if none supplied.
"""
def getPublisher( self ):
"""
Return the "formal" name of the publisher of the
portal.
"""
def getType( self, meta_type ):
"""
Map the Zope 'meta_type' to a DCI-appropriate one (the
default implementation could just return meta_type.)
"""
def listFormats( self, meta_type=None ):
"""
List the allowed 'Content-type' values for a particular
meta_type, or all possible formats if none supplied.
"""
def listLanguages( self, meta_type=None ):
"""
List the allowed language values.
"""
def listCopyrightTypes( self, meta_type=None ):
"""
List the allowed values for a "Copyright type:"
selection list; this gets especially important where
syndication is involved.
"""