本文整理汇总了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)
示例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))
示例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)
示例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
示例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)
示例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)
示例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)
示例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
示例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)
示例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)
示例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)
示例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)