Module cloud.piranha.webapp.api
Package cloud.piranha.webapp.api
Interface WebApplicationRequestMapper
- All Known Implementing Classes:
DefaultWebApplicationRequestMapper
public interface WebApplicationRequestMapper
The WebApplicationRequestMapper API.
- Author:
- Manfred Riem ([email protected])
-
Method Summary
Modifier and Type Method Description default java.util.Set<java.lang.String>
addFilterMapping(java.lang.String filterName, java.lang.String... urlPatterns)
Add a filter mapping.java.util.Set<java.lang.String>
addFilterMapping(java.util.Set<DispatcherType> dispatcherTypes, java.lang.String filterName, java.lang.String... urlPatterns)
Add a filter mapping.default java.util.Set<java.lang.String>
addFilterMappingBeforeExisting(java.lang.String filterName, java.lang.String... urlPatterns)
Add a filter mapping.java.util.Set<java.lang.String>
addFilterMappingBeforeExisting(java.util.Set<DispatcherType> dispatcherTypes, java.lang.String filterName, java.lang.String... urlPatterns)
Add a filter mapping.java.util.Set<java.lang.String>
addServletMapping(java.lang.String servletName, java.lang.String... urlPatterns)
Add a servlet mapping.default java.util.Collection<java.lang.String>
findFilterMappings(java.lang.String path)
Find the filter mappings for the given path.java.util.Collection<java.lang.String>
findFilterMappings(DispatcherType dispatcherType, java.lang.String path)
Find the filter mappings for the given path.WebApplicationRequestMapping
findServletMapping(java.lang.String path)
Find the servlet mapping for the given path.java.util.Collection<java.lang.String>
getServletMappings(java.lang.String servletName)
Get the mappings for the specified servlet.java.lang.String
getServletName(java.lang.String mapping)
Get the servlet name for the specified mapping.
-
Method Details
-
addServletMapping
java.util.Set<java.lang.String> addServletMapping(java.lang.String servletName, java.lang.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.
-
addFilterMapping
default java.util.Set<java.lang.String> addFilterMapping(java.lang.String filterName, java.lang.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
java.util.Set<java.lang.String> addFilterMapping(java.util.Set<DispatcherType> dispatcherTypes, java.lang.String filterName, java.lang.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 java.util.Set<java.lang.String> addFilterMappingBeforeExisting(java.lang.String filterName, java.lang.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
java.util.Set<java.lang.String> addFilterMappingBeforeExisting(java.util.Set<DispatcherType> dispatcherTypes, java.lang.String filterName, java.lang.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 java.util.Collection<java.lang.String> findFilterMappings(java.lang.String path)Find the filter mappings for the given path.- Parameters:
path
- the path.- Returns:
- the mappings.
-
findFilterMappings
java.util.Collection<java.lang.String> findFilterMappings(DispatcherType dispatcherType, java.lang.String path)Find the filter mappings for the given path.- Parameters:
dispatcherType
- the dispatcher type.path
- the path.- Returns:
- the mappings.
-
findServletMapping
Find the servlet mapping for the given path.- Parameters:
path
- the path.- Returns:
- the mapping, or null if not found.
-
getServletMappings
java.util.Collection<java.lang.String> getServletMappings(java.lang.String servletName)Get the mappings for the specified servlet.- Parameters:
servletName
- the servlet name.- Returns:
- the servlet mappings, or an empty collection if none.
-
getServletName
java.lang.String getServletName(java.lang.String mapping)Get the servlet name for the specified mapping.- Parameters:
mapping
- the mapping.- Returns:
- the servlet name, or null if not found.
-