[Zope3-checkins] SVN: Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/ initial commit, with test framework, doc and initial class settled

Tarek Ziadé tziade at nuxeo.com
Sat Oct 8 09:24:38 EDT 2005


Log message for revision 38946:
  initial commit, with test framework, doc and initial class settled

Changed:
  A   Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/
  A   Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/README.txt
  A   Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/__init__.py
  A   Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/configure.zcml
  A   Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/tests/
  A   Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/tests/__init__.py
  A   Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/tests/test_xmlrpcintrospection.py
  A   Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/xmlrpcintrospection.py

-=-
Added: Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/README.txt
===================================================================
--- Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/README.txt	2005-10-08 13:21:18 UTC (rev 38945)
+++ Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/README.txt	2005-10-08 13:24:37 UTC (rev 38946)
@@ -0,0 +1,18 @@
+====================
+XMLRPC Introspection
+====================
+
+This Zope 3 package provides an xmlrpcintrospection mechanism,
+as defined here:
+
+    http://xmlrpc-c.sourceforge.net/xmlrpc-howto/xmlrpc-howto-api-introspection.html
+
+It registers three new xmlrpc methods:
+
+    - `listMethods()`: Lists all xmlrpc methods (ie views) registered for the current object
+
+    - `methodHelp(method_name)`: Returns the method documentation of the given method.
+
+    - `methodSignature(method_name)`: Returns the method documentation of the given method.
+
+It is based on introspection mechanisms provided by the apidoc package.
\ No newline at end of file

Added: Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/__init__.py
===================================================================
--- Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/__init__.py	2005-10-08 13:21:18 UTC (rev 38945)
+++ Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/__init__.py	2005-10-08 13:24:37 UTC (rev 38946)
@@ -0,0 +1 @@
+

Added: Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/configure.zcml
===================================================================
--- Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/configure.zcml	2005-10-08 13:21:18 UTC (rev 38945)
+++ Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/configure.zcml	2005-10-08 13:24:37 UTC (rev 38946)
@@ -0,0 +1,12 @@
+<configure
+  xmlns="http://namespaces.zope.org/zope"
+  xmlns:apidoc="http://namespaces.zope.org/xmlrpcintrospection"
+  i18n_domain="zope">
+
+  <xmlrpc:view
+      for="zope.interfaces.interfaces.IInterface"
+      methods="listAllMethods methodHelp methodSignature"
+      class=".xmlintrospection.XMLRPCIntrospection"
+      />
+
+</configure>

Added: Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/tests/__init__.py
===================================================================
--- Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/tests/__init__.py	2005-10-08 13:21:18 UTC (rev 38945)
+++ Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/tests/__init__.py	2005-10-08 13:24:37 UTC (rev 38946)
@@ -0,0 +1 @@
+

Added: Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/tests/test_xmlrpcintrospection.py
===================================================================
--- Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/tests/test_xmlrpcintrospection.py	2005-10-08 13:21:18 UTC (rev 38945)
+++ Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/tests/test_xmlrpcintrospection.py	2005-10-08 13:24:37 UTC (rev 38946)
@@ -0,0 +1,40 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""This module tests the XMLRPCIntrospection view class
+
+$Id:$
+"""
+import unittest
+from zope.app.testing import ztapi
+from zope.app.testing.placelesssetup import PlacelessSetup
+
+from zope.app.xmlrpcintrospection import xmlrpcintrospection
+
+class Test(PlacelessSetup, unittest.TestCase):
+
+    def setUp(self):
+        super(Test, self).setUp()
+
+    def testInstance(self):
+        ob = xmlrpcintrospection.XMLRPCIntrospection(None, None)
+        self.assertNotEquals(ob, None)
+
+
+def test_suite():
+    loader = unittest.TestLoader()
+    return loader.loadTestsFromTestCase(Test)
+
+
+if __name__ == '__main__':
+    unittest.TextTestRunner().run(test_suite())

Added: Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/xmlrpcintrospection.py
===================================================================
--- Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/xmlrpcintrospection.py	2005-10-08 13:21:18 UTC (rev 38945)
+++ Zope3/branches/tziade_xmlintrospection/src/zope/app/xmlrpcintrospection/xmlrpcintrospection.py	2005-10-08 13:24:37 UTC (rev 38946)
@@ -0,0 +1,32 @@
+##############################################################################
+#
+# Copyright (c) 2004 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""XML-RPC Introspection mechanism
+
+$Id:$
+"""
+__docformat__ = 'restructuredtext'
+
+from zope.app.publisher.xmlrpc import XMLRPCView
+
+class XMLRPCIntrospection(XMLRPCView):
+
+    def listAllMethods(self):
+        return []
+
+    def methodHelp(self, method_name):
+        pass
+
+    def methodSignature(self, method_name):
+        pass
+



More information about the Zope3-Checkins mailing list