[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/appserver/src geasSessionManager.py geasSe...
From: |
Jan Ischebeck |
Subject: |
gnue/appserver/src geasSessionManager.py geasSe... |
Date: |
Tue, 15 Apr 2003 20:18:02 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jan Ischebeck <address@hidden> 03/04/15 20:18:02
Modified files:
appserver/src : geasSessionManager.py geasSession.py
Log message:
raise Error messages in case of "no session" found, instead of raising
just an Indexerror
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/appserver/src/geasSessionManager.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/appserver/src/geasSession.py.diff?tr1=1.23&tr2=1.24&r1=text&r2=text
Patches:
Index: gnue/appserver/src/geasSession.py
diff -c gnue/appserver/src/geasSession.py:1.23
gnue/appserver/src/geasSession.py:1.24
*** gnue/appserver/src/geasSession.py:1.23 Mon Mar 31 08:39:50 2003
--- gnue/appserver/src/geasSession.py Tue Apr 15 20:18:02 2003
***************
*** 19,25 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasSession.py,v 1.23 2003/03/31 13:39:50 siesel Exp $
import geasList
import geasTrigger
--- 19,25 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasSession.py,v 1.24 2003/04/16 00:18:02 siesel Exp $
import geasList
import geasTrigger
***************
*** 154,161 ****
# build bclass object
# TODO: replace it with a call to the class repository, like:
! # classrepository.buildBClassManager(classname, self._user, role)
! newbclass=geasBClass.geasBClass (self, classname)
# cache the bclass object
self._bclasses[classname]=newbclass
--- 154,162 ----
# 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
***************
*** 182,188 ****
#
---------------------------------------------------------------------------
def count (self, list_id):
! list = self._lists [list_id]
return list.count ();
#
---------------------------------------------------------------------------
--- 183,192 ----
#
---------------------------------------------------------------------------
def count (self, list_id):
! try:
! list = self._lists [list_id]
! except:
! raise Error,'The list you are truing to access does not exist.'
return list.count ();
#
---------------------------------------------------------------------------
***************
*** 190,196 ****
#
---------------------------------------------------------------------------
def fetch (self, list_id, start, count):
! list = self._lists [list_id]
return list.fetch (start, count)
#
---------------------------------------------------------------------------
--- 194,203 ----
#
---------------------------------------------------------------------------
def fetch (self, list_id, start, count):
! try:
! list = self._lists [list_id]
! except:
! raise Error,'The list you are truing to access does not exist.'
return list.fetch (start, count)
#
---------------------------------------------------------------------------
Index: gnue/appserver/src/geasSessionManager.py
diff -c gnue/appserver/src/geasSessionManager.py:1.6
gnue/appserver/src/geasSessionManager.py:1.7
*** gnue/appserver/src/geasSessionManager.py:1.6 Mon Mar 31 08:39:50 2003
--- gnue/appserver/src/geasSessionManager.py Tue Apr 15 20:18:01 2003
***************
*** 19,25 ****
#
# Copyright 2001-2003 Free Software Foundation
#
! # $Id: geasSessionManager.py,v 1.6 2003/03/31 13:39:50 siesel Exp $
from geasList import *
from geasSession import *
--- 19,25 ----
#
# Copyright 2001-2003 Free Software Foundation
#
! # $Id: geasSessionManager.py,v 1.7 2003/04/16 00:18:01 siesel Exp $
from geasList import *
from geasSession import *
***************
*** 36,59 ****
# use DB for authetification
self._authAdapter=geasAuthentification.geasDBAuthAgent()
- def getNewSession(self):
- return sess
-
def setConnections(self,connections):
self._connections=connections
- def Shutdown(self):
- pass
-
- def Restart(self):
- pass
-
- def Status(self):
- if self._sessNo==0:
- return "Running (no sessions created yet)"
- else:
- return "Running (%s session created)" % self._sessNo
#####
# here the new API begins
#
--- 36,51 ----
# use DB for authetification
self._authAdapter=geasAuthentification.geasDBAuthAgent()
def setConnections(self,connections):
self._connections=connections
+ def _getSession(self,sess_id):
+ try:
+ return self._sessions[sess_id]
+ except:
+ raise Exception,"The session you have requested don't exist anymore"
+
#####
# here the new API begins
#
***************
*** 76,113 ****
if commit:
self.commit(session_id)
! self._sessions[session_id].logout()
del self._sessions[session_id]
def commit(self,session_id):
! self._sessions[session_id].commit()
def rollback(self,session_id):
! self._sessions[session_id].rollback()
def request(self,session_id,classname,conditions, sortorder,propertylist):
! return self._sessions[session_id].request(classname,conditions,sortorder,
! propertylist)
def count(self,session_id,list_id):
! return self._sessions[session_id].count(list_id);
def fetch(self,session_id,list_id,start,count,close=0):
! return self._sessions[session_id].fetch(list_id,start,count)
def load(self,session_id,classname,obj_id_list,propertylist):
! return self._sessions[session_id].load(classname,obj_id_list,propertylist)
def store(self,session_id,classname,obj_id_list,propertylist,data):
! return self._sessions[session_id].store(classname,obj_id_list,\
propertylist,data)
def call(self,session_id,classname,obj_id_list,methodname,parameters):
! return self._sessions[session_id].call(classname,obj_id_list,\
methodname,parameters)
def delete(self,session_id,classname,obj_id_list):
! return self._sessions[session_id].delete(classname,obj_id_list)
#
# thats the end of the new API
--- 68,105 ----
if commit:
self.commit(session_id)
! self._getSession(session_id).logout()
del self._sessions[session_id]
def commit(self,session_id):
! self._getSession(session_id).commit()
def rollback(self,session_id):
! self._getSession(session_id).rollback()
def request(self,session_id,classname,conditions, sortorder,propertylist):
! return self._getSession(session_id).request(classname,conditions,
! sortorder,propertylist)
def count(self,session_id,list_id):
! return self._getSession(session_id).count(list_id);
def fetch(self,session_id,list_id,start,count,close=0):
! return self._getSession(session_id).fetch(list_id,start,count)
def load(self,session_id,classname,obj_id_list,propertylist):
! return
self._getSession(session_id).load(classname,obj_id_list,propertylist)
def store(self,session_id,classname,obj_id_list,propertylist,data):
! return self._getSession(session_id).store(classname,obj_id_list,\
propertylist,data)
def call(self,session_id,classname,obj_id_list,methodname,parameters):
! return self._getSession(session_id).call(classname,obj_id_list,\
methodname,parameters)
def delete(self,session_id,classname,obj_id_list):
! return self._getSession(session_id).delete(classname,obj_id_list)
#
# thats the end of the new API
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/appserver/src geasSessionManager.py geasSe...,
Jan Ischebeck <=