#NEWLINE# @ classmethod #NEWLINE# def get_method( cls , prefix , name , component_name = None , method = None ) : #NEWLINE# #INDENT# '\n            Retrieves a custom method for a resource or component\n\n            @param prefix: prefix of the resource name (=module name)\n            @param name: name of the resource (=without prefix)\n            @param component_name: name of the component\n            @param method: name of the method\n        ' #NEWLINE# methods = current . model . methods #NEWLINE# cmethods = current . model . cmethods #NEWLINE# if ( not method ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# tablename = ( '%s_%s' % ( prefix , name ) ) #NEWLINE# if ( not component_name ) : #NEWLINE# #INDENT# if ( ( method in methods ) and ( tablename in methods [ method ] ) ) : #NEWLINE# #INDENT# return methods [ method ] [ tablename ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( method in cmethods ) and ( component_name in cmethods [ method ] ) and ( tablename in cmethods [ method ] [ component_name ] ) ) : #NEWLINE# #INDENT# return cmethods [ method ] [ component_name ] [ tablename ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return None