Class OpenCmsServlet.RequestCache

java.lang.Object
org.opencms.main.OpenCmsServlet.RequestCache
Enclosing class:
OpenCmsServlet

public static class OpenCmsServlet.RequestCache extends Object
Context class for storing request-dependent caches etc.
  • Constructor Details

  • Method Details

    • addLog

      public void addLog(String channel, String level, String message)
      Adds a log message to the log buffer.
      Parameters:
      channel - the channel
      level - the log level
      message - the message
    • close

      public void close()
      Called at the end of the request.
    • getAttribute

      public Object getAttribute(String key)
      Gets the attribute for the given key.
      Parameters:
      key - the key
      Returns:
      the attribute
    • getAttribute

      public Object getAttribute(String key, Function<String,Object> provider)
      Gets the stored attribute for the given key, or lazily initializes it with the given provider function if it doesn't exist yet.
      Parameters:
      key - the key
      provider - the function to lazily initialize the entry
      Returns:
      the attribute
    • getCachedConfig

      Gets the cached sitemap configuration data.
      Parameters:
      key - the key
      Returns:
      the sitemap config from the cache
    • setAttribute

      public void setAttribute(String key, Object value)
      Sets the attribute for the given key.
      Parameters:
      key - the key
      value - the attribute value
    • setCachedConfig

      public void setCachedConfig(String key, CmsADEConfigData config)
      Sets the cached sitemap configuration data.
      Parameters:
      key - the key
      config - the sitemap configuration to cache