API¶
Interfaces¶
Utility for storing IAnnotations for principals.
-
interface
zope.principalannotation.interfaces.
IPrincipalAnnotationUtility
[source]¶ Stores
IAnnotations
forIPrinicipals
.-
getAnnotations
(principal)¶ Return object implementing
IAnnotations
for the given :class`~.IPrinicipal`.If there is no
IAnnotations
it will be created and then returned.
-
getAnnotationsById
(principalId)¶ Return object implementing
IAnnotations
for the given prinicipalId.If there is no
IAnnotations
it will be created and then returned.
-
hasAnnotations
(principal)¶ Return boolean indicating if given
IPrincipal
hasIAnnotations
.
-
Utility and Adapters¶
Implementation of IPrincipalAnnotationUtility
-
class
zope.principalannotation.utility.
PrincipalAnnotationUtility
[source]¶ Bases:
persistent.Persistent
Stores
IAnnotations
forIPrinicipals
.The utility ID is ‘PrincipalAnnotation’.
-
class
zope.principalannotation.utility.
Annotations
(principalId, store=None)[source]¶ Bases:
persistent.Persistent
,zope.location.location.Location
Stores annotations for a single principal in a
PersistentDict
.Cooperates with the site hierarchy to find annotations in parent sites.