diff options
author | rescobar | 2010-07-27 21:41:33 +0000 |
---|---|---|
committer | rescobar | 2010-07-27 21:41:33 +0000 |
commit | 8e71561d0f314b642dd02352c3523b2e1ed7b1b0 (patch) | |
tree | 6a46e06aabfccd2f2f4a515a3ed428192f0d225c /plugins/org.eclipse.osee.framework.database.init | |
parent | defe2a43547888b0b39961ad305daf1afba21816 (diff) | |
download | org.eclipse.osee-8e71561d0f314b642dd02352c3523b2e1ed7b1b0.tar.gz org.eclipse.osee-8e71561d0f314b642dd02352c3523b2e1ed7b1b0.tar.xz org.eclipse.osee-8e71561d0f314b642dd02352c3523b2e1ed7b1b0.zip |
"Team Workflow" - YGHW1 - "Block changes to requirements unless done under an appropriate action."
Diffstat (limited to 'plugins/org.eclipse.osee.framework.database.init')
3 files changed, 35 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.framework.database.init/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.database.init/META-INF/MANIFEST.MF index f1d6954390f..3323a2fd985 100644 --- a/plugins/org.eclipse.osee.framework.database.init/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.osee.framework.database.init/META-INF/MANIFEST.MF @@ -18,8 +18,10 @@ Import-Package: org.apache.commons.lang;version="2.4.0", org.eclipse.osee.framework.core.exception, org.eclipse.osee.framework.core.message, org.eclipse.osee.framework.core.model, + org.eclipse.osee.framework.core.services, org.eclipse.osee.framework.core.translation, org.eclipse.osee.framework.core.util, + org.eclipse.osee.framework.database, org.eclipse.osee.framework.database.core, org.eclipse.osee.framework.jdk.core.persistence, org.eclipse.osee.framework.jdk.core.text.change, diff --git a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/DbBootstrapTask.java b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/DbBootstrapTask.java index 6671ebf64e2..37f841d795f 100644 --- a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/DbBootstrapTask.java +++ b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/DbBootstrapTask.java @@ -25,10 +25,12 @@ import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.exception.OseeStateException; import org.eclipse.osee.framework.core.message.DatastoreInitRequest; import org.eclipse.osee.framework.core.model.Branch; +import org.eclipse.osee.framework.core.services.IOseeCachingService; import org.eclipse.osee.framework.core.translation.IDataTranslationService; import org.eclipse.osee.framework.core.util.Conditions; import org.eclipse.osee.framework.core.util.HttpMessage; import org.eclipse.osee.framework.core.util.HttpProcessor.AcquireResult; +import org.eclipse.osee.framework.database.IOseeDatabaseService; import org.eclipse.osee.framework.database.init.internal.DatabaseInitActivator; import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; import org.eclipse.osee.framework.skynet.core.utility.DbUtil; @@ -50,6 +52,13 @@ public class DbBootstrapTask implements IDbInitializationTask { DbUtil.setDbInit(true); createOseeDatastore(); + + IOseeCachingService service = DatabaseInitActivator.getInstance().getCachingService(); + service.clearAll(); + + IOseeDatabaseService databaseService = DatabaseInitActivator.getInstance().getDatabaseService(); + databaseService.getSequence().clear(); + Branch systemRoot = BranchManager.getSystemRootBranch(); Conditions.checkNotNull(systemRoot, "System root was not created - "); diff --git a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/DatabaseInitActivator.java b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/DatabaseInitActivator.java index 01c1d3915d8..2f4ac197efa 100644 --- a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/DatabaseInitActivator.java +++ b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/DatabaseInitActivator.java @@ -10,8 +10,10 @@ *******************************************************************************/ package org.eclipse.osee.framework.database.init.internal; +import org.eclipse.osee.framework.core.services.IOseeCachingService; import org.eclipse.osee.framework.core.translation.IDataTranslationService; import org.eclipse.osee.framework.core.translation.IDataTranslationServiceProvider; +import org.eclipse.osee.framework.database.IOseeDatabaseService; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.util.tracker.ServiceTracker; @@ -21,12 +23,20 @@ public class DatabaseInitActivator implements BundleActivator, IDataTranslationS private static DatabaseInitActivator instance; private ServiceTracker serviceTracker; + private ServiceTracker serviceTracker2; + private ServiceTracker serviceTracker3; @Override public void start(BundleContext context) throws Exception { DatabaseInitActivator.instance = this; serviceTracker = new ServiceTracker(context, IDataTranslationService.class.getName(), null); serviceTracker.open(true); + + serviceTracker2 = new ServiceTracker(context, IOseeCachingService.class.getName(), null); + serviceTracker2.open(true); + + serviceTracker3 = new ServiceTracker(context, IOseeDatabaseService.class.getName(), null); + serviceTracker3.open(true); } @Override @@ -34,14 +44,28 @@ public class DatabaseInitActivator implements BundleActivator, IDataTranslationS if (serviceTracker != null) { serviceTracker.close(); } + if (serviceTracker2 != null) { + serviceTracker2.close(); + } + if (serviceTracker3 != null) { + serviceTracker3.close(); + } } public static DatabaseInitActivator getInstance() { return instance; } + public IOseeCachingService getCachingService() { + return (IOseeCachingService) serviceTracker2.getService(); + } + @Override public IDataTranslationService getTranslationService() { return (IDataTranslationService) serviceTracker.getService(); } + + public IOseeDatabaseService getDatabaseService() { + return (IOseeDatabaseService) serviceTracker3.getService(); + } } |