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