--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_pagelet/metadirectives.py Thu Feb 19 10:54:13 2015 +0100
@@ -0,0 +1,49 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# 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.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard packages
+
+# import interfaces
+
+# import packages
+from zope.configuration.fields import GlobalObject
+from zope.interface import Interface
+from zope.schema import TextLine
+
+
+class IPageletDirective(Interface):
+ """Pagelet ZCML directive interface"""
+
+ name = TextLine(title='The name of the view',
+ description='Shows up in URLs/paths. For example "foo" or "foo.html"',
+ required=True)
+
+ context = GlobalObject(title='The interface or class this view is for',
+ required=False)
+
+ layer = GlobalObject(title="The request interface or class this pagelet is for",
+ description="Defaults to zope.publisher.interfaces.browser.IDefaultBrowserLayer.",
+ required=False)
+
+ view = GlobalObject(title='View class',
+ description='The view function or class',
+ required=True)
+
+ permission = TextLine(title='Permission',
+ description='The permission needed to use the view',
+ required=False)
+
+
+IPageletDirective.setTaggedValue('keyword_arguments', True)