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

Bookmark utility interface. Bookmarks are potentially clustered between sitevision instances. * All altering methods in this class are synchronized.

* *

Note: Does NOT work for anonymous users!

* *

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

* @author Mikael Wikblom * @since Sitevision 2.6.1 */ export interface BookmarkUtil { /** * Returns a list of Node objects for all bookmarks belonging to * the current user regardless of category. This method only returns valid bookmarks * (existing, published objects) * @return a list of bookmark nodes. Is never null */ getBookmarks(): List; /** * Returns a list of Node objects corresponding to the bookmarks for * the current user and the provided categories. This method only returns valid bookmarks * (existing, published objects) * @param category a comma separated list of categories or null for no category * @return a list of bookmark nodes. Is never null */ getBookmarks(category: String | string): List; /** * Adds a bookmark for the current user. This operation is synchronized * @param bookmark the node to be bookmarked must be a sv:page, sv:sitePage or an sv:article * @param categories a comma separated list of categories to where this bookmark belongs * @throws IllegalArgumentException if bookmark is node of wrong type * @throws NullPointerException if bookmark is null * @deprecated Use {@link #add(javax.jcr.Node)}, categories will be resolved from metadata. */ add(bookmark: Node, categories: String | string): void; /** * Adds a bookmark for the current user. This operation is synchronized * @param bookmark the node to be bookmarked must be a sv:page, sv:sitePage or an sv:article * @throws IllegalArgumentException if bookmark is node of wrong type * @throws NullPointerException if bookmark is null */ add(bookmark: Node): void; /** * Removes a bookmark for the current user. This operation is synchronized * @param bookmark the bookmark * @throws NullPointerException if bookmark is null */ remove(bookmark: Node): void; /** * Checks if the current user has the provided bookmark * @param bookmark the bookmark * @return if the user has provided bookmark * @throws NullPointerException if bookmark is null */ contains(bookmark: Node): boolean; /** * Accesses a boolean indicating if the current site has a limited number of bookmarks. * * To get the max number of bookmarks, use {@link #getMaxNofBookmarks()}. * @return a boolean indicating if the current site has a limited number of bookmarks * @throws NullPointerException if current site is indeterminable * @see #getMaxNofBookmarks() * @since Sitevision 2.6.1_01 */ getLimitNofBookmarks(): boolean; /** * Accessor to max number of bookmarks for the current site. * @return max number of bookmarks for the current site * @throws NullPointerException if current site is indeterminable * @see #getLimitNofBookmarks() * @since Sitevision 2.6.1_01 */ getMaxNofBookmarks(): number; } declare namespace BookmarkUtil {} declare var bookmarkUtil: BookmarkUtil; export default bookmarkUtil;