src/pyams_pagelet/interfaces/__init__.py
changeset 0 44692d47182f
child 8 a224fe9eda03
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_pagelet/interfaces/__init__.py	Thu Feb 19 10:54:13 2015 +0100
@@ -0,0 +1,46 @@
+#
+# 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
+from pyramid.interfaces import IView
+from zope.component.interfaces import IObjectEvent, ObjectEvent
+from zope.contentprovider.interfaces import IContentProvider
+
+# import packages
+from zope.interface import implementer
+
+
+class IPagelet(IView):
+    """Pagelet interface"""
+
+    def update(self):
+        """Update the pagelet data."""
+
+    def render(self):
+        """Render the pagelet content w/o o-wrap."""
+
+
+class IPageletRenderer(IContentProvider):
+    """Render a pagelet by calling it's 'render' method"""
+
+
+class IPageletCreatedEvent(IObjectEvent):
+    """Pagelet created event interface"""
+
+
+@implementer(IPageletCreatedEvent)
+class PageletCreatedEvent(ObjectEvent):
+    """Pagelet created event"""