/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { Node } from "../../types/javax/jcr/Node"; import type { Set } from "../../types/java/util/Set"; import type { String } from "../../types/java/lang/String"; import type { Collection } from "../../types/java/util/Collection"; /** * Redirect utility interface (301 redirects for "old urls"). * *

* An instance of the Sitevision class implementing this interface can be obtained via * {@link senselogic.sitevision.api.Utils#getRedirectUtil()}. * See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the Utils interface. *

* @author Magnus Lövgren * @since Sitevision 4.0.3 */ export interface RedirectUtil { /** * Gets all 301 redirect URIs registered for a specific node. * @param aNode a node, typically a sv:page * @return a set of 301 redirect URIs for aNode, never null */ getRedirectURIs(aNode: Node): Set; /** * Adds a relative URI that should trigger a 301 redirect to a specific node. * *

* Permission note! Current user must have {@link senselogic.sitevision.api.security.PermissionUtil.Permission#WRITE} on aNode. *

* @param aNode a node, typically a sv:page * @param aRelativeURI the relative URI that should trigger a 301 redirect to aNode. * @throws IllegalArgumentException if aNode is null or an invalid node, if aRelativeURI is null, whitespace-only or an absolute URI. * @throws RepositoryException if current user is not authorized to alter aNode, if aNode is already locked or something else goes wrong */ addRedirectURI(aNode: Node, aRelativeURI: String | string): void; /** * Adds a collection of relative URIs that should trigger 301 redirects to a specific node. * *

* Permission note! Current user must have {@link senselogic.sitevision.api.security.PermissionUtil.Permission#WRITE} on aNode. *

* @param aNode a node, typically a sv:page * @param aRelativeURIs a collection of relative URIs that should trigger 301 redirects to aNode. * @throws 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. * @throws RepositoryException if current user is not authorized to alter aNode, if aNode is already locked or something else goes wrong */ addRedirectURIs(aNode: Node, aRelativeURIs: Collection | unknown[]): void; /** * Removes a relative 301 redirect URI from a specific node. * *

* Permission note! Current user must have {@link senselogic.sitevision.api.security.PermissionUtil.Permission#WRITE} on aNode. *

* @param aNode a node, typically a sv:page * @param aRelativeURI the relative URI that should be removed from aNode. * @throws IllegalArgumentException if aNode is null or an invalid node, if aRelativeURI is null, whitespace-only or an absolute URI. * @throws RepositoryException if current user is not authorized to alter aNode, if aNode is already locked or something else goes wrong */ removeRedirectURI(aNode: Node, aRelativeURI: String | string): void; /** * Removes all relative 301 redirect URIs from a specific node. * *

* Permission note! Current user must have {@link senselogic.sitevision.api.security.PermissionUtil.Permission#WRITE} on aNode. *

* @param aNode a node, typically a sv:page * @throws IllegalArgumentException if aNode is null or an invalid node, * @throws RepositoryException if current user is not authorized to alter aNode, if aNode is already locked or something else goes wrong */ removeAllRedirectURIs(aNode: Node): void; } declare namespace RedirectUtil {} declare var redirectUtil: RedirectUtil; export default redirectUtil;