src/pyams_utils/interfaces/inherit.py
changeset 128 5b80ba4fba8e
child 163 e6aad36fefc3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_utils/interfaces/inherit.py	Fri Jan 26 15:30:56 2018 +0100
@@ -0,0 +1,44 @@
+#
+# 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 library
+
+# import interfaces
+from pyramid.interfaces import ILocation
+
+# import packages
+from zope.interface import Attribute
+from zope.schema import Bool
+
+from pyams_utils import _
+
+
+class IInheritInfo(ILocation):
+    """Inheritance info"""
+
+    adapted_interface = Attribute("Context or parent adapted interface")
+
+    target_interface = Attribute("Parent target interface")
+
+    parent = Attribute("First parent supporting target interface")
+
+    can_inherit = Attribute("Can inherit from parent?")
+
+    inherit = Bool(title=_("Inherit from parent?"),
+                   required=False,
+                   default=True)
+
+    no_inherit = Bool(title=_("Don't inherit from parent?"),
+                      required=False,
+                      default=False)