Package bscw :: Package api :: Module ap_lst_events
[hide private]

Module ap_lst_events

list events (used by portal widgets)

   If sort is None: events are sorted by hierarchy
   If period is None: no period is applied
   If flter is None: no filter is applied
      filter may be set to the following (string) values:
       all | others | new | newothers
   If attributes is empty: default attributes are returned
   If maxcount is not 0: return no more than 'maxcount' entries
   If offset is not 0: return items starting from 'offset'
   If modified is not 0:
      return items with last-modified date > 'modified' (UTC timestamp)

   returns list of events matching the query
      and the remaining events
      and the last modified time

   note: only unconfirmed events are considered

API definition::

 API = (('object_id', 'ASCII string', 1),
        ('sort', 'ASCII string', 0),
        ('period', 'ASCII string', 0),
        ('flter', 'ASCII string', 0),
        ('attributes', 'array', 0, [('item', 'ASCII string', 1)]),
        ('maxcount', 'int', 0),
        ('offset', 'int', 0),
        ('modified', 'double', 0))

(c) OrbiTeam Software, 2009-2010


Version: $Rev: 25268 $

Functions [hide private]
 
param_def()
return the parameter definition
 
return_def()
return the result definition
 
do_it(request, object_id, sort=None, period=None, flter=None, attributes=[], maxcount=0, offset=0, modified=0)
see above
 
list_events(request, obj, sort=None, period=None, flter=None, attributes=[], maxcount=0, offset=0, modified=0, etype='show_touches', raise_http304=True, allow_links=True)
 
_anchor_path_head(obj, allow_links=True)
return anchor'ed path to object (w/o object itself) cf.
 
get_events(request, obj, etype, nested=False, time=None, service_id=0, raise_http304=True, allow_links=True)
return a filtered list of events and the last modified time
 
event_list(events, preferred_obj=None, allow_links=True)
 
object_events(obj, user_prefs=None, etype=None, time=None, allow_links=True)
 
touch_events(obj, user_prefs, etype=None, time=None, nested=0, service_id=0, allow_links=True)
Variables [hide private]
  log_api = logging.getLogger('api')
  ignore_CantCommit = True
  default_attributes = ['eicon', 'eid', 'ename', 'link', 'oid', ...
  FILTER_OTHER = 'other'
  FILTER_OWN = 'own'
  FILTER_NEW = 'new'
  __package__ = 'bscw.api'
Function Details [hide private]

_anchor_path_head(obj, allow_links=True)

 

return anchor'ed path to object (w/o object itself) cf. get_attributes param 'anchor_path_head'


Variables Details [hide private]

default_attributes

Value:
['eicon',
 'eid',
 'ename',
 'link',
 'oid',
 'oicon',
 'summary',
 'time',
...