/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { Node } from "../../types/javax/jcr/Node"; /** * Trashcan utility interface for delete and restore of nodes. * *
* An instance of the Sitevision class implementing this interface can be obtained via {@link senselogic.sitevision.api.Utils#getTrashcanUtil()}.
* See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the Utils interface.
*
* Puts a node in the site trashcan. *
** A node that has been deleted (i.e. put in the site trashcan) can later be restored using the method * {@link #restoreNode(javax.jcr.Node)} or be permanently removed with the method * {@link #deleteNodeFromTrashcan(javax.jcr.Node)}. *
** Valid node types are: *
*sv:archivesv:articlesv:collaborationGroupPage (since Sitevision 2023.02.1)sv:filesv:foldersv:imagesv:linksv:pagesv:template
* If any other node is specified a ConstraintViolationException is thrown.
*
* The current user must be authorized to delete objects, to alter the node and its current parent or
* a ConstraintViolationException is thrown
* (see {@link senselogic.sitevision.api.security.PermissionUtil#hasEffectiveDeletePermission(Node, Node)}).
*
* If no node is specified a NullPointerException is thrown.
*
null
* @throws ConstraintViolationException if an invalid node is specified or if the current user is not
authorized to perform the delete operation
* @throws RepositoryException if something else goes wrong
* @see senselogic.sitevision.api.security.PermissionUtil#hasEffectiveDeletePermission(Node, Node)
*/
moveNodeToTrashcan(aNode: Node): void;
/**
* * Restores a node from the site trashcan. *
*
* If the node is not in the site trashcan or if an invalid node type is specified
* (i.e. a node that never could be in the site trashcan like the sv:site node)
* a IllegalArgumentException is thrown.
*
* The current user must be authorized to alter the node and the parent node after the
* restore operation or a ConstraintViolationException is thrown.
*
* If no node is specified a NullPointerException is thrown.
*
* Deletes a node from the site trashcan. *
*
* If the node is not in the site trashcan or if an invalid node type is specified
* (i.e. a node that never could be in the site trashcan like the sv:site node)
* a IllegalArgumentException is thrown.
*
* The current user must be authorized to delete objects or a ConstraintViolationException is thrown.
*
* If no node is specified a NullPointerException is thrown.
*
null
* @throws ConstraintViolationException if the current user is not authorized to perform the delete operation
* @throws RepositoryException if something else goes wrong
*/
deleteNodeFromTrashcan(aNode: Node): void;
/**
* * Checks if a node is in the site trashcan *
* *
* If no node is specified a NullPointerException is thrown.
*
* Note that some nodes can't be put in the trashcan (e.g. sv:user, sv:color, sv:portlet, sv:layout etc).
* For such nodes false will be returned.
*
null
* @return true if the Node is in site trashcan, false otherwise
* @since Sitevision 6.2
*/
isInTrashcan(aNode: Node): boolean;
}
declare namespace TrashcanUtil {}
declare var trashcanUtil: TrashcanUtil;
export default trashcanUtil;