[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Folder/Views/XMLRPC - Methods.py:1.1.2.1 __init__.py:1.1.2.1 xmlrpc.zcml:1.1.2.1

Stephan Richter srichter@cbu.edu
Mon, 4 Mar 2002 00:54:43 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Folder/Views/XMLRPC
In directory cvs.zope.org:/tmp/cvs-serv25134/Folder/Views/XMLRPC

Added Files:
      Tag: srichter-OFS_Formulator-branch
	Methods.py __init__.py xmlrpc.zcml 
Log Message:
Here are some of the changes:

- XML-RPC View for Folders; methods are far from being complete, however
  it is the proof of concept; it works.

- Experimental XUL code in folder that shows a tree, a menu and the limit 
  view.

- File can now be viewed like an Image. Since it also sets the right 
  content type, it is even more useful for some of the development.

- ZPTPages are the last content object to be "formulatorized". Now they 
  also entered the new generation code.

ToDo:

- Make tests.

- Update interfaces.

- Get a client side XML-RPC client talk from the browser with Zope to save
  values. 

- Get a tutorial going, so that the ZMI sprinters and developers can make
  use of the technology



=== Added File Zope3/lib/python/Zope/App/OFS/Folder/Views/XMLRPC/Methods.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: Methods.py,v 1.1.2.1 2002/03/04 05:54:42 srichter Exp $
"""

from Zope.Publisher.XMLRPC.MethodPublisher import MethodPublisher
from Zope.Publisher.XMLRPC.IXMLRPCPublisher import IXMLRPCPublisher
from Zope.PageTemplate.PageTemplateFile import PageTemplateFile


class Methods(MethodPublisher):
    """ """

    __implements__ = MethodPublisher.__implements__

        
    def __init__(self, folder):
        self._folder = folder


    def objectIds(self):
        ''' '''
        return self.getContext().objectIds()


    def setLimit(self, limit):
        ''' '''
        return self.getContext().setLimit(limit)


    def getLimit(self):
        ''' '''
        return self.getContext().getLimit()


    def getContext( self ):
        return self._folder



=== Added File Zope3/lib/python/Zope/App/OFS/Folder/Views/XMLRPC/__init__.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: __init__.py,v 1.1.2.1 2002/03/04 05:54:42 srichter Exp $
"""


=== Added File Zope3/lib/python/Zope/App/OFS/Folder/Views/XMLRPC/xmlrpc.zcml ===
<zopeConfigure
   xmlns='http://namespaces.zope.org/zope'
   xmlns:security='http://namespaces.zope.org/security'
   xmlns:xmlrpc='http://namespaces.zope.org/xmlrpc'
>

  <!-- Folder View Directives -->

  <xmlrpc:defaultView name="methods"
    for="Zope.App.OFS.Folder.LoadedFolder.ILoadedFolder."
    factory="Zope.App.OFS.Folder.Views.XMLRPC.Methods." />

  <security:protectClass 
    name="Zope.App.OFS.Folder.Views.XMLRPC.Methods."
    permission_id="Zope.ManageContent" 
    methods="objectIds, setLimit, getLimit"/>

</zopeConfigure>