当前位置: 首页>>代码示例>>Python>>正文


Python Folder.inheritedAttribute方法代码示例

本文整理汇总了Python中OFS.Folder.Folder.inheritedAttribute方法的典型用法代码示例。如果您正苦于以下问题:Python Folder.inheritedAttribute方法的具体用法?Python Folder.inheritedAttribute怎么用?Python Folder.inheritedAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OFS.Folder.Folder的用法示例。


在下文中一共展示了Folder.inheritedAttribute方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __setstate__

# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import inheritedAttribute [as 别名]
 def __setstate__(self,state):
     """Updates"""
     if not hasattr(self, 'map_types'):
         self.map_types = YAHOO_MAP_TYPES
     if not hasattr(self, 'map_engine'):
         self.map_engine = 'yahoo'
     if not hasattr(self, 'googleApiKey'):
         self.googleApiKey = ''
     if not hasattr(self, 'default_type'):
         self.default_type = 'YAHOO_MAP_REG'
     if not hasattr(self, 'enableKeyControls'):
         self.enableKeyControls = True
     Folder.inheritedAttribute("__setstate__") (self, state)
开发者ID:eaudeweb,项目名称:naaya,代码行数:15,代码来源:GeoMapTool.py

示例2: manage_afterAdd

# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import inheritedAttribute [as 别名]
    def manage_afterAdd(self, item, container):
        """ This method is called, whenever _setObject in ObjectManager gets called. """
        Folder.inheritedAttribute('manage_afterAdd')(self, item, container)
        catalog = self.catalog
        catalog.CatalogObject(self)
        element_manager = self.element_manager
        if element_manager.testElementList():
            for id in element_manager.get_elements_ids():
                elem = element_manager.get_elements_collection()[id]

                #catalog google items
                google_list = [elem.get_google_collection()[google_id] for google_id in elem.get_google_ids()]
                for google_item in google_list:
                    catalog.CatalogObject(google_item)

                #catalog element items
                catalog.CatalogObject(element_manager.get_element_item(id))
开发者ID:eea,项目名称:ALiSS_agents,代码行数:19,代码来源:aliss_center.py

示例3: manage_beforeDelete

# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import inheritedAttribute [as 别名]
    def manage_beforeDelete(self, item, container):
        """ This method is called, when the object is deleted. """
        catalog = self.catalog
        Folder.inheritedAttribute('manage_beforeDelete')(self, item, container)
        element_manager = self.element_manager
        for id in element_manager.get_elements_ids():
            elem = element_manager.get_elements_collection()[id]

            for google_id in elem.get_google_ids():
                google_item = elem.get_google_collection()[google_id]

                #uncatalog google pages
                catalog.UncatalogObject(google_item.get_page_collection_objs())
                #uncatalog google items
                catalog.UncatalogObject([google_item])

            #uncatalog element items
            catalog.UncatalogObject(elem)
        catalog.UncatalogObject(self)
开发者ID:eea,项目名称:ALiSS_agents,代码行数:21,代码来源:aliss_center.py

示例4: manage_afterAdd

# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import inheritedAttribute [as 别名]
    def manage_afterAdd(self, item, container):
        """ after add event """
        if item is self:
            handle = self.meta_type + '/' + self.getId()
            nc = BeforeTraverse.NameCaller(self.getId())
            BeforeTraverse.registerBeforeTraverse(container, nc, handle)
        self.loadDefaultRoles()
        try:
            self.createRepository()
            style_css = open(join(DOCMANAGER_PRODUCT_PATH,'zpt','DocManager','DocManager_style.zpt'))
            content = style_css.read()
            style_css.close()
            manage_addPageTemplate(self, id=DOCMANAGER_CSS, title='', text=content)

            style_css = open(join(DOCMANAGER_PRODUCT_PATH,'zpt','DocManager','DocManager_template.zpt'))
            content = style_css.read()
            style_css.close()
            manage_addPageTemplate(self, id=DOCMANAGER_TEMPLATE, title='', text=content)

            Folder.inheritedAttribute('manage_afterAdd')(self, item, container)
        except:
            pass
开发者ID:eaudeweb,项目名称:naaya,代码行数:24,代码来源:DocManager.py

示例5: manage_beforeDelete

# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import inheritedAttribute [as 别名]
 def manage_beforeDelete(self, item, container):
     """
     This method is called, when the object is deleted.
     """
     Folder.inheritedAttribute('manage_beforeDelete')(self, item, container)
     self.delete_portlet_for_object(item)
开发者ID:eaudeweb,项目名称:naaya.Products.NaayaNetRepository,代码行数:8,代码来源:NyNetRepository.py

示例6: manage_beforeDelete

# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import inheritedAttribute [as 别名]
 def manage_beforeDelete(self, item, container):
     """
     This method is called, when the object is deleted.
     """
     Folder.inheritedAttribute('manage_beforeDelete')(self, item, container)
     self.uncatalogNyObject(self)
开发者ID:eaudeweb,项目名称:naaya,代码行数:8,代码来源:NyContainer.py

示例7: manage_afterAdd

# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import inheritedAttribute [as 别名]
 def manage_afterAdd(self, item, container):
     """
     This method is called, whenever _setObject in ObjectManager gets called.
     """
     Folder.inheritedAttribute('manage_afterAdd')(self, item, container)
     self.catalogNyObject(self)
开发者ID:eaudeweb,项目名称:naaya,代码行数:8,代码来源:NyContainer.py

示例8: getattr

# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import inheritedAttribute [as 别名]
            if path:
                subpath = path + '/' + subob.getId()
            else:
                subpath = subob.getId()
            title = getattr(subob, 'title', None)
            if title:
                name = '%s (%s)' % (subpath, title)
            else:
                name = subpath
            rval.append((subpath, name))
            listFolderHierarchy(subob, subpath, rval, adding_meta_type)


try: superFolderGetattr = Folder.__getattr__
except:
    try: superFolderGetattr = Folder.inheritedAttribute('__getattr__')
    except:
        def superFolderGetattr(self, name):
            raise AttributeError, name


class DirectoryView (Folder):
    '''
    '''

    security = ClassSecurityInfo()

    meta_type = 'Filesystem Directory View'
    all_meta_types = ()
    _isDirectoryView = 1
开发者ID:goschtl,项目名称:zope,代码行数:32,代码来源:DirectoryView.py

示例9: manage_beforeDelete

# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import inheritedAttribute [as 别名]
 def manage_beforeDelete(self, item, container):
     """ This method is called, when the object is deleted. """
     if item is self:
         handle = self.meta_type + '/' + self.getId()
         BeforeTraverse.unregisterBeforeTraverse(container, handle)
     Folder.inheritedAttribute('manage_beforeDelete')(self, item, container)
开发者ID:eaudeweb,项目名称:naaya,代码行数:8,代码来源:DocManager.py

示例10: manage_afterAdd

# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import inheritedAttribute [as 别名]
 def manage_afterAdd(self, item, container, new_fn=None):
     self._load_archives()
     Folder.inheritedAttribute ("manage_afterAdd") (self, item, container)
开发者ID:eaudeweb,项目名称:EionetProducts,代码行数:5,代码来源:MailArchiveFolder.py

示例11: manage_beforeDelete

# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import inheritedAttribute [as 别名]
 def manage_beforeDelete(self, item, container):
     """ this method is called, when the object is deleted """
     self.UncatalogDMObject(self)
     try: Folder.inheritedAttribute('manage_beforeDelete')(self, item, container)
     except: SimpleItem.inheritedAttribute('manage_beforeDelete')(self, item, container)
开发者ID:eaudeweb,项目名称:naaya,代码行数:7,代码来源:DocBase.py

示例12: manage_afterAdd

# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import inheritedAttribute [as 别名]
 def manage_afterAdd(self, item, container):
     """ this method is called, whenever _setObject in DocManager gets called """
     try: Folder.inheritedAttribute('manage_afterAdd')(self, item, container)
     except: SimpleItem.inheritedAttribute('manage_afterAdd')(self, item, container)
     self.CatalogDMObject(self)
开发者ID:eaudeweb,项目名称:naaya,代码行数:7,代码来源:DocBase.py


注:本文中的OFS.Folder.Folder.inheritedAttribute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。