Interface WebApplicationRequestMapper

All Known Implementing Classes:
DefaultWebApplicationRequestMapper

public interface WebApplicationRequestMapper
The WebApplicationRequestMapper API.
Author:
Manfred Riem ([email protected])
  • Method Details

    • addServletMapping

      Set<String> addServletMapping(String servletName, String... urlPatterns)
      Add a servlet mapping.
      Parameters:
      servletName - the servlet name.
      urlPatterns - the URL patterns to map (aka mappings).
      Returns:
      the URL patterns that were added.
    • removeServletMapping

      String removeServletMapping(String urlPattern)
      Remove a mapping.
      Parameters:
      urlPattern - the URL pattern
      Returns:
      the Servlet name the pattern was mapped to, or null if no prior mapping.
    • addFilterMapping

      default Set<String> addFilterMapping(String filterName, String... urlPatterns)
      Add a filter mapping.

      This adds the filter mappings at the end of list of existing mappings (if any).

      Parameters:
      filterName - the filter name.
      urlPatterns - the URL patterns to map (aka mappings).
      Returns:
      the URL patterns that were added.
    • addFilterMapping

      Set<String> addFilterMapping(Set<jakarta.servlet.DispatcherType> dispatcherTypes, String filterName, String... urlPatterns)
      Add a filter mapping.

      This adds the filter mappings at the end of list of existing mappings (if any).

      Parameters:
      dispatcherTypes - the dispatcher types.
      filterName - the filter name.
      urlPatterns - the URL patterns to map (aka mappings).
      Returns:
      the URL patterns that were added.
    • addFilterMappingBeforeExisting

      default Set<String> addFilterMappingBeforeExisting(String filterName, String... urlPatterns)
      Add a filter mapping.

      This adds the filter mappings at the start of list of existing mappings (if any). If there are existing mappings these are shifted to the right.

      Parameters:
      filterName - the filter name.
      urlPatterns - the URL patterns to map (aka mappings).
      Returns:
      the URL patterns that were added.
    • addFilterMappingBeforeExisting

      Set<String> addFilterMappingBeforeExisting(Set<jakarta.servlet.DispatcherType> dispatcherTypes, String filterName, String... urlPatterns)
      Add a filter mapping.

      This adds the filter mappings at the start of list of existing mappings (if any). If there are existing mappings these are shifted to the right.

      Parameters:
      dispatcherTypes - the dispatcher types.
      filterName - the filter name.
      urlPatterns - the URL patterns to map (aka mappings).
      Returns:
      the URL patterns that were added.
    • findFilterMappings

      default Collection<String> findFilterMappings(String path)
      Find the filter mappings for the given path.
      Parameters:
      path - the path.
      Returns:
      the mappings.
    • findFilterMappings

      Collection<String> findFilterMappings(jakarta.servlet.DispatcherType dispatcherType, String path)
      Find the filter mappings for the given path.
      Parameters:
      dispatcherType - the dispatcher type.
      path - the path.
      Returns:
      the mappings.
    • findServletMapping

      WebApplicationRequestMapping findServletMapping(String path)
      Find the servlet mapping for the given path.
      Parameters:
      path - the path.
      Returns:
      the mapping, or null if not found.
    • getServletMappings

      Collection<String> getServletMappings(String servletName)
      Get the mappings for the specified servlet.
      Parameters:
      servletName - the servlet name.
      Returns:
      the servlet mappings, or an empty collection if none.
    • getDefaultServlet

      default String getDefaultServlet()
      Get the default servlet.
      Returns:
      the default servlet.
    • getServletName

      String getServletName(String mapping)
      Get the servlet name for the specified mapping.
      Parameters:
      mapping - the mapping.
      Returns:
      the servlet name, or null if not found.