[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services - principalannotation.py:1.4

Jim Fulton jim@zope.com
Thu, 29 May 2003 14:16:33 -0400


Update of /cvs-repository/Zope3/src/zope/app/interfaces/services
In directory cvs.zope.org:/tmp/cvs-serv29921/src/zope/app/interfaces/services

Modified Files:
	principalannotation.py 
Log Message:
Renamed the getAnnotation and hasAnnotation methods of principal
annotation services to getAnnotations and hasAnnotations.

Added a getAnnotationsById, which is needed to do service delegation
in certain situations.


=== Zope3/src/zope/app/interfaces/services/principalannotation.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/interfaces/services/principalannotation.py:1.3	Tue Apr  8 21:38:32 2003
+++ Zope3/src/zope/app/interfaces/services/principalannotation.py	Thu May 29 14:16:33 2003
@@ -20,11 +20,17 @@
 class IPrincipalAnnotationService(Interface):
     """Stores IAnnotations for IPrinicipals."""
 
-    def getAnnotation(principal):
+    def getAnnotations(principal):
         """Return object implementing IAnnotations for the given IPrinicipal.
 
         If there is no IAnnotations it will be created and then returned.
         """
 
-    def hasAnnotation(principal):
+    def getAnnotationsBy(principalId):
+        """Return object implementing IAnnotations for the given prinicipal id.
+
+        If there is no IAnnotations it will be created and then returned.
+        """
+
+    def hasAnnotations(principal):
         """Return boolean indicating if given IPrincipal has IAnnotations."""