File: ZSQLMethod.py

package info (click to toggle)
zope-replacesupport 1.0.2-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 168 kB
  • ctags: 155
  • sloc: python: 743; makefile: 38; sh: 25
file content (24 lines) | stat: -rw-r--r-- 527 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

from Products.ReplaceSupport.ReplaceHandler import ReplaceHandler

__handler_class_name__ = 'ZSQLMethodHandler'

class ZSQLMethodHandler( ReplaceHandler ):
	'''search & replace in ZSQLMethods'''

	def getMetaType( self ):
		return 'Z SQL Method'

	def getChangePermission( self ):
		return 'Change Database Methods'
	
	def getBody( self, ob ):
		return ob.src

	def getParams( self, ob ):
		return ob.arguments_src
	
	def manageEdit( self, ob, body, params='' ):
		ob.manage_edit( ob.title, ob.connection_id, params, body )