/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { Node } from "../../types/javax/jcr/Node"; import type { Date } from "../../types/java/util/Date"; import type { PublisherBuilder } from "../PublisherBuilder"; import type PublishStatus from "../PublishStatus"; /** * Publishing/unpublishing utility interface. * *
* Note that when publishing a child node and the parent node hasn't been published, the child node publishing * will be put on hold (marked with a pause sign in editor) until the parent is published. *
* ** When publishing a page - consider use of {@link Publisher} instead, which is a more powerful and flexible publishing interface. *
* *
* An instance of the Sitevision class implementing this interface can be obtained via
* {@link senselogic.sitevision.api.Utils#getPublishingUtil()}.
* See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the Utils interface.
*
* Publishes a node. *
*
* Valid nodes are sv:sitePage, sv:page, sv:article, sv:collaborationGroupPage,
* sv:template and sv:link (must be a "page link", a stand-alone link in the page tree).
* If another node is specified an IllegalArgumentException is thrown.
*
* If no node is specified a NullPointerException is thrown.
*
* The current user must be authorized to publish nodes or a ConstraintViolationException will be thrown.
*
null
* @throws ConstraintViolationException if current user is not authorized to publish nodes
* @throws RepositoryException if something else goes wrong
* @see senselogic.sitevision.api.security.PermissionUtil#hasEffectivePublishPermission(Node, Node)
* @see Publisher
*/
publishNode(aNode: Node): void;
/**
* * Schedules a node publish job for execution at a specified date. *
*
* Valid nodes are sv:sitePage, sv:page, sv:article, sv:collaborationGroupPage,
* sv:template and sv:link (must be a "page link", a stand-alone link in the page tree).
* If another node is specified an IllegalArgumentException is thrown.
*
* If no node is specified a NullPointerException is thrown.
*
* The current user must be authorized to publish nodes or a ConstraintViolationException will be thrown.
*
* Schedules a node publish job for execution at a specified date and a node unpublish job for execution at another date. *
*
* Valid nodes are sv:sitePage, sv:page, sv:article, sv:collaborationGroupPage,
* sv:template and sv:link (must be a "page link", a stand-alone link in the page tree).
* If another node is specified an IllegalArgumentException is thrown.
*
* If no node is specified a NullPointerException is thrown.
*
* The current user must be authorized to publish nodes or a ConstraintViolationException will be thrown.
*
* Publishes a node instantly with a best before notification date. *
*
* Valid nodes are sv:sitePage, sv:page, sv:article, sv:collaborationGroupPage,
* sv:template and sv:link (must be a "page link", a stand-alone link in the page tree).
* If another node is specified an IllegalArgumentException is thrown.
*
* If a aNotificationDate is before current date a notification will be sent instantly.
* If aNotificationDate is null, no notification will be sent.
*
* The current user must be authorized to publish nodes or a ConstraintViolationException will be thrown.
*
aNode is null.
* @throws IllegalArgumentException if aNode is of invalid type.
* @throws ConstraintViolationException if current user is not authorized to publish nodes.
* @throws RepositoryException on unexpected failures.
* @see senselogic.sitevision.api.security.PermissionUtil#hasEffectivePublishPermission(Node, Node)
* @see Publisher
* @since Sitevision 2.6.2_05
*/
publishNodeWithNotification(aNode: Node, aNotificationDate: Date): void;
/**
* * Schedules a node publish job for execution at a specified date with a best before notification date. *
*
* Valid nodes are sv:sitePage, sv:page, sv:article, sv:collaborationGroupPage,
* sv:template and sv:link (must be a "page link", a stand-alone link in the page tree).
* If another node is specified an IllegalArgumentException is thrown.
*
* If aNotificationDate is null no notification will be sent. If aNotificationDate
* is before aPublishDate no notification will be sent since node hasn't been published yet.
* If a aNotificationDate is before current date, a notification will be sent instantly.
*
* If aPublishDate is null or before current time, the node will be published instantly.
*
* The current user must be authorized to publish nodes or a ConstraintViolationException will be thrown.
*
aNode is null.
* @throws IllegalArgumentException if aNode is of invalid type.
* @throws ConstraintViolationException if current user is not authorized to publish nodes.
* @throws RepositoryException on unexpected failures.
* @see senselogic.sitevision.api.security.PermissionUtil#hasEffectivePublishPermission(Node, Node)
* @see Publisher
* @since Sitevision 2.6.2_05
*/
publishNodeWithNotification(
aNode: Node,
aPublishDate: Date,
aNotificationDate: Date
): void;
/**
* * Schedules a node publish job for execution at a specified date and a node unpublish job for execution at a later * date and a best before notification date. *
*
* Valid nodes are sv:sitePage, sv:page, sv:article, sv:collaborationGroupPage,
* sv:template and sv:link (must be a "page link", a stand-alone link in the page tree).
* If another node is specified an IllegalArgumentException is thrown.
*
* If aNotificationDate is null, no notification will be sent. If aNotificationDate is
* before aPublishDate no notification will be sent since node hasn't been published yet. If a
* aNotificationDate is before current date, a notification will be sent instantly.
*
* If aPublishDate is null or before current time, the node will be published instantly.
*
* If aUnpublishDate is before aPublishDate the unpublish job will run but won't affect
* the publishing, i.e. the node will be published at the given publish date.
*
* The current user must be authorized to publish nodes or a ConstraintViolationException will be thrown.
*
aNode or aUnpublishDate is null.
* @throws IllegalArgumentException if aNode is of invalid type.
* @throws ConstraintViolationException if current user is not authorized to publish nodes.
* @throws RepositoryException on unexpected failures.
* @see senselogic.sitevision.api.security.PermissionUtil#hasEffectivePublishPermission(Node, Node)
* @see Publisher
* @since Sitevision 2.6.2_05
*/
publishNodeWithNotification(
aNode: Node,
aPublishDate: Date,
aUnpublishDate: Date,
aNotificationDate: Date
): void;
/**
* Gets a PublisherBuilder instance that offers more flexible publishing options than the publish methods in this interface.
* @return a PublisherBuilder instance
* @since Sitevision 2026.08.1
*/
getPublisherBuilder(): PublisherBuilder;
/**
* * Unpublishes a node. *
*
* Valid nodes are sv:sitePage, sv:page, sv:article, sv:collaborationGroupPage,
* sv:template and sv:link (must be a "page link", a stand-alone link in the page tree).
* If another node is specified an IllegalArgumentException is thrown.
*
* If no node is specified a NullPointerException is thrown.
*
* The current user must be authorized to publish nodes or a ConstraintViolationException will be thrown.
*
* Schedules a node unpublish job for execution at a specified date. *
*
* Valid nodes are sv:sitePage, sv:page, sv:article, sv:collaborationGroupPage,
* sv:template and sv:link (must be a "page link", a stand-alone link in the page tree).
* If another node is specified an IllegalArgumentException is thrown.
*
* If no node is specified a NullPointerException is thrown.
*
* The current user must be authorized to publish nodes or a ConstraintViolationException will be thrown.
*
* Gets the publish status of a node. *
* *
* Valid nodes are sv:sitePage, sv:page, sv:article, sv:collaborationGroupPage,
* sv:template and sv:link (must be a "page link", a stand-alone link in the page tree).
* If another node is specified an IllegalArgumentException is thrown.
*
* If no node is specified a NullPointerException is thrown.
*
aNode is null
* @throws IllegalArgumentException if aNode is of invalid type
* @throws ConstraintViolationException if current user is not authorized to publish nodes
* @throws RepositoryException if something else goes wrong
* @since Sitevision 2024.01.2
*/
getPublishStatus(aNode: Node): PublishStatus;
/**
* * Clears the publish and unpublish schedule for a node. *
* *
* Valid nodes are sv:sitePage, sv:page, sv:article, sv:collaborationGroupPage,
* sv:template and sv:link (must be a "page link", a stand-alone link in the page tree).
* If another node is specified an IllegalArgumentException is thrown.
*
* If no node is specified a NullPointerException is thrown.
*
* The current user must be authorized to publish nodes and manage publishing locks or a ConstraintViolationException
* will be thrown.
*
aNode is null
* @throws IllegalArgumentException if aNode is of invalid type
* @throws ConstraintViolationException if current user is not authorized to clear the schedule for aNode
* @throws RepositoryException if something else goes wrong
* @since Sitevision 2024.01.2
*/
clearPublishingSchedule(aNode: Node): void;
}
declare namespace PublishingUtil {}
declare var publishingUtil: PublishingUtil;
export default publishingUtil;