[Zope3-checkins] CVS: Zope3/src/zope/app/dav - __init__.py:1.1 configure.zcml:1.1 globaldavschemaservice.py:1.1 meta.zcml:1.1 metaconfigure.py:1.1

Sidnei da Silva sidnei@x3ng.com.br
Tue, 20 May 2003 11:46:40 -0400


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

Added Files:
	__init__.py configure.zcml globaldavschemaservice.py meta.zcml 
	metaconfigure.py 
Log Message:
Brand new DAVSchema service. 
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/Namespace2SchemaRegistry

=== Added File Zope3/src/zope/app/dav/__init__.py ===
# this is a package


=== Added File Zope3/src/zope/app/dav/configure.zcml ===
<zopeConfigure
   xmlns='http://namespaces.zope.org/zope'
   xmlns:dav='http://namespaces.zope.org/zope/dav'>

<serviceType
    id='DAVSchema'
    interface='zope.app.interfaces.component.IDAVSchemaService' />

<service
   serviceType='DAVSchema'
   permission='zope.Public'
   component='zope.app.dav.globaldavschemaservice.davSchemaService' />

<dav:provideInterface
   for="http://purl.org/dc/elements/1.1/"
   interface="zope.app.interfaces.dublincore.IZopeDublinCore"
/>

</zopeConfigure>


=== Added File Zope3/src/zope/app/dav/globaldavschemaservice.py ===
##############################################################################
#
# 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: globaldavschemaservice.py,v 1.1 2003/05/20 15:46:38 sidnei Exp $
"""

from zope.app.component.globalinterfaceservice import InterfaceService
from zope.app.interfaces.component import IGlobalDAVSchemaService

class DAVSchemaService(InterfaceService):
    __implements__ = IGlobalDAVSchemaService

davSchemaService = DAVSchemaService()
provideInterface = davSchemaService.provideInterface
getInterface = davSchemaService.getInterface
queryInterface = davSchemaService.queryInterface
searchInterface = davSchemaService.searchInterface

_clear = davSchemaService._clear

from zope.testing.cleanup import addCleanUp
addCleanUp(_clear)
del addCleanUp


=== Added File Zope3/src/zope/app/dav/meta.zcml ===
<zopeConfigure xmlns='http://namespaces.zope.org/zope'>

  <directives namespace="http://namespaces.zope.org/zope/dav">
    <directive name="provideInterface"
               attributes="for interface"
               handler=" zope.app.dav.metaconfigure.interface"
    />
  </directives>

</zopeConfigure>


=== Added File Zope3/src/zope/app/dav/metaconfigure.py ===
##############################################################################
#
# 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: metaconfigure.py,v 1.1 2003/05/20 15:46:38 sidnei Exp $
"""

from zope.app.services.servicenames import DAVSchema
from zope.app.component.metaconfigure import handler, resolveInterface
from zope.configuration.action import Action

def interface(_context, for_, interface):
    interface = resolveInterface(_context, interface)
    return [
        Action(
          discriminator = None,
          callable = handler,
          args = (DAVSchema, 'provideInterface', for_, interface)
        ),
      ]