Package org.camunda.bpm.webapp.impl.util
Class ServletContextUtil
java.lang.Object
org.camunda.bpm.webapp.impl.util.ServletContextUtil
With Camunda Platform 7.13 we introduced the application path prefix /camunda to Spring Boot.
 The application path is set in Spring Boot's servlet context and is consumed by filters and
 servlets of the Camunda Platform Webapp. This util class holds the methods to get and set the
 application path.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected static StringbuildTelemetrySentAttribute(String webappName, String engineName) static StringgetAppPath(jakarta.servlet.ServletContext servletContext) Consumed by Camunda Platform CE & EE Webapp: Retrieves the application path from Spring Boot's servlet context.static DategetAuthCacheValidationTime(jakarta.servlet.ServletContext servletContext) ReturnsauthCacheValidationTimefrom servlet context to be used on initial login authentication.static booleanisTelemetryDataSentAlready(String webappName, String engineName, jakarta.servlet.ServletContext servletContext) static voidsetAppPath(String applicationPath, jakarta.servlet.ServletContext servletContext) Sets an application path into Spring Boot's servlet context.static voidsetCacheTTLForLogin(long cacheTimeToLive, jakarta.servlet.ServletContext servletContext) Sets in theAuthenticationFilterto be used on initial login authentication.static voidsetTelemetryDataSent(String webappName, String engineName, jakarta.servlet.ServletContext servletContext) Marks the web application as successfully sent to the engine as telemetry info
- 
Field Details- 
APP_PATH_ATTR_NAME- See Also:
 
- 
SUCCESSFUL_ET_ATTR_NAME- See Also:
 
- 
AUTH_CACHE_TTL_ATTR_NAME- See Also:
 
 
- 
- 
Constructor Details- 
ServletContextUtilpublic ServletContextUtil()
 
- 
- 
Method Details- 
getAppPathConsumed by Camunda Platform CE & EE Webapp: Retrieves the application path from Spring Boot's servlet context.- Parameters:
- servletContext- that holds the application path
- Returns:
- a non-empty Stringcontaining the application path or an emptyStringwhen no application path was set.
 
- 
setAppPathpublic static void setAppPath(String applicationPath, jakarta.servlet.ServletContext servletContext) Sets an application path into Spring Boot's servlet context.- Parameters:
- applicationPath- to be set into Spring Boot's servlet context
- servletContext- of Spring Boot the application path should be set into
 
- 
isTelemetryDataSentAlreadypublic static boolean isTelemetryDataSentAlready(String webappName, String engineName, jakarta.servlet.ServletContext servletContext) - Returns:
- whether the web application has already successfully been sent to the engine as telemetry info or not.
 
- 
setTelemetryDataSentpublic static void setTelemetryDataSent(String webappName, String engineName, jakarta.servlet.ServletContext servletContext) Marks the web application as successfully sent to the engine as telemetry info
- 
buildTelemetrySentAttribute
- 
setCacheTTLForLoginpublic static void setCacheTTLForLogin(long cacheTimeToLive, jakarta.servlet.ServletContext servletContext) Sets in theAuthenticationFilterto be used on initial login authentication. SeeAuthenticationFilter.doFilter(ServletRequest, ServletResponse, FilterChain)
- 
getAuthCacheValidationTimeReturnsauthCacheValidationTimefrom servlet context to be used on initial login authentication. SeeUserAuthenticationResource.doLogin(String, String, String, String)
 
-