Class ExecutionServlet

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class ExecutionServlet
    extends BaseServlet
    Author:
    Bryan Chavez
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doGet​(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)  
      protected de.valtech.aecu.api.service.HistoryEntry finishHistoryEntry​(de.valtech.aecu.api.service.HistoryEntry historyEntry, String historyEntryAction)  
      protected de.valtech.aecu.api.service.HistoryEntry getHistoryEntry​(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, String historyEntryAction)  
      protected String prepareJson​(de.valtech.aecu.api.service.ExecutionResult executionResult, String historyEntryPath)
      This method builds the JSON String for the response.
      • 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
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
    • Constructor Detail

      • ExecutionServlet

        public ExecutionServlet()
    • Method Detail

      • doGet

        protected void doGet​(org.apache.sling.api.SlingHttpServletRequest request,
                             org.apache.sling.api.SlingHttpServletResponse response)
                      throws javax.servlet.ServletException,
                             IOException
        Overrides:
        doGet in class org.apache.sling.api.servlets.SlingSafeMethodsServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • 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.AecuException
        IOException
      • 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 - result
        historyEntryPath - path to history node
        Returns:
        json String