Class BookmarksManager

  • All Implemented Interfaces:
    IObserver

    public class BookmarksManager
    extends java.lang.Object
    implements IObserver
    Manages the bookmarks in Gaia Sky. Supports folders.
    • Method Detail

      • initialize

        public static void initialize()
      • getFolders

        public java.util.List<BookmarksManager.BNode> getFolders()
        Returns:
        A list with all folder bookmarks
      • getLeafBookmarks

        public java.util.List<BookmarksManager.BNode> getLeafBookmarks()
        Returns:
        A list with all non-folder bookmarks
      • containsName

        public boolean containsName​(java.lang.String name)
      • containsPath

        public boolean containsPath​(java.lang.String path)
      • containsPath

        public boolean containsPath​(java.nio.file.Path path)
      • persistBookmarks

        public void persistBookmarks()
      • addBookmark

        public boolean addBookmark​(java.lang.String path,
                                   boolean folder)
        Adds a bookmark with the given path.
        Parameters:
        path - The path to add.
        Returns:
        True if added.
      • removeBookmark

        public boolean removeBookmark​(java.lang.String path)
        Removes a bookmark by its path.
        Parameters:
        path - The path to remove
        Returns:
        True if removed.
      • removeBookmarksByName

        public int removeBookmarksByName​(java.lang.String name)
        Remove all bookmarks with the given name.
        Parameters:
        name - The name to remove.
        Returns:
        Number of removed bookmarks.
      • notify

        public void notify​(Events event,
                           java.lang.Object... data)
        Specified by:
        notify in interface IObserver