61 |
except: |
except: |
62 |
self._database = "gnue" |
self._database = "gnue" |
63 |
self._lists = {} |
self._lists = {} |
|
self._classes = {} |
|
64 |
self._listcount=0 |
self._listcount=0 |
65 |
self._authAdapter = geasAuthentification.geasAuthAgent() |
self._authAdapter = geasAuthentification.geasAuthAgent() |
66 |
self._triggerMg = geasTrigger.geasPythonDBTriggerMg(self) |
self._triggerMg = geasTrigger.geasPythonDBTriggerMg(self) |
138 |
if hasattr(self._lists[l],"_datasource"): |
if hasattr(self._lists[l],"_datasource"): |
139 |
self._lists[l]._datasource.rollback() |
self._lists[l]._datasource.rollback() |
140 |
|
|
|
|
|
|
# --------------------------------------- |
|
|
# functions of the new RPC API |
|
|
# not well documented and still a subject of change |
|
|
# --------------------------------------- |
|
|
|
|
|
# --------------------------------------------------------------------------- |
|
|
# Get the BClass object for the given classname |
|
|
# --------------------------------------------------------------------------- |
|
|
|
|
|
def _getClass(self, classname): |
|
|
|
|
|
# if bclass already used, then continue to use the old one |
|
|
if self._bclasses.has_key(classname): |
|
|
return self._bclasses[classname] |
|
|
|
|
|
|
|
|
# build new bclass (Buisness Object Class Manager) |
|
|
|
|
|
# Authentification |
|
|
# TODO: use getRole (n.i.y.) function instead |
|
|
if not self._authAdapter.hasAccess (self, self._user, classname): |
|
|
raise Error,'Class "%s": No Access Granted or Not Existent' % classname |
|
|
|
|
|
# build bclass object |
|
|
# TODO: replace it with a call to the class repository, like: |
|
|
newbclass=self._classrepository.buildBClass(classname, self._user, role) |
|
|
|
|
|
# newbclass=geasBClass.geasBClass (self, classname) |
|
|
|
|
|
# cache the bclass object |
|
|
self._bclasses[classname]=newbclass |
|
|
|
|
|
return newbclass; |
|
|
|
|
141 |
# --------------------------------------------------------------------------- |
# --------------------------------------------------------------------------- |
142 |
# Create a new list of business objects of a given class |
# Create a new list of business objects of a given class |
143 |
# --------------------------------------------------------------------------- |
# --------------------------------------------------------------------------- |
282 |
# FIXME: This function should be moved to the geasBClass object, once |
# FIXME: This function should be moved to the geasBClass object, once |
283 |
# it is working -- Siesel |
# it is working -- Siesel |
284 |
# return self._getClass(classname).call(obj_id_list,methodname,parameters) |
# return self._getClass(classname).call(obj_id_list,methodname,parameters) |
|
|
|