# HG changeset patch # User Thierry Florac # Date 1444232762 -7200 # Node ID c9a917e7875c581422394f301466afc088b5daee # Parent e5252c302dbf2f42b9d59ab753144cf9bf0f4585 Moved IIntIds related interfaces diff -r e5252c302dbf -r c9a917e7875c 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 +# 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)