[Zope3-checkins] CVS: Zope3/src/zope/app/workflow - definition.py:1.3

Steve Alexander steve@cat-box.net
Fri, 6 Jun 2003 12:35:24 -0400


Update of /cvs-repository/Zope3/src/zope/app/workflow
In directory cvs.zope.org:/tmp/cvs-serv5043/src/zope/app/workflow

Modified Files:
	definition.py 
Log Message:
Removed use of ContextAware mixin class.


=== Zope3/src/zope/app/workflow/definition.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/workflow/definition.py:1.2	Tue May 27 10:18:28 2003
+++ Zope3/src/zope/app/workflow/definition.py	Fri Jun  6 12:34:53 2003
@@ -20,16 +20,16 @@
 from types import StringTypes
 from persistence import Persistent
 from persistence.dict import PersistentDict
-from zope.context import ContextAware, getWrapperContainer
+from zope.context import ContextMethod, getWrapperContainer
 from zope.app.interfaces.workflow \
      import IProcessDefinition, IProcessDefinitionElementContainer
-
+from zope.interface import implements
 
 class ProcessDefinition(Persistent):
 
     __doc__ = IProcessDefinition.__doc__
-    
-    __implements__ = IProcessDefinition
+
+    implements(IProcessDefinition)
 
     name = None
 
@@ -47,11 +47,11 @@
 
 
 
-class ProcessDefinitionElementContainer(ContextAware, Persistent):
+class ProcessDefinitionElementContainer(Persistent):
     """ See IProcessDefinitionElementContainer.
     """
 
-    __implements__ = IProcessDefinitionElementContainer
+    implements(IProcessDefinitionElementContainer)
 
     def __init__(self):
         super(ProcessDefinitionElementContainer, self).__init__()
@@ -60,36 +60,36 @@
     def keys(self):
         '''See interface IProcessDefinitionElementContainer'''
         return self.__data.keys()
- 
+
     def __iter__(self):
         return iter(self.__data.keys())
- 
+
     def __getitem__(self, key):
         '''See interface IProcessDefinitionElementContainer'''
         return self.__data[key]
- 
+
     def get(self, key, default=None):
         '''See interface IProcessDefinitionElementContainer'''
         return self.__data.get(key, default)
- 
+
     def values(self):
         '''See interface IProcessDefinitionElementContainer'''
         return self.__data.values()
- 
+
     def __len__(self):
         '''See interface IProcessDefinitionElementContainer'''
         return len(self.__data)
- 
+
     def items(self):
         '''See interface IProcessDefinitionElementContainer'''
         return self.__data.items()
- 
+
     def __contains__(self, key):
         '''See interface IProcessDefinitionElementContainer'''
         return self.__data.has_key(key)
- 
+
     has_key = __contains__
- 
+
     def setObject(self, key, object):
         '''See interface IProcessDefinitionElementContainer'''
         bad = False
@@ -107,11 +107,11 @@
             raise ValueError("The key cannot be an empty string")
         self.__data[key] = object
         return key
-                
+
     def __delitem__(self, key):
         '''See interface IProcessDefinitionElementContainer'''
         del self.__data[key]
 
-
     def getProcessDefinition(self):
         return getWrapperContainer(self)
+    getProcessDefinition = ContextMethod(getProcessDefinition)