[Zope3-dev] Principal with annotations
Stephan Richter
srichter at cosmos.phy.tufts.edu
Fri Sep 24 11:33:53 EDT 2004
On Friday 24 September 2004 11:09, Florian Lindner wrote:
> This chapter is pretty new, isn't it? When I worked through the Zope3
> book some months ago I didn't noticed such a chapter.
Yes, it was suggested by Kapil and I added it just before turning in the book
to the publisher.
> My first questions arises right at the beginning:
>
> "However, principals are often imported from external data sources, so
> that they are not attribute annotatable."
> Since my principals are not impored from external data source but live
> in the ZODB is there a even easier way to fulfil my needs?
Currently it would be non-standard not to use the principal annotation service
for principal annotations. However, if your principals are ZODB-based, you
can just use attribute annotations.
> (attrribute annotatable, what is that?)
IAttributeAnnotatable objects can store annotations on itself in an attribute.
There exists an IAttributeAnnotations adapter that manages the annotations.
See the glossary (Annotation) for more details.
http://dev.zope.org/Zope3/glossary.html
http://dev.zope.org/Zope3/glossary.pdf
Read the first part of the "Events and Subscribers" chapter to see how to
store data on annotatable objects.
http://dev.zope.org/Zope3/events.html
http://dev.zope.org/Zope3/events.pdf
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-dev
mailing list