@Deprecated public class RegexpVirtualURIMapping extends DefaultVirtualURIMapping implements QueryAwareVirtualURIMapping
fromURI
, toURI
can contain references to the regexp matches. For example:
fromURI=/products/([0-9A-Z]+)\.html\?available(true|false) toURI=/product/detail.html?productId=$1&available=$2
VirtualURIMapping.MappingResult
fromURI, pattern, toURI
Constructor and Description |
---|
RegexpVirtualURIMapping()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isValid()
Deprecated.
Validate necessary info to check VirtualUriMapping is valid.
|
VirtualURIMapping.MappingResult |
mapURI(String uri)
Deprecated.
Maps an incoming URI to a new target URI.
|
VirtualURIMapping.MappingResult |
mapURI(String uri,
String queryString)
Deprecated.
Maps an incoming URI and queryString to a new target URI.
|
void |
setFromURI(String fromURI)
Deprecated.
|
getFromURI, getToURI, setToURI, toString
public VirtualURIMapping.MappingResult mapURI(String uri)
VirtualURIMapping
VirtualURIMapping.MappingResult
describing the new
URI and the level of match. The new URI can be prefixed with "redirect:", "permanent:" or "forward:" to trigger
either a temporary redirect, a permanent redirect or a forward respectively. For redirects the URI can be
absolute or relative within the web application (the context path is added automatically). If the mapping does
not apply to the input URI this method returns null.mapURI
in interface VirtualURIMapping
mapURI
in class DefaultVirtualURIMapping
uri
- the URI of the current request, decoded and without the context pathVirtualURIMapping.MappingResult
with the target URI and level or null if the mapping doesn't applypublic VirtualURIMapping.MappingResult mapURI(String uri, String queryString)
QueryAwareVirtualURIMapping
VirtualURIMapping.MappingResult
describing the new
URI and the level of match. The new URI can be prefixed with "redirect:", "permanent:" or "forward:" to trigger
either a temporary redirect, a permanent redirect or a forward respectively. For redirects the URI can be
absolute or relative within the web application (the context path is added automatically). If the mapping does
not apply to the input URI this method returns null.mapURI
in interface QueryAwareVirtualURIMapping
uri
- the URI of the current request, decoded and without the context pathqueryString
- the Query String of the current requestVirtualURIMapping.MappingResult
with the target URI and level or null if the mapping doesn't applypublic void setFromURI(String fromURI)
setFromURI
in class DefaultVirtualURIMapping
public boolean isValid()
VirtualURIMapping
isValid
in interface VirtualURIMapping
isValid
in class DefaultVirtualURIMapping
Copyright © 2003–2020 Magnolia International Ltd.. All rights reserved.