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

Module ap_get_attributenames

get attributenames of object type as list.

   if display_only is set to True, only return 'useful' attributes to be
   displayed to the user.

API definition::

 API = (('classname', 'ASCII string', 1),
        ('get', 'boolean', 0),
        ('info', 'boolean', 0),
        ('admin', 'boolean', 0),
        ('display_only', 'boolean', 0))

Fraunhofer FIT and OrbiTeam Software, (c) 2002-2010


Version: $Rev: 22573 $

Functions [hide private]
 
param_def()
return the parameter definition
 
return_def()
return the result definition
 
do_it(request, classname, get=1, info=1, admin=0, display_only=False)
see above
 
add_filtered(names, class_, get, display_only)
 
lookup_class(class_, get)
Looks up the attributes for the given class in the given attribute map.
 
get_attributenames(request, class_, get=1, info=1, admin=0, display_only=False)
get attributenames of object type as list.
Variables [hide private]
  _ARTIFACT_ATTRIBUTES = (('__class__', 0), ('name', 1))
  _ARTIFACT_ATTRIBUTES_GET = (('__id__', 1), ('descr', 1), ('not...
  _ARTIFACT_ATTRIBUTES_INFO = (('access', 0), ('atime', 1), ('co...
  _ARTIFACT_ATTRIBUTES_ADMIN = ()
  _ATTRIBUTES = {'Artifact': (('__class__', 0), ('name', 1))}
  _ATTRIBUTES_GET = {'Appointment': (('__id__', 1), ('descr', 1)...
  _ATTRIBUTES_INFO = {'Artifact': (('access', 0), ('atime', 1), ...
  _ATTRIBUTES_ADMIN = {'Artifact': ()}
  __package__ = 'bscw.api'
Function Details [hide private]

lookup_class(class_, get)

 

Looks up the attributes for the given class in the given attribute map. If the class is not contained, look for the father class (depth search)!

get_attributenames(request, class_, get=1, info=1, admin=0, display_only=False)

 

get attributenames of object type as list. Parent classes are searched, if not found in ATTRIBUTE tables (see also lookup_class()). If class_ is an `instance', we use its __class_ attribute


Variables Details [hide private]

_ARTIFACT_ATTRIBUTES_GET

Value:
(('__id__', 1),
 ('descr', 1),
 ('notes', 1),
 ('bound_sub_artifacts', 0))

_ARTIFACT_ATTRIBUTES_INFO

Value:
(('access', 0),
 ('atime', 1),
 ('containers', 1),
 ('createEvent', 0),
 ('creator', 1),
 ('ctime', 1),
 ('is_public', 0),
 ('is_shared', 0),
...

_ATTRIBUTES_GET

Value:
{'Appointment': (('__id__', 1),
                 ('descr', 1),
                 ('notes', 1),
                 ('bound_sub_artifacts', 0),
                 ('attendees', 0),
                 ('categ', 0),
                 ('categories', 0),
                 ('end', 0),
...

_ATTRIBUTES_INFO

Value:
{'Artifact': (('access', 0),
              ('atime', 1),
              ('containers', 1),
              ('createEvent', 0),
              ('creator', 1),
              ('ctime', 1),
              ('is_public', 0),
              ('is_shared', 0),
...