public class RegexpVirtualUriMapping extends DefaultVirtualUriMapping
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.Result
Constructor and Description |
---|
RegexpVirtualUriMapping() |
Modifier and Type | Method and Description |
---|---|
Optional<VirtualUriMapping.Result> |
mapUri(URI uri)
Maps an incoming URI to a new target URI.
|
void |
setFromUri(String fromUri) |
getFromUri, getPattern, getToUri, isValid, setInternalFromUri, setToUri, toString
public void setFromUri(String fromUri)
setFromUri
in class DefaultVirtualUriMapping
public Optional<VirtualUriMapping.Result> mapUri(URI uri)
VirtualUriMapping
mapUri
in interface VirtualUriMapping
mapUri
in class DefaultVirtualUriMapping
uri
- a relative URI containing only the path and query components.
The path is relative to the magnolia servlet mapping; context path is already stripped.Copyright © 2003–2019 Magnolia International Ltd.. All rights reserved.