net.sourceforge.squirrel_sql.plugins.sqlbookmark
Class SQLBookmarkPlugin

java.lang.Object
  extended by net.sourceforge.squirrel_sql.client.plugin.DefaultPlugin
      extended by net.sourceforge.squirrel_sql.client.plugin.DefaultSessionPlugin
          extended by net.sourceforge.squirrel_sql.plugins.sqlbookmark.SQLBookmarkPlugin
All Implemented Interfaces:
IPlugin, ISessionPlugin

public class SQLBookmarkPlugin
extends DefaultSessionPlugin

Main entry into the SQL Bookmark plugin.

This plugin allows you to maintain a set of frequently used SQL scripts for easy playback. There is also a parameter replacement syntax available for the SQL files.

Author:
Joseph Mocker

Field Summary
static String RESOURCE_PATH
           
 
Fields inherited from class net.sourceforge.squirrel_sql.client.plugin.DefaultPlugin
_app
 
Constructor Summary
SQLBookmarkPlugin()
           
 
Method Summary
protected  void addBookmarkItem(Bookmark bookmark)
          Add new bookmark to Sessions->Bookmark menu
 void addSQLPanelAPIListeningForBookmarks(ISQLPanelAPI sqlApi)
           
 boolean allowsSessionStartedInBackground()
           
 String getAuthor()
          Returns the authors name.
 String getChangeLogFileName()
          Returns the name of the change log for the plugin.
 String getContributors()
           
 String getDescriptiveName()
          Return the descriptive name of this plugin.
 Object getExternalService()
           
 IGlobalPreferencesPanel[] getGlobalPreferencePanels()
          Create and return a preferences object.
 String getHelpFileName()
          Returns the name of the Help file for the plugin.
 String getInternalName()
          Return the internal name of this plugin.
 String getLicenceFileName()
          Returns the name of the Help file for the plugin.
protected  PluginResources getResources()
          Return the plugin resources.
protected  String getResourceString(String name)
          Get and return a string from the plugin resources.
 ISQLPanelAPI[] getSQLPanelAPIsListeningForBookmarks()
           
 String getVersion()
          Returns the plugin version.
 void initialize()
          Initialize this plugin.
protected  void rebuildMenu()
          Rebuild the Sessions->Bookmarks menu
 void removeALLSQLPanelsAPIListeningForBookmarks()
           
 void removeSQLPanelAPIListeningForBookmarks(ISQLPanelAPI sqlApi)
           
 PluginSessionCallback sessionStarted(ISession session)
           
protected  void setBookmarkManager(BookmarkManager bookmarks)
          Set the bookmark manager.
 
Methods inherited from class net.sourceforge.squirrel_sql.client.plugin.DefaultSessionPlugin
getDefaultNodeExpander, getObjectTypes, getSessionPropertiesPanels, isPluginSession, registerSessionMenu, sessionCreated, sessionEnding
 
Methods inherited from class net.sourceforge.squirrel_sql.client.plugin.DefaultPlugin
aliasCopied, aliasRemoved, getAliasPropertiesPanelControllers, getApplication, getNewSessionPropertiesPanels, getPluginAppSettingsFolder, getPluginJarFilePath, getPluginUserSettingsFolder, getWebSite, load, unload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.squirrel_sql.client.plugin.IPlugin
aliasCopied, aliasRemoved, getAliasPropertiesPanelControllers, getNewSessionPropertiesPanels, getPluginAppSettingsFolder, getPluginJarFilePath, getPluginUserSettingsFolder, getWebSite, load, unload
 

Field Detail

RESOURCE_PATH

public static final String RESOURCE_PATH
See Also:
Constant Field Values
Constructor Detail

SQLBookmarkPlugin

public SQLBookmarkPlugin()
Method Detail

getVersion

public String getVersion()
Returns the plugin version.

Returns:
the plugin version.

getAuthor

public String getAuthor()
Returns the authors name.

Returns:
the authors name.

getContributors

public String getContributors()
Specified by:
getContributors in interface IPlugin
Overrides:
getContributors in class DefaultPlugin

getInternalName

public String getInternalName()
Return the internal name of this plugin.

Returns:
the internal name of this plugin.

getDescriptiveName

public String getDescriptiveName()
Return the descriptive name of this plugin.

Returns:
the descriptive name of this plugin.

getHelpFileName

public String getHelpFileName()
Returns the name of the Help file for the plugin.

Specified by:
getHelpFileName in interface IPlugin
Overrides:
getHelpFileName in class DefaultPlugin
Returns:
the help file name.

getLicenceFileName

public String getLicenceFileName()
Returns the name of the Help file for the plugin.

Specified by:
getLicenceFileName in interface IPlugin
Overrides:
getLicenceFileName in class DefaultPlugin
Returns:
the license file name.

getChangeLogFileName

public String getChangeLogFileName()
Returns the name of the change log for the plugin. This should be a text or HTML file residing in the getPluginAppSettingsFolder directory.

Specified by:
getChangeLogFileName in interface IPlugin
Overrides:
getChangeLogFileName in class DefaultPlugin
Returns:
the changelog file name or null if plugin doesn't have a change log.

getResources

protected PluginResources getResources()
Return the plugin resources. Used by other classes.

Returns:
plugin resources.

getResourceString

protected String getResourceString(String name)
Get and return a string from the plugin resources.

Parameters:
name - name of the resource string to return.
Returns:
resource string.

setBookmarkManager

protected void setBookmarkManager(BookmarkManager bookmarks)
Set the bookmark manager.

Parameters:
bookmarks - new manager to register.

getExternalService

public Object getExternalService()
Specified by:
getExternalService in interface IPlugin
Overrides:
getExternalService in class DefaultPlugin

initialize

public void initialize()
                throws PluginException
Initialize this plugin.

Specified by:
initialize in interface IPlugin
Overrides:
initialize in class DefaultPlugin
Throws:
PluginException

allowsSessionStartedInBackground

public boolean allowsSessionStartedInBackground()
Specified by:
allowsSessionStartedInBackground in interface ISessionPlugin
Overrides:
allowsSessionStartedInBackground in class DefaultSessionPlugin

sessionStarted

public PluginSessionCallback sessionStarted(ISession session)

rebuildMenu

protected void rebuildMenu()
Rebuild the Sessions->Bookmarks menu


addBookmarkItem

protected void addBookmarkItem(Bookmark bookmark)
Add new bookmark to Sessions->Bookmark menu

Parameters:
bookmark - the bookmark to add.

getGlobalPreferencePanels

public IGlobalPreferencesPanel[] getGlobalPreferencePanels()
Create and return a preferences object.

Specified by:
getGlobalPreferencePanels in interface IPlugin
Overrides:
getGlobalPreferencePanels in class DefaultPlugin
Returns:
The global preferences object.

addSQLPanelAPIListeningForBookmarks

public void addSQLPanelAPIListeningForBookmarks(ISQLPanelAPI sqlApi)

removeSQLPanelAPIListeningForBookmarks

public void removeSQLPanelAPIListeningForBookmarks(ISQLPanelAPI sqlApi)

removeALLSQLPanelsAPIListeningForBookmarks

public void removeALLSQLPanelsAPIListeningForBookmarks()

getSQLPanelAPIsListeningForBookmarks

public ISQLPanelAPI[] getSQLPanelAPIsListeningForBookmarks()


Copyright © 2001-2010. All Rights Reserved.