Package org.pentaho.di.www
Class ExecuteTransServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.pentaho.di.www.BaseHttpServlet
org.pentaho.di.www.ExecuteTransServlet
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig,CartePluginInterface,CarteServletInterface
- See Also:
-
Field Summary
FieldsFields inherited from class org.pentaho.di.www.BaseHttpServlet
detections, jobMap, log, socketRepository, transformationMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected voidexecuteTrans(Trans trans) toString()Methods inherited from class org.pentaho.di.www.BaseHttpServlet
convertContextPath, doDelete, doPost, doPut, getDetections, getJobMap, getSocketRepository, getTransformationMap, isJettyMode, logBasic, logBasic, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logRowlevel, setJettyMode, setupMethods inherited from class javax.servlet.http.HttpServlet
doHead, doOptions, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, logMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.pentaho.di.www.CartePluginInterface
isJettyMode, setJettyMode, setup
-
Field Details
-
CONTEXT_PATH
- See Also:
-
-
Constructor Details
-
ExecuteTransServlet
public ExecuteTransServlet() -
ExecuteTransServlet
-
-
Method Details
-
doGet
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException /kettle/executeTrans
GET
Executes transformation from the specified repository. Connects to the repository provided as a parameter, loads the transformation from it and executes it. Empty response is returned or response contains output of an error happened during the transformation execution. Response contains
ERRORresult if error happened during transformation execution.Example Request:
GET /kettle/executeTrans/?rep=my_repository&user=my_user&pass=my_password&trans=my_trans&level=INFOParameters
name description type rep Repository id to connect to. query user User name to be used to connect to repository. query pass User password to be used to connect to repository. query trans Transfromation name to be loaded and executed. query level Logging level to be used for transformation execution (i.e. Debug). query *any name* All the other parameters will be sent to the transformation for using as variables. When necessary you can add custom parameters to the request. They will be used to set the transformation variables values.. query Response Body
element: (custom) media types: application/xml Response contains error output of the transformation executed or nothing if the execution was successful.
Example Error Response:
ERROR Unexpected error executing the transformation: org.pentaho.di.core.exception.KettleException: Unable to find transformation 'dummy-trans.ktr' in directory :/home/admin at org.pentaho.di.www.ExecuteTransServlet.loadTransformation(ExecuteTransServlet.java:214) at org.pentaho.di.www.ExecuteTransServlet.doGet(ExecuteTransServlet.java:104) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:915) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Status Codes
code description 200 Request was processed. 400 When missing mandatory param trans 401 When authentication to repository fails 404 When transformation is not found 500 Internal server error occurs during request processing. - Specified by:
doGetin interfaceCartePluginInterface- Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
toString
-
getService
- Specified by:
getServicein interfaceCarteServletInterface
-
executeTrans
- Throws:
org.pentaho.di.core.exception.KettleException
-
getContextPath
- Specified by:
getContextPathin interfaceCartePluginInterface
-