Commit 3dd22991 authored by Romain Courteaud's avatar Romain Courteaud

Add getMetadataMappingDict, in order to make metadata update more flexible.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19023 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 19ab2191
......@@ -1211,6 +1211,22 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin):
"""
convertFile = WorkflowMethod(convertFile)
security.declareProtected(Permissions.AccessContentsInformation,
'getMetadataMappingDict')
def getMetadataMappingDict(self):
"""
Return a dict of metadata mapping used to update base metadata of the
document
"""
try:
method = self._getTypeBasedMethod('getMetadataMappingDict')
except KeyError, AttributeError:
method = None
if method is not None:
return method()
else:
return {}
security.declareProtected(Permissions.ModifyPortalContent, 'updateBaseMetadata')
def updateBaseMetadata(self, **kw):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment