class ZClassSheets(OFS.PropertySheets.PropertySheets): "Manage a collection of property sheets that provide ZClass management" #isPrincipiaFolderish=1 #def tpValues(self): return self.methods, self.common #def tpURL(self): return 'propertysheets' def manage_workspace(self, URL2): "Emulate standard interface for use with navigation" raise Redirect, URL2 + '/manage_workspace' views = Basic.ZClassViewsSheet('views') basic = Basic.ZClassBasicSheet('basic') permissions = Basic.ZClassPermissionsSheet('permissions') def __init__(self): self.methods = Method.ZClassMethodsSheet('methods') self.common = Property.ZInstanceSheetsSheet('common') # # FTP support # def manage_FTPlist(self, REQUEST): "Directory listing for FTP" out = () files = self.__dict__.items() if not (hasattr(self, 'isTopLevelPrincipiaApplicationObject') and self.isTopLevelPrincipiaApplicationObject): files.insert(0, ('..', self.aq_parent)) for k, v in files: try: stat = marshal.loads(v.manage_FTPstat(REQUEST)) except: stat = None if stat is not None: out = out + ((k, stat), ) return marshal.dumps(out) def manage_FTPstat(self, REQUEST): "Psuedo stat used for FTP listings" mode = 0040000 | 0770 mtime = self.bobobase_modification_time().timeTime() owner = group = 'Zope' return marshal.dumps( (mode, 0, 0, 1, owner, group, 0, mtime, mtime, mtime)) # # WebDAV support # isAnObjectManager = 1 def objectValues(self, filter=None): return [self.methods, self.common]