public class HostBasedVirtualURIMapping extends Object implements VirtualURIMapping
[] virtualURIMapping [] default - class info.magnolia.cms.beans.config.HostBasedVirtualURIMapping - fromURI / - toURI redirect:/.magnolia/pages/adminCentral.html [] hosts - 1 www.acme.com=forward:/acme/en/index.html - 2 www.acme.de=forward:/acme/de/index.html
VirtualURIMapping.MappingResult
Constructor and Description |
---|
HostBasedVirtualURIMapping() |
Modifier and Type | Method and Description |
---|---|
void |
addHost(String mapping)
Adds a host mapping (used by content2bean).
|
String |
getFromURI() |
List<String> |
getHosts() |
String |
getToURI() |
VirtualURIMapping.MappingResult |
mapURI(String uri)
Maps an incoming URI to a new target URI.
|
void |
setFromURI(String fromURI) |
void |
setHosts(List<String> hosts) |
void |
setToURI(String toURI) |
String |
toString() |
public void addHost(String mapping)
mapping
- in the form host=pathpublic 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
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 String getFromURI()
public void setFromURI(String fromURI)
public String getToURI()
public void setToURI(String toURI)
Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.