/** * 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. *

* @author Mikael Wikblom * @since Sitevision 2.6.2 */ export interface StructureUtil { /** *

* 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: *

* * *

* The valid structures are listed below. Any other, invalid combination will result in a ConstraintViolationException. *

* *

* Parent restrictions *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
NodeAllowed parents
sv:articlesv:archive
sv:archivesv:sitePage, sv:page, sv:folder, sv:article
sv:collaborationGroupPagesv:collaborationGroupFolder
sv:filesv:folder, *fileRepos
sv:foldersv:sitePage, sv:page, sv:folder, sv:article, sv:templateRepository, *fileRepos
sv:imagesv:folder, *fileRepos
sv:linksv:sitePage, sv:page, sv:folder, sv:article
sv:pagesv:sitePage, sv:page, sv:folder, sv:article
sv:templatesv:folder, sv:templateRepository
* *

* Root restrictions *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
NodeAllowed root nodes
sv:articlesv:sitePage
sv:archivesv:sitePage
sv:collaborationGroupPagesv:sitePage
sv:filesv:folder, *fileRepos
sv:foldersv:sitePage, sv:templateRepository, *fileRepos
sv:image*fileRepos
sv:linksv:sitePage
sv:pagesv:sitePage
sv:templatesv: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 be null * @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;