author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Fri, 02 Jul 2010 14:44:23 +0200 | |
branch | stable |
changeset 5864 | 9b7c11e80d20 |
parent 5424 | 8ecbcbff9777 |
child 5556 | 9ab2b4c74baf |
permissions | -rw-r--r-- |
5421
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
1 |
# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
2 |
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
3 |
# |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
4 |
# This file is part of CubicWeb. |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
5 |
# |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
6 |
# CubicWeb is free software: you can redistribute it and/or modify it under the |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
7 |
# terms of the GNU Lesser General Public License as published by the Free |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
8 |
# Software Foundation, either version 2.1 of the License, or (at your option) |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
9 |
# any later version. |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
10 |
# |
5424
8ecbcbff9777
replace logilab-common by CubicWeb in disclaimer
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5421
diff
changeset
|
11 |
# CubicWeb is distributed in the hope that it will be useful, but WITHOUT |
5421
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
13 |
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
14 |
# details. |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
15 |
# |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
16 |
# You should have received a copy of the GNU Lesser General Public License along |
8167de96c523
proper licensing information (LGPL-2.1). Hope I get it right this time.
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
5309
diff
changeset
|
17 |
# with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
5309
e8567135a927
[doc/book] fix docstrings, add notes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4936
diff
changeset
|
18 |
""" |
e8567135a927
[doc/book] fix docstrings, add notes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4936
diff
changeset
|
19 |
Standard interfaces. |
0 | 20 |
|
5309
e8567135a927
[doc/book] fix docstrings, add notes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4936
diff
changeset
|
21 |
.. note:: |
e8567135a927
[doc/book] fix docstrings, add notes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4936
diff
changeset
|
22 |
|
e8567135a927
[doc/book] fix docstrings, add notes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4936
diff
changeset
|
23 |
The `implements` selector matches not only entity classes but also |
e8567135a927
[doc/book] fix docstrings, add notes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4936
diff
changeset
|
24 |
their interfaces. Writing __select__ = implements('IGeocodable') is |
e8567135a927
[doc/book] fix docstrings, add notes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4936
diff
changeset
|
25 |
a perfectly fine thing to do. |
0 | 26 |
""" |
27 |
__docformat__ = "restructuredtext en" |
|
28 |
||
29 |
from logilab.common.interface import Interface |
|
30 |
||
31 |
class IEmailable(Interface): |
|
32 |
"""interface for emailable entities""" |
|
1553 | 33 |
|
0 | 34 |
def get_email(self): |
35 |
"""return email address""" |
|
36 |
||
37 |
@classmethod |
|
38 |
def allowed_massmail_keys(cls): |
|
39 |
"""returns a set of allowed email substitution keys |
|
40 |
||
41 |
The default is to return the entity's attribute list but an |
|
42 |
entity class might override this method to allow extra keys. |
|
43 |
For instance, the Person class might want to return a `companyname` |
|
44 |
key. |
|
45 |
""" |
|
46 |
||
47 |
def as_email_context(self): |
|
48 |
"""returns the dictionary as used by the sendmail controller to |
|
49 |
build email bodies. |
|
1553 | 50 |
|
0 | 51 |
NOTE: the dictionary keys should match the list returned by the |
52 |
`allowed_massmail_keys` method. |
|
53 |
""" |
|
54 |
||
55 |
||
56 |
class IWorkflowable(Interface): |
|
57 |
"""interface for entities dealing with a specific workflow""" |
|
2920
64322aa83a1d
start a new workflow engine
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2747
diff
changeset
|
58 |
# XXX to be completed, see cw.entities.wfobjs.WorkflowableMixIn |
0 | 59 |
|
60 |
@property |
|
61 |
def state(self): |
|
2920
64322aa83a1d
start a new workflow engine
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2747
diff
changeset
|
62 |
"""return current state name""" |
0 | 63 |
|
64 |
def change_state(self, stateeid, trcomment=None, trcommentformat=None): |
|
2920
64322aa83a1d
start a new workflow engine
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2747
diff
changeset
|
65 |
"""change the entity's state to the state of the given name in entity's |
64322aa83a1d
start a new workflow engine
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2747
diff
changeset
|
66 |
workflow |
0 | 67 |
""" |
1553 | 68 |
|
0 | 69 |
def latest_trinfo(self): |
70 |
"""return the latest transition information for this entity |
|
71 |
""" |
|
72 |
||
2920
64322aa83a1d
start a new workflow engine
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2747
diff
changeset
|
73 |
|
0 | 74 |
class IProgress(Interface): |
75 |
"""something that has a cost, a state and a progression |
|
76 |
||
4023
eae23c40627a
drop common subpackage
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3635
diff
changeset
|
77 |
Take a look at cubicweb.mixins.ProgressMixIn for some |
0 | 78 |
default implementations |
79 |
""" |
|
80 |
||
81 |
@property |
|
82 |
def cost(self): |
|
83 |
"""the total cost""" |
|
84 |
||
85 |
@property |
|
86 |
def done(self): |
|
87 |
"""what is already done""" |
|
88 |
||
89 |
@property |
|
90 |
def todo(self): |
|
91 |
"""what remains to be done""" |
|
1553 | 92 |
|
0 | 93 |
def progress_info(self): |
94 |
"""returns a dictionary describing progress/estimated cost of the |
|
95 |
version. |
|
96 |
||
4936
a4b772a0d801
Fixed some of the documentation warnings when building the book with sphinx.
Adrien Chauve <adrien.chauve@logilab.fr>
parents:
4252
diff
changeset
|
97 |
- mandatory keys are (''estimated', 'done', 'todo') |
a4b772a0d801
Fixed some of the documentation warnings when building the book with sphinx.
Adrien Chauve <adrien.chauve@logilab.fr>
parents:
4252
diff
changeset
|
98 |
|
a4b772a0d801
Fixed some of the documentation warnings when building the book with sphinx.
Adrien Chauve <adrien.chauve@logilab.fr>
parents:
4252
diff
changeset
|
99 |
- optional keys are ('notestimated', 'notestimatedcorrected', |
a4b772a0d801
Fixed some of the documentation warnings when building the book with sphinx.
Adrien Chauve <adrien.chauve@logilab.fr>
parents:
4252
diff
changeset
|
100 |
'estimatedcorrected') |
a4b772a0d801
Fixed some of the documentation warnings when building the book with sphinx.
Adrien Chauve <adrien.chauve@logilab.fr>
parents:
4252
diff
changeset
|
101 |
|
a4b772a0d801
Fixed some of the documentation warnings when building the book with sphinx.
Adrien Chauve <adrien.chauve@logilab.fr>
parents:
4252
diff
changeset
|
102 |
'noestimated' and 'notestimatedcorrected' should default to 0 |
a4b772a0d801
Fixed some of the documentation warnings when building the book with sphinx.
Adrien Chauve <adrien.chauve@logilab.fr>
parents:
4252
diff
changeset
|
103 |
'estimatedcorrected' should default to 'estimated' |
a4b772a0d801
Fixed some of the documentation warnings when building the book with sphinx.
Adrien Chauve <adrien.chauve@logilab.fr>
parents:
4252
diff
changeset
|
104 |
""" |
0 | 105 |
|
106 |
def finished(self): |
|
107 |
"""returns True if status is finished""" |
|
108 |
||
109 |
def in_progress(self): |
|
110 |
"""returns True if status is not finished""" |
|
111 |
||
112 |
def progress(self): |
|
113 |
"""returns the % progress of the task item""" |
|
1553 | 114 |
|
115 |
||
0 | 116 |
class IMileStone(IProgress): |
117 |
"""represents an ITask's item""" |
|
1553 | 118 |
|
0 | 119 |
parent_type = None # specify main task's type |
1553 | 120 |
|
0 | 121 |
def get_main_task(self): |
122 |
"""returns the main ITask entity""" |
|
123 |
||
124 |
def initial_prevision_date(self): |
|
125 |
"""returns the initial expected end of the milestone""" |
|
1553 | 126 |
|
0 | 127 |
def eta_date(self): |
128 |
"""returns expected date of completion based on what remains |
|
129 |
to be done |
|
130 |
""" |
|
131 |
||
132 |
def completion_date(self): |
|
133 |
"""returns date on which the subtask has been completed""" |
|
134 |
||
135 |
def contractors(self): |
|
136 |
"""returns the list of persons supposed to work on this task""" |
|
137 |
||
138 |
||
139 |
class ITree(Interface): |
|
140 |
||
141 |
def parent(self): |
|
142 |
"""returns the parent entity""" |
|
143 |
||
144 |
def children(self): |
|
145 |
"""returns the item's children""" |
|
146 |
||
2747
4f9ffcd8d5a2
cleanup docstring, add actually used method to the ITree interface
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2135
diff
changeset
|
147 |
def children_rql(self): |
4f9ffcd8d5a2
cleanup docstring, add actually used method to the ITree interface
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2135
diff
changeset
|
148 |
"""XXX returns RQL to get children""" |
4f9ffcd8d5a2
cleanup docstring, add actually used method to the ITree interface
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2135
diff
changeset
|
149 |
|
3635
a56759c3c99f
do not override __iter__ on entities
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2920
diff
changeset
|
150 |
def iterchildren(self): |
0 | 151 |
"""iterates over the item's children""" |
1553 | 152 |
|
0 | 153 |
def is_leaf(self): |
154 |
"""returns true if this node as no child""" |
|
155 |
||
156 |
def is_root(self): |
|
157 |
"""returns true if this node has no parent""" |
|
158 |
||
159 |
def root(self): |
|
2747
4f9ffcd8d5a2
cleanup docstring, add actually used method to the ITree interface
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2135
diff
changeset
|
160 |
"""returns the root object""" |
0 | 161 |
|
162 |
||
163 |
## web specific interfaces #################################################### |
|
164 |
||
165 |
||
166 |
class IPrevNext(Interface): |
|
167 |
"""interface for entities which can be linked to a previous and/or next |
|
168 |
entity |
|
169 |
""" |
|
1553 | 170 |
|
0 | 171 |
def next_entity(self): |
172 |
"""return the 'next' entity""" |
|
173 |
def previous_entity(self): |
|
174 |
"""return the 'previous' entity""" |
|
175 |
||
176 |
||
177 |
class IBreadCrumbs(Interface): |
|
178 |
"""interface for entities which can be "located" on some path""" |
|
1553 | 179 |
|
5309
e8567135a927
[doc/book] fix docstrings, add notes
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4936
diff
changeset
|
180 |
# XXX fix recurs ! |
0 | 181 |
def breadcrumbs(self, view, recurs=False): |
182 |
"""return a list containing some: |
|
1553 | 183 |
|
0 | 184 |
* tuple (url, label) |
185 |
* entity |
|
186 |
* simple label string |
|
187 |
||
188 |
defining path from a root to the current view |
|
189 |
||
190 |
the main view is given as argument so breadcrumbs may vary according |
|
191 |
to displayed view (may be None). When recursing on a parent entity, |
|
192 |
the `recurs` argument should be set to True. |
|
193 |
""" |
|
194 |
||
195 |
||
196 |
class IDownloadable(Interface): |
|
197 |
"""interface for downloadable entities""" |
|
1553 | 198 |
|
0 | 199 |
def download_url(self): # XXX not really part of this interface |
200 |
"""return an url to download entity's content""" |
|
201 |
def download_content_type(self): |
|
202 |
"""return MIME type of the downloadable content""" |
|
203 |
def download_encoding(self): |
|
204 |
"""return encoding of the downloadable content""" |
|
205 |
def download_file_name(self): |
|
206 |
"""return file name of the downloadable content""" |
|
207 |
def download_data(self): |
|
208 |
"""return actual data of the downloadable content""" |
|
209 |
||
210 |
||
211 |
class IEmbedable(Interface): |
|
212 |
"""interface for embedable entities""" |
|
1553 | 213 |
|
0 | 214 |
def embeded_url(self): |
215 |
"""embed action interface""" |
|
1553 | 216 |
|
0 | 217 |
class ICalendarable(Interface): |
767 | 218 |
"""interface for items that do have a begin date 'start' and an end date 'stop' |
1553 | 219 |
""" |
220 |
||
2135
55fc8b488907
[interfaces] describe more explicitly what should be implemente in the ICalendarable interface
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1977
diff
changeset
|
221 |
@property |
55fc8b488907
[interfaces] describe more explicitly what should be implemente in the ICalendarable interface
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1977
diff
changeset
|
222 |
def start(self): |
55fc8b488907
[interfaces] describe more explicitly what should be implemente in the ICalendarable interface
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1977
diff
changeset
|
223 |
"""return start date""" |
55fc8b488907
[interfaces] describe more explicitly what should be implemente in the ICalendarable interface
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1977
diff
changeset
|
224 |
|
55fc8b488907
[interfaces] describe more explicitly what should be implemente in the ICalendarable interface
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1977
diff
changeset
|
225 |
@property |
55fc8b488907
[interfaces] describe more explicitly what should be implemente in the ICalendarable interface
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1977
diff
changeset
|
226 |
def stop(self): |
55fc8b488907
[interfaces] describe more explicitly what should be implemente in the ICalendarable interface
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1977
diff
changeset
|
227 |
"""return stop state""" |
55fc8b488907
[interfaces] describe more explicitly what should be implemente in the ICalendarable interface
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1977
diff
changeset
|
228 |
|
0 | 229 |
class ICalendarViews(Interface): |
230 |
"""calendar views interface""" |
|
231 |
def matching_dates(self, begin, end): |
|
232 |
""" |
|
233 |
:param begin: day considered as begin of the range (`DateTime`) |
|
234 |
:param end: day considered as end of the range (`DateTime`) |
|
1553 | 235 |
|
0 | 236 |
:return: |
237 |
a list of dates (`DateTime`) in the range [`begin`, `end`] on which |
|
238 |
this entity apply |
|
239 |
""" |
|
1553 | 240 |
|
0 | 241 |
class ITimetableViews(Interface): |
242 |
"""timetable views interface""" |
|
243 |
def timetable_date(self): |
|
244 |
"""XXX explain |
|
1553 | 245 |
|
0 | 246 |
:return: date (`DateTime`) |
247 |
""" |
|
248 |
||
249 |
class IGeocodable(Interface): |
|
250 |
"""interface required by geocoding views such as gmap-view""" |
|
251 |
||
252 |
@property |
|
253 |
def latitude(self): |
|
254 |
"""returns the latitude of the entity""" |
|
255 |
||
256 |
@property |
|
257 |
def longitude(self): |
|
258 |
"""returns the longitude of the entity""" |
|
259 |
||
260 |
def marker_icon(self): |
|
261 |
"""returns the icon that should be used as the marker |
|
262 |
(returns None for default) |
|
263 |
""" |
|
1553 | 264 |
|
125
979dbe0cade3
views with rss feed
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
0
diff
changeset
|
265 |
class IFeed(Interface): |
979dbe0cade3
views with rss feed
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
0
diff
changeset
|
266 |
"""interface for entities with rss flux""" |
1553 | 267 |
|
125
979dbe0cade3
views with rss feed
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
0
diff
changeset
|
268 |
def rss_feed_url(self): |
979dbe0cade3
views with rss feed
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
0
diff
changeset
|
269 |
"""return an url which layout sub-entities item |
979dbe0cade3
views with rss feed
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
0
diff
changeset
|
270 |
""" |
1553 | 271 |
|
990
5f1ff5b6907a
ISiocItem is an interface that is implemented by 'post' entities (in sioc specification) i.e blogentry, mail ...
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
626
diff
changeset
|
272 |
class ISiocItem(Interface): |
5f1ff5b6907a
ISiocItem is an interface that is implemented by 'post' entities (in sioc specification) i.e blogentry, mail ...
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
626
diff
changeset
|
273 |
"""interface for entities (which are item |
5f1ff5b6907a
ISiocItem is an interface that is implemented by 'post' entities (in sioc specification) i.e blogentry, mail ...
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
626
diff
changeset
|
274 |
in sioc specification) with sioc views""" |
1553 | 275 |
|
993
c1ce4c3a7c8f
removing useless method for interfaces ISiocItem and ISiocContainer.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
990
diff
changeset
|
276 |
def isioc_content(self): |
990
5f1ff5b6907a
ISiocItem is an interface that is implemented by 'post' entities (in sioc specification) i.e blogentry, mail ...
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
626
diff
changeset
|
277 |
"""return content entity""" |
5f1ff5b6907a
ISiocItem is an interface that is implemented by 'post' entities (in sioc specification) i.e blogentry, mail ...
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
626
diff
changeset
|
278 |
|
993
c1ce4c3a7c8f
removing useless method for interfaces ISiocItem and ISiocContainer.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
990
diff
changeset
|
279 |
def isioc_container(self): |
1199
7fa66717175b
fixing isioc_type comment
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
994
diff
changeset
|
280 |
"""return container entity""" |
7fa66717175b
fixing isioc_type comment
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
994
diff
changeset
|
281 |
|
7fa66717175b
fixing isioc_type comment
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
994
diff
changeset
|
282 |
def isioc_type(self): |
7fa66717175b
fixing isioc_type comment
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
994
diff
changeset
|
283 |
"""return container type (post, BlogPost, MailMessage)""" |
7fa66717175b
fixing isioc_type comment
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
994
diff
changeset
|
284 |
|
7fa66717175b
fixing isioc_type comment
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
994
diff
changeset
|
285 |
def isioc_replies(self): |
1553 | 286 |
"""return replies items""" |
1199
7fa66717175b
fixing isioc_type comment
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
994
diff
changeset
|
287 |
|
7fa66717175b
fixing isioc_type comment
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
994
diff
changeset
|
288 |
def isioc_topics(self): |
7fa66717175b
fixing isioc_type comment
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
994
diff
changeset
|
289 |
"""return topics items""" |
1553 | 290 |
|
990
5f1ff5b6907a
ISiocItem is an interface that is implemented by 'post' entities (in sioc specification) i.e blogentry, mail ...
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
626
diff
changeset
|
291 |
class ISiocContainer(Interface): |
5f1ff5b6907a
ISiocItem is an interface that is implemented by 'post' entities (in sioc specification) i.e blogentry, mail ...
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
626
diff
changeset
|
292 |
"""interface for entities (which are container |
5f1ff5b6907a
ISiocItem is an interface that is implemented by 'post' entities (in sioc specification) i.e blogentry, mail ...
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
626
diff
changeset
|
293 |
in sioc specification) with sioc views""" |
5f1ff5b6907a
ISiocItem is an interface that is implemented by 'post' entities (in sioc specification) i.e blogentry, mail ...
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
626
diff
changeset
|
294 |
|
993
c1ce4c3a7c8f
removing useless method for interfaces ISiocItem and ISiocContainer.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
990
diff
changeset
|
295 |
def isioc_type(self): |
1199
7fa66717175b
fixing isioc_type comment
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
994
diff
changeset
|
296 |
"""return container type (forum, Weblog, MailingList)""" |
7fa66717175b
fixing isioc_type comment
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
994
diff
changeset
|
297 |
|
7fa66717175b
fixing isioc_type comment
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
994
diff
changeset
|
298 |
def isioc_items(self): |
7fa66717175b
fixing isioc_type comment
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
994
diff
changeset
|
299 |
"""return contained items""" |