public class NextSequenceValueServlet extends BaseHttpServlet implements CartePluginInterface
Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT_PATH |
static String |
PARAM_INCREMENT |
static String |
PARAM_NAME |
static String |
XML_TAG |
static String |
XML_TAG_ERROR |
static String |
XML_TAG_INCREMENT |
static String |
XML_TAG_VALUE |
Constructor and Description |
---|
NextSequenceValueServlet() |
NextSequenceValueServlet(TransformationMap transformationMap) |
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, setup
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
isJettyMode, setJettyMode, setup
public static final String CONTEXT_PATH
public static final String PARAM_NAME
public static final String PARAM_INCREMENT
public static final String XML_TAG
public static final String XML_TAG_VALUE
public static final String XML_TAG_INCREMENT
public static final String XML_TAG_ERROR
public NextSequenceValueServlet()
public NextSequenceValueServlet(TransformationMap transformationMap)
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
Increments specified pre-configured sequence. Method is used for reserving a number of IDs and incrementing a sequence pre-configured in Carte server configuration by specified amount. If no increment value provided 10000 is used by default.
Example Request:
GET /kettle/nextSequence?name=test_seq
name | description | type |
---|---|---|
name | name of the sequence specified in Carte configuration file. | query |
increment | (optional) parameter used for incrementing sequence. If no parameter specified 10000 is used by default. | integer, optional |
text: | HTML |
media types: | text/xml |
Response XML containing sequence value and the increment value used.
Example Response:
570000 10000
code | description |
---|---|
200 | Request was processed. |
404 | If the sequence was not found or error occurred during allocation |
500 | Internal server error occurs during request processing. |
doGet
in interface CartePluginInterface
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
public String getService()
getService
in interface CarteServletInterface
public String getContextPath()
getContextPath
in interface CartePluginInterface