org.olat.bookmark
Class BookmarkManager

java.lang.Object
  extended by org.olat.bookmark.BookmarkManager
Direct Known Subclasses:
BookmarkManagerImpl

public abstract class BookmarkManager
extends java.lang.Object


Constructor Summary
BookmarkManager()
           
 
Method Summary
abstract  void createAndPersistBookmark(Bookmark newBookmark)
           
abstract  java.lang.String createJumpInURL(Bookmark bookmark)
          Create a fully qualified URL that can be used to launch this bookmark e.g.
abstract  void deleteAllBookmarksFor(OLATResourceable res)
          Delete all bookmarks pointing to the given resourceable.
abstract  void deleteBookmark(Bookmark deletableBookmark)
           
abstract  void deleteUserData(Identity identity, java.lang.String newDeletedUserName)
          Delete all bookmarks for certain identity.
abstract  java.util.List findBookmarksByIdentity(Identity identity)
           
abstract  java.util.List findBookmarksByIdentity(Identity identity, java.lang.String type)
          Finds bookmarks of a specific type for an identity
static BookmarkManager getInstance()
          The getInstance Method loads the real implementation via spring and returns it as a singleton.
abstract  OLATResourceable getLaunchOlatResourceable(Bookmark chosenBm)
          calculates the URL for launching a bookmark
abstract  boolean isResourceableBookmarked(Identity identity, OLATResourceable res)
           
abstract  boolean launchBookmark(Bookmark bookmark, UserRequest ureq, WindowControl wControl)
          Launch the given bookmark
abstract  void setBookmarkHandlers(java.util.List<BookmarkHandler> newBookmarkHanlders)
          Spring setter method
abstract  void updateBookmark(Bookmark changedBookmark)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BookmarkManager

public BookmarkManager()
Method Detail

getInstance

public static final BookmarkManager getInstance()
The getInstance Method loads the real implementation via spring and returns it as a singleton. This is a convinience method.

Returns:
Singleton.

createAndPersistBookmark

public abstract void createAndPersistBookmark(Bookmark newBookmark)
Parameters:
newBookmark -

findBookmarksByIdentity

public abstract java.util.List findBookmarksByIdentity(Identity identity)
Parameters:
identity -
Returns:
a List of found bookmarks of given subject

findBookmarksByIdentity

public abstract java.util.List findBookmarksByIdentity(Identity identity,
                                                       java.lang.String type)
Finds bookmarks of a specific type for an identity

Parameters:
identity -
type -
Returns:
list of bookmarks for this identity

updateBookmark

public abstract void updateBookmark(Bookmark changedBookmark)
Parameters:
changedBookmark -

deleteBookmark

public abstract void deleteBookmark(Bookmark deletableBookmark)
Parameters:
deletableBookmark -

getLaunchOlatResourceable

public abstract OLATResourceable getLaunchOlatResourceable(Bookmark chosenBm)
calculates the URL for launching a bookmark

Parameters:
chosenBm -
Returns:
resourceablea instance

deleteAllBookmarksFor

public abstract void deleteAllBookmarksFor(OLATResourceable res)
Delete all bookmarks pointing to the given resourceable.

Parameters:
res -

isResourceableBookmarked

public abstract boolean isResourceableBookmarked(Identity identity,
                                                 OLATResourceable res)
Parameters:
identity -
res -
Returns:
true if resourceable is bookmarked

deleteUserData

public abstract void deleteUserData(Identity identity,
                                    java.lang.String newDeletedUserName)
Delete all bookmarks for certain identity.

See Also:
org.olat.user.UserDataDeletable#deleteUserData(org.olat.core.id.Identity)

launchBookmark

public abstract boolean launchBookmark(Bookmark bookmark,
                                       UserRequest ureq,
                                       WindowControl wControl)
Launch the given bookmark

Parameters:
bookmark -
ureq -
wControl -
Returns:
TRUE: launch successful; FALSE: no launcher found (unknonwn bookmark type)

createJumpInURL

public abstract java.lang.String createJumpInURL(Bookmark bookmark)
Create a fully qualified URL that can be used to launch this bookmark e.g. from a browser bookmark or an RSS feed document

Parameters:
bookmark -
Returns:
URL or NULL if not successful

setBookmarkHandlers

public abstract void setBookmarkHandlers(java.util.List<BookmarkHandler> newBookmarkHanlders)
Spring setter method

Parameters:
newBookmarkHanlders -