Logo Search packages:      
Sourcecode: zope-archetypes version File versions

def Archetypes::ArchetypeTool::ArchetypeTool::getCatalogsByType (   self,
  meta_type 
)

Return the catalog objects assoicated with a given type

Definition at line 901 of file ArchetypeTool.py.

00901                                           :
        """Return the catalog objects assoicated with a given type"""
        catalogs = []
        catalog_map=getattr(self,'catalog_map',None)
        if catalog_map:
            names = self.catalog_map.get(meta_type, ['portal_catalog', UID_CATALOG])
        else:
            names = ['portal_catalog', UID_CATALOG]
        for name in names:
            try:
                catalogs.append(getToolByName(self, name))
            except Exception, E:
                log("No tool", name, E)
                pass
        return catalogs

    security.declareProtected(CMFCorePermissions.View,
                              'getCatalogsInSite')


Generated by  Doxygen 1.6.0   Back to index