[Zope3-Users] Content cloning ?

Thierry Florac thierry.florac at onf.fr
Mon Jan 15 10:06:27 EST 2007


  Hi,

In an application I'm currently building with Zope3, I need to be able
to "clone" several kinds of content data.
While cloning a simple content class is quite simple, I don't know
exactly how to clone data provided through adapters, which may store
these data throught annotations.

What I was thinking about was something like :
 - create a new interface "IClonable", with a single "clone" method
 - make my specific content interfaces, eventually provided throught
adapters, extend IClonable
 - get a list of interfaces provided by my content class, directly or
throught adapters, which extend IClonable, and call their "clone" method
when cloning is required.

So, actually, my main problem is : 
 - how can I get the list of interfaces provided by a given class,
directly of throught adapters ?
 - is this conception method the best one in Python/Zope3 to clone
data ??

Thanks for any help or advise...

  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : thierry.florac at onf.fr
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85



More information about the Zope3-users mailing list