Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
CMFCore.browser.typeinfo.ScriptableTypeInformationAddView Class Reference
Inheritance diagram for CMFCore.browser.typeinfo.ScriptableTypeInformationAddView:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.browser.typeinfo.ScriptableTypeInformationAddView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def getProfileInfos

Static Public Attributes

 klass = ScriptableTypeInformation
string description = u'A type information object defines a portal type.'

Detailed Description

Add view for ScriptableTypeInformation.

Definition at line 104 of file typeinfo.py.


Member Function Documentation

Definition at line 39 of file typeinfo.py.

00039 
00040     def getProfileInfos(self):
00041         profiles = []
00042         stool = queryUtility(ISetupTool)
00043         if stool:
00044             for info in stool.listContextInfos():
00045                 obj_ids = []
00046                 context = stool._getImportContext(info['id'])
00047                 file_ids = context.listDirectory('types')
00048                 for file_id in file_ids or ():
00049                     if not file_id.endswith('.xml'):
00050                         continue
00051 
00052                     filename = 'types/%s' % file_id
00053                     body = context.readDataFile(filename)
00054                     if body is None:
00055                         continue
00056 
00057                     root = parseString(body).documentElement
00058                     meta_type = str(root.getAttribute('meta_type'))
00059                     if meta_type != self.klass.meta_type:
00060                         continue
00061 
00062                     obj_id = str(root.getAttribute('name'))
00063                     obj_ids.append(obj_id)
00064                 if not obj_ids:
00065                     continue
00066                 obj_ids.sort()
00067                 profiles.append({'id': info['id'],
00068                                  'title': info['title'],
00069                                  'obj_ids': tuple(obj_ids)})
00070         return tuple(profiles)


Member Data Documentation

string CMFCore.browser.typeinfo.FactoryTypeInformationAddView.description = u'A type information object defines a portal type.' [static, inherited]

Definition at line 37 of file typeinfo.py.

Reimplemented from CMFCore.browser.typeinfo.FactoryTypeInformationAddView.

Definition at line 109 of file typeinfo.py.


The documentation for this class was generated from the following file: