BookmarkService

public interface BookmarkService

Service interface for management of course bookmarks for a user. This is used to maintain the progress of a user in the curriculum.

Methods

createBookmark

Bookmark createBookmark(Bookmark bookmark)

Creates a bookmark for a user.

Parameters:
  • bookmark – bookmark object to save
Returns:

bookmark object created in the store

deleteAllBookmarksForUser

void deleteAllBookmarksForUser(String externalId)

Deletes all bookmarks for a given user.

Parameters:
  • externalId – external tracking id for the user

deleteBookmark

void deleteBookmark(long bookmarkId)

Deletes a bookmark with the given id.

Parameters:
  • bookmarkId – id of the bookmark

getAllBookmarksForUser

List<Bookmark> getAllBookmarksForUser(String externalId)

Gets all the bookmarks for a user.

Parameters:
  • externalId – external tracking id for the user
Returns:

list of bookmarks for user

getBookmarkById

Bookmark getBookmarkById(long bookmarkId)

Gets bookmark by bookmark id.

Parameters:
  • bookmarkId – id of the bookmark
Returns:

bookmark object with the id

getLatestBookmarkByUserId

Bookmark getLatestBookmarkByUserId(String externalId)

Gets the latest bookmark for the user identified by the externalId.

Parameters:
  • externalId – external tracking id for the user
Returns:

bookmark object for the user or null if no bookmarks exist for user

updateBookmark

Bookmark updateBookmark(Bookmark bookmark)

Updates the given bookmark for the user.

Parameters:
  • bookmark – bookmark to update
Returns:

updated bookmark object