Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorafinkbein2009-01-14 23:34:27 +0000
committerafinkbein2009-01-14 23:34:27 +0000
commitb217d357d23702c0c6a98f7ef1c374aa728b3393 (patch)
tree2d7153370395fcacfc3a0b11e88bf6f3173812b3
parent5567d357449880faf47c0f4e132afce8c105168c (diff)
downloadorg.eclipse.osee-b217d357d23702c0c6a98f7ef1c374aa728b3393.tar.gz
org.eclipse.osee-b217d357d23702c0c6a98f7ef1c374aa728b3393.tar.xz
org.eclipse.osee-b217d357d23702c0c6a98f7ef1c374aa728b3393.zip
-rw-r--r--org.eclipse.osee.framework.postgresql/.classpath7
-rw-r--r--org.eclipse.osee.framework.postgresql/.project28
-rw-r--r--org.eclipse.osee.framework.postgresql/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--org.eclipse.osee.framework.postgresql/META-INF/MANIFEST.MF15
-rw-r--r--org.eclipse.osee.framework.postgresql/OSGI-INF/postgresql.connection.driver.provider.xml7
-rw-r--r--org.eclipse.osee.framework.postgresql/build.properties5
-rw-r--r--org.eclipse.osee.framework.postgresql/src/org/eclipse/osee/framework/postgresql/Activator.java32
-rw-r--r--org.eclipse.osee.framework.postgresql/src/org/eclipse/osee/framework/postgresql/PostgresqlConnection.java39
8 files changed, 137 insertions, 0 deletions
diff --git a/org.eclipse.osee.framework.postgresql/.classpath b/org.eclipse.osee.framework.postgresql/.classpath
new file mode 100644
index 00000000000..8a8f1668cdc
--- /dev/null
+++ b/org.eclipse.osee.framework.postgresql/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.osee.framework.postgresql/.project b/org.eclipse.osee.framework.postgresql/.project
new file mode 100644
index 00000000000..a4a66b0c183
--- /dev/null
+++ b/org.eclipse.osee.framework.postgresql/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osee.framework.postgresql</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.osee.framework.postgresql/.settings/org.eclipse.pde.core.prefs b/org.eclipse.osee.framework.postgresql/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 00000000000..b83ba010d18
--- /dev/null
+++ b/org.eclipse.osee.framework.postgresql/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,4 @@
+#Mon Jul 14 14:56:26 MST 2008
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/org.eclipse.osee.framework.postgresql/META-INF/MANIFEST.MF b/org.eclipse.osee.framework.postgresql/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..35ef8a97d49
--- /dev/null
+++ b/org.eclipse.osee.framework.postgresql/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Postgresql Db Connector Plug-in (Incubation)
+Bundle-SymbolicName: org.eclipse.osee.framework.postgresql;singleton:=true
+Bundle-Version: 0.4.0.qualifier
+Bundle-Activator: org.eclipse.osee.framework.postgresql.Activator
+Bundle-Vendor: Eclipse.org
+Bundle-ActivationPolicy: lazy
+OseeEarlyStart: true
+Service-Component: OSGI-INF/postgresql.connection.driver.provider.xml
+Import-Package: org.eclipse.osee.framework.db.connection,
+ org.osgi.framework;version="1.3.0",
+ org.postgresql;resolution:=optional
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.equinox.ds;bundle-version="1.0.0"
diff --git a/org.eclipse.osee.framework.postgresql/OSGI-INF/postgresql.connection.driver.provider.xml b/org.eclipse.osee.framework.postgresql/OSGI-INF/postgresql.connection.driver.provider.xml
new file mode 100644
index 00000000000..e71e14ee809
--- /dev/null
+++ b/org.eclipse.osee.framework.postgresql/OSGI-INF/postgresql.connection.driver.provider.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<component name="postgresql.connection.driver.provider">
+ <implementation class="org.eclipse.osee.framework.postgresql.PostgresqlConnection"/>
+ <service>
+ <provide interface="org.eclipse.osee.framework.db.connection.IConnection"/>
+ </service>
+</component> \ No newline at end of file
diff --git a/org.eclipse.osee.framework.postgresql/build.properties b/org.eclipse.osee.framework.postgresql/build.properties
new file mode 100644
index 00000000000..a65755cb2a8
--- /dev/null
+++ b/org.eclipse.osee.framework.postgresql/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ OSGI-INF/
diff --git a/org.eclipse.osee.framework.postgresql/src/org/eclipse/osee/framework/postgresql/Activator.java b/org.eclipse.osee.framework.postgresql/src/org/eclipse/osee/framework/postgresql/Activator.java
new file mode 100644
index 00000000000..be907388ad6
--- /dev/null
+++ b/org.eclipse.osee.framework.postgresql/src/org/eclipse/osee/framework/postgresql/Activator.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.postgresql;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ }
+
+}
diff --git a/org.eclipse.osee.framework.postgresql/src/org/eclipse/osee/framework/postgresql/PostgresqlConnection.java b/org.eclipse.osee.framework.postgresql/src/org/eclipse/osee/framework/postgresql/PostgresqlConnection.java
new file mode 100644
index 00000000000..bb19f639216
--- /dev/null
+++ b/org.eclipse.osee.framework.postgresql/src/org/eclipse/osee/framework/postgresql/PostgresqlConnection.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.postgresql;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.Properties;
+import org.eclipse.osee.framework.db.connection.IConnection;
+
+public class PostgresqlConnection implements IConnection {
+
+ private static final String driverName = "org.postgresql.Driver";
+
+ public PostgresqlConnection() {
+ }
+
+ public Connection getConnection(Properties properties, String connectionURL) throws ClassNotFoundException, SQLException {
+ Class.forName(driverName);
+ Connection connection = DriverManager.getConnection(connectionURL, properties);
+ return connection;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.osee.framework.db.connection.IConnection#getDriver()
+ */
+ @Override
+ public String getDriver() {
+ return driverName;
+ }
+}

Back to the top