[Zope3-checkins] CVS: Zope3/src/zope/component - interfaces.py:1.1.2.3 resource.py:1.1.2.2 service.py:1.1.2.2 skin.py:1.1.2.2
Jim Fulton
jim@zope.com
Tue, 24 Dec 2002 07:51:55 -0500
Update of /cvs-repository/Zope3/src/zope/component
In directory cvs.zope.org:/tmp/cvs-serv1158/src/zope/component
Modified Files:
Tag: NameGeddon-branch
interfaces.py resource.py service.py skin.py
Log Message:
Searched for and changed over 1200 references to Zope.something.
Most of these were either comments, doc strings, or permission ids.
Many were imports or ids in zcml. (much zcml fixup is still needed.
=== Zope3/src/zope/component/interfaces.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/component/interfaces.py:1.1.2.2 Mon Dec 23 15:18:03 2002
+++ Zope3/src/zope/component/interfaces.py Tue Dec 24 07:51:24 2002
@@ -46,9 +46,11 @@
def getUtility(context, interface, name=''):
"""Get the utility that provides interface
- Returns the nearest utility to the context that implements
- the specified interface. If one is not found, raises
- Zope.ComponentArchitecture.ComponentLookupError."""
+ Returns the nearest utility to the context that implements the
+ specified interface. If one is not found, raises
+ ComponentLookupError.
+
+ """
def queryUtility(context, interface, default=None, name=''):
"""Look for the utility that provides interface
@@ -63,9 +65,10 @@
Returns the nearest adapter to the context that can adapt
object to interface. If context is not specified, attempts to
- use wrapping around object to specify a context. If a matching
- adapter cannot be found, raises
- Zope.ComponentArchitecture.ComponentLookupError."""
+ use wrapping around object to specify a context. If a
+ matching adapter cannot be found, raises ComponentLookupError.
+
+ """
def queryAdapter(object, interface, default=None, name='', context=None):
"""Look for adapter to interface for object
@@ -78,11 +81,15 @@
# Factory service
def createObject(context, name, *args, **kwargs):
- """finds the factory of the given name that is nearest to the
+ """Create an object using a factory
+
+ finds the factory of the given name that is nearest to the
context, and passes the other given arguments to the factory
to create a new instance. Returns a reference to the new
object. If a matching factory cannot be found raises
- Zope.ComponentArchitecture.ComponentLookupError"""
+ ComponentLookupError
+
+ """
def getFactoryInterfaces(context, name):
"""finds the factory of the given name that is nearest to the
@@ -92,11 +99,12 @@
# Skin service
def getSkin(wrapped_object, name, view_type):
- """returns the nearest skin (sequence of layer names) to the
+ """Get a skin definition as a sequence of layers
+
+ Returns the nearest skin (sequence of layer names) to the
object, as specified by the name and the view type (browser,
- xml-rpc, etc.) as expressed by an interface. If a matching skin
- is not found, raises
- Zope.ComponentArchitecture.ComponentLookupError
+ xml-rpc, etc.) as expressed by an interface. If a matching
+ skin is not found, raises ComponentLookupError
There is a predefined skin in the global skin service, '', with
a single layer, ''."""
@@ -109,7 +117,7 @@
The request must implement IPresentationRequest: it provides
the view type and the skin name. The nearest one to the
object is found. If a matching view cannot be found, raises
- Zope.ComponentArchitecture.ComponentLookupError.
+ ComponentLookupError.
"""
@@ -128,7 +136,7 @@
The request must implement IPresentationRequest, and provides the
desired view type. The nearest one to the object is found.
If a matching default view name cannot be found, raises
- Zope.NotFoundError.
+ NotFoundError.
"""
@@ -151,8 +159,9 @@
The object provides a place to look for placeful resources.
- A Zope.ComponentArchitecture.ComponentLookupError will be
- raised if the component can't be found.
+ A ComponentLookupError will be raised if the component can't
+ be found.
+
"""
def queryResource(wrapped_object, name, request, default=None):
@@ -205,17 +214,20 @@
class IFactoryService(Interface):
def createObject(name, *args, **kwargs):
- """Create a new object using the factory with the given name,
+ """Create an object using a factory
+
+ Create a new object using the factory with the given name,
passing all remaining arguments to the factory transparently.
- A Zope.ComponentArchitecture.ComponentLookupError will be
- raised if the factory component can't be found.
+ A ComponentLookupError will be raised if the factory component
+ can't be found.
+
"""
def getFactory(name):
"""Return a registered factory
- A Zope.ComponentArchitecture.ComponentLookupError will be
+ A ComponentLookupError will be
raised if the factory component can't be found.
"""
@@ -233,8 +245,7 @@
def getUtility(interface, name=''):
"""Look up a utility that provides an interface.
- If one is not found, raises
- Zope.ComponentArchitecture.ComponentLookupError.
+ If one is not found, raises ComponentLookupError.
"""
@@ -263,7 +274,7 @@
If name is empty and the object already implements the
interface, then the object will be returned.
- A Zope.ComponentArchitecture.ComponentLookupError will be
+ A ComponentLookupError will be
raised if the component can't be found.
"""
@@ -354,7 +365,7 @@
The object provides a place to look for placeful resources.
- A Zope.ComponentArchitecture.ComponentLookupError will be
+ A ComponentLookupError will be
raised if the component can't be found.
"""
@@ -401,7 +412,7 @@
The object also provides a place to look for placeful views.
- A Zope.ComponentArchitecture.ComponentLookupError will be
+ A ComponentLookupError will be
raised if the component can't be found.
"""
@@ -421,7 +432,7 @@
The request must implement IPresentationRequest.
- A Zope.NotFoundError will be raised if the suitable
+ A NotFoundError will be raised if the suitable
default view name for the object cannot be found.
"""
=== Zope3/src/zope/component/resource.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/component/resource.py:1.1.2.1 Mon Dec 23 14:32:40 2002
+++ Zope3/src/zope/component/resource.py Tue Dec 24 07:51:24 2002
@@ -48,9 +48,6 @@
self.__layers = {}
__implements__ = IGlobalResourceService
-
- # Implementation methods for interface
- # Zope.ComponentArchitecture.IResourceService.
def getResource(self, object, name, request):
'''See interface IResourceService'''
=== Zope3/src/zope/component/service.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/component/service.py:1.1.2.1 Mon Dec 23 14:32:40 2002
+++ Zope3/src/zope/component/service.py Tue Dec 24 07:51:24 2002
@@ -26,17 +26,18 @@
def defineService(name, interface):
"""Define a new service of the given name implementing the given
interface. If the name already exists, raises
- Zope.Exceptions.DuplicationError"""
+ DuplicationError"""
def provideService(name, component):
- """provide a service component to do the work of the named
+ """Register a service component.
+
+ Provide a service component to do the work of the named
service. If a service component has already been assigned to
- this name, raise Zope.Exceptions.DuplicationError; if the name
- has not been defined, raises
- Zope.ComponentArchitecture.GlobalServiceManager.UndefinedService;
- if the component does not implement the registered interface for
- the service name, raises
- Zope.ComponentArchitecture.GlobalServiceManager.InvalidService.
+ this name, raise DuplicationError; if the name has not been
+ defined, raises UndefinedService; if the component does not
+ implement the registered interface for the service name,
+ raises InvalidService.
+
"""
class UndefinedService(Exception):
=== Zope3/src/zope/component/skin.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/component/skin.py:1.1.2.1 Mon Dec 23 14:32:40 2002
+++ Zope3/src/zope/component/skin.py Tue Dec 24 07:51:24 2002
@@ -36,9 +36,6 @@
self.__skins = {}
__implements__ = IGlobalSkinService
-
- # Implementation methods for interface
- # Zope.ComponentArchitecture.ISkinService.
def defineSkin(self, name, view_type, layers):
'''See interface IGlobalSkinService'''