Copyright© 2008-2026 Sitevision AB, all rights reserved.
@Requireable(value="RedirectUtil") public interface RedirectUtil
An instance of the Sitevision class implementing this interface can be obtained via
Utils.getRedirectUtil().
See Utils for how to obtain an instance of the Utils interface.
| Modifier and Type | Method and Description |
|---|---|
void |
addRedirectURI(Node aNode,
String aRelativeURI)
Adds a relative URI that should trigger a 301 redirect to a specific node.
|
void |
addRedirectURIs(Node aNode,
Collection<String> aRelativeURIs)
Adds a collection of relative URIs that should trigger 301 redirects to a specific node.
|
Set<String> |
getRedirectURIs(Node aNode)
Gets all 301 redirect URIs registered for a specific node.
|
void |
removeAllRedirectURIs(Node aNode)
Removes all relative 301 redirect URIs from a specific node.
|
void |
removeRedirectURI(Node aNode,
String aRelativeURI)
Removes a relative 301 redirect URI from a specific node.
|
Set<String> getRedirectURIs(Node aNode)
aNode - a node, typically a sv:pageaNode, never nullvoid addRedirectURI(Node aNode, String aRelativeURI) throws IllegalArgumentException, RepositoryException
Permission note! Current user must have PermissionUtil.Permission.WRITE on aNode.
aNode - a node, typically a sv:pageaRelativeURI - the relative URI that should trigger a 301 redirect to aNode.IllegalArgumentException - if aNode is null or an invalid node,
if aRelativeURI is null, whitespace-only or an absolute URI.RepositoryException - if current user is not authorized to alter aNode,
if aNode is already locked or something else goes wrongvoid addRedirectURIs(Node aNode, Collection<String> aRelativeURIs) throws IllegalArgumentException, RepositoryException
Permission note! Current user must have PermissionUtil.Permission.WRITE on aNode.
aNode - a node, typically a sv:pageaRelativeURIs - a collection of relative URIs that should trigger 301 redirects to aNode.IllegalArgumentException - if aNode is null or an invalid node,
if aRelativeURI is null, empty or doesn't contain any non-whitespace only or an non-absolute URI.RepositoryException - if current user is not authorized to alter aNode,
if aNode is already locked or something else goes wrongvoid removeRedirectURI(Node aNode, String aRelativeURI) throws IllegalArgumentException, RepositoryException
Permission note! Current user must have PermissionUtil.Permission.WRITE on aNode.
aNode - a node, typically a sv:pageaRelativeURI - the relative URI that should be removed from aNode.IllegalArgumentException - if aNode is null or an invalid node,
if aRelativeURI is null, whitespace-only or an absolute URI.RepositoryException - if current user is not authorized to alter aNode,
if aNode is already locked or something else goes wrongvoid removeAllRedirectURIs(Node aNode) throws IllegalArgumentException, RepositoryException
Permission note! Current user must have PermissionUtil.Permission.WRITE on aNode.
aNode - a node, typically a sv:pageIllegalArgumentException - if aNode is null or an invalid node,RepositoryException - if current user is not authorized to alter aNode,
if aNode is already locked or something else goes wrongSitevision - Content Management Made Easy
Sitevision is an advanced Java enterprise portal product that implements Java Content Repository (JSR 283).
Copyright© 2008-2026 Sitevision AB, all rights reserved.