Author: jmorliaguet
Date: Sat Nov  5 12:52:48 2005
New Revision: 29011

Added:
   z3lab/cpsskins/branches/jmo-perspectives/elements/engine.py   (contents, 
props changed)
   z3lab/cpsskins/branches/jmo-perspectives/elements/filter.py   (contents, 
props changed)
   z3lab/cpsskins/branches/jmo-perspectives/elements/renderer.py   (contents, 
props changed)
Modified:
   z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/engine.py
   z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/interfaces.py
   
z3lab/cpsskins/branches/jmo-perspectives/configuration/displays/metaconfigure.py
   
z3lab/cpsskins/branches/jmo-perspectives/configuration/engines/metaconfigure.py
   
z3lab/cpsskins/branches/jmo-perspectives/configuration/filters/metaconfigure.py
   
z3lab/cpsskins/branches/jmo-perspectives/configuration/presentations/metaconfigure.py
   z3lab/cpsskins/branches/jmo-perspectives/configuration/renderers/meta.zcml
   
z3lab/cpsskins/branches/jmo-perspectives/configuration/renderers/metaconfigure.py
   z3lab/cpsskins/branches/jmo-perspectives/elements/interfaces.py
   
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/accesskeys/__init__.py
   
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/effect/__init__.py
   
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/htmlcleaner/__init__.py
   
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/layout/__init__.py
   
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/style/__init__.py
   
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/style/configure.zcml
   z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/style/css.py
   
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/widget/__init__.py
   z3lab/cpsskins/branches/jmo-perspectives/engines/jsr168/filters/__init__.py
Log:

- converted renderers to utilities

- renamed Renderer as RendererView for the adapter that does the
  actual rendering as opposed to the object that contains
  the renderer's configuration.



Modified: z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/engine.py
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/engine.py        
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/engine.py        
Sat Nov  5 12:52:48 2005
@@ -28,13 +28,13 @@
 
 from cpsskins import getThemeManager, getContexts
 from cpsskins.browser.negociation.interfaces import INegociation
-from cpsskins.browser.rendering.interfaces import IUpdateData
+from cpsskins.browser.rendering.interfaces import IUpdateData, IFilterView
 from cpsskins.configuration.interfaces import IRegistry
-from cpsskins.elements.interfaces import IType
+from cpsskins.elements.interfaces import IType, IRenderer, IFilter
 from cpsskins.elements.interfaces import IElement, ILeaf, ISlot, IDisplayable
 from cpsskins.relations.interfaces import IPredicate
 from cpsskins.storage.interfaces import IRelationStorage
-from interfaces import IViewer, IRenderer, IFilter, IContextInfo
+from interfaces import IViewer, IRendererView, IFilterView, IContextInfo
 from cpsskins.elements.interfaces import INodeTraverser, INode
 
 import logging
@@ -42,9 +42,10 @@
 INFO = logging.INFO
 logger = logging.getLogger()
 
-renderer_registry = getUtility(IRegistry, 'renderers')
 accesskey_registry = getUtility(IRegistry, 'accesskeys')
 
+_marker = object()
+
 class ContextInfo:
     """A transient object that holds information used by a renderer.
 
@@ -169,7 +170,7 @@
         contexts['tree'] = _updateTreeInfo(node=element, globals=globals)
 
         # render the tree
-        return getMultiAdapter((element, request), IRenderer)()
+        return getMultiAdapter((element, request), IRendererView)()
 
 def _updateTreeInfo(index={}, node=None, globals=None):
     """Build the tree info for an element.
@@ -214,12 +215,12 @@
 
     return index
 
-class Renderer(object):
+class RendererView(object):
     """A renderer is a collection of filters. It provides some rendering
     for elements.
     """
     adapts(IElement, IRequest)
-    implements(IRenderer)
+    implements(IRendererView)
 
     def __init__(self, element, request):
         self.element = element
@@ -248,32 +249,22 @@
                     logger.log(INFO,
                         "The object '%s' is not a valid node." % repr(node))
                     continue
-                renderer = getMultiAdapter((node, request), IRenderer)
+                renderer = getMultiAdapter((node, request), IRendererView)
                 rendered.append(renderer())
             markup = ''.join(rendered)
 
-        # look for renderers associated to the element's content type
-        iface = IType(element).getContentType()
-        if (iface, engine) not in renderer_registry:
-            # fall back to the element type
-            iface = IType(element).getElementType()
-
-        if (iface, engine) not in renderer_registry:
-            logger.log(INFO,
-                "The element '%s' cannot be rendered by the '%s' engine."
-                % (repr(element), engine))
-            return markup
-
         # apply all the filters in sequence
-        for f in self._getFilters(iface, info.display, engine):
+        for f in self._getFilters(info):
             markup = f(markup, info)
 
         return markup
 
-    def _getFilters(self, iface, display, engine):
+    def _getFilters(self, info):
         """Get the list of filters associated to the element
         """
         element, request = self.element, self.request
+        engine = info.globals.engine
+        display = info.display
 
         if display is None:
             return []
@@ -281,11 +272,28 @@
         contexts = getContexts(request)
         relations = contexts['relations']
 
+        # look for renderers associated to the element's content type
+        iface = IType(element).getContentType()
+        name = engine + '.' + iface.__name__  # XXX create a dotted name
+        renderer = queryUtility(IRenderer, name)
+        if renderer is None:
+            # fall back to the element type
+            iface = IType(element).getElementType()
+
+        name = engine + '.' + iface.__name__ # XXX create a dotted name
+        renderer = queryUtility(IRenderer, name)
+        if renderer is None:
+            logger.log(INFO,
+                "The element '%s' cannot be rendered by the '%s' engine."
+                % (repr(element), engine))
+            return []
+
         filters = []
-        for filter_name in renderer_registry.get((iface, engine), []):
+
+        for filter_name in renderer.filters:
             filter_proxy = queryUtility(IFilter, filter_name)
             if filter_proxy is None:
-                logger.log(INFO, "Filter '%s' is not registered." % 
filter_name)
+                logger.log(INFO, "Filter '%s' is not registered." % 
filter_proxy)
                 continue
 
             factory = filter_proxy.factory
@@ -309,14 +317,14 @@
                 # get the adapter
                 filter = queryMultiAdapter(
                     objects=(adapted,),
-                    interface=IFilter,
+                    interface=IFilterView,
                     name=filter_name,
                     default=None)
 
                 if filter is None:
                     logger.log(INFO,
                         "Filter '%s' will not be applied. "
-                        "No IFilter adapter was found for '%s'."
+                        "No IFilterView adapter was found for '%s'."
                         % (filter_name, repr(adapted)))
                     continue
 

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/interfaces.py
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/interfaces.py    
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/interfaces.py    
Sat Nov  5 12:52:48 2005
@@ -19,16 +19,18 @@
 
 from zope.interface import Interface
 
+from zope.configuration.fields import Tokens
+
 # Rendering
 
 class IViewer(Interface):
     """Elements that can be viewed should implement this."""
 
-class IRenderer(Interface):
-    """Renderers should implement this"""
+class IRendererView(Interface):
+    """Renderer views should implement this"""
 
-class IFilter(Interface):
-    """A rendering filter"""
+class IFilterView(Interface):
+    """Filter views should implement this"""
 
 class IContextInfo(Interface):
     """Some information about the element being rendered"""
@@ -48,8 +50,3 @@
     def update(info):
         """This method is called when the element is updated."""
 
-class IStylesheetRenderer(IRenderer):
-    """Render a theme's stylesheets."""
-
-    def renderCSS():
-       """Render the theme's css file. XXX to be moved elsewhere."""

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/configuration/displays/metaconfigure.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/configuration/displays/metaconfigure.py
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/configuration/displays/metaconfigure.py
    Sat Nov  5 12:52:48 2005
@@ -28,8 +28,6 @@
 from cpsskins.elements.interfaces import IDisplay, IElementType, IDisplayType
 from cpsskins.elements.display import Display
 
-_marker = object()
-
 def display(_context, name='', schema=None, factory=None):
 
     if not name:
@@ -39,7 +37,7 @@
         raise ConfigurationError(
             "Display names can only contain alphabetic characters.")
 
-    if queryUtility(IDisplay, name, _marker) is not _marker:
+    if queryUtility(IDisplay, name) is not None:
         raise ConfigurationError, \
             "A display with the name '%s' has already been registered." % name
 

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/configuration/engines/metaconfigure.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/configuration/engines/metaconfigure.py 
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/configuration/engines/metaconfigure.py 
    Sat Nov  5 12:52:48 2005
@@ -23,11 +23,9 @@
 from cpsskins.elements.interfaces import IEngine
 from cpsskins.elements.engine import Engine
 
-_marker = object()
-
 def engine(_context, name, accesskeys=[]):
 
-    if queryUtility(IEngine, name, _marker) is not _marker:
+    if queryUtility(IEngine, name) is not None:
         raise ConfigurationError(
             "The '%s' engine has already been registered." % name)
 

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/configuration/filters/metaconfigure.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/configuration/filters/metaconfigure.py 
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/configuration/filters/metaconfigure.py 
    Sat Nov  5 12:52:48 2005
@@ -24,19 +24,18 @@
 from zope.component import provideAdapter, queryUtility, provideUtility
 from zope.configuration.exceptions import ConfigurationError
 
-from cpsskins.browser.rendering.filter import Filter
-
-_marker = object()
+from cpsskins.browser.rendering.interfaces import IFilterView
 
 def filter(_context, name='', for_=None, factory=None, predicate=None,
            template='', stylesheet=None):
 
-    from cpsskins.browser.rendering.interfaces import IFilter
+    from cpsskins.elements.filter import Filter
+    from cpsskins.elements.interfaces import IFilter
 
     if not name:
         raise ConfigurationError("Must specify the filter name.")
 
-    if queryUtility(IFilter, name, _marker) is not _marker:
+    if queryUtility(IFilter, name) is not None:
         raise ConfigurationError, \
             "A filter with the name '%s' has already been registered." % name
 
@@ -54,15 +53,15 @@
         _context.action(
             discriminator = ('adapter', factory, for_, name),
             callable = provideAdapter,
-            args = (factory, (for_,), IFilter, name))
-        provideUtility(Filter(predicate=predicate), IFilter, name)
+            args = (factory, (for_,), IFilterView, name))
+        provideUtility(Filter(name=name, predicate=predicate), IFilter, name)
 
     # factory
     elif factory:
         if template or for_:
             raise ConfigurationError(
                 "With a factory, cannot specify a template or an interface.")
-        provideUtility(Filter(factory=factory), IFilter, name)
+        provideUtility(Filter(name=name, factory=factory), IFilter, name)
 
     # template
     elif template:
@@ -70,7 +69,7 @@
             raise ConfigurationError(
                 "With a template, cannot specify an interface")
         template = pagetemplate.ViewPageTemplateFile(template)
-        provideUtility(Filter(template=template), IFilter, name)
+        provideUtility(Filter(name=name, template=template), IFilter, name)
 
     # register resources
     if stylesheet:

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/configuration/presentations/metaconfigure.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/configuration/presentations/metaconfigure.py
       (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/configuration/presentations/metaconfigure.py
       Sat Nov  5 12:52:48 2005
@@ -26,8 +26,6 @@
 
 _ = MessageFactory("cpsskins")
 
-_marker = object()
-
 class PresentationDirective(object):
 
     def __init__(self, _context, for_):
@@ -46,7 +44,7 @@
 
         name = str(self.for_)
 
-        if queryUtility(IPresentation, name, _marker) is not _marker:
+        if queryUtility(IPresentation, name) is not None:
             raise ConfigurationError(
                 "A presentation has already been registered for the"
                 "interface %s" % self.for_)

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/configuration/renderers/meta.zcml
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/configuration/renderers/meta.zcml  
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/configuration/renderers/meta.zcml  
Sat Nov  5 12:52:48 2005
@@ -6,7 +6,7 @@
     <complexDirective
         name="renderer"
         schema=".metadirectives.IRendererDirective"
-        handler=".metaconfigure.Renderer">
+        handler=".metaconfigure.RendererDirective">
 
       <subdirective
           name="filter"

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/configuration/renderers/metaconfigure.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/configuration/renderers/metaconfigure.py
   (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/configuration/renderers/metaconfigure.py
   Sat Nov  5 12:52:48 2005
@@ -18,21 +18,22 @@
 __docformat__ = "reStructuredText"
 
 from zope.app.component.metaconfigure import adapter
-from zope.component import getUtility
+from zope.component import provideUtility, queryUtility
 from zope.configuration.exceptions import ConfigurationError
 from zope.i18nmessageid import MessageFactory
 from zope.publisher.interfaces.browser import IBrowserRequest
 
 from cpsskins.configuration.interfaces import IRegistry
-from cpsskins.browser.rendering.engine import Renderer as RenderingEngine
-from cpsskins.browser.rendering.interfaces import IRenderer
+from cpsskins.browser.rendering.engine import RendererView
+from cpsskins.browser.rendering.interfaces import IRendererView
+from cpsskins.elements.renderer import Renderer
+from cpsskins.elements.interfaces import IRenderer
 
 _ = MessageFactory("cpsskins")
 
-renderer_registry = getUtility(IRegistry, 'renderers')
 registered_adapters = []
 
-class Renderer(object):
+class RendererDirective(object):
 
     def __init__(self, _context, engine, for_):
         self._context = _context
@@ -48,7 +49,9 @@
         renderer(self._context, engine, self.for_)
 
         for iface in self.for_:
-            renderer_registry.register((iface, engine), self.filters)
+            name = engine + '.' + iface.__name__ # XXX create a dotted name
+            provideUtility(Renderer(filters=self.filters), IRenderer, name)
+            print queryUtility(IRenderer, name)
 
 def renderer(_context, engine, for_):
 
@@ -64,10 +67,7 @@
         if iface in registered_adapters:
             continue
         # zope:adapter
-        adapter(_context=_context,
-                factory=(RenderingEngine,),
-                provides=IRenderer,
-                for_=(iface, IBrowserRequest),
-               )
+        adapter(_context=_context, factory=(RendererView,),
+                provides=IRendererView, for_=(iface, IBrowserRequest))
         registered_adapters.append(iface)
 

Added: z3lab/cpsskins/branches/jmo-perspectives/elements/engine.py
==============================================================================
--- (empty file)
+++ z3lab/cpsskins/branches/jmo-perspectives/elements/engine.py Sat Nov  5 
12:52:48 2005
@@ -0,0 +1,31 @@
+##############################################################################
+#
+# Copyright (c) 2005 Nuxeo and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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$
+"""
+
+__docformat__ = "reStructuredText"
+
+from zope.interface import implements
+
+from cpsskins.elements.interfaces import IEngine
+
+class Engine(object):
+
+    implements(IEngine)
+
+    def __init__(self, accesskeys):
+        self.accesskeys = accesskeys
+

Added: z3lab/cpsskins/branches/jmo-perspectives/elements/filter.py
==============================================================================
--- (empty file)
+++ z3lab/cpsskins/branches/jmo-perspectives/elements/filter.py Sat Nov  5 
12:52:48 2005
@@ -0,0 +1,34 @@
+##############################################################################
+#
+# Copyright (c) 2005 Nuxeo and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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$
+"""
+
+__docformat__ = "reStructuredText"
+
+from zope.interface import implements
+
+from interfaces import IFilter
+
+class Filter(object):
+
+    implements(IFilter)
+
+    def __init__(self, name='', predicate=None, factory=None, template=None):
+        self.name = name
+        self.predicate = predicate
+        self.factory = factory
+        self.template = template
+

Modified: z3lab/cpsskins/branches/jmo-perspectives/elements/interfaces.py
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/elements/interfaces.py     
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/elements/interfaces.py     Sat Nov 
 5 12:52:48 2005
@@ -25,6 +25,7 @@
 from zope.interface import Interface, Attribute
 from zope.interface.interfaces import IInterface
 from zope.schema import TextLine
+from zope.configuration.fields import Tokens
 
 _ = MessageFactory("cpsskins")
 
@@ -140,6 +141,15 @@
 class IEngine(Interface):
     """A rendering engine."""
 
+class IRenderer(Interface):
+    """Renderers should implement this"""
+
+    filters = Tokens(
+        title=u"Filters associated to the filter.")
+
+class IFilter(Interface):
+    """A filter"""
+
 class IPresentation(Interface):
     """A Presentation."""
 

Added: z3lab/cpsskins/branches/jmo-perspectives/elements/renderer.py
==============================================================================
--- (empty file)
+++ z3lab/cpsskins/branches/jmo-perspectives/elements/renderer.py       Sat Nov 
 5 12:52:48 2005
@@ -0,0 +1,31 @@
+##############################################################################
+#
+# Copyright (c) 2005 Nuxeo and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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$
+"""
+
+__docformat__ = "reStructuredText"
+
+from zope.interface import implements
+
+from interfaces import IRenderer
+
+class Renderer(object):
+
+    implements(IRenderer)
+
+    def __init__(self, filters):
+        self.filters = filters
+

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/accesskeys/__init__.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/accesskeys/__init__.py
     (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/accesskeys/__init__.py
     Sat Nov  5 12:52:48 2005
@@ -21,7 +21,7 @@
 
 from zope.interface import implements
 
-from cpsskins.browser.rendering.interfaces import IFilter
+from cpsskins.browser.rendering.interfaces import IFilterView
 
 startTag = re.compile('<.*?>')
 
@@ -29,7 +29,7 @@
     """Adds access keys after the first HTML tag found in the markup.
 
     """
-    implements(IFilter)
+    implements(IFilterView)
 
     def __init__(self):
         pass

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/effect/__init__.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/effect/__init__.py
 (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/effect/__init__.py
 Sat Nov  5 12:52:48 2005
@@ -29,7 +29,7 @@
 
 from cpsskins.model.interfaces import IImage
 from cpsskins.elements.interfaces import IDisplay
-from cpsskins.browser.rendering.interfaces import IFilter
+from cpsskins.browser.rendering.interfaces import IFilterView
 from cpsskins.thememanager import getThemeManager
 
 INFO = logging.INFO
@@ -44,7 +44,7 @@
     """Applies effects on objects.
     """
     adapts(IDisplay)
-    implements(IFilter)
+    implements(IFilterView)
 
     def __init__(self, context):
         self.context = context

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/htmlcleaner/__init__.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/htmlcleaner/__init__.py
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/htmlcleaner/__init__.py
    Sat Nov  5 12:52:48 2005
@@ -21,7 +21,7 @@
 
 from zope.interface import implements
 
-from cpsskins.browser.rendering.interfaces import IFilter
+from cpsskins.browser.rendering.interfaces import IFilterView
 
 class HTMLCleaner(object):
     """Cleans and optimizes the html code.
@@ -48,7 +48,7 @@
     '<div>Some text\\n\\n          <p>Some other text</p> </div>'
 
     """
-    implements(IFilter)
+    implements(IFilterView)
 
     def __init__(self):
         pass

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/layout/__init__.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/layout/__init__.py
 (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/layout/__init__.py
 Sat Nov  5 12:52:48 2005
@@ -24,7 +24,7 @@
 from zope.security.proxy import removeSecurityProxy
 
 from cpsskins.elements.interfaces import IFormat
-from cpsskins.browser.rendering.interfaces import IFilter
+from cpsskins.browser.rendering.interfaces import IFilterView
 
 startTag = re.compile('<.*?>')
 styleAttr = re.compile(' style="(.*?)"')
@@ -92,7 +92,7 @@
     """
 
     adapts(IFormat)
-    implements(IFilter)
+    implements(IFilterView)
 
     def __init__(self, context):
         self.context = context

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/style/__init__.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/style/__init__.py
  (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/style/__init__.py
  Sat Nov  5 12:52:48 2005
@@ -23,7 +23,7 @@
 from zope.component import adapts
 
 from cpsskins.engines.default.formats.style import IStyle
-from cpsskins.browser.rendering.interfaces import IFilter
+from cpsskins.browser.rendering.interfaces import IFilterView
 
 startTag = re.compile('<.*?>')
 classAttr = re.compile(' class="(.*?)"')
@@ -77,7 +77,7 @@
     """
 
     adapts(IStyle)
-    implements(IFilter)
+    implements(IFilterView)
 
     def __init__(self, context):
         self.context = context

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/style/configure.zcml
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/style/configure.zcml
       (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/style/configure.zcml
       Sat Nov  5 12:52:48 2005
@@ -49,7 +49,7 @@
       for="*"
       layer="cpsskins"
       permission="zope.View"
-      class=".css.StylesheetRenderer"
+      class=".css.StylesheetView"
       >
 
     <browser:page

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/style/css.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/style/css.py   
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/style/css.py   
    Sat Nov  5 12:52:48 2005
@@ -25,14 +25,15 @@
 from cpsskins.storage.interfaces import IFormatStorage
 from cpsskins.thememanager import getThemeManager
 
-class IStylesheetRenderer(Interface):
+class IStylesheetView(Interface):
+
     def renderCSS():
         """Render the styles in CSS"""
 
-class StylesheetRenderer(BrowserView):
+class StylesheetView(BrowserView):
     """A stylesheet renderer
     """
-    implements(IStylesheetRenderer)
+    implements(IStylesheetView)
 
     def renderCSS(self):
         """Render the styles in CSS

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/widget/__init__.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/widget/__init__.py
 (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/default/filters/widget/__init__.py
 Sat Nov  5 12:52:48 2005
@@ -24,7 +24,7 @@
 from zope.i18nmessageid import MessageFactory
 from zope.schema.vocabulary import SimpleVocabulary
 
-from cpsskins.browser.rendering.interfaces import IFilter
+from cpsskins.browser.rendering.interfaces import IFilterView
 from cpsskins.configuration.interfaces import IRegistry
 from cpsskins.engines.default.formats.interfaces import IWidget
 from interfaces import IBasicWidgetView, IWidgetView
@@ -44,7 +44,7 @@
     """Presents data by means of widgets.
     """
     adapts(IWidget)
-    implements(IFilter)
+    implements(IFilterView)
 
     def __init__(self, context):
         self.context = context

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/jsr168/filters/__init__.py
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/engines/jsr168/filters/__init__.py 
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/engines/jsr168/filters/__init__.py 
Sat Nov  5 12:52:48 2005
@@ -20,7 +20,7 @@
 from zope.app.traversing.api import getParent
 from zope.interface import implements
 
-from cpsskins.browser.rendering.interfaces import IFilter
+from cpsskins.browser.rendering.interfaces import IFilterView
 from cpsskins.elements.interfaces import ISlot
 
 OPEN = 0
@@ -29,7 +29,7 @@
 class BoxControls(object):
     """Adds a JSR-168 like portlet box controls to objects.
     """
-    implements(IFilter)
+    implements(IFilterView)
 
     def __init__(self):
         pass
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to