| author | jmisinco | 2011-04-20 18:40:36 (EDT) |
|---|---|---|
| committer | Ryan D. Brooks | 2011-04-20 18:40:36 (EDT) |
| commit | 43dfc2d24b75160039bd5b0ad3c3a837bd5f1bbe (patch) (side-by-side diff) | |
| tree | 048f48792509263efdc41bf8729c3f9b47a95767 | |
| parent | 23a96d6d3fc23233d5ac01ec776b03a9d6a92a21 (diff) | |
| download | org.eclipse.osee-43dfc2d24b75160039bd5b0ad3c3a837bd5f1bbe.zip org.eclipse.osee-43dfc2d24b75160039bd5b0ad3c3a837bd5f1bbe.tar.gz org.eclipse.osee-43dfc2d24b75160039bd5b0ad3c3a837bd5f1bbe.tar.bz2 | |
refactor: Remove Activator from org.eclipse.osee.demo.db.connection
| -rw-r--r-- | plugins/org.eclipse.osee.demo.db.connection/.project | 5 | ||||
| -rw-r--r-- | plugins/org.eclipse.osee.demo.db.connection/META-INF/MANIFEST.MF | 5 | ||||
| -rw-r--r-- | plugins/org.eclipse.osee.demo.db.connection/OSGI-INF/component.xml | 7 | ||||
| -rw-r--r-- | plugins/org.eclipse.osee.demo.db.connection/OSGI-INF/demo.connection.contributor.xml | 7 | ||||
| -rw-r--r-- | plugins/org.eclipse.osee.demo.db.connection/build.properties | 6 | ||||
| -rw-r--r-- | plugins/org.eclipse.osee.demo.db.connection/src/org/eclipse/osee/demo/db/connection/DemoDbConnectionInfo.java | 4 | ||||
| -rw-r--r-- | plugins/org.eclipse.osee.demo.db.connection/src/org/eclipse/osee/demo/db/connection/internal/Activator.java | 38 | ||||
| -rw-r--r-- | plugins/org.eclipse.osee.demo.db.connection/src/org/eclipse/osee/demo/db/connection/osee.demo.db.connection.xml (renamed from plugins/org.eclipse.osee.demo.db.connection/support/osee.demo.db.connection.xml) | 22 |
8 files changed, 19 insertions, 75 deletions
diff --git a/plugins/org.eclipse.osee.demo.db.connection/.project b/plugins/org.eclipse.osee.demo.db.connection/.project index 71e68c6..8f0dfa4 100644 --- a/plugins/org.eclipse.osee.demo.db.connection/.project +++ b/plugins/org.eclipse.osee.demo.db.connection/.project @@ -20,6 +20,11 @@ <arguments> </arguments> </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ds.core.builder</name> + <arguments> + </arguments> + </buildCommand> </buildSpec> <natures> <nature>org.eclipse.pde.PluginNature</nature> diff --git a/plugins/org.eclipse.osee.demo.db.connection/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.demo.db.connection/META-INF/MANIFEST.MF index e0215dd..b432a60 100644 --- a/plugins/org.eclipse.osee.demo.db.connection/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.osee.demo.db.connection/META-INF/MANIFEST.MF @@ -1,13 +1,12 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Connection Plug-in -Bundle-SymbolicName: org.eclipse.osee.demo.db.connection;singleton:=true +Bundle-SymbolicName: org.eclipse.osee.demo.db.connection Bundle-Version: 0.9.8.qualifier -Bundle-Activator: org.eclipse.osee.demo.db.connection.internal.Activator Bundle-Vendor: Eclipse Open System Engineering Environment Bundle-ActivationPolicy: lazy Import-Package: org.eclipse.osee.framework.core.data, org.eclipse.osee.framework.database.core, org.osgi.framework -Service-Component: OSGI-INF/demo.connection.contributor.xml +Service-Component: OSGI-INF/component.xml Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/plugins/org.eclipse.osee.demo.db.connection/OSGI-INF/component.xml b/plugins/org.eclipse.osee.demo.db.connection/OSGI-INF/component.xml new file mode 100644 index 0000000..9069c1d --- a/dev/null +++ b/plugins/org.eclipse.osee.demo.db.connection/OSGI-INF/component.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osee.demo.db.connection.DemoDbConnectionInfo"> + <implementation class="org.eclipse.osee.demo.db.connection.DemoDbConnectionInfo"/> + <service> + <provide interface="org.eclipse.osee.framework.database.core.IDbConnectionInformationContributor"/> + </service> +</scr:component> diff --git a/plugins/org.eclipse.osee.demo.db.connection/OSGI-INF/demo.connection.contributor.xml b/plugins/org.eclipse.osee.demo.db.connection/OSGI-INF/demo.connection.contributor.xml deleted file mode 100644 index 43d4af0..0000000 --- a/plugins/org.eclipse.osee.demo.db.connection/OSGI-INF/demo.connection.contributor.xml +++ b/dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0"?>
-<component name="demo.connection.contributor">
- <implementation class="org.eclipse.osee.demo.db.connection.DemoDbConnectionInfo"/>
- <service>
- <provide interface="org.eclipse.osee.framework.database.core.IDbConnectionInformationContributor"/>
- </service>
-</component>
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.demo.db.connection/build.properties b/plugins/org.eclipse.osee.demo.db.connection/build.properties index 4229dce..2a0c8ce 100644 --- a/plugins/org.eclipse.osee.demo.db.connection/build.properties +++ b/plugins/org.eclipse.osee.demo.db.connection/build.properties @@ -1,6 +1,6 @@ -source.. = src/ output.. = bin/ bin.includes = META-INF/,\ .,\ - support/,\ - OSGI-INF/ + OSGI-INF/,\ + OSGI-INF/component.xml +source.. = src/ diff --git a/plugins/org.eclipse.osee.demo.db.connection/src/org/eclipse/osee/demo/db/connection/DemoDbConnectionInfo.java b/plugins/org.eclipse.osee.demo.db.connection/src/org/eclipse/osee/demo/db/connection/DemoDbConnectionInfo.java index cf40326..42247d2 100644 --- a/plugins/org.eclipse.osee.demo.db.connection/src/org/eclipse/osee/demo/db/connection/DemoDbConnectionInfo.java +++ b/plugins/org.eclipse.osee.demo.db.connection/src/org/eclipse/osee/demo/db/connection/DemoDbConnectionInfo.java @@ -11,7 +11,6 @@ package org.eclipse.osee.demo.db.connection; import java.net.URL; -import org.eclipse.osee.demo.db.connection.internal.Activator; import org.eclipse.osee.framework.core.data.IDatabaseInfo; import org.eclipse.osee.framework.database.core.DatabaseInfoManager; import org.eclipse.osee.framework.database.core.IDbConnectionInformationContributor; @@ -23,7 +22,8 @@ public class DemoDbConnectionInfo implements IDbConnectionInformationContributor @Override public IDatabaseInfo[] getDbInformation() throws Exception { - URL url = Activator.getEntry("/support/osee.demo.db.connection.xml"); + URL url = getClass().getResource("osee.demo.db.connection.xml"); return DatabaseInfoManager.readFromXml(url.openStream()); } + } diff --git a/plugins/org.eclipse.osee.demo.db.connection/src/org/eclipse/osee/demo/db/connection/internal/Activator.java b/plugins/org.eclipse.osee.demo.db.connection/src/org/eclipse/osee/demo/db/connection/internal/Activator.java deleted file mode 100644 index e687e1e..0000000 --- a/plugins/org.eclipse.osee.demo.db.connection/src/org/eclipse/osee/demo/db/connection/internal/Activator.java +++ b/dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 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.demo.db.connection.internal; - -import java.net.URL; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -/** - * @author Roberto E. Escobar - */ -public class Activator implements BundleActivator { - - private static Activator instance; - private BundleContext context; - - @Override - public void start(BundleContext context) throws Exception { - instance = this; - this.context = context; - } - - @Override - public void stop(BundleContext context) throws Exception { - } - - public static URL getEntry(String path) { - return instance.context.getBundle().getEntry(path); - } -}
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.demo.db.connection/support/osee.demo.db.connection.xml b/plugins/org.eclipse.osee.demo.db.connection/src/org/eclipse/osee/demo/db/connection/osee.demo.db.connection.xml index 8a02974..9afe177 100644 --- a/plugins/org.eclipse.osee.demo.db.connection/support/osee.demo.db.connection.xml +++ b/plugins/org.eclipse.osee.demo.db.connection/src/org/eclipse/osee/demo/db/connection/osee.demo.db.connection.xml @@ -16,17 +16,6 @@ <Url>#PREFIX#://#HOST#:#PORT#/#DBHOME##DBNAME#;IGNORECASE=TRUE;SCHEMA_SEARCH_PATH=OSEE,PUBLIC;MVCC=TRUE</Url> </ConnectionDescription> - <DatabaseInfo id="DerbyServer"> - <DatabaseHome key="#DBHOME#" /> - <DatabaseName key="#DBNAME#" value="DerbyDatabase" /> - <DatabaseType key="#TYPE#" value="derby" /> - <Prefix key="#PREFIX#" value="jdbc:derby" /> - <UserName key="#USERNAME#" value="osee" /> - <Password key="#PASSWORD#" value="osee" /> - <Host key="#HOST#" value="@AvailableDbServices.hostAddress" /> - <Port key="#PORT#" value="@AvailableDbServices.port" /> - </DatabaseInfo> - <DatabaseInfo id="postgresqlInfo"> <DatabaseHome key="#DBHOME#" /> <DatabaseName key="#DBNAME#" value="OSEE" /> @@ -43,22 +32,11 @@ <Url>#PREFIX#://#HOST#:#PORT#/#DBHOME##DBNAME#</Url> </ConnectionDescription> - <ConnectionDescription id="NetDerbyClient"> - <Driver>org.apache.derby.jdbc.ClientDriver</Driver> - <Url>#PREFIX#://#HOST#:#PORT#/#DBHOME##DBNAME#;</Url> - <UrlAttributes> - <Entry>create=true</Entry> - </UrlAttributes> - </ConnectionDescription> - <AvailableDbServices> <Server id="h2" dbInfo="h2.db.info" hostAddress="127.0.0.1" port="8088" connectsWith="h2.db.connection" /> - <Server id="derby" dbInfo="DerbyServer" hostAddress="127.0.0.1" - port="1621" connectsWith="NetDerbyClient" /> - <Server id="osee.microdoc" dbInfo="postgresqlInfo" hostAddress="78.46.71.230" port="5432" connectsWith="postgresql" applicationServer="http://osee.microdoc.com:8089/" /> |

