On 20.04.2010 01:40, sunew wrote:
In getpaid.core.options, the PersistentOptions class, used for handling the annotation storage on objects, for items as well as payment processors and so on, was setting the annotation_key on the PersistentOptions class itself instead of the generated storage classes (like BuyableContentStorage).
Hi, quite a reveal!
The migration should probably consists of trawling through the whole site, and fixing annotation keys where necessary, for both content and settings in general.
Which objects could really have annotations set by PersistentOptions? Any else than he portal root (for store settings and processor settings) and objects marked with IPayableMarker? (And those can be directly queried from the catalog without traversing the whole site.)
I guess, the hard part would be the heuristics to go through the existing annotations on a particular object and move the found payable settings to a proper annotation dict with a correct key. Although, if we'd create a list of all possible getpaid-related annotation keys (and respective interfaces), the only problem would be properties of different plugins/markers with colliding names?
Interestingly, for me it seems that with the default installation all the different payble settings (key "getpaid.content.*") get stored with key "getpaid.configuration" (dict(obj.__annotations__)['getpaid.configuration']). I wonder, if the plugins can really change the class generation order so that the key could be different from that. I guess, plugins.zcml on Products.PloneGetPaid could prevent that.
Would you still use Products.PloneGetPaid's custom upgrading framework for a such migration or should it be done as GenericSetup upgradeStep?
Best Regards, Asko -- GetPaid for Plone: http://www.plonegetpaid.com (overview info) | http://code.google.com/p/getpaid (code and issue tracker) You received this message because you are subscribed to the Google Groups "getpaid-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en?hl=en
