Commit d6d7c5f6 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix "handles" function naming.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16606 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e0169de7
...@@ -360,7 +360,7 @@ class FolderHandler: ...@@ -360,7 +360,7 @@ class FolderHandler:
""" """
return "FolderHandler" return "FolderHandler"
def handles(self, folder): def isApplicable(self, folder):
""" """
Returns True if this plugin should handle this folder Returns True if this plugin should handle this folder
""" """
...@@ -374,7 +374,7 @@ class CMFBTreeFolderHandler(FolderHandler): ...@@ -374,7 +374,7 @@ class CMFBTreeFolderHandler(FolderHandler):
def __getattr__(self, id): def __getattr__(self, id):
return getattr(CMFBTreeFolder, id) return getattr(CMFBTreeFolder, id)
def handles(self, folder): def isApplicable(self, folder):
result = False result = False
if getattr(folder, '_tree', None) is not None: if getattr(folder, '_tree', None) is not None:
result = True result = True
...@@ -388,7 +388,7 @@ class CMFHBTreeFolderHandler(FolderHandler): ...@@ -388,7 +388,7 @@ class CMFHBTreeFolderHandler(FolderHandler):
def __getattr__(self, id): def __getattr__(self, id):
return getattr(CMFHBTreeFolder, id) return getattr(CMFHBTreeFolder, id)
def handles(self, folder): def isApplicable(self, folder):
result = False result = False
if getattr(folder, '_htree', None) is not None: if getattr(folder, '_htree', None) is not None:
result = True result = True
...@@ -402,7 +402,7 @@ class OFSFolderHandler(FolderHandler): ...@@ -402,7 +402,7 @@ class OFSFolderHandler(FolderHandler):
def __getattr__(self, id): def __getattr__(self, id):
return getattr(OFSFolder, id) return getattr(OFSFolder, id)
def handles(self, folder): def isApplicable(self, folder):
result = False result = False
if getattr(folder, '_objects', None) is not None: if getattr(folder, '_objects', None) is not None:
result = True result = True
...@@ -498,7 +498,7 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn, ...@@ -498,7 +498,7 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn,
global folder_handler_dict global folder_handler_dict
plugin_list = folder_handler_dict.values() plugin_list = folder_handler_dict.values()
for plugin in plugin_list: for plugin in plugin_list:
if plugin.handles(self): if plugin.isApplicable(self):
self._folder_handler = "%r" % plugin self._folder_handler = "%r" % plugin
break break
if self._folder_handler is None: if self._folder_handler is None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment