net.sourceforge.squirrel_sql.plugins.sqlbookmark
Class BookmarkManager

java.lang.Object
  extended by net.sourceforge.squirrel_sql.plugins.sqlbookmark.BookmarkManager
All Implemented Interfaces:
ICompletorModel

public class BookmarkManager
extends Object
implements ICompletorModel

Manages the users bookmarks. Including loading and saving to an XML file.

Author:
Joseph Mocker

Constructor Summary
BookmarkManager(SQLBookmarkPlugin plugin)
           
 
Method Summary
protected  boolean add(Bookmark bookmark)
          Add a new bookmark, or replace an existing bookmark.
protected  Bookmark get(String name)
          Retrieve a bookmark by name.
 CompletionCandidates getCompletionCandidates(String bookmarkNameBegin)
           
protected  Iterator<Bookmark> iterator()
           
protected  void load()
          Load the stored bookmarks.
 void removeAll()
           
protected  void save()
          Save the bookmarks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BookmarkManager

public BookmarkManager(SQLBookmarkPlugin plugin)
Method Detail

add

protected boolean add(Bookmark bookmark)
Add a new bookmark, or replace an existing bookmark.

Parameters:
bookmark - bookmark to add/change.
Returns:
true if a replacement, false if a new bookmark.

get

protected Bookmark get(String name)
Retrieve a bookmark by name.

Parameters:
name - Name of the bookmark.
Returns:
the bookmark.

load

protected void load()
             throws IOException
Load the stored bookmarks.

Throws:
IOException

save

protected void save()
Save the bookmarks.


iterator

protected Iterator<Bookmark> iterator()

getCompletionCandidates

public CompletionCandidates getCompletionCandidates(String bookmarkNameBegin)
Specified by:
getCompletionCandidates in interface ICompletorModel

removeAll

public void removeAll()


Copyright © 2001-2010. All Rights Reserved.