Class AbstractRestServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.avoka.fc.core.servlet.rest.AbstractRestServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable
Direct Known Subclasses:
RestApplicationPackageV1Servlet, RestArchiveV1Servlet, RestConfigurationServiceV1Servlet, RestDeliveryServiceV1Servlet, RestFormGroupsV1Servlet, RestGroovyServiceInvokeV1Servlet, RestGroovyServiceInvokeV2Servlet, RestJsAppDeployV1Servlet, RestServiceDefinitionsV1Servlet, RestTasksV1Servlet, RestTestCenterV1Servlet, RestTPacV1Servlet, RestTransactionHistoryV1Servlet, RestTransactionsV1Servlet

public abstract class AbstractRestServlet extends jakarta.servlet.http.HttpServlet
Provides an abstract REST service Servlet.
Since:
4.3.0
See Also:
  • Field Details

  • Constructor Details

    • AbstractRestServlet

      public AbstractRestServlet()
  • Method Details

    • getRestBasePath

      protected abstract String getRestBasePath()
      Returns:
      the REST API base path
    • getThreadObjectContext

      protected org.apache.cayenne.ObjectContext getThreadObjectContext()
    • getRequestPaths

      protected String[] getRequestPaths(jakarta.servlet.http.HttpServletRequest request)
    • getNonEmptyRequestPaths

      protected String[] getNonEmptyRequestPaths(jakarta.servlet.http.HttpServletRequest request)
    • marshallJsonObject

      protected Object marshallJsonObject(jakarta.servlet.http.HttpServletRequest request, Class objectClass) throws IOException, com.google.gson.JsonSyntaxException
      Throws:
      IOException
      com.google.gson.JsonSyntaxException
    • renderJsonResponse

      protected void renderJsonResponse(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object responseObject)
    • renderResponse

      protected void renderResponse(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String responseData, String contentType)
    • logRequest

      protected void logRequest(jakarta.servlet.http.HttpServletRequest request)
    • setNoCacheHeaders

      protected void setNoCacheHeaders(jakarta.servlet.http.HttpServletResponse response)
    • getUserAccount

      protected UserAccount getUserAccount(jakarta.servlet.http.HttpServletRequest request)
    • isAuthorized

      protected boolean isAuthorized(UserAccount userAccount, jakarta.servlet.http.HttpServletResponse response) throws IOException
      Throws:
      IOException
    • isAuthorized

      protected boolean isAuthorized(UserAccount userAccount, String permission, jakarta.servlet.http.HttpServletResponse response) throws IOException
      Throws:
      IOException
    • getRequestParamsMap

      protected Map<String,Object> getRequestParamsMap(jakarta.servlet.http.HttpServletRequest request) throws IOException
      Throws:
      IOException
    • getMultiPartRequestMap

      protected Map<String,Object> getMultiPartRequestMap(jakarta.servlet.http.HttpServletRequest request) throws IOException
      Throws:
      IOException