/**
* 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";
import type { Map } from "../../types/java/util/Map";
import type { PageUtilConstants } from "../../types/senselogic/sitevision/api/render/velocity/VelocityAccess.PageUtilConstants";
/**
* Page utility interface that handles nodes with primary node type sv:page.
*
*
* Note! This interface is used to create and update pages. You would typically use * {@link senselogic.sitevision.api.webresource.structure.StructureUtil} to move a page * and {@link senselogic.sitevision.api.webresource.structure.TrashcanUtil} to delete a page. * {@link senselogic.sitevision.api.webresource.webcontent.WebContentUtil} can be used to update the content * of a page. *
* ** Important note! Methods in this interface operates in the * {@link senselogic.sitevision.api.versioning.VersionUtil#OFFLINE_VERSION}. * Hence, if you create a page, updates the name of a page or such, the page must be published * (see {@link senselogic.sitevision.api.versioning.PublishingUtil}) to have any effect in the * {@link senselogic.sitevision.api.versioning.VersionUtil#ONLINE_VERSION} *
* *
* An instance of the Sitevision class implementing this interface can be obtained via {@link senselogic.sitevision.api.Utils#getPageUtil()}.
* See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the Utils interface.
*
visibleInMenus.
* The property value must be of type Boolean.
title.
* The property value must be of type String.
shortId.
* The property value must be of type String.
locale.
*
* The property value must be of type Locale or a String that can be resolved to a non-null Locale
* via {@link senselogic.sitevision.api.i18n.LocaleUtil#getLocaleByString(String)}.
*
robotsIndex.
* The property value must be of type Boolean.
creationDate.
* The property value must be of type Date or a String on format yyyy-MM-dd HH:mm:ss where
* HH:mm:ss is optional (defaults to 00:00:00).
createdBy.
* The property value must be a {@link javax.jcr.Node} with primary node type sv:user or sv:systemUser.
*/ PROPERTY_CREATED_BY: "createdBy"; /** * Name of the property specifying the last modified date of the page. It corresponds to the sv:page propertylastModifiedDate.
* The property value must be of type Date or a String on format yyyy-MM-dd HH:mm:ss where
* HH:mm:ss is optional (defaults to 00:00:00).
lastModifiedBy.
* The property value must be of type {@link javax.jcr.Node} of type sv:user or sv:systemUser.
*/ PROPERTY_LAST_MODIFIED_BY: "lastModifiedBy"; /** * Name of the property specifying the last published date of a page. It corresponds to the sv:page propertylastPublishDate.
* The property value must be of type Date or a String on format yyyy-MM-dd HH:mm:ss, where
* HH:mm:ss is optional (defaults to 00:00:00).
lastPublishedBy.
* The property value must be a {@link javax.jcr.Node} with primary node type sv:user or sv:systemUser.
* @since Sitevision 3.5.3 */ PROPERTY_LAST_PUBLISHED_BY: "lastPublishedBy"; /** * Name of the property specifying the published date of a page. It corresponds to the sv:page propertypublishDate.
* The property value must be of type Date or a String on format yyyy-MM-dd HH:mm:ss, where
* HH:mm:ss is optional (defaults to 00:00:00).
publishedBy.
* The property value must be a {@link javax.jcr.Node} with primary node type sv:user or sv:systemUser.
* @since Sitevision 3.5.3 */ PROPERTY_PUBLISHED_BY: "publishedBy"; /** *
* Name of the property specifying the last user to unpublish a page.
* It corresponds to the sv:page property lastUnpublishedBy.
*
* The property value must be a {@link javax.jcr.Node} with primary node type sv:user or sv:systemUser. *
* @since Sitevision 2024.01.2 */ PROPERTY_LAST_UNPUBLISHED_BY: "lastUnpublishedBy"; /** *
* Name of the property specifying the last unpublished date of a page.
* It corresponds to the sv:page property lastUnpublishDate.
*
* The property value must be of type Date or a String on format yyyy-MM-dd HH:mm:ss,
* where HH:mm:ss is optional (defaults to 00:00:00).
*
* Creates a page as sub node to the specified parent. *
*
* The parent may be either a {@code sv:sitePage}, {@code sv:page}, {@code sv:folder}, {@code sv:article} or a
* {@code sv:collaborationGroupPage}.
* If other parent is specified a ConstraintViolationException is thrown.
*
Any name can be given a page, it should however not contain the character '/'.
* *If no parent, no template or no name is specified a NullPointerException is thrown.
The current user must be authorized to create pages, layouts and to do write operations on the parent node or
* a ConstraintViolationException will be thrown.
Note that a new page inherits metadata and permissions from its parent.
* *Use {@link senselogic.sitevision.api.webresource.webcontent.WebContentUtil#updateContent(javax.jcr.Node, java.util.Map)} * to add content to the new page.
* @param aParent the parent node of the page. May not benull
* @param aTemplate the template used for the page. May not be null
* @param aName the name of the sv:page. May not be null
* @return a sv:page node corresponding to the newly created page. Will never return null
* @throws ConstraintViolationException if an invalid parent is specified or if the current user
is not authorized to create a page
* @throws RepositoryException if something else goes wrong
* @see #createPage(javax.jcr.Node, javax.jcr.Node, String, java.util.Map, java.util.Map)
*/
createPage(aParent: Node, aTemplate: Node, aName: String | string): Node;
/**
* * Creates a page with properties and web content. *
*
* The parent may be either a {@code sv:sitePage}, {@code sv:page}, {@code sv:folder}, {@code sv:article}
* or a {@code sv:collaborationGroupPage}.
* If other parent is specified a ConstraintViolationException is thrown.
* It is possible to provide the web content for the page as well as page properties.
*
Properties:
*IllegalArgumentException is thrown
* If an invalid value is provided for a property, an IllegalArgumentException is thrown
Default values:
*The page content is specified using the * content map containing keys corresponding to layout names (e.g. "Huvudinnehåll") on the page and values containing the * HTML used to generate a portlet structure in the layout. The provided content is converted to * Sitevision text, table and image modules. It is also possible to specify that a horizontal or a vertical * layout should be created. For more information about the HTML to portlet mapping can be found in the * {@link senselogic.sitevision.api.webresource.webcontent.WebContentUtil} javadoc. * *
Any name can be given a page, it should however not contain the character '/'.
* *If no parent, no template or no name is specified a NullPointerException is thrown.
The current user must be authorized to create pages, layouts and to do write operations on the parent node or
* a ConstraintViolationException will be thrown.
Note that a new page inherits metadata and permissions from its parent.
* @param aParent the parent node of the page. May not benull
* @param aTemplate the sv:template node to be used for the page. May not be null
* @param aName the name of the sv:page. May not be null
* @param properties the page properties. May be null
* @param content a map containing the HTML content. The keys must correspond to layout names on the node. May be null
* @return a sv:page node corresponding to the newly created page. Will never return null
* @throws ConstraintViolationException if an invalid parent is specified or if the current user
is not authorized to create the page
* @throws RepositoryException if something else goes wrong
* @see #createPage(javax.jcr.Node, javax.jcr.Node, String)
*/
createPage(
aParent: Node,
aTemplate: Node,
aName: String | string,
properties: Map | {},
content: Map | {}
): Node;
/**
* Updates the properties of a page. If no page is specified a NullPointerException
* is thrown. If the node is not a sv:page an IllegalArgumentException is thrown.
Properties:
*IllegalArgumentException is thrown
* If an invalid value is provided for a property, an IllegalArgumentException is thrown.
The current user must be authorized to do write operations on the page or
* a ConstraintViolationException will be thrown.
If no properties map is specified a NullPointerException is thrown.
null
* @param properties the page properties. May not be null
* @throws ConstraintViolationException if the current user is not authorized to alter the page
* @throws RepositoryException if something else goes wrong
*/
updatePage(aPage: Node, properties: Map | {}): void;
/**
* Alters the name of a page. If no page is specified a NullPointerException
* is thrown. If the node is not a sv:page an IllegalArgumentException is thrown.
Any name can be given a page, it should however not contain the character '/'. If null is
* provided a NullPointerException is thrown.
The current user must be authorized to do write operations on the page or
* a ConstraintViolationException will be thrown.
null
* @param aName the new name of the page. May not be null
* @throws ConstraintViolationException if the current user is not authorized to alter the name of the
page
* @throws RepositoryException if something else goes wrong
*/
renamePage(aPage: Node, aName: String | string): void;
}
declare namespace PageUtil {}
declare var pageUtil: PageUtil;
export default pageUtil;