Copyright© 2008-2018 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
|
java.util.List<Node> |
getBookmarks()
Returns a list of
Node objects for all bookmarks belonging to
the current user regardless of category. |
java.util.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.
|
java.util.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)null
java.util.List<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:article
categories
- a comma separated list of categories to where this bookmark belongsIllegalArgumentException
- if bookmark
is node of wrong typeNullPointerException
- if bookmark
is null
void add(Node bookmark)
bookmark
- the node to be bookmarked must be a sv:page
,
sv:sitePage
or an sv:article
IllegalArgumentException
- if bookmark is node of wrong typeNullPointerException
- if bookmark
is null
void remove(Node bookmark)
bookmark
- the bookmarkNullPointerException
- if bookmark
is null
boolean contains(Node bookmark)
bookmark
- the bookmarkNullPointerException
- if bookmark
is null
boolean 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 - Portal and Content Management Made Easy
SiteVision is an advanced Java enterprise portal product and a portlet container (JSR 286) that implements Java Content Repository (JSR 283).
Copyright© 2008-2018 SiteVision AB, all rights reserved.