Class ServletContextUtil

java.lang.Object
org.operaton.bpm.webapp.neo.impl.util.ServletContextUtil

public final class ServletContextUtil extends Object
With Operaton.13 we introduced the application path prefix /operaton to Spring Boot. The application path is set in Spring Boot's servlet context and is consumed by filters and servlets of the Operaton Webapp. This util class holds the methods to get and set the application path.
  • Field Details

    • APP_PATH_ATTR_NAME

      protected static final String APP_PATH_ATTR_NAME
      Deliberately distinct from the legacy webapp's attribute name. Both webapps can be deployed into the same servlet context, and a shared key would mean whichever initializer ran last decided the application path for both — which previously left the neo SPA emitting its XSRF cookie under the legacy webapp's path.
      See Also:
    • SUCCESSFUL_ET_ATTR_NAME

      protected static final String SUCCESSFUL_ET_ATTR_NAME
      See Also:
    • AUTH_CACHE_TTL_ATTR_NAME

      protected static final String AUTH_CACHE_TTL_ATTR_NAME
      See Also:
  • Method Details

    • getAppPath

      public static String getAppPath(jakarta.servlet.ServletContext servletContext)
      Consumed by Operaton CE & EE Webapp: Retrieves the application path from Spring Boot's servlet context.
      Parameters:
      servletContext - that holds the application path
      Returns:
      a non-empty String containing the application path or an empty String when no application path was set.
    • setAppPath

      public 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
    • isTelemetryDataSentAlready

      public 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.
    • setTelemetryDataSent

      public 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

      protected static String buildTelemetrySentAttribute(String webappName, String engineName)
    • setCacheTTLForLogin

      public static void setCacheTTLForLogin(long cacheTimeToLive, jakarta.servlet.ServletContext servletContext)
    • getAuthCacheValidationTime

      public static Date getAuthCacheValidationTime(jakarta.servlet.ServletContext servletContext)
      Returns authCacheValidationTime from servlet context to be used on initial login authentication. See UserAuthenticationResource.doLogin(String, String, String, String)