src/pyams_utils/interfaces/intids.py
changeset 46 c9a917e7875c
child 419 05ff71a02b2d
equal deleted inserted replaced
45:e5252c302dbf 46:c9a917e7875c
       
     1 #
       
     2 # Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
       
     3 # All Rights Reserved.
       
     4 #
       
     5 # This software is subject to the provisions of the Zope Public License,
       
     6 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
       
     7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
       
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
       
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
       
    10 # FOR A PARTICULAR PURPOSE.
       
    11 #
       
    12 
       
    13 __docformat__ = 'restructuredtext'
       
    14 
       
    15 # import standard packages
       
    16 
       
    17 # import interfaces
       
    18 from zope.interface import Interface
       
    19 
       
    20 # import packages
       
    21 from zope.schema import TextLine, Int
       
    22 
       
    23 
       
    24 #
       
    25 # Generic interfaces
       
    26 #
       
    27 
       
    28 class IIndexLength(Interface):
       
    29     """Index length interface"""
       
    30 
       
    31     count = Int(title="Indexed elements count")
       
    32 
       
    33 
       
    34 class IUniqueID(Interface):
       
    35     """Interface used to get unique ID of an object"""
       
    36 
       
    37     oid = TextLine(title="Unique ID",
       
    38                    description="Globally unique identifier of this object can be used to create internal links",
       
    39                    readonly=True)