@WebServlet(value="/simpleDiscoverModel") public class JsonInjectorServlet extends AbstractJsonDiscoverer
JsonInjector
The servlet answers to POST HTTP calls. Receives as input a JSON document from which a model is discovered. The discovered model is returned as both image and xmi, both of them encoded as base64.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INJECTOR_ID
The ID for this servlet which will be used to access to the working directory
|
private static long |
serialVersionUID |
dotExePath, jsonParam, properties, serverURL, version, workingDir
Constructor and Description |
---|
JsonInjectorServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Performs a POST call to this servlet.
|
addResponseOptions, digestExceptionMessage, doOptions, drawModel, drawModel, drawObjectModel, encodeToString, encodeToString, encodeToString, init
doDelete, doGet, doHead, doPut, doTrace, getLastModified, service, service
private static final long serialVersionUID
public static final java.lang.String INJECTOR_ID
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
Receives a JSON document (in the parameter set in AbstractJsonDiscoverer.jsonParam
)
Discovers a model (using JsonInjector
) and returns two params:
doPost
in class javax.servlet.http.HttpServlet
request
- The Request of the callresponse
- The Response to the calljavax.servlet.ServletException
java.io.IOException
HttpServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)