/**
* 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 { LinkTarget } from "../../types/senselogic/sitevision/api/webresource/LinkTarget";
import type { Map } from "../../types/java/util/Map";
import type { LinkPageUtilConstants } from "../../types/senselogic/sitevision/api/render/velocity/VelocityAccess.LinkPageUtilConstants";
/**
* Link page utility interface that handles nodes in the page tree with primary node type sv:link.
*
*
* Note! This interface is used to create and update link pages. You would typically use * {@link senselogic.sitevision.api.webresource.structure.StructureUtil} to move a link page * and {@link senselogic.sitevision.api.webresource.structure.TrashcanUtil} to delete a link page. *
* ** Important note! Methods in this interface operates in the * {@link senselogic.sitevision.api.versioning.VersionUtil#OFFLINE_VERSION}. * Hence, if you create a link page, updates the name of a link 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 WebResourceFactory#getLinkPageUtil()}.
* See {@link WebResourceFactory} for how to obtain an instance of the WebResourceFactory interface.
*
visibleInMenus.
*
* 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 a link page. It corresponds to the sv:link 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 a {@link javax.jcr.Node} with primary node type sv:user or sv:systemUser. *
*/ PROPERTY_LAST_MODIFIED_BY: "lastModifiedBy"; /** * Name of the property specifying the last published date of a link page. It corresponds to the sv:link 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. *
*/ PROPERTY_LAST_PUBLISHED_BY: "lastPublishedBy"; /** * Name of the property specifying the published date of a link page. It corresponds to the sv:link 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. *
*/ PROPERTY_PUBLISHED_BY: "publishedBy"; /** *
* Name of the property specifying the last user to unpublish a link page.
* It corresponds to the sv:link 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 link page.
* It corresponds to the sv:link 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 link page as sub node of a specified parent. *
** The parent may be: *
*
* If other parent is specified a ConstraintViolationException is thrown.
*
* Any non-whitespace name can be given a link page, it should however not contain the character '/'. *
* *
* If no parent, no name or no link target is specified a NullPointerException is thrown.
*
* The current user must be authorized to create links and to do write operations on the parent node or
* a ConstraintViolationException will be thrown.
*
* Note that a new link page inherits metadata and permissions from its parent. *
* @param aParent the parent node of the link page. May not benull
* @param aName the name of the link page. May not be null or whitespace only
* @param aLinkTarget the target of the link page. May not be null
* @return a sv:link node corresponding to the newly created link page
* @throws ConstraintViolationException if an invalid parent is specified or if the current user
is not authorized to create a link page
* @throws RepositoryException if something else goes wrong
*/
createLinkPage(
aParent: Node,
aName: String | string,
aLinkTarget: LinkTarget
): Node;
/**
* * Creates a link page with properties as sub node of a specified parent. *
** The parent may be: *
*
* If other parent is specified a ConstraintViolationException is thrown.
*
* Any non-whitespace name can be given a link page, it should however not contain the character '/'. *
* *
* If no parent, no name or no link target is specified a NullPointerException is thrown.
*
* The current user must be authorized to create links and to do write operations on the parent node or
* a ConstraintViolationException will be thrown.
*
* It is possible to provide these properties for the link page: *
*
* If an invalid value is provided for a property, an IllegalArgumentException is thrown
*
* Default values: *
** Note that a new link page inherits metadata and permissions from its parent. *
* @param aParent the parent node of the link page. May not benull
* @param aName the name of the link page. May not be null or whitespace only
* @param aLinkTarget the target of the link page. May not be null
* @param aProperties the link page properties. May be null or empty
* @return a sv:link node corresponding to the newly created link page
* @throws ConstraintViolationException if an invalid parent is specified or if the current user
is not authorized to create the link page
* @throws RepositoryException if something else goes wrong
*/
createLinkPage(
aParent: Node,
aName: String | string,
aLinkTarget: LinkTarget,
aProperties: Map | {}
): Node;
/**
* * Updates the name of a link page. *
* ** Any non-whitespace name can be given a link page, it should however not contain the character '/'. *
* *
* If no link page or no name is specified a NullPointerException is thrown.
*
* The current user must be authorized to do write operations on the link page or
* a ConstraintViolationException will be thrown.
*
null
* @param aName the name of the link page. May not be null or whitespace only
* @throws ConstraintViolationException if an invalid link page is specified or if the current user
is not authorized to update the link page
* @throws RepositoryException if something else goes wrong
*/
renameLinkPage(aLinkPage: Node, aName: String | string): void;
/**
* * Updates the target of a link page. *
* *
* If no link page or no link target is specified a NullPointerException is thrown.
*
* The current user must be authorized to do write operations on the link page or
* a ConstraintViolationException will be thrown.
*
null
* @param aLinkTarget the target of the link page. May not be null
* @throws ConstraintViolationException if an invalid link page is specified or if the current user
is not authorized to update the link page
* @throws RepositoryException if something else goes wrong
*/
updateLinkPageTarget(aLinkPage: Node, aLinkTarget: LinkTarget): void;
/**
* * Updates the properties of a link page. *
* *
* If no link page is specified a NullPointerException is thrown.
*
* The current user must be authorized to do write operations on the link page or
* a ConstraintViolationException will be thrown.
*
* Properties: *
*
* If an invalid value is provided for a property, an IllegalArgumentException is thrown
*
* Default values: *
*null
* @param aProperties the link page properties. Should not be null or empty
* @throws ConstraintViolationException if an invalid link page is specified or if the current user
is not authorized to update the link page
* @throws RepositoryException if something else goes wrong
*/
updateLinkPage(aLinkPage: Node, aProperties: Map | {}): void;
}
declare namespace LinkPageUtil {}
declare var linkPageUtil: LinkPageUtil;
export default linkPageUtil;