/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { Node } from "../../types/javax/jcr/Node"; import type { Set } from "../../types/java/util/Set"; import type { String } from "../../types/java/lang/String"; /** *

* Subscriber utility interface. *

* *

* An instance of the Sitevision class implementing this interface can be obtained via * {@link senselogic.sitevision.api.Utils#getSubscriberUtil()}. * See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the Utils interface. *

* *

* To find an active subscription, use the property isActiveSubscription or the convenience method * {@link SubscriptionUtil#getActiveSubscription}. An active subscription is either sv:site, sv:page, * sv:archive or sv:article where the subscription functionality has been activated. * More information about subscriptions can be found in the Sitevision help pages. *

* *

* A subscriber is either an e-mail or a phone number. Phone number is only available if the Sitevision licence * contains the feature "sms". *

* *

* The write methods are fully synchronized and will never throw ConcurrentModificationExceptions. *

* @author Mikael Wikblom * @since Sitevision 2.6.1_10 */ export interface SubscriberUtil { /** *

Access to a Set of subscribers (i.e. e-mail and / or phone numbers) for an active subscription.

* *

This method will never throw exceptions.

* @param anActiveSubscription the active subscription Node * @return a Set of String with the subscribers. Will never return null */ getSubscribers(anActiveSubscription: Node): Set; /** *

* Method used to add an e-mail or phone number as a subscriber to the active subscription. * If the subscriber is already a subscriber nothing will be done. *

* *

* This method will not throw exceptions. *

* @param anActiveSubscription the active subscription Node * @param aSubscriber a String containing the e-mail or phone number of the subscriber * @return indicates that the subscriber is available as a subscriber after the operation */ addSubscriber( anActiveSubscription: Node, aSubscriber: String | string ): boolean; /** *

* Removes an e-mail or phone number from the subscribers of the active subscription. * If the subscriber is not a subscriber nothing will be done. *

* *

* This method will not throw exceptions. *

* @param anActiveSubscription the active subscription Node * @param aSubscriber a String containing the e-mail or phone number of the subscriber * @return indicates that the subscriber is not available as a subscriber after the operation */ removeSubscriber( anActiveSubscription: Node, aSubscriber: String | string ): boolean; /** *

* Finds out if an e-mail of phone number is already a subscriber to the active subscription. * Note that this method is much faster than getSubscribers(anActiveSubscription).contains(aSubscriber) *

* *

* This method will not throw exceptions. *

* @param anActiveSubscription the active subscription Node * @param aSubscriber a String containing the e-mail or phone number of the subscriber * @return indicates that the subscriber already is a subscriber to the active subscription */ isSubscriber( anActiveSubscription: Node, aSubscriber: String | string ): boolean; } declare namespace SubscriberUtil {} declare var subscriberUtil: SubscriberUtil; export default subscriberUtil;