Commit 8cb216d8 authored by Hanno Schlichting's avatar Hanno Schlichting

Whitespace

parent 2128e89e
...@@ -95,35 +95,24 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -95,35 +95,24 @@ class ZCatalog(Folder, Persistent, Implicit):
icon = 'misc_/ZCatalog/ZCatalog.gif' icon = 'misc_/ZCatalog/ZCatalog.gif'
manage_options = ( manage_options = (
{'label': 'Contents', # TAB: Contents {'label': 'Contents', 'action': 'manage_main'},
'action': 'manage_main'}, {'label': 'Catalog', 'action': 'manage_catalogView'},
{'label': 'Catalog', # TAB: Cataloged Objects {'label': 'Properties', 'action': 'manage_propertiesForm'},
'action': 'manage_catalogView'}, {'label': 'Indexes', 'action': 'manage_catalogIndexes'},
{'label': 'Properties', # TAB: Properties {'label': 'Metadata', 'action': 'manage_catalogSchema'},
'action': 'manage_propertiesForm'}, {'label': 'Find Objects', 'action': 'manage_catalogFind'},
{'label': 'Indexes', # TAB: Indexes {'label': 'Advanced', 'action': 'manage_catalogAdvanced'},
'action': 'manage_catalogIndexes'}, {'label': 'Query Report', 'action': 'manage_catalogReport'},
{'label': 'Metadata', # TAB: Metadata {'label': 'Undo', 'action': 'manage_UndoForm'},
'action': 'manage_catalogSchema'}, {'label': 'Security', 'action': 'manage_access'},
{'label': 'Find Objects', # TAB: Find Objects {'label': 'Ownership', 'action': 'manage_owner'},
'action': 'manage_catalogFind'},
{'label': 'Advanced', # TAB: Advanced
'action': 'manage_catalogAdvanced'},
{'label': 'Query Report',
'action': 'manage_catalogReport',
},
{'label': 'Undo', # TAB: Undo
'action': 'manage_UndoForm'},
{'label': 'Security', # TAB: Security
'action': 'manage_access'},
{'label': 'Ownership', # TAB: Ownership
'action': 'manage_owner'},
) )
security.declareProtected(manage_zcatalog_entries, 'manage_main') security.declareProtected(manage_zcatalog_entries, 'manage_main')
security.declareProtected(search_zcatalog, 'all_meta_types') security.declareProtected(search_zcatalog, 'all_meta_types')
security.declareProtected(manage_zcatalog_entries,
'manage_catalogAddRowForm')
manage_catalogAddRowForm = DTMLFile('dtml/catalogAddRowForm', globals()) manage_catalogAddRowForm = DTMLFile('dtml/catalogAddRowForm', globals())
security.declareProtected(manage_zcatalog_entries, 'manage_catalogView') security.declareProtected(manage_zcatalog_entries, 'manage_catalogView')
...@@ -189,7 +178,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -189,7 +178,6 @@ class ZCatalog(Folder, Persistent, Implicit):
RESPONSE.redirect( RESPONSE.redirect(
URL1 + '/manage_main?manage_tabs_message=Catalog%20Changed') URL1 + '/manage_main?manage_tabs_message=Catalog%20Changed')
def manage_subbingToggle(self, REQUEST, RESPONSE, URL1): def manage_subbingToggle(self, REQUEST, RESPONSE, URL1):
""" toggle subtransactions """ """ toggle subtransactions """
if self.threshold: if self.threshold:
...@@ -219,7 +207,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -219,7 +207,6 @@ class ZCatalog(Folder, Persistent, Implicit):
URL1 + URL1 +
'/manage_catalogView?manage_tabs_message=Object%20Cataloged') '/manage_catalogView?manage_tabs_message=Object%20Cataloged')
security.declareProtected(manage_zcatalog_entries, security.declareProtected(manage_zcatalog_entries,
'manage_uncatalogObject') 'manage_uncatalogObject')
def manage_uncatalogObject(self, REQUEST, RESPONSE, URL1, urls=None): def manage_uncatalogObject(self, REQUEST, RESPONSE, URL1, urls=None):
...@@ -236,7 +223,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -236,7 +223,6 @@ class ZCatalog(Folder, Persistent, Implicit):
URL1 + URL1 +
'/manage_catalogView?manage_tabs_message=Object%20Uncataloged') '/manage_catalogView?manage_tabs_message=Object%20Uncataloged')
security.declareProtected(manage_zcatalog_entries, 'manage_catalogReindex') security.declareProtected(manage_zcatalog_entries, 'manage_catalogReindex')
def manage_catalogReindex(self, REQUEST, RESPONSE, URL1): def manage_catalogReindex(self, REQUEST, RESPONSE, URL1):
""" clear the catalog, then re-index everything """ """ clear the catalog, then re-index everything """
...@@ -258,7 +244,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -258,7 +244,6 @@ class ZCatalog(Folder, Persistent, Implicit):
'Total time: %s\n' 'Total time: %s\n'
'Total CPU time: %s' % (`elapse`, `c_elapse`))) 'Total CPU time: %s' % (`elapse`, `c_elapse`)))
security.declareProtected(manage_zcatalog_entries, 'refreshCatalog') security.declareProtected(manage_zcatalog_entries, 'refreshCatalog')
def refreshCatalog(self, clear=0, pghandler=None): def refreshCatalog(self, clear=0, pghandler=None):
""" re-index everything we can find """ """ re-index everything we can find """
...@@ -304,7 +289,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -304,7 +289,6 @@ class ZCatalog(Folder, Persistent, Implicit):
URL1 + URL1 +
'/manage_catalogAdvanced?manage_tabs_message=Catalog%20Cleared') '/manage_catalogAdvanced?manage_tabs_message=Catalog%20Cleared')
security.declareProtected(manage_zcatalog_entries, security.declareProtected(manage_zcatalog_entries,
'manage_catalogFoundItems') 'manage_catalogFoundItems')
def manage_catalogFoundItems(self, REQUEST, RESPONSE, URL2, URL1, def manage_catalogFoundItems(self, REQUEST, RESPONSE, URL2, URL1,
...@@ -313,10 +297,8 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -313,10 +297,8 @@ class ZCatalog(Folder, Persistent, Implicit):
obj_expr=None, obj_mtime=None, obj_expr=None, obj_mtime=None,
obj_mspec=None, obj_roles=None, obj_mspec=None, obj_roles=None,
obj_permission=None): obj_permission=None):
""" Find object according to search criteria and Catalog them """ Find object according to search criteria and Catalog them
""" """
elapse = time.time() elapse = time.time()
c_elapse = time.clock() c_elapse = time.clock()
...@@ -348,7 +330,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -348,7 +330,6 @@ class ZCatalog(Folder, Persistent, Implicit):
'Total CPU time: %s' 'Total CPU time: %s'
% (`elapse`, `c_elapse`))) % (`elapse`, `c_elapse`)))
security.declareProtected(manage_zcatalog_entries, 'manage_addColumn') security.declareProtected(manage_zcatalog_entries, 'manage_addColumn')
def manage_addColumn(self, name, REQUEST=None, RESPONSE=None, URL1=None): def manage_addColumn(self, name, REQUEST=None, RESPONSE=None, URL1=None):
""" add a column """ """ add a column """
...@@ -359,7 +340,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -359,7 +340,6 @@ class ZCatalog(Folder, Persistent, Implicit):
URL1 + URL1 +
'/manage_catalogSchema?manage_tabs_message=Column%20Added') '/manage_catalogSchema?manage_tabs_message=Column%20Added')
security.declareProtected(manage_zcatalog_entries, 'manage_delColumn') security.declareProtected(manage_zcatalog_entries, 'manage_delColumn')
def manage_delColumn(self, names, REQUEST=None, RESPONSE=None, URL1=None): def manage_delColumn(self, names, REQUEST=None, RESPONSE=None, URL1=None):
""" delete a column or some columns """ """ delete a column or some columns """
...@@ -374,7 +354,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -374,7 +354,6 @@ class ZCatalog(Folder, Persistent, Implicit):
URL1 + URL1 +
'/manage_catalogSchema?manage_tabs_message=Column%20Deleted') '/manage_catalogSchema?manage_tabs_message=Column%20Deleted')
security.declareProtected(manage_zcatalog_entries, 'manage_addIndex') security.declareProtected(manage_zcatalog_entries, 'manage_addIndex')
def manage_addIndex(self, name, type, extra=None, def manage_addIndex(self, name, type, extra=None,
REQUEST=None, RESPONSE=None, URL1=None): REQUEST=None, RESPONSE=None, URL1=None):
...@@ -386,7 +365,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -386,7 +365,6 @@ class ZCatalog(Folder, Persistent, Implicit):
URL1 + URL1 +
'/manage_catalogIndexes?manage_tabs_message=Index%20Added') '/manage_catalogIndexes?manage_tabs_message=Index%20Added')
security.declareProtected(manage_zcatalog_entries, 'manage_delIndex') security.declareProtected(manage_zcatalog_entries, 'manage_delIndex')
def manage_delIndex(self, ids=None, REQUEST=None, RESPONSE=None, def manage_delIndex(self, ids=None, REQUEST=None, RESPONSE=None,
URL1=None): URL1=None):
...@@ -407,7 +385,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -407,7 +385,6 @@ class ZCatalog(Folder, Persistent, Implicit):
URL1 + URL1 +
'/manage_catalogIndexes?manage_tabs_message=Index%20Deleted') '/manage_catalogIndexes?manage_tabs_message=Index%20Deleted')
security.declareProtected(manage_zcatalog_entries, 'manage_clearIndex') security.declareProtected(manage_zcatalog_entries, 'manage_clearIndex')
def manage_clearIndex(self, ids=None, REQUEST=None, RESPONSE=None, def manage_clearIndex(self, ids=None, REQUEST=None, RESPONSE=None,
URL1=None): URL1=None):
...@@ -428,7 +405,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -428,7 +405,6 @@ class ZCatalog(Folder, Persistent, Implicit):
URL1 + URL1 +
'/manage_catalogIndexes?manage_tabs_message=Index%20Cleared') '/manage_catalogIndexes?manage_tabs_message=Index%20Cleared')
def reindexIndex(self, name, REQUEST, pghandler=None): def reindexIndex(self, name, REQUEST, pghandler=None):
if isinstance(name, str): if isinstance(name, str):
name = (name, ) name = (name, )
...@@ -478,7 +454,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -478,7 +454,6 @@ class ZCatalog(Folder, Persistent, Implicit):
'/manage_catalogIndexes' '/manage_catalogIndexes'
'?manage_tabs_message=Reindexing%20Performed') '?manage_tabs_message=Reindexing%20Performed')
security.declareProtected(manage_zcatalog_entries, 'catalog_object') security.declareProtected(manage_zcatalog_entries, 'catalog_object')
def catalog_object(self, obj, uid=None, idxs=None, update_metadata=1, def catalog_object(self, obj, uid=None, idxs=None, update_metadata=1,
pghandler=None): pghandler=None):
...@@ -627,7 +602,7 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -627,7 +602,7 @@ class ZCatalog(Folder, Persistent, Implicit):
return self._catalog.searchResults(REQUEST, used, **kw) return self._catalog.searchResults(REQUEST, used, **kw)
security.declareProtected(search_zcatalog, '__call__') security.declareProtected(search_zcatalog, '__call__')
__call__=searchResults __call__ = searchResults
security.declareProtected(search_zcatalog, 'search') security.declareProtected(search_zcatalog, 'search')
def search( def search(
...@@ -853,9 +828,7 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -853,9 +828,7 @@ class ZCatalog(Folder, Persistent, Implicit):
self.pgthreshold = 0 self.pgthreshold = 0
return self.pgthreshold return self.pgthreshold
#
# Indexing methods # Indexing methods
#
def addIndex(self, name, type, extra=None): def addIndex(self, name, type, extra=None):
# Convert the type by finding an appropriate product which supports # Convert the type by finding an appropriate product which supports
...@@ -905,9 +878,7 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -905,9 +878,7 @@ class ZCatalog(Folder, Persistent, Implicit):
def delColumn(self, name): def delColumn(self, name):
return self._catalog.delColumn(name) return self._catalog.delColumn(name)
#
# Catalog report methods # Catalog report methods
#
security.declareProtected(manage_zcatalog_entries, 'getCatalogReport') security.declareProtected(manage_zcatalog_entries, 'getCatalogReport')
def getCatalogReport(self): def getCatalogReport(self):
...@@ -939,7 +910,6 @@ class ZCatalog(Folder, Persistent, Implicit): ...@@ -939,7 +910,6 @@ class ZCatalog(Folder, Persistent, Implicit):
'/manage_catalogReport?manage_tabs_message=' + '/manage_catalogReport?manage_tabs_message=' +
'Long%20query%20time%20changed') 'Long%20query%20time%20changed')
InitializeClass(ZCatalog) InitializeClass(ZCatalog)
......
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