RE : computeId customisation

"Winterflood, Jonathan" <[email protected]>
Newsgroups gmane.comp.web.zope.cps.devel
Message-ID <2A5D32A4E4678A4D8A8AF34E3B0A785F26DD96@CORPMAIL31.corp.capgemini.com>
Thanks a lot

>It is indeed some kind of a hack: generateId is suppose to provide  
>disambiguation within the given container.
>If you're really new to Zope, I should maybe point out that this  
>notion of id is by no means global.

I understand this script is used by CPS to create id's for the proxies to documents
these proxies circulate different workspaces in CPS (passed from private per-user spaces to common spaces, mostly)
The Id being generated in private-spaces, it would be possible that at one point there will be a clash when the proxies are moved to the common spaces, am I right?


>The fact that it uses numbers for that purpose is coincidental (it's  
>not likely to change soon).
>A cleaner way would be to implement you own logic using  
>container.hasObject() to check prior existence.

I'm thinking of something like a global counter, somehow stored by computeId, incremented for each document.

Jonathan



This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.

_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel
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.