Package org.pentaho.platform.web.servlet
Class GenericServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.pentaho.platform.web.servlet.ServletBase
org.pentaho.platform.web.servlet.GenericServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable,org.pentaho.platform.api.engine.ILogger
- See Also:
-
Field Summary
Fields inherited from class org.pentaho.platform.web.servlet.ServletBase
debugFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEADFields inherited from interface org.pentaho.platform.api.engine.ILogger
ACTIVITY_LOG, DEBUG, ERROR, FATAL, INFO, INSTANCE_LOG, SESSION_LOG, SOLUTION_LOG, TRACE, UNKNOWN, WARN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidallowBrowserCache(String maxAge, org.pentaho.platform.api.engine.IParameterProvider pathParams) protected booleandoesStaticResourceExist(org.pentaho.platform.api.engine.IPluginManager pluginManager, String pluginId, String staticResourceUrl) Checks if a static resource, given its relative URL actually exists.protected voiddoGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) protected voiddoPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) protected org.pentaho.platform.api.engine.ICacheManagerorg.apache.commons.logging.Logprotected org.pentaho.platform.api.engine.IOutputHandlergetOutputHandler(jakarta.servlet.http.HttpServletResponse response, boolean allowFeedback) protected org.pentaho.platform.api.engine.IPluginManagergetPluginManager(jakarta.servlet.http.HttpServletRequest request) voidinit()protected booleanisPluginCacheOn(org.pentaho.platform.api.engine.IPluginManager pluginManager, String pluginId) Checks if the cache is enabled for the given plugin.booleanisStaticResource(jakarta.servlet.http.HttpServletRequest request) Determines if the request is for an existing static resource handled by this content generator handler assuming it's being served via its default URL,/content.Methods inherited from class org.pentaho.platform.web.servlet.ServletBase
debug, debug, error, error, fatal, fatal, getLoggingLevel, getObjectName, getPentahoSession, info, info, setCorsHeaders, setLoggingLevel, trace, trace, warn, warnMethods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, init, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Constructor Details
-
GenericServlet
public GenericServlet()
-
-
Method Details
-
getLogger
public org.apache.commons.logging.Log getLogger()- Specified by:
getLoggerin classServletBase
-
init
public void init() throws jakarta.servlet.ServletException- Overrides:
initin classjakarta.servlet.GenericServlet- Throws:
jakarta.servlet.ServletException
-
isStaticResource
public boolean isStaticResource(@NonNull jakarta.servlet.http.HttpServletRequest request) Determines if the request is for an existing static resource handled by this content generator handler assuming it's being served via its default URL,/content.This particular method can be used without performing servlet initialization, via
init().The implementation of this method uses the exact same rules used by
doGet(HttpServletRequest, HttpServletResponse)to identify static resources. The two must be kept in sync.- Parameters:
request- The request.- Returns:
trueif the request is for a static resource;false, otherwise.
-
doesStaticResourceExist
protected boolean doesStaticResourceExist(@NonNull org.pentaho.platform.api.engine.IPluginManager pluginManager, @NonNull String pluginId, @NonNull String staticResourceUrl) Checks if a static resource, given its relative URL actually exists.This method is used by
isStaticResource(HttpServletRequest)to determine if a static resource actually exists, and not only whether its URL is public.This method uses the deprecated method
IPluginManager.getStaticResource(String)so that it behaves the closest possible todoGet(HttpServletRequest, HttpServletResponse).- Parameters:
pluginManager- The plugin manager.pluginId- The plugin ID.staticResourceUrl- The static resource URL.- Returns:
trueif the static resource exists;false, otherwise.
-
getCacheManager
protected org.pentaho.platform.api.engine.ICacheManager getCacheManager() -
isPluginCacheOn
protected boolean isPluginCacheOn(@NonNull org.pentaho.platform.api.engine.IPluginManager pluginManager, @NonNull String pluginId) Checks if the cache is enabled for the given plugin.- Parameters:
pluginManager- The plugin manager.pluginId- The plugin ID.- Returns:
trueif the cache is enabled;false, otherwise.
-
doPost
protected void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException - Overrides:
doPostin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException - Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-
allowBrowserCache
protected void allowBrowserCache(String maxAge, org.pentaho.platform.api.engine.IParameterProvider pathParams) -
getOutputHandler
protected org.pentaho.platform.api.engine.IOutputHandler getOutputHandler(jakarta.servlet.http.HttpServletResponse response, boolean allowFeedback) throws IOException - Throws:
IOException
-
getPluginManager
protected org.pentaho.platform.api.engine.IPluginManager getPluginManager(jakarta.servlet.http.HttpServletRequest request)
-