[Zope-CVS] SVN: ldapadapter/trunk/interfaces.py Split interface into a basic one and a management one.

Florent Guillaume fg at nuxeo.com
Sat Oct 9 08:31:17 EDT 2004


Log message for revision 27819:
  Split interface into a basic one and a management one.
  


Changed:
  U   ldapadapter/trunk/interfaces.py


-=-
Modified: ldapadapter/trunk/interfaces.py
===================================================================
--- ldapadapter/trunk/interfaces.py	2004-10-09 12:30:33 UTC (rev 27818)
+++ ldapadapter/trunk/interfaces.py	2004-10-09 12:31:17 UTC (rev 27819)
@@ -26,17 +26,6 @@
 
 class ILDAPAdapter(Interface):
     """Adapter to an LDAP server."""
-    serverUrl = TextLine(
-        title=_("Server URL"),
-        description=_(
-            "Specify the LDAP URL of the server. Examples:\n"
-            "\n"
-            "ldap:///\n",
-            "ldap://localhost:389/\n",
-            ),
-        default=u"ldap://localhost",
-        required=True,
-        )
     host = TextLine(
         title=_("Host"),
         default=u'localhost',
@@ -52,13 +41,29 @@
         default=False,
         )
 
-    def connect(dn, password):
+    def connect(dn, password=None):
         """Connect to the server.
 
         Returns an ILDAPConnection.
         """
 
+class ILDAPAdapterManagement(Interface):
+    serverURL = TextLine(
+        title=_("Server URL"),
+        description=_(
+            "Specify the LDAP URL of the server. Examples:\n"
+            "\n"
+            "ldap:///\n",
+            "ldaps://localhost:389/\n",
+            ),
+        default=u"ldap://localhost",
+        )
 
+class IManageableLDAPAdapter(ILDAPAdapter,
+                             ILDAPAdapterManagement):
+    """LDAP Adapter with management functions."""
+
+
 class ILDAPConnection(Interface):
     """LDAP connection to a server, bound to a user."""
     def search(base, scope='one', filter='(objectclass=*)', attrs=None):



More information about the Zope-CVS mailing list