Author: jmorliaguet
Date: Mon Nov 21 21:07:01 2005
New Revision: 1916

Added:
   cpsskins/branches/jmo-perspectives/perspectives/README.txt   (contents, 
props changed)
   cpsskins/branches/jmo-perspectives/perspectives/perspective.py   (contents, 
props changed)
Modified:
   cpsskins/branches/jmo-perspectives/perspectives/__init__.py
Log:


- import fixup



Added: cpsskins/branches/jmo-perspectives/perspectives/README.txt
==============================================================================
--- (empty file)
+++ cpsskins/branches/jmo-perspectives/perspectives/README.txt  Mon Nov 21 
21:07:01 2005
@@ -0,0 +1,9 @@
+
+============
+PERSPECTIVES
+============
+
+Perspectives are a generalization of the concept of "context".
+
+The application or parts of the application behave differently depending on
+the perspective. Perspectives are only names, they contain no data.

Modified: cpsskins/branches/jmo-perspectives/perspectives/__init__.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/perspectives/__init__.py (original)
+++ cpsskins/branches/jmo-perspectives/perspectives/__init__.py Mon Nov 21 
21:07:01 2005
@@ -17,47 +17,5 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.interface import implements
-
-from cpsskins import configuration
-from cpsskins.setup.resources import ResourceManager
-from interfaces import IPerspective
-
-class Perspective(object):
-    """A perspective
-
-    >>> perspective = Perspective(name='cpsskins.perspective')
-    >>> perspective
-    <Perspective: 'cpsskins.perspective'>
-
-    """
-    implements(IPerspective)
-
-    def __init__(self, name=u'', title=u''):
-        self.name = name
-        self.title = title
-
-    def __repr__(self):
-        return "<Perspective: '%s'>" % str(self)
-
-    def __str__(self):
-        return self.name
-
-    def __eq__(self, other):
-        return str(self) == other
-
-class Relatable(object):
-    """This adapter makes perspectives relatable.
-    """
-    def __init__(self, context):
-        self.context = context
-
-    def __str__(self):
-        return str(self.context)
-
-class Resources(ResourceManager):
-    """This adapter makes perspectives usable as resources
-    """
-    setting_type = configuration.IPerspective
-    setting_factory = configuration.Perspective
+from cpsskins.perspectives.perspective import Perspective, Relatable, Resources
 

Added: cpsskins/branches/jmo-perspectives/perspectives/perspective.py
==============================================================================
--- (empty file)
+++ cpsskins/branches/jmo-perspectives/perspectives/perspective.py      Mon Nov 
21 21:07:01 2005
@@ -0,0 +1,63 @@
+##############################################################################
+#
+# 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.interface import implements
+
+from cpsskins import configuration
+from cpsskins.setup.resources import ResourceManager
+from cpsskins.perspectives.interfaces import IPerspective
+
+class Perspective(object):
+    """A perspective
+
+    >>> perspective = Perspective(name='cpsskins.perspective')
+    >>> perspective
+    <Perspective: 'cpsskins.perspective'>
+
+    """
+    implements(IPerspective)
+
+    def __init__(self, name=u'', title=u''):
+        self.name = name
+        self.title = title
+
+    def __repr__(self):
+        return "<Perspective: '%s'>" % str(self)
+
+    def __str__(self):
+        return self.name
+
+    def __eq__(self, other):
+        return str(self) == other
+
+class Relatable(object):
+    """This adapter makes perspectives relatable.
+    """
+    def __init__(self, context):
+        self.context = context
+
+    def __str__(self):
+        return str(self.context)
+
+class Resources(ResourceManager):
+    """This adapter makes perspectives usable as resources
+    """
+    setting_type = configuration.IPerspective
+    setting_factory = configuration.Perspective
+
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to