info.magnolia.cms.beans.config
Class HostBasedRegexpVirtualURIMapping
java.lang.Object
info.magnolia.cms.beans.config.DefaultVirtualURIMapping
info.magnolia.cms.beans.config.HostBasedVirtualURIMapping
info.magnolia.cms.beans.config.HostBasedRegexpVirtualURIMapping
- All Implemented Interfaces:
- QueryAwareVirtualURIMapping, VirtualURIMapping
public class HostBasedRegexpVirtualURIMapping
- extends HostBasedVirtualURIMapping
- implements QueryAwareVirtualURIMapping
Virtual uri mapping implementation which combines functionality of HostBasedVirtualURIMapping
and RegexpVirtualURIMapping
.
regexp
protected Pattern regexp
HostBasedRegexpVirtualURIMapping
public HostBasedRegexpVirtualURIMapping()
mapURI
public VirtualURIMapping.MappingResult mapURI(String uri)
- Description copied from interface:
VirtualURIMapping
- Maps an incoming URI to a new target URI. Returns a
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.
- Specified by:
mapURI
in interface VirtualURIMapping
- Overrides:
mapURI
in class HostBasedVirtualURIMapping
- Parameters:
uri
- the URI of the current request, decoded and without the context path
- Returns:
- a
VirtualURIMapping.MappingResult
with the target URI and level or null if the mapping doesn't apply
mapURI
public VirtualURIMapping.MappingResult mapURI(String uri,
String queryString)
- Description copied from interface:
QueryAwareVirtualURIMapping
- Maps an incoming URI and queryString to a new target URI. Returns a
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.
- Specified by:
mapURI
in interface QueryAwareVirtualURIMapping
- Parameters:
uri
- the URI of the current request, decoded and without the context pathqueryString
- the Query String of the current request
- Returns:
- a
VirtualURIMapping.MappingResult
with the target URI and level or null if the mapping doesn't apply
setFromURI
public void setFromURI(String fromURI)
- Overrides:
setFromURI
in class DefaultVirtualURIMapping
Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.