/** * 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"; /** *
* Subscription utility interface. *
* *
* An instance of the Sitevision class implementing this interface can be obtained via
* {@link senselogic.sitevision.api.Utils#getSubscriptionUtil()}.
* See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the Utils interface.
*
Returns the active subscription Node of a Node. An active subscription
* is a sv:site, sv:page, sv:article or sv:archive that has activated
* the subscription functionality. More information about subscriptions can be found in the Sitevision help pages.
*
* ex: from the sitevision navigator
*
* - server
* ---site A (subscription activated, including all children)
* -----page 1
* -------archive X (subscription activated, including all children)
* ---------article V
* -----page 2 (subscription activated)
* -------page 21
*
* getActiveSubscription(site A) -> site A
* getActiveSubscription(page 1) -> site A
* getActiveSubscription(archive X) -> archive X
* getActiveSubscription(article V) -> archive X
* getActiveSubscription(page 2) -> page 2
* getActiveSubscription(page 21) -> null
*
To find out if a Node has active subscription use the property isActiveSubscription. This
* method is simply convenience to find the active Node.
This method will never throw exceptions
* @param aNode aNode in the navigation (e.g. a sv:page or an sv:article)
* @return a Node with activated subscription or null if not available
*/
getActiveSubscription(aNode: Node): Node;
/**
* Activates a subscription for the given Node.
The current user must have write subscription permission to activate subscriptions.
* @param aNode theNode to activate a subscription for.
* @param subtreeScope true if activation should include subnodes, false otherwise.
* @param title the subscription title.
* @param description the subscription description.
* @throws ConstraintViolationException if the current user isn't allowed to modify subscriptions.
* @throws IllegalArgumentException if the given node aNode is null or if the given node isn't a
subscriptionable node.
* @throws RepositoryException if something else goes wrong.
* @see senselogic.sitevision.api.security.PermissionUtil#hasWriteSubscriptionPermission(javax.jcr.Node, javax.jcr.Node)
* @since Sitevision 2.6.2_05
*/
activateSubscription(
aNode: Node,
subtreeScope: boolean,
title: String | string,
description: String | string
): void;
/**
* Deactivates the subscription for the given Node.
The current user must have write subscription permission to deactivate subscriptions.
* @param aNode theNode to deactivate the subscription for.
* @throws RepositoryException if the current user isn't allowed to modify subscriptions.
* @throws IllegalArgumentException if the given node aNode is null or if the given node isn't
a subscriptionable node.
* @see senselogic.sitevision.api.security.PermissionUtil#hasWriteSubscriptionPermission(javax.jcr.Node, javax.jcr.Node)
* @since Sitevision 2.6.2_05
*/
deactivateSubscription(aNode: Node): void;
/**
* Configures email properties for the subscription on the given node.
* *The current user must have write subscription permission to configure subscription email.
* @param aNode theNode to configure.
* @param from name of the sender.
* @param fromAddress email address of the sender.
* @param subject the email subject.
* @param footer the email footer
* @throws ConstraintViolationException if the current user isn't allowed to modify subscriptions.
* @throws IllegalArgumentException if the given node aNode is null, if the given node isn't
a subscriptionable node, if fromAddress is null or not a
valid email adress.
* @throws RepositoryException if something else goes wrong.
* @see senselogic.sitevision.api.security.PermissionUtil#hasWriteSubscriptionPermission(javax.jcr.Node, javax.jcr.Node)
* @since Sitevision 2.6.2_05
*/
configureSubscriptionEmail(
aNode: Node,
from: String | string,
fromAddress: String | string,
subject: String | string,
footer: String | string
): void;
/**
* Notifies the subscribers of a given node with an active subscription.
*
* * This method will use the settings of the active subscription to send mail notifications to all subscribers. * A properly configured active subscription has mail settings that specifies from, from address, * subject and a footer. The active subscription also has a mail template that is * used to create the actual body of the notification. The mail template for an active subscription * will typically include something like this: *
*
* The aNotificationText parameter of this method will be used as notification text in the mail template.
* In other words - if aNotificationText is null, the notification mail body will typically
* contain the URL and the footer only.
*
Node that has an active subscription, typically a sv:page or sv:article
* @param aNotificationText the notification text
* @return true if a notification could be scheduled, false otherwise
(e.g. if aNode is null or has no active subscription, see {@link #getActiveSubscription(javax.jcr.Node)})
* @since Sitevision 3.6.3
*/
notifySubscribersOf(aNode: Node, aNotificationText: String | string): boolean;
}
declare namespace SubscriptionUtil {}
declare var subscriptionUtil: SubscriptionUtil;
export default subscriptionUtil;