Class BaseServlet

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
    Direct Known Subclasses:
    ExecutionServlet

    public class BaseServlet
    extends org.apache.sling.api.servlets.SlingAllMethodsServlet
    Author:
    Bryan Chavez
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseServlet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void sendInternalServerError​(org.apache.sling.api.SlingHttpServletResponse response)  
      protected void setNoCache​(javax.servlet.http.HttpServletResponse response)  
      protected boolean validateParameter​(String param)  
      protected void writeResult​(org.apache.sling.api.SlingHttpServletResponse response, String json)  
      protected void writeResult​(org.apache.sling.api.SlingHttpServletResponse response, String json, int status)  
      • 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, doGet, 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

      • BaseServlet

        public BaseServlet()
    • Method Detail

      • setNoCache

        protected void setNoCache​(javax.servlet.http.HttpServletResponse response)
      • writeResult

        protected void writeResult​(org.apache.sling.api.SlingHttpServletResponse response,
                                   String json,
                                   int status)
                            throws IOException
        Throws:
        IOException
      • writeResult

        protected void writeResult​(org.apache.sling.api.SlingHttpServletResponse response,
                                   String json)
                            throws IOException
        Throws:
        IOException
      • sendInternalServerError

        protected void sendInternalServerError​(org.apache.sling.api.SlingHttpServletResponse response)
                                        throws IOException
        Throws:
        IOException
      • validateParameter

        protected boolean validateParameter​(String param)