Package org.camunda.bpm.webapp.impl.util
Class ServletContextUtil
- java.lang.Object
-
- org.camunda.bpm.webapp.impl.util.ServletContextUtil
-
public class ServletContextUtil extends java.lang.ObjectWith 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 Summary
Fields Modifier and Type Field Description protected static java.lang.StringAPP_PATH_ATTR_NAMEprotected static java.lang.StringAUTH_CACHE_TTL_ATTR_NAMEprotected static java.lang.StringSUCCESSFUL_ET_ATTR_NAME
-
Constructor Summary
Constructors Constructor Description ServletContextUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static java.lang.StringbuildTelemetrySentAttribute(java.lang.String webappName, java.lang.String engineName)static java.lang.StringgetAppPath(javax.servlet.ServletContext servletContext)Consumed by Camunda Platform CE & EE Webapp: Retrieves the application path from Spring Boot's servlet context.static java.util.DategetAuthCacheValidationTime(javax.servlet.ServletContext servletContext)ReturnsauthCacheValidationTimefrom servlet context to be used on initial login authentication.static booleanisTelemetryDataSentAlready(java.lang.String webappName, java.lang.String engineName, javax.servlet.ServletContext servletContext)static voidsetAppPath(java.lang.String applicationPath, javax.servlet.ServletContext servletContext)Sets an application path into Spring Boot's servlet context.static voidsetCacheTTLForLogin(long cacheTimeToLive, javax.servlet.ServletContext servletContext)Sets {@param cacheTimeToLive} in theAuthenticationFilterto be used on initial login authentication.static voidsetTelemetryDataSent(java.lang.String webappName, java.lang.String engineName, javax.servlet.ServletContext servletContext)Marks the web application as successfully sent to the engine as telemetry info
-
-
-
Field Detail
-
APP_PATH_ATTR_NAME
protected static final java.lang.String APP_PATH_ATTR_NAME
- See Also:
- Constant Field Values
-
SUCCESSFUL_ET_ATTR_NAME
protected static final java.lang.String SUCCESSFUL_ET_ATTR_NAME
- See Also:
- Constant Field Values
-
AUTH_CACHE_TTL_ATTR_NAME
protected static final java.lang.String AUTH_CACHE_TTL_ATTR_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAppPath
public static java.lang.String getAppPath(javax.servlet.ServletContext servletContext)
Consumed 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.
-
setAppPath
public static void setAppPath(java.lang.String applicationPath, javax.servlet.ServletContext servletContext)Sets an application path into Spring Boot's servlet context.- Parameters:
applicationPath- to be set into Spring Boot's servlet contextservletContext- of Spring Boot the application path should be set into
-
isTelemetryDataSentAlready
public static boolean isTelemetryDataSentAlready(java.lang.String webappName, java.lang.String engineName, javax.servlet.ServletContext servletContext)- Returns:
- whether the web application has already successfully been sent to the engine as telemetry info or not.
-
setTelemetryDataSent
public static void setTelemetryDataSent(java.lang.String webappName, java.lang.String engineName, javax.servlet.ServletContext servletContext)Marks the web application as successfully sent to the engine as telemetry info
-
buildTelemetrySentAttribute
protected static java.lang.String buildTelemetrySentAttribute(java.lang.String webappName, java.lang.String engineName)
-
setCacheTTLForLogin
public static void setCacheTTLForLogin(long cacheTimeToLive, javax.servlet.ServletContext servletContext)Sets {@param cacheTimeToLive} in theAuthenticationFilterto be used on initial login authentication. SeeAuthenticationFilter.doFilter(ServletRequest, ServletResponse, FilterChain)
-
getAuthCacheValidationTime
public static java.util.Date getAuthCacheValidationTime(javax.servlet.ServletContext servletContext)
ReturnsauthCacheValidationTimefrom servlet context to be used on initial login authentication. SeeUserAuthenticationResource.doLogin(String, String, String, String)
-
-