Moved IIntIds related interfaces
authorThierry Florac <thierry.florac@onf.fr>
Wed, 07 Oct 2015 17:46:02 +0200
changeset 46 c9a917e7875c
parent 45 e5252c302dbf
child 47 2b580a3b2142
Moved IIntIds related interfaces
src/pyams_utils/interfaces/intids.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_utils/interfaces/intids.py	Wed Oct 07 17:46:02 2015 +0200
@@ -0,0 +1,39 @@
+#
+# 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 zope.interface import Interface
+
+# import packages
+from zope.schema import TextLine, Int
+
+
+#
+# Generic interfaces
+#
+
+class IIndexLength(Interface):
+    """Index length interface"""
+
+    count = Int(title="Indexed elements count")
+
+
+class IUniqueID(Interface):
+    """Interface used to get unique ID of an object"""
+
+    oid = TextLine(title="Unique ID",
+                   description="Globally unique identifier of this object can be used to create internal links",
+                   readonly=True)