[Zapp-cvs-commit] ZApp ZApp_Application.py,1.32,1.33 ZApp_CMFBase.py,1.36,1.37 ZApp_Specialist.py,1.
Brought to you by:
sspickle
|
From: Steve S. <ssp...@us...> - 2004-03-21 13:18:30
|
Update of /cvsroot/zapp/ZApp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26043 Modified Files: ZApp_Application.py ZApp_CMFBase.py ZApp_Specialist.py Log Message: allow rack specific customizations Index: ZApp_Application.py =================================================================== RCS file: /cvsroot/zapp/ZApp/ZApp_Application.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** ZApp_Application.py 16 Mar 2004 20:56:30 -0000 1.32 --- ZApp_Application.py 21 Mar 2004 13:08:17 -0000 1.33 *************** *** 514,518 **** try: lever = getattr(rack, leverName) ! resultList.append(`lever(dbName=dbName, catalogName=catalogName)`) except: f = StringIO() --- 514,518 ---- try: lever = getattr(rack, leverName) ! resultList.append(`lever(dbName=dbName, catalogName=catalogName, rackName=rack.getId())`) except: f = StringIO() Index: ZApp_CMFBase.py =================================================================== RCS file: /cvsroot/zapp/ZApp/ZApp_CMFBase.py,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** ZApp_CMFBase.py 21 Mar 2004 12:26:09 -0000 1.36 --- ZApp_CMFBase.py 21 Mar 2004 13:08:18 -0000 1.37 *************** *** 347,350 **** --- 347,352 ---- os.system("mv %s %s" % (oldPath, newPath)) + + extendProperties(ZApp_CMF_FSObject, []) class ZApp_CMF_FSImage( ZApp_CMF_FSObject): Index: ZApp_Specialist.py =================================================================== RCS file: /cvsroot/zapp/ZApp/ZApp_Specialist.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** ZApp_Specialist.py 10 Mar 2004 20:43:56 -0000 1.38 --- ZApp_Specialist.py 21 Mar 2004 13:08:18 -0000 1.39 *************** *** 120,124 **** ) ! def getPrimaryKey(self): """ Get the primary key for the objects managed by this specialist... --- 120,124 ---- ) ! def getPrimaryKey(self, rackID='defaultRack'): """ Get the primary key for the objects managed by this specialist... *************** *** 342,346 **** return "OK!" ! def ZApp_getDefaultDictionary(self, typeString=0): """ return a dictionary with default values for each property... --- 342,346 ---- return "OK!" ! def ZApp_getDefaultDictionary(self, typeString=0, rackID='defaultRack'): """ return a dictionary with default values for each property... *************** *** 350,354 **** dict = {} ! pm = self.ZApp_getPropertyMap() if typeString: --- 350,354 ---- dict = {} ! pm = self.ZApp_getPropertyMap(rackID=rackID) if typeString: *************** *** 377,381 **** return dict ! def ZApp_getPropertyMap(self): """ return a tuple of property dictionaries for the properties of the --- 377,381 ---- return dict ! def ZApp_getPropertyMap(self, rackID='defaultRack'): """ return a tuple of property dictionaries for the properties of the *************** *** 387,437 **** return tuple(filter( lambda x:x.get('id','') != 'title', map( lambda dict: dict.copy(), ! self.ZApp_getItemClassAttr('_properties')) ) ) ! def ZApp_getIndexedAttributes(self): """ return a list of indexed attributes for this class.. """ ! return self.ZApp_getItemClassAttr('_indexed_attrs') ! def ZApp_getInsertQueryPrefix(self): """ return an insert query prefix. """ ! return self.ZApp_getItemClassAttr('_insertQueryPrefix') ! def ZApp_getCustomSkinScripts(self): """ return a list of custom skin scripts for this Specialists storage class.. """ ! return self.ZApp_getItemClassAttr('_custom_skin_scripts') ! def ZApp_getPrimaryKeyGenerator(self): """ return a primary key generator string. """ ! return self.ZApp_getItemClassAttr('_primaryKeyGenerator') ! def ZApp_getDefaultStringSize(self): """ return a default string size for dbSize... """ ! return self.ZApp_getItemClassAttr('_defaultStringSize',30) ! def ZApp_getPrimaryKeySize(self): """ return a default string size for dbSize... """ ! return self.ZApp_getItemClassAttr('_primaryKeyStringSize',40) ! def ZApp_getItemClassAttr(self, attr, default=None): """ Return the class for objects managed by this ZApp_Specialist. """ ! return self.defaultRack.getKlassAttr( attr, default ) ! def ZApp_getReferenceLookup(self): """ return a lookup table for references by objects managed --- 387,444 ---- return tuple(filter( lambda x:x.get('id','') != 'title', map( lambda dict: dict.copy(), ! self.ZApp_getItemClassAttr('_properties', rackID=rackID)) ) ) ! def ZApp_getIndexedAttributes(self, rackID='defaultRack'): """ return a list of indexed attributes for this class.. """ ! return self.ZApp_getItemClassAttr('_indexed_attrs', rackID=rackID) ! def ZApp_getInsertQueryPrefix(self, rackID='defaultRack'): """ return an insert query prefix. """ ! return self.ZApp_getItemClassAttr('_insertQueryPrefix', rackID=rackID) ! def ZApp_getCustomSkinScripts(self, rackID='defaultRack'): """ return a list of custom skin scripts for this Specialists storage class.. """ ! return self.ZApp_getItemClassAttr('_custom_skin_scripts', rackID=rackID) ! def ZApp_getPrimaryKeyGenerator(self, rackID='defaultRack'): """ return a primary key generator string. """ ! return self.ZApp_getItemClassAttr('_primaryKeyGenerator', rackID=rackID) ! def ZApp_getDefaultStringSize(self, rackID='defaultRack'): """ return a default string size for dbSize... """ ! return self.ZApp_getItemClassAttr('_defaultStringSize',30, rackID=rackID) ! def ZApp_getPrimaryKeySize(self, rackID='defaultRack'): """ return a default string size for dbSize... """ ! return self.ZApp_getItemClassAttr('_primaryKeyStringSize',40, rackID=rackID) ! def ZApp_getItemClassAttr(self, attr, default=None, rackID='defaultRack'): """ Return the class for objects managed by this ZApp_Specialist. """ ! ! missing = [] ! ! rack = getattr(self, rackID, missing) ! if rack is missing: ! return default ! ! return rack.getKlassAttr( attr, default ) ! def ZApp_getReferenceLookup(self, rackID='defaultRack'): """ return a lookup table for references by objects managed *************** *** 461,465 **** if refLookup is missing: ! refLookup = self.ZApp_getItemClassAttr('ZApp_referenceLookup', {}) if hasattr( refLookup, 'func_code' ) or hasattr( refLookup, '__call__'): --- 468,472 ---- if refLookup is missing: ! refLookup = self.ZApp_getItemClassAttr('ZApp_referenceLookup', {}, rackID=rackID) if hasattr( refLookup, 'func_code' ) or hasattr( refLookup, '__call__'): |