public class AddJobServlet extends BaseHttpServlet implements CartePluginInterface
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTEXT_PATH |
| Constructor and Description |
|---|
AddJobServlet() |
AddJobServlet(JobMap jobMap,
SocketRepository socketRepository) |
| Modifier and Type | Method and Description |
|---|---|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
/**
|
String |
getContextPath() |
String |
getService() |
String |
toString() |
convertContextPath, getDetections, getJobMap, getSocketRepository, getTransformationMap, isJettyMode, logBasic, logBasic, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logRowlevel, setJettyMode, setupdestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, logequals, getClass, hashCode, notify, notifyAll, wait, wait, waitisJettyMode, setJettyMode, setuppublic static final String CONTEXT_PATH
public AddJobServlet()
public AddJobServlet(JobMap jobMap, SocketRepository socketRepository)
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
Uploads and executes job configuration XML file.
Uploads xml file containing job and job_execution_configuration (wrapped in job_configuration tag)
to be executed and executes it. Method relies on the input parameter to determine if xml or html
reply should be produced. The job_configuration xml is
transferred within request body.
Job name of the executed job will be returned in the Response object
or message describing error occurred. To determine if the call successful or not you should
rely on result parameter in response.
Example Request:
POST /kettle/addJob/?xml=Y
Request body should contain xml containing job_configuration (job + job_execution_configuration wrapped in job_configuration tag).
| name | description | type |
|---|---|---|
| xml | Boolean flag set to either Y or N describing if xml or html reply
should be produced. |
boolean, optional |
| element: | (custom) |
| media types: | text/xml, text/html |
Response wraps job name that was executed or error stack trace
if an error occurred. Response has result OK if there were no errors. Otherwise it returns ERROR.
Example Response:
OK
Job 'dummy_job' was added to the list with id 1e90eca8-4d4c-47f7-8e5c-99ec36525e7c
1e90eca8-4d4c-47f7-8e5c-99ec36525e7c
| code | description |
|---|---|
| 200 | Request was processed and XML response is returned. |
| 500 | Internal server error occurs during request processing. |
doGet in interface CartePluginInterfacedoGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionpublic String getService()
getService in interface CarteServletInterfacepublic String getContextPath()
getContextPath in interface CartePluginInterface