Revision: 6056
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=6056&view=rev
Author: manningr
Date: 2010-12-25 23:08:32 +0000 (Sat, 25 Dec 2010)
Log Message:
-----------
New plugin archetype project
Added Paths:
-----------
trunk/sql12/plugins/squirrelsql-plugin-archetype/
trunk/sql12/plugins/squirrelsql-plugin-archetype/pom.xml
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/java/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/META-INF/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/META-INF/maven/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/META-INF/maven/archetype.xml
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ExamplePlugin.java
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ExampleSqlExecutionListener.java
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ScriptDB2ProcedureAction.java
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ScriptDB2ViewAction.java
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/resources/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/test/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/test/java/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/test/java/net/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/test/java/net/sourceforge/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/test/java/net/sourceforge/squirrel_sql/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/test/java/net/sourceforge/squirrel_sql/plugins/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/test/java/net/sourceforge/squirrel_sql/plugins/example/
trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/test/java/net/sourceforge/squirrel_sql/plugins/example/ExamplePluginTest.java
Property changes on: trunk/sql12/plugins/squirrelsql-plugin-archetype
___________________________________________________________________
Added: svn:ignore
+ target
.project
.classpath
.settings
Added: trunk/sql12/plugins/squirrelsql-plugin-archetype/pom.xml
===================================================================
--- trunk/sql12/plugins/squirrelsql-plugin-archetype/pom.xml (rev 0)
+++ trunk/sql12/plugins/squirrelsql-plugin-archetype/pom.xml 2010-12-25 23:08:32 UTC (rev 6056)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>net.sf.squirrel-sql</groupId>
+ <artifactId>squirrel-root-pom</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <groupId>net.sf.squirrel-sql.plugins</groupId>
+ <artifactId>squirrelsql-plugin-archetype</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <name>Archetype - squirrelsql-plugin-archetype</name>
+ <url>http://maven.apache.org</url>
+</project>
Added: trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/META-INF/maven/archetype.xml
===================================================================
--- trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/META-INF/maven/archetype.xml (rev 0)
+++ trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/META-INF/maven/archetype.xml 2010-12-25 23:08:32 UTC (rev 6056)
@@ -0,0 +1,17 @@
+<archetype>
+ <id>squirrelsql-plugin-archetype</id>
+ <sources>
+ <source>src/main/java/net/sourceforge/squirrel_sql/plugins/example/ExamplePlugin.java</source>
+ <source>src/main/java/net/sourceforge/squirrel_sql/plugins/example/ScriptDB2ProcedureAction.java</source>
+ <source>src/main/java/net/sourceforge/squirrel_sql/plugins/example/ScriptDB2ViewAction.java</source>
+ </sources>
+ <resources>
+ <resource>src/main/resources/doc/changes.txt</resource>
+ <resource>src/main/resources/doc/licence.txt</resource>
+ <resource>src/main/resources/doc/readme.txt</resource>
+ <resource>src/main/resources/net/sourceforge/squirrel_sql/plugins/example/example.properties</resource>
+ </resources>
+ <testSources>
+ <source>src/test/java/net/sourceforge/squirrel_sql/plugins/example/ExamplePluginTest.java</source>
+ </testSources>
+</archetype>
Added: trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ExamplePlugin.java
===================================================================
--- trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ExamplePlugin.java (rev 0)
+++ trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ExamplePlugin.java 2010-12-25 23:08:32 UTC (rev 6056)
@@ -0,0 +1,170 @@
+package net.sourceforge.squirrel_sql.plugins.example;
+
+import net.sourceforge.squirrel_sql.client.plugin.DefaultSessionPlugin;
+import net.sourceforge.squirrel_sql.client.plugin.PluginException;
+import net.sourceforge.squirrel_sql.client.plugin.PluginResources;
+import net.sourceforge.squirrel_sql.client.plugin.PluginSessionCallback;
+import net.sourceforge.squirrel_sql.client.plugin.PluginSessionCallbackAdaptor;
+import net.sourceforge.squirrel_sql.client.preferences.IGlobalPreferencesPanel;
+import net.sourceforge.squirrel_sql.client.session.IObjectTreeAPI;
+import net.sourceforge.squirrel_sql.client.session.ISession;
+import net.sourceforge.squirrel_sql.fw.dialects.DialectFactory;
+import net.sourceforge.squirrel_sql.fw.sql.DatabaseObjectType;
+import net.sourceforge.squirrel_sql.fw.util.IMessageHandler;
+
+/**
+ * The Example plugin class. This plugin does the following: 1. If the database types is DB2, it registers a
+ * menu action in the popup menu for view and procedure nodes in the ObjectTree. For detailed information and
+ * usage of the Plugin API see the following:
+ * https://sourceforge.net/apps/trac/squirrel-sql/wiki/SQuirreLSQLClientPluginAPI
+ */
+public class ExamplePlugin extends DefaultSessionPlugin
+{
+ private PluginResources _resources;
+
+
+ /**
+ * Return the internal name of this plugin.
+ *
+ * @return the internal name of this plugin.
+ */
+ public String getInternalName()
+ {
+ return "example";
+ }
+
+ /**
+ * Return the descriptive name of this plugin.
+ *
+ * @return the descriptive name of this plugin.
+ */
+ public String getDescriptiveName()
+ {
+ return "Example Plugin";
+ }
+
+ /**
+ * Returns the current version of this plugin.
+ *
+ * @return the current version of this plugin.
+ */
+ public String getVersion()
+ {
+ return "0.01";
+ }
+
+ /**
+ * Returns the authors name.
+ *
+ * @return the authors name.
+ */
+ public String getAuthor()
+ {
+ return "Gerd Wagner";
+ }
+
+ /**
+ * Returns the name of the change log for the plugin. This should be a text or HTML file residing in the
+ * <TT>getPluginAppSettingsFolder</TT> directory.
+ *
+ * @return the changelog file name or <TT>null</TT> if plugin doesn't have a change log.
+ */
+ public String getChangeLogFileName()
+ {
+ return "changes.txt";
+ }
+
+ /**
+ * Returns the name of the Help file for the plugin. This should be a text or HTML file residing in the
+ * <TT>getPluginAppSettingsFolder</TT> directory.
+ *
+ * @return the Help file name or <TT>null</TT> if plugin doesn't have a help file.
+ */
+ public String getHelpFileName()
+ {
+ return "readme.txt";
+ }
+
+ /**
+ * Returns the name of the Licence file for the plugin. This should be a text or HTML file residing in the
+ * <TT>getPluginAppSettingsFolder</TT> directory.
+ *
+ * @return the Licence file name or <TT>null</TT> if plugin doesn't have a licence file.
+ */
+ public String getLicenceFileName()
+ {
+ return "licence.txt";
+ }
+
+ /**
+ * @return Comma separated list of contributors.
+ */
+ public String getContributors()
+ {
+ return "";
+ }
+
+ /**
+ * Create preferences panel for the Global Preferences dialog.
+ *
+ * @return Preferences panel.
+ */
+ public IGlobalPreferencesPanel[] getGlobalPreferencePanels()
+ {
+ return new IGlobalPreferencesPanel[0];
+ }
+
+ /**
+ * Initialize this plugin.
+ */
+ public synchronized void initialize() throws PluginException
+ {
+ _resources = new PluginResources("net.sourceforge.squirrel_sql.plugins.example.example", this);
+ }
+
+ /**
+ * Called when a session started. Add commands to popup menu in object tree.
+ *
+ * @param session
+ * The session that is starting.
+ * @return An implementation of PluginSessionCallback or null to indicate the plugin does not work with this
+ * session
+ */
+ public PluginSessionCallback sessionStarted(ISession session)
+ {
+ // Adds the view and procedure script actions if the session is DB2.
+ addTreeNodeMenuActionsForDB2(session);
+
+ // Register a custom ISQLExecutionListener implementation that simply prints all SQL being executed to
+ // the message panel.
+ IMessageHandler messageHandler = session.getApplication().getMessageHandler();
+ ExampleSqlExecutionListener sqlExecutionListener = new ExampleSqlExecutionListener(messageHandler);
+ session.getSessionSheet().getSQLPaneAPI().addSQLExecutionListener(sqlExecutionListener);
+
+ return new PluginSessionCallbackAdaptor(this);
+ }
+
+ private void addTreeNodeMenuActionsForDB2(ISession session)
+ {
+ try
+ {
+ if (DialectFactory.isDB2(session.getMetaData()))
+ {
+ // Plugin knows only how to script Views and Stored Procedures on DB2.
+ // So if it's not a DB2 Session we tell SQuirreL the Plugin should not be used.
+
+ // Add context menu items to the object tree's view and procedure nodes.
+ IObjectTreeAPI otApi = session.getSessionInternalFrame().getObjectTreeAPI();
+ otApi.addToPopup(DatabaseObjectType.VIEW, new ScriptDB2ViewAction(getApplication(), _resources,
+ session));
+ otApi.addToPopup(DatabaseObjectType.PROCEDURE, new ScriptDB2ProcedureAction(getApplication(),
+ _resources, session));
+ }
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+}
Added: trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ExampleSqlExecutionListener.java
===================================================================
--- trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ExampleSqlExecutionListener.java (rev 0)
+++ trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ExampleSqlExecutionListener.java 2010-12-25 23:08:32 UTC (rev 6056)
@@ -0,0 +1,52 @@
+package net.sourceforge.squirrel_sql.plugins.example;
+
+import net.sourceforge.squirrel_sql.client.session.event.ISQLExecutionListener;
+import net.sourceforge.squirrel_sql.fw.util.IMessageHandler;
+
+/*
+ * Copyright (C) 2010 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/**
+ * A simple ISQLExecutionListener that displays the SQL as it is being executed in the main application
+ * message panel (at the bottom of the application).
+ */
+public class ExampleSqlExecutionListener implements ISQLExecutionListener
+{
+ private final IMessageHandler _messageHandler;
+
+ public ExampleSqlExecutionListener(IMessageHandler messageHandler) {
+ _messageHandler = messageHandler;
+ }
+
+ @Override
+ public void statementExecuted(String sql)
+ {
+ _messageHandler.showMessage("statementExecuted: "+sql);
+ }
+
+ @Override
+ public String statementExecuting(String sql)
+ {
+ _messageHandler.showMessage("statementExecuting: "+sql);
+
+ // We don't modify the SQL in this example. We could veto it's execution be returned null.
+ return sql;
+ }
+
+}
Added: trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ScriptDB2ProcedureAction.java
===================================================================
--- trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ScriptDB2ProcedureAction.java (rev 0)
+++ trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ScriptDB2ProcedureAction.java 2010-12-25 23:08:32 UTC (rev 6056)
@@ -0,0 +1,82 @@
+package net.sourceforge.squirrel_sql.plugins.example;
+
+import java.awt.event.ActionEvent;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import net.sourceforge.squirrel_sql.client.IApplication;
+import net.sourceforge.squirrel_sql.client.action.SquirrelAction;
+import net.sourceforge.squirrel_sql.client.gui.session.SessionInternalFrame;
+import net.sourceforge.squirrel_sql.client.session.ISession;
+import net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo;
+import net.sourceforge.squirrel_sql.fw.sql.IProcedureInfo;
+import net.sourceforge.squirrel_sql.fw.sql.SQLUtilities;
+import net.sourceforge.squirrel_sql.fw.util.Resources;
+
+public class ScriptDB2ProcedureAction extends SquirrelAction {
+ private static final long serialVersionUID = 1L;
+
+ transient private ISession _session;
+
+ // /////////////////////////////////////////////////////////
+ // IBM DB 2 specific code to read procedure definitions.
+ private static final String SQL =
+ "SELECT TEXT " +
+ "FROM SYSIBM.SYSPROCEDURES " +
+ "WHERE PROCNAME = ? ";
+
+ public ScriptDB2ProcedureAction(IApplication app, Resources rsrc,
+ ISession session) {
+ super(app, rsrc);
+ _session = session;
+ }
+
+ public void actionPerformed(ActionEvent evt) {
+ PreparedStatement stat = null;
+ ResultSet res = null;
+ try {
+
+ IDatabaseObjectInfo[] dbObjs = _session.getSessionInternalFrame()
+ .getObjectTreeAPI().getSelectedDatabaseObjects();
+
+ stat = _session.getSQLConnection().prepareStatement(SQL);
+
+ StringBuffer script = new StringBuffer();
+ for (int i = 0; i < dbObjs.length; i++) {
+ IProcedureInfo pi = (IProcedureInfo) dbObjs[i];
+ stat.setString(1, pi.getSimpleName());
+ res = stat.executeQuery();
+ res.next();
+ res.getString("TEXT");
+
+ script.append(res.getString("TEXT"));
+ script.append(getStatementSeparator());
+ res.close();
+ }
+ stat.close();
+
+ SessionInternalFrame sessMainFrm = _session
+ .getSessionInternalFrame();
+ sessMainFrm.getSQLPanelAPI().appendSQLScript(script.toString());
+ sessMainFrm.getSessionPanel().selectMainTab(
+ ISession.IMainPanelTabIndexes.SQL_TAB);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ SQLUtilities.closeResultSet(res);
+ SQLUtilities.closeStatement(stat);
+ }
+ }
+
+ private String getStatementSeparator() {
+ String statementSeparator = _session.getQueryTokenizer()
+ .getSQLStatementSeparator();
+
+ if (1 < statementSeparator.length()) {
+ statementSeparator = "\n" + statementSeparator + "\n";
+ }
+
+ return statementSeparator;
+ }
+
+}
Added: trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ScriptDB2ViewAction.java
===================================================================
--- trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ScriptDB2ViewAction.java (rev 0)
+++ trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/main/java/net/sourceforge/squirrel_sql/plugins/example/ScriptDB2ViewAction.java 2010-12-25 23:08:32 UTC (rev 6056)
@@ -0,0 +1,85 @@
+package net.sourceforge.squirrel_sql.plugins.example;
+
+import net.sourceforge.squirrel_sql.client.IApplication;
+import net.sourceforge.squirrel_sql.client.action.SquirrelAction;
+import net.sourceforge.squirrel_sql.client.gui.session.SessionInternalFrame;
+import net.sourceforge.squirrel_sql.client.session.ISession;
+import net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo;
+import net.sourceforge.squirrel_sql.fw.sql.ITableInfo;
+import net.sourceforge.squirrel_sql.fw.util.Resources;
+
+import java.awt.event.ActionEvent;
+import java.sql.ResultSet;
+import java.sql.Statement;
+
+public class ScriptDB2ViewAction extends SquirrelAction
+{
+ private static final long serialVersionUID = 1L;
+
+ private ISession _session;
+
+
+ public ScriptDB2ViewAction(IApplication app, Resources rsrc, ISession session)
+ {
+ super(app, rsrc);
+ _session = session;
+ }
+
+
+ public void actionPerformed(ActionEvent evt)
+ {
+ try
+ {
+ Statement stat = _session.getSQLConnection().createStatement();
+
+ SessionInternalFrame sessMainFrm = _session.getSessionInternalFrame();
+ IDatabaseObjectInfo[] dbObjs = sessMainFrm.getObjectTreeAPI().getSelectedDatabaseObjects();
+
+
+ StringBuffer script = new StringBuffer();
+ for (int i = 0; i < dbObjs.length; i++)
+ {
+ ITableInfo ti = (ITableInfo) dbObjs[i];
+
+ ///////////////////////////////////////////////////////////
+ // IBM DB 2 specific code to read view definitions.
+ String sql =
+ "SELECT TEXT " +
+ "FROM SYSIBM.SYSVIEWS " +
+ "WHERE NAME = '" + ti.getSimpleName() + "'";
+
+ ResultSet res = stat.executeQuery(sql);
+ res.next();
+
+ script.append(res.getString("TEXT"));
+ script.append(getStatementSeparator());
+ res.close();
+ //
+ ///////////////////////////////////////////////////////////
+ }
+
+ stat.close();
+
+ sessMainFrm.getSQLPanelAPI().appendSQLScript(script.toString());
+ sessMainFrm.getSessionPanel().selectMainTab(ISession.IMainPanelTabIndexes.SQL_TAB);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private String getStatementSeparator()
+ {
+ String statementSeparator = _session.getQueryTokenizer().getSQLStatementSeparator();
+
+ if (1 < statementSeparator.length())
+ {
+ statementSeparator = "\n" + statementSeparator + "\n";
+ }
+
+ return statementSeparator;
+ }
+
+
+}
Added: trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/test/java/net/sourceforge/squirrel_sql/plugins/example/ExamplePluginTest.java
===================================================================
--- trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/test/java/net/sourceforge/squirrel_sql/plugins/example/ExamplePluginTest.java (rev 0)
+++ trunk/sql12/plugins/squirrelsql-plugin-archetype/src/main/resources/archetype-resources/src/test/java/net/sourceforge/squirrel_sql/plugins/example/ExamplePluginTest.java 2010-12-25 23:08:32 UTC (rev 6056)
@@ -0,0 +1,47 @@
+package net.sourceforge.squirrel_sql.plugins.example;
+
+import net.sourceforge.squirrel_sql.client.plugin.AbstractSessionPluginTest;
+
+import org.junit.Before;
+
+
+/*
+ * Copyright (C) 2010 Rob Manning
+ * man...@us...
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+public class ExamplePluginTest extends AbstractSessionPluginTest
+{
+
+ @Override
+ protected String getDatabaseProductName()
+ {
+ return "DB2";
+ }
+
+ @Override
+ protected String getDatabaseProductVersion()
+ {
+ return null;
+ }
+
+ @Before
+ public void setUp() throws Exception
+ {
+ classUnderTest = new ExamplePlugin();
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|