diff options
author | afinkbein | 2008-09-26 16:55:38 +0000 |
---|---|---|
committer | afinkbein | 2008-09-26 16:55:38 +0000 |
commit | 362701a0defdba9a0d70610c0db3ac3dd4f434eb (patch) | |
tree | 3e08ebaf072c55b62d2da2b67e76856b6578d990 | |
parent | 7494156977b6648ba5915dac919ac196d76dde75 (diff) | |
download | org.eclipse.osee-362701a0defdba9a0d70610c0db3ac3dd4f434eb.tar.gz org.eclipse.osee-362701a0defdba9a0d70610c0db3ac3dd4f434eb.tar.xz org.eclipse.osee-362701a0defdba9a0d70610c0db3ac3dd4f434eb.zip |
7 files changed, 133 insertions, 0 deletions
diff --git a/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/.classpath b/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/.classpath new file mode 100644 index 00000000000..8a8f1668cdc --- /dev/null +++ b/MS_0.4.0_20080926/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/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/.project b/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/.project new file mode 100644 index 00000000000..a4a66b0c183 --- /dev/null +++ b/MS_0.4.0_20080926/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/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/.settings/org.eclipse.pde.core.prefs b/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 00000000000..b83ba010d18 --- /dev/null +++ b/MS_0.4.0_20080926/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/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/META-INF/MANIFEST.MF b/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..5110bb3575d --- /dev/null +++ b/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Postgresql Db Connector Plug-in (Incubation) +Bundle-SymbolicName: org.eclipse.osee.framework.postgresql +Bundle-Version: 0.4.0.qualifier +Bundle-Activator: org.eclipse.osee.framework.postgresql.Activator +Bundle-Vendor: Eclipse.org +Bundle-ActivationPolicy: lazy +OseeEarlyStart: true +Import-Package: org.eclipse.osee.framework.db.connection, + org.osgi.framework;version="1.3.0", + org.postgresql;resolution:=optional +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/build.properties b/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/build.properties new file mode 100644 index 00000000000..41eb6ade2b4 --- /dev/null +++ b/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/build.properties @@ -0,0 +1,4 @@ +source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/src/org/eclipse/osee/framework/postgresql/Activator.java b/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/src/org/eclipse/osee/framework/postgresql/Activator.java new file mode 100644 index 00000000000..6b7c4991eb7 --- /dev/null +++ b/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/src/org/eclipse/osee/framework/postgresql/Activator.java @@ -0,0 +1,38 @@ +/*******************************************************************************
+ * 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.eclipse.osee.framework.db.connection.IConnection;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+public class Activator implements BundleActivator {
+
+ private ServiceRegistration registration;
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ registration = context.registerService(IConnection.class.getName(), new PostgresqlConnection(), null);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ registration.unregister();
+ }
+
+}
diff --git a/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/src/org/eclipse/osee/framework/postgresql/PostgresqlConnection.java b/MS_0.4.0_20080926/org.eclipse.osee.framework.postgresql/src/org/eclipse/osee/framework/postgresql/PostgresqlConnection.java new file mode 100644 index 00000000000..bb19f639216 --- /dev/null +++ b/MS_0.4.0_20080926/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;
+ }
+}
|