205 cardinality = '**' |
205 cardinality = '**' |
206 symmetric = True |
206 symmetric = True |
207 # NOTE: the 'object = ExternalUri' declaration will still be mandatory |
207 # NOTE: the 'object = ExternalUri' declaration will still be mandatory |
208 # in the cube's schema. |
208 # in the cube's schema. |
209 object = 'ExternalUri' |
209 object = 'ExternalUri' |
210 |
|
211 |
|
212 class CWCache(EntityType): |
|
213 """a simple cache entity characterized by a name and |
|
214 a validity date. |
|
215 |
|
216 The target application is responsible for updating timestamp |
|
217 when necessary to invalidate the cache (typically in hooks). |
|
218 |
|
219 Also, checkout the AppObject.get_cache() method. |
|
220 """ |
|
221 # XXX only handle by hooks, shouldn't be readable/editable at all through |
|
222 # the ui and so no permissions should be granted, no? |
|
223 __permissions__ = { |
|
224 'read': ('managers', 'users', 'guests'), |
|
225 'add': ('managers',), |
|
226 'update': ('managers', 'users',), # XXX |
|
227 'delete': ('managers',), |
|
228 } |
|
229 |
|
230 name = String(required=True, unique=True, maxsize=128, |
|
231 description=_('name of the cache')) |
|
232 timestamp = TZDatetime(default='NOW') |
|
233 |
210 |
234 |
211 |
235 class CWSource(EntityType): |
212 class CWSource(EntityType): |
236 __permissions__ = { |
213 __permissions__ = { |
237 'read': ('managers', 'users', 'guests'), |
214 'read': ('managers', 'users', 'guests'), |