[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/applicationcontrol - __init__.py:1.2 applicationcontrol.py:1.2 runtimeinfo.py:1.2 servercontrol.py:1.2 zopeversion.py:1.2

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


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

Added Files:
	__init__.py applicationcontrol.py runtimeinfo.py 
	servercontrol.py zopeversion.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/interfaces/applicationcontrol/__init__.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:13:57 2002
+++ Zope3/src/zope/app/interfaces/applicationcontrol/__init__.py	Wed Dec 25 09:12:57 2002
@@ -0,0 +1,2 @@
+#
+# This file is necessary to make this directory a package.


=== Zope3/src/zope/app/interfaces/applicationcontrol/applicationcontrol.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:13:57 2002
+++ Zope3/src/zope/app/interfaces/applicationcontrol/applicationcontrol.py	Wed Dec 25 09:12:57 2002
@@ -0,0 +1,26 @@
+##############################################################################
+#
+# 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.
+#
+##############################################################################
+__doc__ = """ Application Control Interface
+
+$Id$"""
+
+from zope.interface import Interface
+
+class IApplicationControl(Interface):
+    """ """
+
+    def getStartTime():
+        """Return the time the application started
+
+           in seconds since the epoch"""


=== Zope3/src/zope/app/interfaces/applicationcontrol/runtimeinfo.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:13:57 2002
+++ Zope3/src/zope/app/interfaces/applicationcontrol/runtimeinfo.py	Wed Dec 25 09:12:57 2002
@@ -0,0 +1,48 @@
+##############################################################################
+#
+# 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.
+#
+##############################################################################
+__doc__ = """ Runtime Information Interface
+
+$Id$"""
+
+from zope.interface import Interface
+
+class IRuntimeInfo(Interface):
+    """ Runtime Information Adapter for Application Control """
+
+    def getZopeVersion():
+        """Return a string containing the descriptive version of the
+           current zope installation"""
+
+    def getPythonVersion():
+        """Return a string containing verbose description of the python
+           interpreter"""
+
+    def getPythonPath():
+        """Return a tuple containing the lookup paths of the python interpreter
+        """
+
+    def getSystemPlatform():
+        """Return the system platform name in a 5 tuple of
+           (sysname, nodename, release, version, machine)"""
+
+    def getCommandLine():
+        """Return the command line string Zope was invoked with"""
+
+    def getProcessId():
+        """Return the process id number currently serving the request
+        """
+
+    def getUptime():
+        """Return a string containing the Zope server uptime in unix uptime
+           format with seconds ([NN days, ]HH:MM:SS)"""


=== Zope3/src/zope/app/interfaces/applicationcontrol/servercontrol.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:13:57 2002
+++ Zope3/src/zope/app/interfaces/applicationcontrol/servercontrol.py	Wed Dec 25 09:12:57 2002
@@ -0,0 +1,53 @@
+##############################################################################
+#
+# 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.
+#
+##############################################################################
+__doc__ = """ Server Control Interface
+
+$Id$"""
+
+from zope.interface import Interface
+
+class ServerControlError(Exception):
+    """Represents an error in the ServerControl.
+    """
+
+class DoublePriorityError(ServerControlError):
+    """Raisen when somebody tries to register a second Hook
+       for a priority."""
+
+class NotCallableError(ServerControlError):
+    """Raisen if a given object is not callable."""
+
+class IServerControl(Interface):
+    """Server Control Interface defines methods for shutting down and
+       restarting the server.
+
+       This utility also keeps a registry of things to call when shutting down
+       zope. You can register using this interface or the zcml on the global
+       ServerController instance."""
+
+    def shutdown():
+        """Shutdown the server gracefully
+
+                Returns: Nothing
+        """
+
+    def restart():
+        """Restart the server gracefully
+
+                Returns: Nothing
+        """
+
+    def registerShutdownHook(call, priority, name):
+        """Register a function that will be callen on server shutdown.
+           The function needs to takes no argument at all."""


=== Zope3/src/zope/app/interfaces/applicationcontrol/zopeversion.py 1.1 => 1.2 ===
--- /dev/null	Wed Dec 25 09:13:57 2002
+++ Zope3/src/zope/app/interfaces/applicationcontrol/zopeversion.py	Wed Dec 25 09:12:57 2002
@@ -0,0 +1,25 @@
+##############################################################################
+#
+# 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.
+#
+##############################################################################
+__doc__ = """Zope version interface
+
+$Id$"""
+
+from zope.interface import Interface
+
+class IZopeVersion(Interface):
+    """ Zope version """
+
+    def getZopeVersion():
+        """Return a string containing the Zope version (possibly including
+           CVS information)"""