Class RequestAttributeStoreServletFilter

java.lang.Object
net.ontopia.topicmaps.nav2.utils.RequestAttributeStoreServletFilter
All Implemented Interfaces:
jakarta.servlet.Filter

public class RequestAttributeStoreServletFilter extends Object implements jakarta.servlet.Filter
INTERNAL: Servlet filter that creates a new topic map store for each request.

The filter can be configured using the following configuration parameters:

topicMapId - The id of the topic map to create a store for. Mandatory.
repositoryId - The id of the topic map repository. The default is to use the default repository.
readOnly - A boolean specifying if the store should be readonly. The default is true.
requestAttribute - The name of the request attribute under which the store should be placed. The default can be retrieved through the getDefaultRequestAttribute. Override the default only when neccessary.

Since:
3.4
  • Field Details

    • filterConfig

      protected jakarta.servlet.FilterConfig filterConfig
  • Constructor Details

    • RequestAttributeStoreServletFilter

      public RequestAttributeStoreServletFilter()
  • Method Details

    • init

      public void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException
      Specified by:
      init in interface jakarta.servlet.Filter
      Throws:
      jakarta.servlet.ServletException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface jakarta.servlet.Filter
    • doFilter

      public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doFilter in interface jakarta.servlet.Filter
      Throws:
      IOException
      jakarta.servlet.ServletException
    • getDefaultRequestAttribute

      public static String getDefaultRequestAttribute()
    • getTopicMapId

      protected String getTopicMapId(jakarta.servlet.ServletRequest request)
    • getRepositoryId

      protected String getRepositoryId(jakarta.servlet.ServletRequest request)
    • getReadOnly

      protected boolean getReadOnly(jakarta.servlet.ServletRequest request)
    • getRequestAttribute

      protected String getRequestAttribute(jakarta.servlet.ServletRequest request)