Copyright© 2008-2026 Sitevision AB, all rights reserved.
@Requireable(value="BookmarkUtil") public interface BookmarkUtil
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 Utils.getBookmarkUtil().
See Utils for how to obtain an instance of the Utils interface.
| Modifier and Type | Method and Description |
|---|---|
void |
add(Node bookmark)
Adds a bookmark for the current user.
|
void |
add(Node bookmark,
String categories)
Deprecated.
Use
add(javax.jcr.Node), categories will be resolved from metadata. |
boolean |
contains(Node bookmark)
Checks if the current user has the provided bookmark
|
List<Node> |
getBookmarks()
Returns a list of
Node objects for all bookmarks belonging to
the current user regardless of category. |
List<Node> |
getBookmarks(String category)
Returns a list of
Node objects corresponding to the bookmarks for
the current user and the provided categories. |
boolean |
getLimitNofBookmarks()
Accesses a
boolean indicating if the current site has a limited number of bookmarks. |
int |
getMaxNofBookmarks()
Accessor to max number of bookmarks for the current site.
|
void |
remove(Node bookmark)
Removes a bookmark for the current user.
|
List<Node> getBookmarks()
Node objects for all bookmarks belonging to
the current user regardless of category. This method only returns valid bookmarks
(existing, published objects)nullList<Node> getBookmarks(String category)
Node objects corresponding to the bookmarks for
the current user and the provided categories. This method only returns valid bookmarks
(existing, published objects)category - a comma separated list of categories or null for no categorynull@Deprecated void add(Node bookmark, String categories)
add(javax.jcr.Node), categories will be resolved from metadata.bookmark - the node to be bookmarked must be a sv:page,
sv:sitePage or an sv:articlecategories - a comma separated list of categories to where this bookmark belongsIllegalArgumentException - if bookmark is node of wrong typeNullPointerException - if bookmark is nullvoid add(Node bookmark)
bookmark - the node to be bookmarked must be a sv:page,
sv:sitePage or an sv:articleIllegalArgumentException - if bookmark is node of wrong typeNullPointerException - if bookmark is nullvoid remove(Node bookmark)
bookmark - the bookmarkNullPointerException - if bookmark is nullboolean contains(Node bookmark)
bookmark - the bookmarkNullPointerException - if bookmark is nullboolean getLimitNofBookmarks()
boolean indicating if the current site has a limited number of bookmarks.
To get the max number of bookmarks, use getMaxNofBookmarks().boolean indicating if the current site has a limited number of bookmarksNullPointerException - if current site is indeterminablegetMaxNofBookmarks()int getMaxNofBookmarks()
NullPointerException - if current site is indeterminablegetLimitNofBookmarks()Sitevision - Content Management Made Easy
Sitevision is an advanced Java enterprise portal product that implements Java Content Repository (JSR 283).
Copyright© 2008-2026 Sitevision AB, all rights reserved.