/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { Node } from "../../types/javax/jcr/Node"; /** * Utility interface for alterations of the node structure. * *
* Note! Use {@link senselogic.sitevision.api.webresource.structure.TrashcanUtil} to * "move a Node to the Trashcan" or "restore a Node from the Trashcan". *
* *
* An instance of the Sitevision class implementing this interface can be obtained via
* {@link senselogic.sitevision.api.Utils#getStructureUtil()}. See {@link senselogic.sitevision.api.Utils}
* for how to obtain an instance of the Utils interface.
*
* Moves a node from the current parent to another in the node structure. *
* ** Trashcan note! A Node that resides in the Trashcan can not be moved. * Also, a Node can not be moved to the Trashcan (or to any Node that resides in the Trashcan). * Use {@link TrashcanUtil} to move a Node to the Trashcan or restore a Node from the Trashcan. *
* ** Currently supported node types are: *
*sv:articlesv:archivesv:collaborationGroupPage (since Sitevision 2023.02.1)sv:filesv:foldersv:imagesv:linksv:pagesv:template
* The valid structures are listed below. Any other, invalid combination will result in a ConstraintViolationException.
*
* Parent restrictions *
*| Node | *Allowed parents | *
|---|---|
sv:article |
* sv:archive |
*
sv:archive |
* sv:sitePage, sv:page, sv:folder, sv:article |
*
sv:collaborationGroupPage |
* sv:collaborationGroupFolder |
*
sv:file |
* sv:folder, *fileRepos |
*
sv:folder |
* sv:sitePage, sv:page, sv:folder, sv:article, sv:templateRepository, *fileRepos |
*
sv:image |
* sv:folder, *fileRepos |
*
sv:link |
* sv:sitePage, sv:page, sv:folder, sv:article |
*
sv:page |
* sv:sitePage, sv:page, sv:folder, sv:article |
*
sv:template |
* sv:folder, sv:templateRepository |
*
* Root restrictions *
*| Node | *Allowed root nodes | *
|---|---|
sv:article |
* sv:sitePage |
*
sv:archive |
* sv:sitePage |
*
sv:collaborationGroupPage |
* sv:sitePage |
*
sv:file |
* sv:folder, *fileRepos |
*
sv:folder |
* sv:sitePage, sv:templateRepository, *fileRepos |
*
sv:image |
* *fileRepos |
*
sv:link |
* sv:sitePage |
*
sv:page |
* sv:sitePage |
*
sv:template |
* sv:templateRepository |
*
* (*fileRepos corresponds to sv:fileRepository, sv:imageRepository, sv:localFileRepository, sv:localImageRepository)
*
* If the node or the parent is null a NullPointerException is thrown.
*
* Requires {@link senselogic.sitevision.api.security.PermissionUtil.Permission#MOVE_NODE} and
* {@link senselogic.sitevision.api.security.PermissionUtil.Permission#WRITE} on aNode
* If the user is not authorized to alter aNode a ConstraintViolationException is thrown.
*
* Requires {@link senselogic.sitevision.api.security.PermissionUtil.Permission#WRITE} on aParent and current container of aNode
* If the user is not authorized to write on aParent or the current container of aNode a ConstraintViolationException is thrown.
*
* If the parent is descendant of the node a ConstraintViolationException is thrown.
*
* * Note! The move operation will be silently ignored if the node is already a child of the parent. * *
* @param aNode the node that is to be moved. May not benull
* @param aParent the new parent node. May not be null
* @throws ConstraintViolationException if current user is not authorized to move aNode to aParent
or if an invalid structure would be result of the operation
* @throws RepositoryException if something else goes wrong
*/
moveNode(aNode: Node, aParent: Node): void;
}
declare namespace StructureUtil {}
declare var structureUtil: StructureUtil;
export default structureUtil;