Author: jmorliaguet
Date: Sun Oct 16 18:22:19 2005
New Revision: 28343

Added:
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/README.txt   (contents, props 
changed)
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/__init__.py   (contents, props 
changed)
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/hello-icon.png   (contents, 
props changed)
   z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/hello.py   (contents, props 
changed)
Log:

- updated to the new API



Added: z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/README.txt
==============================================================================
--- (empty file)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/README.txt      Sun Oct 16 
18:22:19 2005
@@ -0,0 +1,2 @@
+
+This portlet displays 'Hello world'

Added: z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/__init__.py
==============================================================================
--- (empty file)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/__init__.py     Sun Oct 16 
18:22:19 2005
@@ -0,0 +1 @@
+# This is a package

Added: z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/hello-icon.png
==============================================================================
Binary file. No diff available.

Added: z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/hello.py
==============================================================================
--- (empty file)
+++ z3lab/z3ecm/trunk/src/ecm/cpsskins/example1/hello.py        Sun Oct 16 
18:22:19 2005
@@ -0,0 +1,44 @@
+##############################################################################
+#
+# Copyright (c) 2005 Nuxeo and Contributors.
+# 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.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+__docformat__ = "reStructuredText"
+
+from zope.component import adapts
+from zope.interface import implements
+
+from cpsskins.elements.interfaces import IPortlet
+from cpsskins.elements.portlet import Portlet
+
+class IHelloPortlet(IPortlet):
+    """Interface for the 'hello world' portlet"""
+
+class HelloPortlet(Portlet):
+    """The Hello portlet always says 'Hello world'.
+
+    It is not configurable.
+    """
+    implements(IHelloPortlet)
+
+class HelloDisplayData(object):
+    """The portlet returns 'Hello world'.
+    """
+    adapts(IHelloPortlet, IContextInfo)
+    implements(IDisplayData)
+
+    def __call__(self, **kw):
+        return 'Hello world'
+
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to