comparison sat_pubsub/iidavoll.py @ 265:89493845d3dd

fix the method signatures of iidavoll.ILeafNode and memory_storage.LeafNode according to pgsql_storage.LeafNode
author souliane <souliane@mailoo.org>
date Sat, 22 Feb 2014 08:04:09 +0100
parents 9dfd3890e646
children 8a71486c3e95
comparison
equal deleted inserted replaced
264:86e767dc6abb 265:89493845d3dd
535 @return: deferred that fires with a C{list} of ids of the items that 535 @return: deferred that fires with a C{list} of ids of the items that
536 were deleted 536 were deleted
537 """ 537 """
538 538
539 539
540 def getItems(maxItems=None): 540 def getItems(authorized_groups, unrestricted, maxItems=None):
541 """ 541 """ Get all authorised items
542 Get items. 542 If C{maxItems} is not given, all authorised items in the node are returned,
543
544 If C{maxItems} is not given, all items in the node are returned,
545 just like C{getItemsById}. Otherwise, C{maxItems} limits 543 just like C{getItemsById}. Otherwise, C{maxItems} limits
546 the returned items to a maximum of that number of most recently 544 the returned items to a maximum of that number of most recently
547 published items. 545 published and authorised items.
548 546
547 @param authorized_groups: we want to get items that these groups can access
548 @param unrestricted: if true, don't check permissions (i.e.: get all items)
549 @param maxItems: if given, a natural number (>0) that limits the 549 @param maxItems: if given, a natural number (>0) that limits the
550 returned number of items. 550 returned number of items.
551 @return: deferred that fires with a C{list} of found items. 551 @return: deferred that fires a C{list} of (item, access_model, id)
552 """ 552 if unrestricted is True, else a C{list} of items.
553 553 """
554 554
555 def getItemsById(itemIdentifiers): 555
556 def getItemsById(authorized_groups, unrestricted, itemIdentifiers):
556 """ 557 """
557 Get items by item id. 558 Get items by item id.
558 559
559 Each item in the returned list is a unicode string that 560 Each item in the returned list is a unicode string that
560 represent the XML of the item as it was published, including the 561 represent the XML of the item as it was published, including the
561 item wrapper with item id. 562 item wrapper with item id.
562 563
564 @param authorized_groups: we want to get items that these groups can access
565 @param unrestricted: if true, don't check permissions
563 @param itemIdentifiers: C{list} of item ids. 566 @param itemIdentifiers: C{list} of item ids.
564 @return: deferred that fires with a C{list} of found items. 567 @return: deferred that fires a C{list} of (item, access_model, id)
568 if unrestricted is True, else a C{list} of items.
565 """ 569 """
566 570
567 571
568 def purge(): 572 def purge():
569 """ 573 """