[Zope3-checkins] SVN: Zope3/branches/ajung-tarek-request-publication-branch/src/zope/app/publication/interfaces.py new marker interfaces for methods and mimetypes

Andreas Jung andreas at andreas-jung.com
Thu Oct 6 11:13:14 EDT 2005


Log message for revision 38791:
  new marker interfaces  for methods and mimetypes
  

Changed:
  U   Zope3/branches/ajung-tarek-request-publication-branch/src/zope/app/publication/interfaces.py

-=-
Modified: Zope3/branches/ajung-tarek-request-publication-branch/src/zope/app/publication/interfaces.py
===================================================================
--- Zope3/branches/ajung-tarek-request-publication-branch/src/zope/app/publication/interfaces.py	2005-10-06 15:04:08 UTC (rev 38790)
+++ Zope3/branches/ajung-tarek-request-publication-branch/src/zope/app/publication/interfaces.py	2005-10-06 15:13:14 UTC (rev 38791)
@@ -82,3 +82,38 @@
     /.  In particular, if the content included HTML, relative links in
     the HTML are relative to the container the content is in.
     """
+
+
+# marker interfaces for request-publication factories
+class IMethodPOST(interface.Interface):
+    """Marker interface for request-publication factories able to deal
+       with POST requests.
+    """
+
+class IMethodGET(interface.Interface):
+    """Marker interface for request-publication factories able to deal
+       with GET requests.
+    """
+
+class IMethodHEAD(interface.Interface):
+    """Marker interface for request-publication factories able to deal
+       with HEAD requests.
+    """
+    
+class IMimetypeTextXML(interface.Interface):
+    """ request-chooser able to deal with text/html """
+
+class IMimetypesAll(interface.Interface):
+    """ request-chooser able to deal with any mimetypes """
+
+class IRequestPublicationFactory(interface.Interface):
+    """ request-publication factory """
+
+    def canHandle(environment):
+        """ returns True if it can handle the request,
+            otherwise False. 'environment' can be used by the factory 
+            to make a decision based on the HTTP headers.
+        """
+
+    def getRequestPublication():
+        """ returns a tuple (request, publication) """



More information about the Zope3-Checkins mailing list