MCPcopy Create free account
hub / github.com/quentinhardy/odat / createClassAndFunctionToExecOsCmd

Method createClassAndFunctionToExecOsCmd

Java.py:103–121  ·  view source on GitHub ↗

CREATE AND COMPILE JAVA CLASS and CREATE FUNCTION TO CALL JAVA

(self)

Source from the content-addressed store, hash-verified

101 self.JAVA_SESSION_CLEARED = "Java session state cleared"
102
103 def createClassAndFunctionToExecOsCmd(self):
104 '''
105 CREATE AND COMPILE JAVA CLASS and CREATE FUNCTION TO CALL JAVA
106 '''
107 logging.info("Create and compile the java class")
108 if "path-shell" in self.args:
109 self.SOURCE_OS_COMMAND_CLASS = self.SOURCE_OS_COMMAND_CLASS.replace('"/bin/sh"','"'+self.args["path-shell"]+'"')
110 status = self.__execPLSQL__(self.SOURCE_OS_COMMAND_CLASS)
111 if isinstance(status,Exception):
112 logging.info("Impossible to create and compile the java class: {0}".format(self.cleanError(status)))
113 return status
114 else :
115 logging.info("Create a function to call java")
116 status = self.__execPLSQL__(self.SOURCE_OS_COMMAND_CREATE_FUNCTION)
117 if isinstance(status,Exception):
118 logging.info("Impossible to create function to call java: {0}".format(self.cleanError(status)))
119 return status
120 else :
121 return True
122
123 def deleteClassAndFunctionToExecOsCmd(self):
124 '''

Callers 3

execOSCommandMethod · 0.95
getInteractiveShellMethod · 0.95
testAllMethod · 0.95

Calls 2

__execPLSQL__Method · 0.80
cleanErrorMethod · 0.80

Tested by

no test coverage detected