[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services/servicemanager - __init__.py:1.1.2.1 interfaces.py:1.1.2.1

Jim Fulton jim@zope.com
Mon, 23 Dec 2002 14:31:54 -0500


Update of /cvs-repository/Zope3/src/zope/app/interfaces/services/servicemanager
In directory cvs.zope.org:/tmp/cvs-serv19908/zope/app/interfaces/services/servicemanager

Added Files:
      Tag: NameGeddon-branch
	__init__.py interfaces.py 
Log Message:
Initial renaming before debugging

=== Added File Zope3/src/zope/app/interfaces/services/servicemanager/__init__.py ===
#
# This file is necessary to make this directory a package.


=== Added File Zope3/src/zope/app/interfaces/services/servicemanager/interfaces.py ===
##############################################################################
#
# Copyright (c) 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.
# 
##############################################################################
"""View package.

$Id: interfaces.py,v 1.1.2.1 2002/12/23 19:31:53 jim Exp $
"""
__metaclass__ = type

from zope.publisher.interfaces.browser import IBrowserPresentation
from zope.interface import Interface
from zope.app.component.interfacefield import InterfaceField
from zope.schema import BytesLine
from zope.component.interfaces import IPresentation
from zope.app.interfaces.container import IContainer

class IViewPackageInfo(Interface):

    forInterface = InterfaceField(
        title = u"For interface",
        description = u"The interface of the objects being viewed",
        required = True,
        )

    presentationType = InterfaceField(
        title = u"Presentation type",
        description = u"The presentation type of a view",
        required = True,
        type = IPresentation,
        default = IBrowserPresentation,
        )

    factoryName = BytesLine(
        title=u"The dotted name of a factory for creating the view",
        required = True,
        )

    layer = BytesLine(
        title = u"Layer",
        description = u"The skin layer the view is registered for",
        required = False,
        min_length = 1,
        default = "default",
        )

class IViewPackage(IViewPackageInfo,  IContainer):
    """Sub-packages that contain templates that are registered as views
    """