/**
* This file is auto generated from JavaDoc. Do not modify it manually.
*/
import type { Node } from "../../types/javax/jcr/Node";
import type { String } from "../../types/java/lang/String";
/**
* Folder utility interface that handles nodes with primary node type sv:folder.
*
*
* Note! This interface is used to create folders. You would typically use * {@link senselogic.sitevision.api.webresource.structure.StructureUtil} to move a folder * and {@link senselogic.sitevision.api.webresource.structure.TrashcanUtil} to delete a folder. *
* *
* An instance of the Sitevision class implementing this interface can be obtained via {@link senselogic.sitevision.api.Utils#getFolderUtil()}.
* See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the Utils interface.
*
* The parent may be either a {@code sv:sitePage}, {@code sv:page}, {@code sv:folder}, {@code sv:article}, {@code sv:collaborationGroupPage},
* {@code sv:imageRepository}, {@code sv:localImageRepository}, {@code sv:personalImageRepository},
* {@code sv:fileRepository}, {@code sv:localFileRepository}, {@code sv:personalFileRepository}
* or {@code sv:templateRepository}.
* If an other parent is specified an ConstraintViolationException is thrown.
*
* Any name can be given the folder. If null is provided a NullPointerException is thrown.
*
* The current user must be authorized to create folders and to do write operations on the parent node or a
* ConstraintViolationException will be thrown. Note that creation of a folder in the sv:personalFileRepository or
* sv:localImageRepository of a sv:collaborationGroup is also allowed for members of the group.
*
Note that a new folder inherits metadata and permissions from its parent.
* @param aParent the parent node of the sv:folder. May not benull
* @param aName the name of the folder. May not be null
* @return the newly created sv:folder node.
* @throws ConstraintViolationException if an invalid parent is specified or if the current user
is not authorized to create a folder
* @throws RepositoryException if something else goes wrong
*/
createFolder(aParent: Node, aName: String | string): Node;
/**
* Alters the name of a folder.
*
*
* If no folder is specified a NullPointerException is thrown.
* If the node is not a sv:folder an IllegalArgumentException is thrown.
*
* Any name can be given a folder. If null is provided a NullPointerException is thrown.
*
* The current user must be authorized to do write operations on the folder or a ConstraintViolationException will be thrown.
* Note that rename of a folder in the sv:personalFileRepository or sv:localImageRepository of a sv:collaborationGroup is also allowed
* for members of the group.
*
null
* @param aName the new name of the folder. May not be null
* @throws ConstraintViolationException if the current user is not authorized to alter the name of the folder
* @throws RepositoryException if something else goes wrong
*/
renameFolder(aFolder: Node, aName: String | string): void;
/**
* Modifies versioning for a file folder (versioning only applies to new files created in the file folder).
*
*
* If no folder is specified a NullPointerException is thrown.
* If the node is not a sv:folder in a file tree an IllegalArgumentException is thrown.
*
* Current user must be authorized to do write operations on the folder or
* a ConstraintViolationException will be thrown.
*
* Current user (the invoker of this method) must have WRITE permission and MANAGE_DOWNLOAD_PROTECTION permission on the folder node that * should be updated (see {@link senselogic.sitevision.api.security.PermissionUtil.Permission#WRITE} * and {@link senselogic.sitevision.api.security.PermissionUtil.Permission#MANAGE_DOWNLOAD_PROTECTION}). *
* *
* If no folder is specified a NullPointerException is thrown.
* If the node is not a sv:folder in a file tree an IllegalArgumentException is thrown.
*
* Tip! Use {@link senselogic.sitevision.api.property.PropertyUtil} or {@link senselogic.sitevision.api.property.Properties} * to check current state, i.e. the "downloadProtected" boolean property. *
* @param aFolder the sv:folder. May not be null * @param aDownloadProtected the new state of download protection for aFolder * @throws ConstraintViolationException if the current user is not authorized to mutate aFolder * @throws RepositoryException if something else goes wrong * @since Sitevision 2022.08.1 */ setDownloadProtected(aFolder: Node, aDownloadProtected: boolean): void; } declare namespace FolderUtil {} declare var folderUtil: FolderUtil; export default folderUtil;