Package de.valtech.aecu.core.servlets
Class ExecutionServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- org.apache.sling.api.servlets.SlingSafeMethodsServlet
-
- org.apache.sling.api.servlets.SlingAllMethodsServlet
-
- de.valtech.aecu.core.servlets.BaseServlet
-
- de.valtech.aecu.core.servlets.ExecutionServlet
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class ExecutionServlet extends BaseServlet
- Author:
- Bryan Chavez
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringERROR_MESSAGE_MANDATORY-
Fields inherited from class de.valtech.aecu.core.servlets.BaseServlet
ERROR_MESSAGE_INTERNAL_SERVER
-
-
Constructor Summary
Constructors Constructor Description ExecutionServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)protected de.valtech.aecu.api.service.HistoryEntryfinishHistoryEntry(de.valtech.aecu.api.service.HistoryEntry historyEntry, String historyEntryAction)protected de.valtech.aecu.api.service.HistoryEntrygetHistoryEntry(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, String historyEntryAction)protected StringprepareJson(de.valtech.aecu.api.service.ExecutionResult executionResult, String historyEntryPath)This method builds the JSON String for the response.-
Methods inherited from class de.valtech.aecu.core.servlets.BaseServlet
sendInternalServerError, setNoCache, validateParameter, writeResult, writeResult
-
Methods inherited from class org.apache.sling.api.servlets.SlingAllMethodsServlet
doDelete, doPost, doPut, getAllowedRequestMethods, isMethodValid, mayService
-
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, service
-
-
-
-
Field Detail
-
ERROR_MESSAGE_MANDATORY
protected static final String ERROR_MESSAGE_MANDATORY
- See Also:
- Constant Field Values
-
-
Method Detail
-
doGet
protected void doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws javax.servlet.ServletException, IOException- Overrides:
doGetin classorg.apache.sling.api.servlets.SlingSafeMethodsServlet- Throws:
javax.servlet.ServletExceptionIOException
-
getHistoryEntry
protected de.valtech.aecu.api.service.HistoryEntry getHistoryEntry(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, String historyEntryAction) throws de.valtech.aecu.api.service.AecuException, IOException- Throws:
de.valtech.aecu.api.service.AecuExceptionIOException
-
finishHistoryEntry
protected de.valtech.aecu.api.service.HistoryEntry finishHistoryEntry(de.valtech.aecu.api.service.HistoryEntry historyEntry, String historyEntryAction) throws de.valtech.aecu.api.service.AecuException- Throws:
de.valtech.aecu.api.service.AecuException
-
prepareJson
protected String prepareJson(de.valtech.aecu.api.service.ExecutionResult executionResult, String historyEntryPath)
This method builds the JSON String for the response. Eg: {"success": true,"historyEntryPath":"/var/aecu/2018/6/13/152892696338961314"}- Parameters:
executionResult- resulthistoryEntryPath- path to history node- Returns:
- json String
-
-