Class BookmarksManager
java.lang.Object
gaiasky.gui.bookmarks.BookmarksManager
- All Implemented Interfaces:
IObserver
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddBookmark(String path, boolean folder) Adds a bookmark with the given path.booleancontainsName(String name) booleancontainsNameRecursive(String name, BookmarksManager.BookmarkNode node) booleancontainsPath(Path path) Returns the internal list of bookmark nodes.getBookmarksByType(List<BookmarksManager.BookmarkNode> bookmarks, List<BookmarksManager.BookmarkNode> result, boolean folder) voidEvent notification call.voidbooleanremove(BookmarksManager.BookmarkNode bookmark) Removes the settings file of the give bookmark, if it exists.booleanremoveBookmark(String path, boolean move) Removes a bookmark by its path.intremoveBookmarksByName(String name) Remove all bookmarks with the given name.
-
Constructor Details
-
BookmarksManager
public BookmarksManager()
-
-
Method Details
-
getBookmarks
Returns the internal list of bookmark nodes.- Returns:
- The list of
BookmarksManager.BookmarkNodeobjects.
-
getFolders
- Returns:
- A list with all folder bookmarks
-
getBookmarksByType
public List<BookmarksManager.BookmarkNode> getBookmarksByType(List<BookmarksManager.BookmarkNode> bookmarks, List<BookmarksManager.BookmarkNode> result, boolean folder) -
containsName
-
containsNameRecursive
-
containsPath
-
persistBookmarks
public void persistBookmarks() -
addBookmark
Adds a bookmark with the given path.- Parameters:
path- The path to add.folder- Whether this bookmark is a folder.- Returns:
- True if added.
-
remove
Removes the settings file of the give bookmark, if it exists.- Parameters:
bookmark- The bookmark.- Returns:
- True if the settings file was removed, false otherwise.
-
removeBookmark
Removes a bookmark by its path.- Parameters:
path- The path to remove.move- Indicates whether this remove operation is part of a move operation, to prevent the deletion of data.- Returns:
- True if removed.
-
removeBookmarksByName
Remove all bookmarks with the given name.- Parameters:
name- The name to remove.- Returns:
- Number of removed bookmarks.
-
notify
-