Package platecom :: Package utils :: Module interfaces
[hide private]
[frames] | no frames]

Source Code for Module iccommunity.core.interfaces

  1  ############################################################################## 
  2  # 
  3  # Copyright (c) 2005 Zope Corporation and Contributors. 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  """ iccommunity.core interfaces. 
 14  """ 
 15  # pylint: disable-msg=W0232,R0903 
 16   
 17  from zope import schema 
 18  from zope.interface import Interface 
 19  from zope.schema.fieldproperty import FieldProperty 
 20   
 21  from platecom.utils.i18n import _ 
 22   
23 -class IicCommunitySite(Interface):
24 """ represents a platecom installation, should be a local site 25 with local components installed 26 """
27
28 -class IPlatecomConfiglet(Interface):
29 """ platecom configlet 30 """
31
32 -class IPlatecomManagementContentTypes( Interface ):
33 34 fallback_types = schema.List(title = _(u"Fallback Content Types"), 35 required = False, 36 default = [], 37 description = _(u"Content Types with language fallback capabilities"), 38 value_type=schema.Choice(vocabulary="plone.content_types"))
39
40 -class ILanguagesManager(Interface):
41 """ 42 43 """ 44
45 - def listCurrentUserLanguages(self):
46 """ 47 """
48
49 - def listUserLanguages(self, user_id):
50 """ 51 """
52
53 - def storeUserLanguages(self, user_id, languages):
54 """ 55 """
56
57 -class IMultilingualContentMarker(Interface):
58 """ Marker para un ContentType que tiene 59 getters multilingües 60 """
61
62 -class IMultilingualGettersMarker(Interface):
63 """ Marker para un ContentType que tiene 64 getters multilingües en lugar de los 65 originales de archetypes 66 """
67
68 -class IContentTypesMultilingualPatcher(Interface):
69 """ Utility para aplicar los parches de soporte multilenguaje 70 a un ContentType en particular 71 """
72 - def patch(self, klass):
73 """ Incorpora los metodos con fallback multilingüe 74 """
75
76 - def unpatch(self, klass):
77 """ Remueve los metodos con fallback multilingüe 78 """
79
80 -class IFieldEmptiness( Interface ):
81 """ Emptiness adapter. 82 """ 83
84 - def __call__(self, instance):
85 """ 86 """
87
88 -class IPlatecomManagementThesaurusUpload( Interface ):
89 """ Interface used for a thesaurus file upload. 90 """ 91 92 thesaurus_file = schema.Bytes(title = _(u"Thesaurus file"), 93 required = True, 94 description = _(u"A thesaurus file located in your computer")) 95 default_language = schema.Choice(title = _(u"Default language"), 96 required = True, 97 default = "en", 98 description = _(u"If term have no language is defined as this language"), 99 vocabulary="plone.languages") 100 context = schema.TextLine(title = _(u"Context"), 101 required = False) #When updated will be required
102