Interface BookmarkProvider

    • Constructor Detail

    • Method Detail

      • getBookmarks

        @NonNull() abstract List<Bookmark> getBookmarks()

        Returns the list of bookmarks in the document.

        Note: this call may block for a while and should not be called on the main thread.

        Returns:

        List of bookmarks or empty list if this document contains no bookmarks.

      • getBookmarksAsync

        @NonNull() abstract Observable<List<Bookmark>> getBookmarksAsync()

        Returns the list of bookmarks in the document.

        Returns:

        Observable stream of bookmarks in the document.

      • addBookmark

         abstract boolean addBookmark(@NonNull() Bookmark bookmark)

        Adds a new bookmark to the document.

        Parameters:
        bookmark - Bookmark to be added to the document.
        Returns:

        true if bookmark was actually added, false otherwise.

      • removeBookmark

         abstract boolean removeBookmark(@NonNull() Bookmark bookmark)

        Removes bookmark from the document.

        Parameters:
        bookmark - Bookmark to be removed.
        Returns:

        true if bookmark was actually removed, false otherwise.

      • addBookmarkAsync

        @NonNull() abstract Completable addBookmarkAsync(@NonNull() Bookmark bookmark)

        Adds bookmark to the document.

        Parameters:
        bookmark - Bookmark to be added.
        Returns:

        Completable which notifies when addition was successful.

      • removeBookmarkAsync

        @NonNull() abstract Completable removeBookmarkAsync(@NonNull() Bookmark bookmark)

        Remove bookmark from the document.

        Parameters:
        bookmark - Bookmark to be added.
        Returns:

        Completable which notifies when removal was successful.

      • hasUnsavedChanges

         abstract boolean hasUnsavedChanges()

        Returns true if there were any changes to the bookmarks without save.

        Returns:

        true if bookmarks were changed, false otherwise.