[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services - __init__.py:1.2 adapter.py:1.2 adapter_search.pt:1.2 adapterconfigsummary.pt:1.2 add_adapter_config.pt:1.2 add_cache.pt:1.2 add_module.pt:1.2 add_service_1.pt:1.2 add_service_2.pt:1.2 addconnectionconfig.pt:1.2 addrole.pt:1.2 addservicemanager.py:1.2 auth.pt:1.2 auth.py:1.2 cache.py:1.2 caches.pt:1.2 changeconfigurations.pt:1.2 changeconfigurations.py:1.2 componentconfigedit.pt:1.2 componentconfigitemedit.pt:1.2 componentconfigsummary.pt:1.2 componentconfigurl.py:1.2 configurationstatuswidget.py:1.2 configure.zcml:1.2 connection.py:1.2 connections.pt:1.2 edit_module.pt:1.2 editconfiguration.pt:1.2 error.gif:1.2 error.pt:1.2 error.py:1.2 error_service.gif:1.2 errorentry.pt:1.2 event.py:1.2 event_service.gif:1.2 eventcontrol.pt:1.2 field.py:1.2 hub.gif:1.2 hub.py:1.2 hubcontrol.pt:1.2 module.py:1.2 namecomponentconfigurable.pt:1.2 namecomponentconfigurableview.py:1.2 nameconfigurable.pt:1.2 nameconfigurableview.py:1.2 package! .py:1.2 packages_contents.pt:1.2 pageconfigsummary.pt:1.2 role.gif:1.2 role.py:1.2 role_service.gif:1.2 service.gif:1.2 service.py:1.2 services.pt:1.2 texttbentry.pt:1.2 view.py:1.2 view_search.pt:1.2 viewconfigsummary.pt:1.2 viewpackage_contents.pt:1.2 zpt.py:1.2

Jim Fulton jim@zope.com
Wed, 25 Dec 2002 09:14:12 -0500


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

Added Files:
	__init__.py adapter.py adapter_search.pt 
	adapterconfigsummary.pt add_adapter_config.pt add_cache.pt 
	add_module.pt add_service_1.pt add_service_2.pt 
	addconnectionconfig.pt addrole.pt addservicemanager.py auth.pt 
	auth.py cache.py caches.pt changeconfigurations.pt 
	changeconfigurations.py componentconfigedit.pt 
	componentconfigitemedit.pt componentconfigsummary.pt 
	componentconfigurl.py configurationstatuswidget.py 
	configure.zcml connection.py connections.pt edit_module.pt 
	editconfiguration.pt error.gif error.pt error.py 
	error_service.gif errorentry.pt event.py event_service.gif 
	eventcontrol.pt field.py hub.gif hub.py hubcontrol.pt 
	module.py namecomponentconfigurable.pt 
	namecomponentconfigurableview.py nameconfigurable.pt 
	nameconfigurableview.py package.py packages_contents.pt 
	pageconfigsummary.pt role.gif role.py role_service.gif 
	service.gif service.py services.pt texttbentry.pt view.py 
	view_search.pt viewconfigsummary.pt viewpackage_contents.pt 
	zpt.py 
Log Message:
Grand renaming:

- Renamed most files (especially python modules) to lower case.

- Moved views and interfaces into separate hierarchies within each
  project, where each top-level directory under the zope package
  is a separate project.

- Moved everything to src from lib/python.

  lib/python will eventually go away. I need access to the cvs
  repository to make this happen, however.

There are probably some bits that are broken. All tests pass
and zope runs, but I haven't tried everything. There are a number
of cleanups I'll work on tomorrow.



=== Zope3/src/zope/app/browser/services/__init__.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:08 2002
+++ Zope3/src/zope/app/browser/services/__init__.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,2 @@
+#
+# This file is necessary to make this directory a package.


=== Zope3/src/zope/app/browser/services/adapter.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:08 2002
+++ Zope3/src/zope/app/browser/services/adapter.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,112 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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.
+#
+##############################################################################
+"""Views for local adapter configuration.
+
+  AdapterSeviceView -- it's a bit different from other services, as it
+  has a lot of things in it, so we provide a search interface:
+
+    search page
+    browsing page
+
+  AdapterConfigurationAdd
+
+$Id$
+"""
+__metaclass__ = type
+
+import md5
+from zope.app.form.utility \
+     import setUpWidgets, getWidgetsData, getWidgetsDataForContent, fieldNames
+from zope.publisher.browser import BrowserView
+from zope.app.interfaces.services.interfaces \
+     import IAdapterConfiguration, IAdapterConfigurationInfo
+from zope.event import publish
+from zope.app.event.objectevent import ObjectCreatedEvent
+from zope.app.interfaces.services.configuration import IConfiguration
+from zope.app.services.adapter import AdapterConfiguration
+from zope.app.component.interfacefield import InterfaceField
+from zope.interface import Interface
+from zope.component import getView
+from zope.proxy.context import ContextWrapper
+
+class IAdapterSearch(Interface):
+
+    forInterface = InterfaceField(title=u"For interface",
+                                  required=False,
+                                  )
+    providedInterface = InterfaceField(title=u"Provided interface",
+                                       required=False,
+                                       )
+
+
+class AdapterServiceView(BrowserView):
+
+    def __init__(self, *args):
+        super(AdapterServiceView, self).__init__(*args)
+        setUpWidgets(self, IAdapterSearch)
+
+    def configInfo(self):
+        forInterface = self.forInterface.getData()
+        providedInterface = self.providedInterface.getData()
+
+
+        result = []
+        for (forInterface, providedInterface, registry
+             ) in self.context.getRegisteredMatching(forInterface,
+                                                     providedInterface):
+            forInterface = (
+                forInterface.__module__ +"."+ forInterface.__name__)
+            providedInterface = (
+                providedInterface.__module__ +"."+ providedInterface.__name__)
+
+            registry = ContextWrapper(registry, self.context)
+            view = getView(registry, "ChangeConfigurations", self.request)
+            prefix = md5.new('%s %s' %
+                             (forInterface, providedInterface)).hexdigest()
+            view.setPrefix(prefix)
+            view.update()
+            result.append(
+                {'forInterface': forInterface,
+                 'providedInterface': providedInterface,
+                 'view': view,
+                 })
+
+        return result
+
+
+class AdapterConfigurationAdd(BrowserView):
+
+    def __init__(self, *args):
+        super(AdapterConfigurationAdd, self).__init__(*args)
+        setUpWidgets(self, IAdapterConfiguration)
+
+    def refresh(self):
+        if "FINISH" in self.request:
+            data = getWidgetsData(self, IAdapterConfigurationInfo)
+            configuration = AdapterConfiguration(**data)
+            publish(self.context.context, ObjectCreatedEvent(configuration))
+            configuration = self.context.add(configuration)
+            getWidgetsDataForContent(self, IConfiguration, configuration)
+            self.request.response.redirect(self.context.nextURL())
+            return False
+
+        return True
+
+    def getWidgets(self):
+        return ([getattr(self, name)
+                 for name in fieldNames(IAdapterConfigurationInfo)]
+                +
+                [getattr(self, name)
+                 for name in fieldNames(IConfiguration)]
+                )


=== Zope3/src/zope/app/browser/services/adapter_search.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:08 2002
+++ Zope3/src/zope/app/browser/services/adapter_search.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,48 @@
+<html metal:use-macro="views/standard_macros/page">
+<head><title></title></head>
+<body>
+<div metal:fill-slot="body">
+
+<form action="." method="GET"
+      tal:attributes="action request/URL"
+      >
+  <table>
+    <tr tal:content="structure view/forInterface/row" />
+    <tr tal:content="structure view/providedInterface/row" />
+    <tr>
+      <td></td>
+      <td> 
+         <input type="submit" value="Refresh">
+         <input type="submit" value="Search" name="SEARCH">
+     </td>
+    </tr>
+  </table>
+</form>
+
+<form action="." method="POST"
+      tal:attributes="action request/URL"
+      tal:condition="request/SEARCH|nothing"
+      >
+  <table>
+    <tr>
+       <th>For/<br>Provided</th>
+       <th>Configuration</th>
+    </tr>
+    
+    <tr tal:repeat="config view/configInfo">
+      <td> <span tal:content="config/forInterface" />/<br>
+           <span tal:content="config/providedInterface" />
+      </td>
+      <td tal:content="structure config/view" />
+    </tr>
+    <tr>
+      <td></td>
+      <td></td>
+      <td> 
+         <input type="submit" value="Update" name="UPDATE_SUBMIT">
+      </td>
+    </tr>
+  </table>
+</form>
+
+</div></body></html>


=== Zope3/src/zope/app/browser/services/adapterconfigsummary.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:08 2002
+++ Zope3/src/zope/app/browser/services/adapterconfigsummary.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1 @@
+<span tal:replace="context/factoryName" />


=== Zope3/src/zope/app/browser/services/add_adapter_config.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:08 2002
+++ Zope3/src/zope/app/browser/services/add_adapter_config.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,21 @@
+<html metal:use-macro="views/standard_macros/dialog">
+<head><title></title></head>
+<body>
+<div metal:fill-slot="body">
+
+<form action="." method="post"
+      tal:attributes="action request/URL"
+      tal:condition="view/refresh"
+      >
+  <table>
+     <tr tal:repeat="widget view/getWidgets"
+         tal:content="structure widget/row">
+       <td>Label</td>
+       <td>Roles</td>
+     </tr>
+  </table>
+  <input type="submit" value="Refresh" />
+  <input type="submit" name="FINISH" value="Finish" />
+</form>
+
+</div></body></html>


=== Zope3/src/zope/app/browser/services/add_cache.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:08 2002
+++ Zope3/src/zope/app/browser/services/add_cache.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,38 @@
+<html metal:use-macro="views/standard_macros/page">
+<head><title>Add a cache configuration</title></head>
+<body>
+<div metal:fill-slot="body">
+
+<form action="finish.html" method="post">
+  <table>
+     <tr>
+       <td>Cache Name</td>
+       <td><input type="text" name="cache_name" /></td>
+     </tr>
+     <tr>
+       <td>Component</td>
+       <td><select name="component_path">
+             <option tal:repeat="path view/components"
+                     tal:attributes="value path"
+                     tal:content="path">path</option>
+           </select>
+       </td>
+     </tr>
+     <tr>
+       <td>Status</td>
+       <td tal:content="structure view/status"><input type="text"></td>
+     </tr>
+     <tr>
+       <td>Title</td>
+       <td tal:content="structure view/title"><input type="text"></td>
+     </tr>
+     <tr>
+       <td>Description</td>
+       <td tal:content="structure view/description"><textarea></textarea></td>
+     </tr>
+
+  </table>
+  <input type="submit" />
+</form>
+
+</div></body></html>


=== Zope3/src/zope/app/browser/services/add_module.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:08 2002
+++ Zope3/src/zope/app/browser/services/add_module.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,14 @@
+<html metal:use-macro="views/standard_macros/page">
+<head><title>Add a module</title></head>
+<body>
+<div metal:fill-slot="body">
+
+<p>Enter the absolute module name and source code.</p>
+
+<form action="action.html">
+<input name="name">
+<textarea name="source:text" cols="65" rows="25"></textarea>
+<input type="submit" value="Add module"/>
+</form>
+
+</div></body></html>


=== Zope3/src/zope/app/browser/services/add_service_1.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:08 2002
+++ Zope3/src/zope/app/browser/services/add_service_1.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,30 @@
+<html metal:use-macro="views/standard_macros/page">
+<head><title>Add a service component</title></head>
+<body>
+<div metal:fill-slot="body">
+
+<form action="step2.html">
+<table>
+<tr>
+  <td>Service Type</td>
+  <td>
+    <select name="service_type">
+      <option tal:repeat="service view/services"
+              tal:attributes="value service"
+              tal:content="service">service</option>
+    </select>
+  </td>
+</tr>
+<tr>
+  <td>Title</td>
+  <td tal:content="structure view/title"><input type="text"></td>
+</tr>
+<tr>
+  <td>Description</td>
+  <td tal:content="structure view/description"><textarea></textarea></td>
+</tr>
+</table>
+<input type=submit value="Next"/>
+</form>
+
+</div></body></html>


=== Zope3/src/zope/app/browser/services/add_service_2.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:09 2002
+++ Zope3/src/zope/app/browser/services/add_service_2.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,40 @@
+<html metal:use-macro="views/standard_macros/page">
+<head><title>Contact Information</title></head>
+<body>
+<div metal:fill-slot="body">
+
+<form action="finish.html" method="post">
+  <input type="hidden" name="service_type" value="" 
+         tal:attributes="value request/service_type" />
+  <table>
+     <tr>
+       <td>Service Type</td>
+       <td tal:content="request/service_type">Roles</td>
+     </tr>
+     <tr>
+       <td>Component</td>
+       <td><select name="component_path">
+             <option tal:repeat="path view/components"
+                     tal:attributes="value path"
+                     tal:content="path">path</option>
+           </select>
+       </td>
+     </tr>
+     <tr>
+       <td>Status</td>
+       <td tal:content="structure view/status"><input type="text"></td>
+     </tr>
+     <tr>
+       <td>Title</td>
+       <td tal:content="structure view/title"><input type="text"></td>
+     </tr>
+     <tr>
+       <td>Description</td>
+       <td tal:content="structure view/description"><textarea></textarea></td>
+     </tr>
+
+  </table>
+  <input type="submit" value="Finish" />
+</form>
+
+</div></body></html>


=== Zope3/src/zope/app/browser/services/addconnectionconfig.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:09 2002
+++ Zope3/src/zope/app/browser/services/addconnectionconfig.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,42 @@
+<html metal:use-macro="views/standard_macros/page">
+<head><title>Add a connection configuration</title></head>
+<body>
+<div metal:fill-slot="body">
+
+<form action="finish.html" method="post">
+  <table>
+     <tr>
+       <td>Connection Name</td>
+       <td><input type="text" name="connection_name" /></td>
+     </tr>
+     <tr>
+       <td>Component</td>
+       <td><select name="component_path">
+             <option tal:repeat="path view/components"
+                     tal:attributes="value path"
+                     tal:content="path">path</option>
+           </select>
+       </td>
+     </tr>
+     <tr>
+       <td>Permission</td>
+       <td tal:content="structure view/permission"><input type="text"></td>
+     </tr>
+     <tr>
+       <td>Status</td>
+       <td tal:content="structure view/status"><input type="text"></td>
+     </tr>
+     <tr>
+       <td>Title</td>
+       <td tal:content="structure view/title"><input type="text"></td>
+     </tr>
+     <tr>
+       <td>Description</td>
+       <td tal:content="structure view/description"><textarea></textarea></td>
+     </tr>
+
+  </table>
+  <input type="submit" />
+</form>
+
+</div></body></html>


=== Zope3/src/zope/app/browser/services/addrole.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:09 2002
+++ Zope3/src/zope/app/browser/services/addrole.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,19 @@
+<html metal:use-macro="views/standard_macros/page">
+<head><title>Add Role</title></head>
+<body>
+<div metal:fill-slot="body">
+Enter the information about the role.
+<form action="action.html" method="post">
+<table cellspacing="0" cellpadding="2" border="0">
+  <tr><td>Id</td>
+      <td><input type="text" name="id" size="40" value="" /> </td>
+  </tr>
+  <tr><td>Title</td>
+      <td><input type="text" name="title" size="60" value="" /> </td>
+  </tr>
+  <tr><td>Descrption</td>
+      <td><textarea name="description" rows="10" cols="60"></textarea></td>
+  </tr>
+</table>
+<input type="submit" name="submit" value=" Create Role " />
+</form></div></body></html>


=== Zope3/src/zope/app/browser/services/addservicemanager.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:09 2002
+++ Zope3/src/zope/app/browser/services/addservicemanager.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,30 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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.
+#
+##############################################################################
+"""
+$Id$
+"""
+
+from zope.publisher.browser import BrowserView
+from zope.app.services.service import ServiceManager
+
+
+class AddServiceManager(BrowserView):
+
+    def addServiceManager(self):
+        sm = ServiceManager()
+        if self.context.hasServiceManager():
+            raise ValueError(
+                  'This folder already contains a service manager')
+        self.context.setServiceManager(sm)
+        self.request.response.redirect("++etc++Services/")


=== Zope3/src/zope/app/browser/services/auth.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:09 2002
+++ Zope3/src/zope/app/browser/services/auth.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,63 @@
+<html metal:use-macro="views/standard_macros/page">
+<head>
+  <title>Add User</title>
+</head>
+<body>
+
+  <div metal:fill-slot="body">
+
+    <form action="." method="post" enctype="multipart/form-data">
+    
+      <table>      
+    	<tbody>   
+    	
+    	  <tr>
+    	    <th>Id:</th>
+    	    <td>
+	      <input type="text" name="id" size="40" value="">  
+            </td>
+    	  </tr>
+    	  <tr>
+    	    <th>Title:</th>
+    	    <td>
+	      <input type="text" name="title" size="40" value="">  
+            </td>
+    	  </tr>
+    	  <tr>
+    	    <th>Description:</th>
+    	    <td>
+	      <input type="text" name="description" size="40" value="">  
+            </td>
+    	  </tr>
+    	  <tr>
+    	    <th>Login:</th>
+    	    <td>
+	      <input type="text" name="login" size="40" value="">  
+            </td>
+    	  </tr>
+    	  <tr>
+    	    <th>Password:</th>
+    	    <td>
+	      <input type="password" name="password" size="40" value="">  
+            </td>
+    	  </tr>
+    	  <tr>
+    	    <th>Roles:</th>
+    	    <td>
+	      <select name="roles:list">
+	        <option value="Manager">Manager</option>
+              </select>
+            </td>
+    	  </tr>
+    	    	
+    	</tbody>     
+      </table>
+    
+      <input type="submit" name="action.html:method" value="Add" />
+    
+    </form> 
+
+  </div>
+
+</body>
+</html>
\ No newline at end of file


=== Zope3/src/zope/app/browser/services/auth.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:09 2002
+++ Zope3/src/zope/app/browser/services/auth.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,50 @@
+##############################################################################
+#
+# 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.0 (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.
+#
+##############################################################################
+"""Connection Management GUI
+
+$Id$
+"""
+from zope.publisher.browser import BrowserView
+from zope.app.services.auth import User
+
+class AddUser(BrowserView):
+
+    def action(self, id, title, description, login, password, roles):
+        user = User(id, title, description, login, password)
+        self.context.setObject(id, user)
+        return self.request.response.redirect(self.request.URL[-2])
+
+
+"""Connection Management GUI
+
+$Id$
+"""
+from zope.component import getService
+from zope.publisher.browser import BrowserView
+
+class EditUser(BrowserView):
+
+    def action(self, title, description, login, password, roles):
+        user = self.context
+        user.setTitle(title)
+        user.setDescription(description)
+        user.setLogin(login)
+        if password != "DEFAULT":
+            user.setPassword(password)
+        user.setRoles(roles)
+        return self.request.response.redirect(self.request.URL[-1])
+
+    def getAvailableRoles(self):
+        service = getService(self.context, "Roles")
+        return service.getRoles()


=== Zope3/src/zope/app/browser/services/cache.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:09 2002
+++ Zope3/src/zope/app/browser/services/cache.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,47 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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.
+#
+##############################################################################
+"""Cache configuration adding view
+
+$Id$
+"""
+__metaclass__ = type
+
+from zope.component import getServiceManager
+from zope.publisher.browser import BrowserView
+from zope.app.form.utility import setUpWidgets, getWidgetsDataForContent
+from zope.app.interfaces.services.cache \
+     import ICacheConfiguration
+from zope.app.services.cache \
+     import CacheConfiguration
+from zope.app.interfaces.cache.cache import ICache
+
+class AddCacheConfiguration(BrowserView):
+
+    def __init__(self, *args):
+        super(AddCacheConfiguration, self).__init__(*args)
+        setUpWidgets(self, ICacheConfiguration)
+
+    def components(self):
+        service = getServiceManager(self.context.context)
+        paths = [info['path'] for info in service.queryComponent(type=ICache)]
+        paths.sort()
+        return paths
+
+    def action(self, cache_name, component_path):
+        if not cache_name:
+            raise ValueError, 'You must specify a cache name'
+        cd = CacheConfiguration(cache_name, component_path)
+        cd = self.context.add(cd)
+        getWidgetsDataForContent(self, ICacheConfiguration, content=cd)
+        self.request.response.redirect(self.context.nextURL())


=== Zope3/src/zope/app/browser/services/caches.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:09 2002
+++ Zope3/src/zope/app/browser/services/caches.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,33 @@
+<html metal:use-macro="views/standard_macros/page">
+<body metal:fill-slot="body">
+<div metal:use-macro="view/indexMacros/macros/body">
+
+  <h2 metal:fill-slot="heading">Caches configured in this cache service.</h2>
+
+  <p metal:fill-slot="empty_text">No caches have been configured</p>
+
+  <div metal:fill-slot="extra_top">
+
+    <p>For each cache, the cache name is given and all of the
+       components registered to provide the cache are shown.  You
+       may select the component to provide the cache or disable the
+       cache.
+    </p>
+
+    <p>Select a cache name or a component name to visit the cache
+       or component.
+    </p>
+
+  </div>
+
+  <p metal:fill-slot="help_text">To configure a cache, add a database
+     adapter component to a <em>package</em> in <a
+     href="../../../Packages">Packages</a> or to the <a
+     href="../../../Packages/default">default package</a>. After the component
+     is added, add a cache configuration that configures the component to
+     provide a cache.
+  </p>
+
+</div>
+</body>
+</html>


=== Zope3/src/zope/app/browser/services/changeconfigurations.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:09 2002
+++ Zope3/src/zope/app/browser/services/changeconfigurations.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,32 @@
+<table width="100%">
+  <tr tal:define="message view/message" tal:condition="message">
+     <td></td>
+     <td colspan="2"><em tal:content="message">xxxx</em></td>
+  </tr>
+  <tr tal:repeat="configuration view/configurations">
+     <td><input type="radio" name="Roles" value="0"
+             tal:attributes="
+             name view/name;
+             value configuration/id;
+             checked configuration/active;
+             "
+             />
+     </td>
+     <td><a href="."
+            tal:attributes="href string:${view/configBase}/${configuration/id}"
+            tal:content="configuration/id"
+         >foo/bar</a></td>
+     <td tal:content="structure configuration/summary">
+         Configuration summary
+     </td>
+  </tr>
+  <tr>
+     <td><input type="radio" name="Roles" value="disable"
+                tal:attributes="
+                   name view/name;
+                   checked view/inactive;
+                   "
+                /></td>
+     <td><em>Disable</em></td>
+  </tr>
+</table>


=== Zope3/src/zope/app/browser/services/changeconfigurations.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:10 2002
+++ Zope3/src/zope/app/browser/services/changeconfigurations.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,79 @@
+##############################################################################
+#
+# 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.0 (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.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+
+from zope.publisher.browser import BrowserView
+from zope.component import getView, getServiceManager
+from zope.proxy.introspection import removeAllProxies
+
+class ChangeConfigurations(BrowserView):
+
+    _prefix = 'configurations'
+    name = _prefix + ".active"
+    message = ''
+    configBase = ''
+
+    def setPrefix(self, prefix):
+        self._prefix = prefix
+        self.name = prefix + ".active"
+
+    def applyUpdates(self):
+        message = ''
+        if 'submit_update' in self.request.form:
+            active = self.request.form.get(self.name)
+            if active == "disable":
+                active = self.context.active()
+                if active is not None:
+                    self.context.deactivate(active)
+                    message = "Disabled"
+            else:
+                for info in self.context.info():
+                    if info['id'] == active:
+                        if not info['active']:
+                            self.context.activate(info['configuration'])
+                            message = "Updated"
+
+        return message
+
+    def update(self):
+
+        message = self.applyUpdates()
+
+        self.configBase = str(getView(getServiceManager(self.context),
+                                      'absolute_url', self.request)
+                              ) + '/Packages'
+
+        configurations = self.context.info()
+
+        # This is OK because configurations is just a list of dicts
+        configurations = removeAllProxies(configurations)
+
+        inactive = 1
+        for info in configurations:
+            if info['active']:
+                inactive = None
+            else:
+                info['active'] = None
+
+            info['summary'] = getView(info['configuration'],
+                                      'ConfigurationSummary',
+                                      self.request)
+
+        self.inactive = inactive
+        self.configurations = configurations
+
+        self.message = message


=== Zope3/src/zope/app/browser/services/componentconfigedit.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:10 2002
+++ Zope3/src/zope/app/browser/services/componentconfigedit.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,35 @@
+<html metal:use-macro="views/standard_macros/page">
+  <body>
+  <div metal:fill-slot="body">
+
+    <div metal:use-macro="view/generated_form/macros/body">
+
+      <h3 metal:fill-slot="heading">
+          <span tal:replace="context/label">Service</span>
+          Configuration
+      </h3>
+
+      <table metal:fill-slot="extra_info">
+        <tr>
+          <td tal:content="context/label">Service type</td>
+          <td tal:content="context/name">Foo</td>
+        </tr>
+        <tr>
+          <td>Component Path</td>
+          <td>
+            <a href='.'
+               tal:attributes="href view/componentURL"
+               tal:content="view/componentPath">foo/bar</a>
+          </td>
+        </tr>
+        <tr>
+          <td>Permission</td>
+          <td>
+            <span tal:replace="view/permission">Zope.Foo</span>
+          </td>
+      </table>
+
+    </div>
+  </div>
+  </body>
+</html>


=== Zope3/src/zope/app/browser/services/componentconfigitemedit.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:10 2002
+++ Zope3/src/zope/app/browser/services/componentconfigitemedit.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,23 @@
+<div metal:use-macro="view/generated_form/macros/formbody">
+
+  <h5 metal:fill-slot="heading">
+    <a href="configure/42"
+       tal:attributes="href views/absolute_url">
+      <span tal:replace="context/name">Foo</span>
+      <span tal:replace="context/label">Service</span>
+    </a>
+  </h5>
+
+  <table>
+  <tr metal:fill-slot="extra_top">
+      <td>Component Path</td>
+      <td>
+       <a href="."
+          tal:content="view/componentPath"
+          tal:attributes="href view/componentURL"
+          >Foo</a>
+      </td>
+    </tr>
+  </table>
+
+</div>


=== Zope3/src/zope/app/browser/services/componentconfigsummary.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:10 2002
+++ Zope3/src/zope/app/browser/services/componentconfigsummary.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,4 @@
+<span tal:replace="context/title" />
+<a href='.'
+   tal:attributes="href view/componentURL"
+   tal:content="view/componentPath">foo/bar</a>


=== Zope3/src/zope/app/browser/services/componentconfigurl.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:10 2002
+++ Zope3/src/zope/app/browser/services/componentconfigurl.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,37 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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.
+#
+##############################################################################
+"""
+$Id$
+"""
+
+from zope.component import getView
+from zope.app.traversing import traverse, locationAsUnicode
+from zope.proxy.introspection import removeAllProxies
+
+__metaclass__ = type
+
+class ComponentConfigURL:
+    """View mixin that provides an absolute componentURL for
+    Component configurations
+    """
+
+    def componentPath(self):
+        return locationAsUnicode(self.context.componentPath)
+
+    def componentURL(self):
+        ob = traverse(self.context, self.context.componentPath)
+        return str(getView(ob, 'absolute_url', self.request))
+
+
+__doc__ = ComponentConfigURL.__doc__ + __doc__


=== Zope3/src/zope/app/browser/services/configurationstatuswidget.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:10 2002
+++ Zope3/src/zope/app/browser/services/configurationstatuswidget.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,36 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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.
+#
+##############################################################################
+"""Configuration Browser Views
+
+XXX longer description goes here.
+
+$Id$
+"""
+__metaclass__ = type
+
+from zope.app.browser.form.widget import BrowserWidget
+from zope.app.interfaces.services.configuration \
+     import Active, Registered, Unregistered
+
+class ConfigurationStatusWidget(BrowserWidget):
+
+    def __call__(self):
+        checked = self._showData() or Unregistered
+        result = [
+            ('<label><input type="radio" name="%s" value="%s"%s>&nbsp;%s</label>'
+             % (self.name, v, (v == checked and ' checked' or ''), v)
+             )
+            for v in (Unregistered, Registered, Active)
+            ]
+        return ' '.join(result)


=== Zope3/src/zope/app/browser/services/configure.zcml 1.1 => 1.2 === (711/811 lines abridged)
--- /dev/null	Wed Dec 25 09:14:10 2002
+++ Zope3/src/zope/app/browser/services/configure.zcml	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,808 @@
+<zopeConfigure
+   xmlns='http://namespaces.zope.org/zope'
+   xmlns:browser='http://namespaces.zope.org/browser'
+   xmlns:form='http://namespaces.zope.org/form'
+   >
+
+<!--Error Reporting Service -->
+
+  <browser:view
+    for="zope.app.interfaces.services.error.IErrorReportingService"
+    permission="zope.Public"
+    factory="zope.app.browser.services.error.EditErrorLog">
+
+    <browser:page name="index.html" template="error.pt" />
+    <browser:page name="edit.html" attribute="updateProperties" />
+    <browser:page name="showEntry.html" template="errorentry.pt"/>
+    <browser:page name="showTextTBEntry.html"
+       template="texttbentry.pt"/>
+    </browser:view>
+
+  <browser:menuItem menu="add_component"
+     for="zope.app.interfaces.container.IAdding" 
+     action="ErrorReportingService"  title='Error Reporting Service'
+     description='Error Reporting Service for Logging Errors'
+     />
+  
+  <browser:icon name="zmi_icon" 
+      for="zope.app.interfaces.services.error.IErrorReportingService" 
+      file="error_service.gif" />
+
+  <browser:menuItem
+      for="zope.app.interfaces.services.error.IErrorReportingService" 
+      menu="zmi_views"
+      title="Errors"
+      action="index.html"
+      />
+
+<!-- CachingService -->
+
+  <browser:menuItems
+      menu="zmi_views"
+      for="zope.app.services.cache.ILocalCachingService">
+      <browser:menuItem title="Caches" action="index.html"/>
+    </browser:menuItems>
+
+  <browser:view
+      for="zope.app.services.cache.ILocalCachingService"

[-=- -=- -=- 711 lines omitted -=- -=- -=-]

+     permission="zope.ManageServices"
+     label="Default configuration parameters"
+     />
+
+  <browser:menuItems menu="zmi_views"
+             for="zope.app.interfaces.services.service.IViewPackage">
+    <browser:menuItem title="Contents"
+              action="@@contents.html"/>
+    <browser:menuItem title="Default Configuration"
+              action="@@DefaultConfiguration.html"/>
+  </browser:menuItems>
+
+  <browser:menuItem menu="add_component" for="zope.app.interfaces.container.IAdding"
+     action="zope.app.services.viewpackage.ViewPackage" 
+     title="View Sub-Package" />
+
+<!-- Session service -->
+
+  <browser:menuItem
+     menu="add_component"
+     for="zope.app.interfaces.container.IAdding" 
+     action="ISessionService"  title='Cookie Session Service'
+     description='Simplistic session support using cookies' />
+
+<!-- Principal annotations (user data) service -->
+
+  <browser:menuItem menu="add_component"
+     for="zope.app.interfaces.container.IAdding" 
+     action="IPrincipalAnnotationService"  title='Principal Annotation Service'
+     description='Stores Annotations for Principals' 
+     />
+
+
+<!-- Object Hub -->
+
+  <browser:menuItem
+      menu="add_component"
+      for="zope.app.interfaces.container.IAdding"
+      action="ObjectHub"
+      title='ObjectHub'
+      description="An object hub, for cataloging, unique object ids, and 
+                   more: use sparingly" 
+      />
+
+  <browser:icon
+      name="zmi_icon"
+      for="zope.app.interfaces.services.hub.IObjectHub" 
+      file="hub.gif" />
+
+</zopeConfigure>


=== Zope3/src/zope/app/browser/services/connection.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:10 2002
+++ Zope3/src/zope/app/browser/services/connection.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,50 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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.
+#
+##############################################################################
+"""Connection configuration adding view
+
+$Id$
+"""
+__metaclass__ = type
+
+from zope.component import getServiceManager
+from zope.publisher.browser import BrowserView
+from zope.app.form.utility import setUpWidgets, getWidgetsDataForContent
+from zope.app.interfaces.services.connection \
+     import IConnectionConfiguration
+from zope.app.services.connection \
+     import ConnectionConfiguration
+from zope.app.interfaces.rdb import IZopeDatabaseAdapter
+
+class AddConnectionConfiguration(BrowserView):
+
+    def __init__(self, *args):
+        super(AddConnectionConfiguration, self).__init__(*args)
+        setUpWidgets(self, IConnectionConfiguration)
+
+    def components(self):
+        service = getServiceManager(self.context.context)
+        paths = [info['path']
+                 for info in service.queryComponent(type=IZopeDatabaseAdapter)]
+        paths.sort()
+        return paths
+
+    def action(self, connection_name, component_path=None):
+        if not connection_name:
+            raise ValueError('You must specify a connection name')
+        if not component_path:
+            raise ValueError('You must specify a component path')
+        cd = ConnectionConfiguration(connection_name, component_path)
+        cd = self.context.add(cd)
+        getWidgetsDataForContent(self, IConnectionConfiguration, content=cd)
+        self.request.response.redirect(self.context.nextURL())


=== Zope3/src/zope/app/browser/services/connections.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:10 2002
+++ Zope3/src/zope/app/browser/services/connections.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,33 @@
+<html metal:use-macro="views/standard_macros/page">
+<body metal:fill-slot="body">
+<div metal:use-macro="view/indexMacros/macros/body">
+
+  <h2 metal:fill-slot="heading">Connections configured in this connection service.</h2>
+
+  <p metal:fill-slot="empty_text">No connections have been configured</p>
+
+  <div metal:fill-slot="extra_top">
+
+    <p>For each connection, the connection name is given and all of the
+       components registered to provide the connection are shown.  You
+       may select the component to provide the connection or disable the
+       connection.
+    </p>
+
+    <p>Select a connection name or a component name to visit the connection
+       or component.
+    </p>
+
+  </div>
+
+  <p metal:fill-slot="help_text">To configure a connection, add a database
+     adapter component to a <em>package</em> in <a
+     href="../../../Packages">Packages</a> or to the <a
+     href="../../../Packages/default">default package</a>. After the component
+     is added, add a connection configuration that configures the component to
+     provide a connection.
+  </p>
+
+</div>
+</body>
+</html>


=== Zope3/src/zope/app/browser/services/edit_module.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:10 2002
+++ Zope3/src/zope/app/browser/services/edit_module.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,17 @@
+<html metal:use-macro="views/standard_macros/page">
+<head><title>Add a module</title></head>
+<body>
+<div metal:fill-slot="body">
+
+<p>Enter the absolute module name and source code.</p>
+
+<form action="edit.html">
+<span tal:replace="view/update"></span>
+<p>Module: <span tal:content="context/name">Module Name</span></p>
+<textarea name="source:text" cols="65" rows="25"
+          tal:content="context/source"
+></textarea>
+<input type="submit" value="Edit"/>
+</form>
+
+</div></body></html>


=== Zope3/src/zope/app/browser/services/editconfiguration.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:10 2002
+++ Zope3/src/zope/app/browser/services/editconfiguration.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,47 @@
+<html metal:use-macro="views/standard_macros/page">
+<head>
+  <title>View Service Configuration</title>
+</head>
+<body>
+<div metal:fill-slot="body">
+<form action="."
+      tal:define="info view/action"
+      tal:attributes="action request/URL">
+
+<div tal:condition="info" tal:content="info" />
+
+<table align=center width=100% cellspacing=0 cellpadding=0>
+  <tr tal:repeat="config view/configInfo">
+     <td valign=top>
+        <input type=checkbox name='keys:list' 
+               value='2' 
+               tal:attributes="value config/key"/>
+        </td>
+     <td>
+         <table border=1 width=100%>
+           <tr><td tal:content="structure config/view">
+               Edit Adapter Directives
+               </td>
+           </tr>
+         </table>
+     </td>	
+  </tr>
+  <tr>
+    <td></td>
+    <td>
+      <input type=submit name='refresh_submit' value="Refresh">
+      <input type=submit name='UPDATE_SUBMIT' value="Update">
+      <input type=submit name='add_submit' value="Add">
+      <input type=submit name='remove_submit' value="Remove">&nbsp;&nbsp;
+      <input type=submit name='top_submit' value="Top">
+      <input type=submit name='up_submit' value="Up">
+      <input type=submit name='down_submit' value="Down">
+      <input type=submit name='bottom_submit' value="Bottom">
+    </td>	
+  </tr>
+</table>
+
+</form>
+</div>
+</body>
+</html>


=== Zope3/src/zope/app/browser/services/error.gif 1.1 => 1.2 ===
  <Binary-ish file>

=== Zope3/src/zope/app/browser/services/error.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/error.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,103 @@
+<html metal:use-macro="views/standard_macros/page">
+<head>
+  <title>View Error Log Report</title>
+</head>
+<body>
+<div metal:fill-slot="body">
+<p class="form-help">
+This page lists the exceptions that have occurred in this site
+recently.  You can configure how many exceptions should be kept
+and whether the exceptions should be copied to Zope's event log
+file(s).
+</p>
+
+<form action="edit.html" method="post">
+<br>
+<table tal:define="props context/getProperties">
+  <tr>
+    <td align="left" valign="top">
+    <div class="form-label">
+    Number of exceptions to keep
+    </div>
+    </td>
+    <td align="left" valign="top">
+    <input type="text" name="keep_entries" size="40"
+           tal:attributes="value props/keep_entries" />
+    </td>
+  </tr>
+  <tr>
+    <td align="left" valign="top">
+    <div class="form-label">
+    Copy exceptions to the event log
+    </div>
+    </td>
+    <td align="left" valign="top">
+    <input type="checkbox" name="copy_to_zlog"
+           tal:attributes="checked props/copy_to_zlog;" />
+    </td>
+  </tr>
+  <tr>
+    <td align="left" valign="top">
+    <div class="form-label">
+    Ignored exception types
+    </div>
+    </td>
+    <td align="left" valign="top">
+    <textarea name="ignored_exceptions:lines" cols="40" rows="3"
+      tal:content="python: '\n'.join(props['ignored_exceptions'])"></textarea>
+    </td>
+  </tr>
+  <tr>
+    <td align="left" valign="top">
+    </td>
+    <td align="left" valign="top">
+    <div class="form-element">
+    <input class="form-element" type="submit" name="submit" 
+     value=" Save Changes " />
+    </div>
+    </td>
+  </tr>
+</table>
+
+<h3>Exception Log (most recent first)</h3>
+
+<div tal:define="entries context/getLogEntries">
+
+<em tal:condition="not:entries">
+No exceptions logged.
+</em>
+
+<table tal:condition="entries">
+ <tr>
+  <th align="left">Time</th>
+  <th align="left">User</th>
+  <th align="left">Exception</th>
+ </tr>
+ <tr tal:repeat="entry entries">
+  <td valign="top" nowrap="nowrap">
+   <span tal:content="entry/time">Time</span>
+  </td>
+  <td>
+   <span tal:content="entry/username">joe</span>
+  </td>
+  <td valign="top">
+   <a href="showEntry" tal:attributes="href string:showEntry.html?id=${entry/id}"
+    >
+    <span tal:content="entry/type">AttributeError</span>:
+    <span tal:define="value entry/value"
+      tal:content="python: len(value) < 70 and value or value[:70] + '...'">
+      Application object has no attribute "zzope"</span>
+   </a>
+  </td>
+ </tr>
+</table>
+</div>
+</form>
+<p>
+<form action="main.html" method="GET">
+<input type="submit" name="submit" value=" Refresh " />
+</form>
+</p>
+</div>
+</body>
+</html>
\ No newline at end of file


=== Zope3/src/zope/app/browser/services/error.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/error.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,33 @@
+##############################################################################
+#
+# 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.0 (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.
+#
+##############################################################################
+""" Define view component for event service control.
+
+$Id$
+"""
+
+from zope.publisher.browser import BrowserView
+from zope.component.contextdependent import ContextDependent
+from zope.app.services.errorr import IErrorReportingService
+from zope.pagetemplate.pagetemplatefile import PageTemplateFile
+from zope.proxy.introspection import removeAllProxies
+
+class EditErrorLog(BrowserView):
+    __used_for__ = IErrorReportingService
+
+    def updateProperties(self, keep_entries, copy_to_zlog=None, ignored_exceptions=None):
+        errorLog = self.context
+        if copy_to_zlog is None:
+            copy_to_zlog = 0
+        errorLog.setProperties(keep_entries, copy_to_zlog, ignored_exceptions)
+        return self.request.response.redirect('main.html')


=== Zope3/src/zope/app/browser/services/error_service.gif 1.1 => 1.2 ===
  <Binary-ish file>

=== Zope3/src/zope/app/browser/services/errorentry.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/errorentry.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,69 @@
+<html metal:use-macro="views/standard_macros/page">
+<head>
+  <title>View Error Log Report</title>
+</head>
+<body>
+<div metal:fill-slot="body">
+<h1>Header</h1>
+<h3>Exception traceback</h3>
+<hr>
+<div tal:define="entry python:context.getLogEntryById(request.get('id'))">
+<em tal:condition="not:entry">
+The specified log entry was not found.  It may have expired.
+</em>
+
+<div tal:condition="entry">
+
+<table>
+ <tr>
+  <th align="left" valign="top">Time</th>
+    <td tal:content="entry/time">Time</td>
+ </tr>
+ <tr>
+  <th align="left" valign="top">User</th>
+  <td tal:content="entry/username">joe</td>
+ </tr>
+ <tr>
+  <th align="left" valign="top">Request URL</th>
+  <td tal:content="entry/url">http://zeomega.com</td>
+ </tr>
+ <tr>
+  <th align="left" valign="top">Exception Type</th>
+  <td tal:content="entry/type">AttributeError</td>
+ </tr>
+ <tr>
+  <th align="left" valign="top">Exception Value</th>
+  <td tal:content="entry/value">zzope</td>
+ </tr>
+</table>
+
+<div tal:condition="entry/tb_html" tal:content="structure entry/tb_html">
+Traceback (HTML)
+</div>
+
+<pre tal:condition="not:entry/tb_html" tal:content="entry/tb_text">
+Traceback (text)
+</pre>
+
+<p tal:condition="entry/tb_text"><a href="" tal:attributes="href
+   string:showTextTBEntry.html?id=${entry/id}">Display
+   traceback as text</a></p>
+
+
+
+<div tal:condition="entry/req_html">
+<h3>REQUEST</h3>
+<hr>
+<div tal:replace="structure entry/req_html"></div>
+</div>
+
+</div>
+
+<p>
+<form action="main.html" method="GET">
+<input type="submit" name="submit" value=" Return to log " />
+</form>
+</p>
+</div>
+</div>
+</html>


=== Zope3/src/zope/app/browser/services/event.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/event.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,34 @@
+##############################################################################
+#
+# 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.0 (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.
+#
+##############################################################################
+""" Define view component for event service control.
+
+$Id$
+"""
+
+from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
+from zope.interfaces.event import IEventService
+from zope.proxy.introspection import removeAllProxies
+from zope.publisher.browser import BrowserView
+
+
+class Control(BrowserView):
+    __used_for__ = IEventService
+
+    def index(self, toggleSubscribeOnBind=False):
+        if toggleSubscribeOnBind:
+            cntx = removeAllProxies(self.context)
+            cntx.subscribeOnBind = not cntx.subscribeOnBind
+        return self.__control()
+
+    __control = ViewPageTemplateFile("control.pt")


=== Zope3/src/zope/app/browser/services/event_service.gif 1.1 => 1.2 ===
  <Binary-ish file>

=== Zope3/src/zope/app/browser/services/eventcontrol.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/eventcontrol.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,39 @@
+<html metal:use-macro="views/standard_macros/page">
+<head>
+<style metal:fill-slot="headers" type="text/css">
+<!--
+.ContentListing {
+    width: 100%;
+}
+
+.ContentIcon {
+    width: 20px;
+}
+
+.ContentTitle {
+    text-align: left;
+}
+-->
+</style>
+</head>
+<body>
+<div metal:fill-slot="body">
+<p>Subscribe on bind: <span tal:condition="context/subscribeOnBind">ON (this
+  event service will try to subscribe to the nearest parent local event service
+  whenever it is bound into service by its service manager; <strong>it will
+  receive events from its parent</strong> if it is bound now)</span><span
+  tal:condition="not:context/subscribeOnBind">OFF (this
+  event service will <em>not</em> try to subscribe to the nearest parent
+  local event service whenever it is bound into service by its service manager;
+  <strong>it will <em>not</em> receive events from its parent</strong> if it is
+  bound now)</span></p>
+  <form method="post">
+  <input type="submit" value="Toggle" name="toggleSubscribeOnBind" />
+  </form>
+</div>
+</body>
+</html>
+
+
+
+


=== Zope3/src/zope/app/browser/services/field.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/field.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,46 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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.
+#
+##############################################################################
+"""A widget for ComponentLocation field.
+
+$Id$
+"""
+__metaclass__ = type
+
+from zope.app.browser.form.widget import BrowserWidget
+from zope.component import getServiceManager
+
+class ComponentLocationWidget(BrowserWidget):
+
+    def _convert(self, value):
+        return value or None
+
+    def __call__(self):
+        selected = self._showData()
+        service_manager = getServiceManager(self.context.context)
+        info = service_manager.queryComponent(self.context.type)
+        result = []
+
+        result.append('<select name="%s">' % self.name)
+        result.append('<option></option>')
+
+        for item in info:
+            item = item['path']
+            if item == selected:
+                result.append('<option selected>%s</option>' % item)
+            else:
+                result.append('<option>%s</option>' % item)
+
+        result.append('</select>')
+
+        return "\n".join(result)


=== Zope3/src/zope/app/browser/services/hub.gif 1.1 => 1.2 ===
  <Binary-ish file>

=== Zope3/src/zope/app/browser/services/hub.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/hub.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,30 @@
+##############################################################################
+#
+# 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.0 (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.
+#
+##############################################################################
+""" Define view component for object hub.
+
+$Id$
+"""
+
+from zope.app.interfaces.services.hub import IObjectHub
+from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
+from zope.publisher.browser import BrowserView
+
+
+class Control(BrowserView):
+    __used_for__ = IObjectHub
+
+    def index(self):
+        return self.__control()
+
+    __control = ViewPageTemplateFile("control.pt")


=== Zope3/src/zope/app/browser/services/hubcontrol.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/hubcontrol.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,28 @@
+<html metal:use-macro="views/standard_macros/page">
+<head>
+<style metal:fill-slot="headers" type="text/css">
+<!--
+.ContentListing {
+    width: 100%;
+}
+
+.ContentIcon {
+    width: 20px;
+}
+
+.ContentTitle {
+    text-align: left;
+}
+-->
+</style>
+</head>
+<body>
+<div metal:fill-slot="body">
+This is an object hub.
+</div>
+</body>
+</html>
+
+
+
+


=== Zope3/src/zope/app/browser/services/module.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/module.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,46 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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.
+#
+##############################################################################
+"""Handle form to create module
+
+$Id$
+"""
+
+from zope.publisher.browser import BrowserView
+from zope.app.services.module import Manager
+
+class AddModule(BrowserView):
+
+    def action(self, name, source):
+        mgr = Manager()
+        mgr = self.context.add(mgr)
+        mgr.new(name, source)
+        self.request.response.redirect(self.context.nextURL())
+
+
+"""Handle form to edit module
+
+$Id$
+"""
+
+from zope.publisher.browser import BrowserView
+from zope.app.services.module import Manager
+
+class EditModule(BrowserView):
+
+    def update(self):
+        if "source" in self.request:
+            self.context.update(self.request["source"])
+            return u"The source was updated."
+        else:
+            return u""


=== Zope3/src/zope/app/browser/services/namecomponentconfigurable.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/namecomponentconfigurable.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,64 @@
+<html metal:use-macro="views/standard_macros/page">
+<body metal:fill-slot="body">
+<div metal:define-macro="body">
+<div tal:define="registries view/update">
+
+  <h2 metal:define-slot="heading">Fruits configured in this fruits manager.</h2>
+
+  <div tal:condition="not:registries">
+       <p metal:define-slot="empty_text">No fruits have been configured</p>
+  </div>
+
+  <div tal:condition="registries">
+
+    <div metal:define-slot="extra_top">
+
+      <p>For each fruit, the fruit name is given and all of the components
+         registered to provide the fruit are shown.  You may select the
+         component to provide the fruit or disable the fruit.
+      </p>
+
+      <p>Select a fruit name or a component name to visit the fruit or
+         component.
+      </p>
+
+    </div>
+
+      <form action="." method="post" tal:attributes="action request/URL">
+
+      <table width="100%">
+
+         <tr tal:repeat="registry registries">
+           <td valign="top" align="right">
+              <a href="#"
+                 tal:content="registry/name"
+                 tal:attributes="href registry/url"
+                 tal:condition="registry/active"
+                 >Orange</a>
+              <span tal:replace="registry/name"
+                    tal:condition="registry/inactive" />
+           </td>
+           <td tal:content="structure registry/view">
+           </td>
+         </tr>
+
+      </table>
+
+      <input type=submit name="submit_update" value="Update"><br>
+
+      </form>
+
+    <div metal:define-slot="extra_bottom" />
+
+  </div>
+
+  <p metal:define-slot="help_text">To configure a fruit, add a fruit component
+     to a <em>package</em> in <a href="Packages">Packages</a> or to the <a
+     href="Packages/default">default package</a>. After the fruit is added, add
+     a fruit configuration that configures the component to provide a fruit.
+  </p>
+
+</div>
+</div>
+</body>
+</html>


=== Zope3/src/zope/app/browser/services/namecomponentconfigurableview.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/namecomponentconfigurableview.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,37 @@
+##############################################################################
+#
+# 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.0 (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.
+#
+##############################################################################
+"""Generic INameComponentConfigurable view mixin
+
+$Id$
+"""
+
+from zope.app.traversing import traverse
+from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
+from zope.app.browser.services.nameconfigurableview \
+        import NameConfigurableView
+from zope.component import getView
+
+class NameComponentConfigurableView(NameConfigurableView):
+
+    indexMacros = index = ViewPageTemplateFile('namecomponentconfigurable.pt')
+
+    def _getItem(self, name, view, cfg):
+        item_dict = NameConfigurableView._getItem(self, name, view, cfg)
+        if cfg is not None:
+            ob = traverse(cfg, cfg.componentPath)
+            url = str(getView(ob, 'absolute_url', self.request))
+        else:
+            url = None
+        item_dict['url'] = url
+        return item_dict


=== Zope3/src/zope/app/browser/services/nameconfigurable.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/nameconfigurable.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,60 @@
+<html metal:use-macro="views/standard_macros/page">
+<body metal:fill-slot="body">
+<div metal:define-macro="body">
+<div tal:define="registries view/update">
+
+  <h2 metal:define-slot="heading">Fruits configured in this fruits manager.</h2>
+
+  <div tal:condition="not:registries">
+       <p metal:define-slot="empty_text">No fruits have been configured</p>
+  </div>
+
+  <div tal:condition="registries">
+
+    <div metal:define-slot="extra_top">
+
+      <p>For each fruit, the fruit name is given and all of the 
+         registrations are shown.  You may select the
+         registration to provide the fruit or disable the fruit.
+      </p>
+
+    </div>
+
+      <form action="." method="post" tal:attributes="action request/URL">
+
+      <table width="100%">
+
+         <tr tal:repeat="registry registries">
+           <td valign="top" align="right">
+              <span
+                 tal:content="registry/name"
+                 tal:condition="registry/active"
+                 >Orange</span>
+              <span tal:replace="registry/name"
+                    tal:condition="registry/inactive" />
+           </td>
+           <td tal:content="structure registry/view">
+           </td>
+         </tr>
+
+      </table>
+
+      <input type=submit name="submit_update" value="Update"><br>
+
+      </form>
+
+    <div metal:define-slot="extra_bottom" />
+
+  </div>
+
+  <p metal:define-slot="help_text">To configure a fruit, add a fruit component
+     to a <em>package</em> in <a href="Packages">Packages</a> or to the <a
+     href="Packages/default">default package</a>. After the fruit is added, add
+     a fruit configuration that configures the component to provide a fruit.
+     These instructions may not apply, depending what kind of fruit you have.
+  </p>
+
+</div>
+</div>
+</body>
+</html>


=== Zope3/src/zope/app/browser/services/nameconfigurableview.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/nameconfigurableview.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,50 @@
+##############################################################################
+#
+# 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.0 (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.
+#
+##############################################################################
+"""Generic INameConfigurable view mixin
+
+$Id$
+"""
+
+from zope.publisher.browser import BrowserView
+from zope.component import getView
+from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
+
+class NameConfigurableView(BrowserView):
+
+    indexMacros = index = ViewPageTemplateFile('nameconfigurable.pt')
+
+    def update(self):
+
+        names = list(self.context.listConfigurationNames())
+        names.sort()
+
+        items = []
+        for name in names:
+            registry = self.context.queryConfigurations(name)
+            view = getView(registry, "ChangeConfigurations", self.request)
+            view.setPrefix(name)
+            view.update()
+            cfg = registry.active()
+            active = cfg is not None
+            items.append(self._getItem(name, view, cfg))
+
+        return items
+
+    def _getItem(self, name, view, cfg):
+        # hook for subclasses. returns a dict to append to an item
+        return {"name": name,
+                "active": cfg is not None,
+                "inactive": cfg is None,
+                "view": view,
+                }


=== Zope3/src/zope/app/browser/services/package.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/package.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,44 @@
+##############################################################################
+#
+# 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.0 (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.
+#
+##############################################################################
+"""
+
+Revision information: $Id$
+"""
+from zope.app.browser.container.contents import Contents
+from zope.app.interfaces.services.service import IServiceManager
+from zope.app.pagetemplate import ViewPageTemplateFile
+from zope.app.services.package import Package
+from zope.app.services.zpt import ZPTTemplate
+
+
+class ViewPackageContents(Contents):
+
+    __used_for__ = IServiceManager
+
+    index = ViewPageTemplateFile('viewpackage_contents.pt')
+
+    def add(self, name):
+        self.context.setObject(name, ZPTTemplate())
+        self.request.response.redirect('.')
+
+
+class PackagesContents(Contents):
+
+    __used_for__ = IServiceManager
+
+    index = ViewPageTemplateFile('packages_contents.pt')
+
+    def addPackage(self, name):
+        self.context.setObject(name, Package())
+        self.request.response.redirect('.')


=== Zope3/src/zope/app/browser/services/packages_contents.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/packages_contents.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,27 @@
+<html metal:use-macro="views/standard_macros/page">
+<head>
+<style metal:fill-slot="headers" type="text/css">
+</style>
+</head>
+<body>
+<div metal:fill-slot="body">
+
+<form action="." method="get" 
+      tal:define="container_contents view/listContentInfo"
+>
+
+  <p>Package Contents</p>
+
+  <div metal:use-macro="view/contentsMacros/macros/contents_table" />
+
+  <br />
+    <input type="text" name="name" />
+    <input type="submit" name="@@addPackage.html:method" value="Add"
+           i18nXXX:attributes="value string:menu_add_button" />
+    <input type="submit" name="@@removeObjects.html:method" value="Delete"
+           i18nXXX:attributes="value string:menu_delete_button" /> 
+</form>
+
+</div>
+</body>
+</html>


=== Zope3/src/zope/app/browser/services/pageconfigsummary.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/pageconfigsummary.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,2 @@
+<span tal:replace="context/factoryName" />
+<span tal:replace="context/template" />


=== Zope3/src/zope/app/browser/services/role.gif 1.1 => 1.2 ===
  <Binary-ish file>

=== Zope3/src/zope/app/browser/services/role.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/role.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,27 @@
+from zope.publisher.browser import BrowserView
+from zope.app.services.role import Role
+from zope.app.services.role import ILocalRoleService
+
+
+class Add(BrowserView):
+    "Provide a user interface for adding a contact"
+
+    __used_for__ = ILocalRoleService
+
+    def action(self, id, title, description):
+        "Add a contact"
+        role = Role(id, title, description)
+        self.context.setObject(id, role)
+        self.request.response.redirect('.')
+
+
+
+""" Define view component for service manager contents.
+
+$Id$
+"""
+
+from zope.app.browser.container.contents import Contents
+
+class Contents(Contents):
+    pass


=== Zope3/src/zope/app/browser/services/role_service.gif 1.1 => 1.2 ===
  <Binary-ish file>

=== Zope3/src/zope/app/browser/services/service.gif 1.1 => 1.2 ===
  <Binary-ish file>

=== Zope3/src/zope/app/browser/services/service.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/service.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,163 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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.
+#
+##############################################################################
+"""Adding components for components and configuration
+
+$Id$
+"""
+
+from zope.app.browser.container.adding import Adding as ContentAdding
+
+
+class ComponentAdding(ContentAdding):
+    """Adding component for components
+    """
+
+    menu_id = "add_component"
+
+    def action(self, type_name, id):
+        if not id:
+            # Generate an id from the type name
+            id = type_name
+            if id in self.context:
+                i=2
+                while ("%s-%s" % (id, i)) in self.context:
+                    i=i+1
+                id = "%s-%s" % (id, i)
+        return super(ComponentAdding, self).action(type_name, id)
+
+class ConfigurationAdding(ContentAdding):
+    """Adding component for configuration
+    """
+
+    menu_id = "add_configuration"
+
+
+"""
+$Id$
+"""
+
+from zope.publisher.browser import BrowserView
+from zope.component import getView, getAdapter
+from zope.proxy.context import ContextWrapper
+from zope.app.interfaces.container import IZopeContainer
+
+class EditConfiguration(BrowserView):
+    """Adding component for service containers
+    """
+
+    menu_id = "add_component"
+
+    def __init__(self, context, request):
+        self.request = request
+        self.context = context
+
+    def action(self):
+        """Perform actions depending on user input.
+
+
+        """
+        if 'add_submit' in self.request:
+            self.request.response.redirect('+')
+            return ''
+
+        if 'keys' in self.request:
+            k = self.request['keys']
+        else:
+            k = []
+
+        msg = 'You must select at least one item to use this action'
+
+        if 'remove_submit' in self.request:
+            if not k: return msg
+            self.remove_objects(k)
+        elif 'top_submit' in self.request:
+            if not k: return msg
+            self.context.moveTop(k)
+        elif 'bottom_submit' in self.request:
+            if not k: return msg
+            self.context.moveBottom(k)
+        elif 'up_submit' in self.request:
+            if not k: return msg
+            self.context.moveUp(k)
+        elif 'down_submit' in self.request:
+            if not k: return msg
+            self.context.moveDown(k)
+
+        return ''
+
+    def remove_objects(self, key_list):
+        """Remove the directives from the container.
+        """
+        container = getAdapter(self.context, IZopeContainer)
+        for item in key_list:
+            del container[item]
+
+    def configInfo(self):
+        """Render View for each direcitves.
+        """
+        r = []
+        for name, directive in self.context.items():
+            d = ContextWrapper(directive, self.context, name = name)
+            view = getView(d, 'ItemEdit', self.request)
+            view.setPrefix('config'+str(name))
+            r.append({'key': name, 'view': view})
+        return r
+
+__doc__ = EditConfiguration.__doc__ + __doc__
+
+
+
+"""XXX short summary goes here.
+
+XXX longer description goes here.
+
+$Id$
+"""
+__metaclass__ = type
+
+from zope.component import getServiceManager
+from zope.publisher.browser import BrowserView
+from zope.app.services.service \
+     import ServiceConfiguration
+from zope.app.interfaces.services.configuration import IConfiguration
+from zope.app.form.utility import setUpWidgets, getWidgetsDataForContent
+
+class AddServiceConfiguration(BrowserView):
+
+    def __init__(self, *args):
+        super(AddServiceConfiguration, self).__init__(*args)
+        setUpWidgets(self, IConfiguration)
+
+    def services(self):
+        service = getServiceManager(self.context.context)
+        definitions = service.getServiceDefinitions()
+        names = [name for (name, interface) in definitions]
+        names.sort()
+        return names
+
+    def components(self):
+        service_type = self.request['service_type']
+        service = getServiceManager(self.context.context)
+        type = service.getInterfaceFor(service_type)
+        paths = [info['path']
+                 for info in service.queryComponent(type=type)
+                 ]
+        paths.sort()
+        return paths
+
+    def action(self, service_type, component_path):
+        sd = ServiceConfiguration(service_type, component_path)
+        sd = self.context.add(sd)
+        getWidgetsDataForContent(self, IConfiguration, sd)
+        self.request.response.redirect(self.context.nextURL())


=== Zope3/src/zope/app/browser/services/services.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/services.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,32 @@
+<html metal:use-macro="views/standard_macros/page">
+<body metal:fill-slot="body">
+<div metal:use-macro="view/indexMacros/macros/body">
+
+  <h2 metal:fill-slot="heading">Services configured in this service manager.</h2>
+
+  <p metal:fill-slot="empty_text">No services have been configured</p>
+
+  <div metal:fill-slot="extra_top">
+
+    <p>For each service, the service name is given and all of the
+       components registered to provide the service are shown.  You
+       may select the component to provide the service or disable the
+       service.
+    </p>
+
+    <p>Select a service name or a component name to visit the service
+       or component.
+    </p>
+
+  </div>
+
+  <p metal:fill-slot="help_text">To configure a service, add a service
+     component to a <em>package</em> in <a href="Packages">Packages</a> or to
+     the <a href="Packages/default">default package</a>. After the component is
+     added, add a service configuration that configures the
+     component to provide a service.
+  </p>
+
+</div>
+</body>
+</html>


=== Zope3/src/zope/app/browser/services/texttbentry.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/texttbentry.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,7 @@
+<html>
+ <div tal:define="entry python:context.getLogEntryById(request.get('id'))">
+  <pre tal:content="entry/tb_text">
+	Traceback (text)
+  </pre>
+ </div>
+</html>
\ No newline at end of file


=== Zope3/src/zope/app/browser/services/view.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/view.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,110 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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.
+#
+##############################################################################
+"""Views for local view configuration.
+
+  ViewSeviceView -- it's a bit different from other services, as it
+  has a lot of things in it, so we provide a search interface:
+
+    search page
+    browsing page
+
+  ViewConfigrationAdd
+
+$Id$
+"""
+__metaclass__ = type
+
+import md5
+from zope.app.form.utility \
+     import setUpWidgets, getWidgetsData, getWidgetsDataForContent, fieldNames
+from zope.publisher.browser import BrowserView
+from zope.app.interfaces.services.interfaces \
+     import IViewConfiguration, IViewConfigurationInfo
+from zope.app.interfaces.services.interfaces \
+     import IPageConfiguration, IPageConfigurationInfo
+from zope.event import publish
+from zope.app.event.objectevent import ObjectCreatedEvent
+from zope.app.interfaces.services.configuration import IConfiguration
+from zope.app.services.view import ViewConfiguration, PageConfiguration
+from zope.app.component.interfacefield import InterfaceField
+from zope.interface import Interface
+from zope.component import getView
+from zope.proxy.context import ContextWrapper
+from zope.schema import TextLine, BytesLine
+from zope.component.interfaces import IPresentation
+
+class IViewSearch(Interface):
+
+    forInterface = InterfaceField(title=u"For interface",
+                                  required=False,
+                                  )
+    presentationType = InterfaceField(title=u"Provided interface",
+                                      required=False,
+                                      type=IPresentation
+                                      )
+
+    viewName = TextLine(title=u'View name',
+                        required=False,
+                        )
+
+    layer = BytesLine(title=u'Layer',
+                      required=False,
+                        )
+
+
+class ViewServiceView(BrowserView):
+
+    def __init__(self, *args):
+        super(ViewServiceView, self).__init__(*args)
+        setUpWidgets(self, IViewSearch)
+
+    def configInfo(self):
+        input_for = self.forInterface.getData()
+        input_type = self.presentationType.getData()
+        input_name = self.viewName.getData()
+        input_layer = self.layer.getData()
+
+        result = []
+        for info in self.context.getRegisteredMatching(
+            input_for, input_type, input_name, input_layer):
+
+            forInterface, presentationType, registry, layer, viewName = info
+
+            forInterface = (
+                forInterface.__module__ +"."+ forInterface.__name__)
+            presentationType = (
+                presentationType.__module__ +"."+ presentationType.__name__)
+
+            registry = ContextWrapper(registry, self.context)
+            view = getView(registry, "ChangeConfigurations", self.request)
+            prefix = md5.new('%s %s' %
+                             (forInterface, presentationType)).hexdigest()
+            view.setPrefix(prefix)
+            view.update()
+
+            if input_name is not None:
+                viewName = None
+
+            if input_layer is not None:
+                layer = None
+
+            result.append(
+                {'forInterface': forInterface,
+                 'presentationType': presentationType,
+                 'view': view,
+                 'viewName': viewName,
+                 'layer': layer,
+                 })
+
+        return result


=== Zope3/src/zope/app/browser/services/view_search.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:11 2002
+++ Zope3/src/zope/app/browser/services/view_search.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,59 @@
+<html metal:use-macro="views/standard_macros/page">
+<head><title></title></head>
+<body>
+<div metal:fill-slot="body">
+
+<form action="." method="GET"
+      tal:attributes="action request/URL"
+      >
+  <table>
+    <tr tal:content="structure view/forInterface/row" />
+    <tr tal:content="structure view/presentationType/row" />
+    <tr>
+      <td></td>
+      <td> 
+         <input type="submit" value="Refresh">
+         <input type="submit" value="Search" name="SEARCH">
+     </td>
+    </tr>
+  </table>
+</form>
+
+<form action="." method="POST"
+      tal:attributes="action request/URL"
+      tal:condition="request/SEARCH|nothing"
+      >
+  <table      
+      tal:define="layer not:request/field.layer|nothing;
+                  viewName not:request/field.viewName|nothing;
+                  "
+      >
+    <tr>
+       <th>For/<br>Provided</th>
+       <th tal:condition="layer">Layer</th>
+       <th tal:condition="viewName">View name</th>
+       <th>Configuration</th>
+       
+    </tr>
+    
+    <tr tal:repeat="config view/configInfo">
+      <td> <span tal:content="config/forInterface" />/<br>
+           <span tal:content="config/presentationType" />
+      </td>
+      <td tal:condition="layer"
+          tal:content="config/layer">Layer</td>
+      <td tal:condition="viewName"
+          tal:content="config/viewName">View name</td>      
+      <td tal:content="structure config/view" />
+    </tr>
+    <tr>
+      <td></td>
+      <td></td>
+      <td> 
+         <input type="submit" value="Update" name="UPDATE_SUBMIT">
+      </td>
+    </tr>
+  </table>
+</form>
+
+</div></body></html>


=== Zope3/src/zope/app/browser/services/viewconfigsummary.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:12 2002
+++ Zope3/src/zope/app/browser/services/viewconfigsummary.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1 @@
+<span tal:replace="context/factoryName" />


=== Zope3/src/zope/app/browser/services/viewpackage_contents.pt 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:12 2002
+++ Zope3/src/zope/app/browser/services/viewpackage_contents.pt	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,27 @@
+<html metal:use-macro="views/standard_macros/page">
+<head>
+<style metal:fill-slot="headers" type="text/css">
+</style>
+</head>
+<body>
+<div metal:fill-slot="body">
+
+<form action="." method="get" 
+      tal:define="container_contents view/listContentInfo"
+      >
+
+  <p>View Package Contents</p>
+
+  <div metal:use-macro="view/contentsMacros/macros/contents_table" />
+
+  <br />
+    <input type="text" name="name" />
+    <input type="submit" name="@@add.html:method" value="Add"
+           i18nXXX:attributes="value string:menu_add_button" />
+    <input type="submit" name="@@removeObjects.html:method" value="Delete"
+           i18nXXX:attributes="value string:menu_delete_button" /> 
+</form>
+
+</div>
+</body>
+</html>


=== Zope3/src/zope/app/browser/services/zpt.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:14:12 2002
+++ Zope3/src/zope/app/browser/services/zpt.py	Wed Dec 25 09:12:36 2002
@@ -0,0 +1,29 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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.
+#
+##############################################################################
+"""XXX short summary goes here.
+
+XXX longer description goes here.
+
+$Id$
+"""
+from zope.publisher.browser import BrowserView
+
+__metaclass__ = type
+
+class Source(BrowserView):
+
+    def __call__(self):
+        self.request.response.setHeader('content-type',
+                                        self.context.contentType)
+        return self.context.source