comparison sat/plugins/plugin_exp_pubsub_schema.py @ 2760:3480d4fdf83a

plugins XEP-0060, XEP-0313: implemented Order-By protoXEP: new "order_by" key can be used in extra data, value can be, for now, "creation" or "modification".
author Goffi <goffi@goffi.org>
date Sun, 06 Jan 2019 17:36:51 +0100
parents 56f94936df1e
children 003b8b4b56a7
comparison
equal deleted inserted replaced
2759:607cfc79e40f 2760:3480d4fdf83a
270 ) 270 )
271 d.addCallback(self._p.serItemsData) 271 d.addCallback(self._p.serItemsData)
272 return d 272 return d
273 273
274 @defer.inlineCallbacks 274 @defer.inlineCallbacks
275 def getDataFormItems( 275 def getDataFormItems(self, client, service, nodeIdentifier, schema=None,
276 self, 276 max_items=None, item_ids=None, sub_id=None, rsm_request=None,
277 client, 277 extra=None, default_node=None, form_ns=None, filters=None):
278 service,
279 nodeIdentifier,
280 schema=None,
281 max_items=None,
282 item_ids=None,
283 sub_id=None,
284 rsm_request=None,
285 extra=None,
286 default_node=None,
287 form_ns=None,
288 filters=None,
289 ):
290 """Get items known as being data forms, and convert them to XMLUI 278 """Get items known as being data forms, and convert them to XMLUI
291 279
292 @param schema(domish.Element, data_form.Form, None): schema of the node if known 280 @param schema(domish.Element, data_form.Form, None): schema of the node if known
293 if None, it will be retrieved from node 281 if None, it will be retrieved from node
294 @param default_node(unicode): node to use if nodeIdentifier is None or empty 282 @param default_node(unicode): node to use if nodeIdentifier is None or empty
497 sub_id = None 485 sub_id = None
498 extra = self._p.parseExtra(extra_dict) 486 extra = self._p.parseExtra(extra_dict)
499 487
500 return client, service, node, max_items, extra, sub_id 488 return client, service, node, max_items, extra, sub_id
501 489
502 def _get( 490 def _get(self, service="", node="", max_items=10, item_ids=None, sub_id=None,
503 self, 491 extra=None, default_node=None, form_ns=None, filters=None,
504 service="", 492 profile_key=C.PROF_KEY_NONE):
505 node="",
506 max_items=10,
507 item_ids=None,
508 sub_id=None,
509 extra=None,
510 default_node=None,
511 form_ns=None,
512 filters=None,
513 profile_key=C.PROF_KEY_NONE,
514 ):
515 """Bridge method to retrieve data from node with schema 493 """Bridge method to retrieve data from node with schema
516 494
517 this method is a helper so dependant plugins can use it directly 495 this method is a helper so dependant plugins can use it directly
518 when adding *Get methods 496 when adding *Get methods
519 extra can have the key "labels_as_list" which is a hack to convert 497 extra can have the key "labels_as_list" which is a hack to convert