Class OpenCmsServlet.RequestCache

    • Constructor Summary

      Constructors 
      Constructor Description
      RequestCache()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addLog​(java.lang.String channel, java.lang.String level, java.lang.String message)
      Adds a log message to the log buffer.
      void close()
      Called at the end of the request.
      java.lang.Object getAttribute​(java.lang.String key)
      Gets the attribute for the given key.
      java.lang.Object getAttribute​(java.lang.String key, java.util.function.Function<java.lang.String,​java.lang.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.
      CmsADEConfigData getCachedConfig​(java.lang.String key)
      Gets the cached sitemap configuration data.
      void setAttribute​(java.lang.String key, java.lang.Object value)
      Sets the attribute for the given key.
      void setCachedConfig​(java.lang.String key, CmsADEConfigData config)
      Sets the cached sitemap configuration data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addLog

        public void addLog​(java.lang.String channel,
                           java.lang.String level,
                           java.lang.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 java.lang.Object getAttribute​(java.lang.String key)
        Gets the attribute for the given key.
        Parameters:
        key - the key
        Returns:
        the attribute
      • getAttribute

        public java.lang.Object getAttribute​(java.lang.String key,
                                             java.util.function.Function<java.lang.String,​java.lang.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

        public CmsADEConfigData getCachedConfig​(java.lang.String key)
        Gets the cached sitemap configuration data.
        Parameters:
        key - the key
        Returns:
        the sitemap config from the cache
      • setAttribute

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

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