diff options
author | donald.g.dunne | 2014-07-09 18:56:41 +0000 |
---|---|---|
committer | Roberto E. Escobar | 2014-08-28 23:59:15 +0000 |
commit | 9d55c399433635a9961620eaad5d55850a0dc076 (patch) | |
tree | bdca5d69d86d8b9d1a7c3adc0e6286edcc9bba57 /plugins/org.eclipse.osee.ats.core.client | |
parent | 5241817d0c70f54b9e200d78ed959990131f3d97 (diff) | |
download | org.eclipse.osee-9d55c399433635a9961620eaad5d55850a0dc076.tar.gz org.eclipse.osee-9d55c399433635a9961620eaad5d55850a0dc076.tar.xz org.eclipse.osee-9d55c399433635a9961620eaad5d55850a0dc076.zip |
refinement: Inject DbService in osee.ats.core.client
Change-Id: Ieeecd5f0153aec69f2b465e9fd54c9a1e87b4286
Diffstat (limited to 'plugins/org.eclipse.osee.ats.core.client')
4 files changed, 8 insertions, 36 deletions
diff --git a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.client.service.xml b/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.client.service.xml index 0dfa6f3202b..ceb4275de97 100644 --- a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.client.service.xml +++ b/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/ats.client.service.xml @@ -14,4 +14,5 @@ </service> <reference bind="setAtsWorkDefinitionService" cardinality="1..1" interface="org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionService" name="IAtsWorkDefinitionService" policy="static"/> <reference bind="setAtsUserService" cardinality="1..1" interface="org.eclipse.osee.ats.api.user.IAtsUserService" name="IAtsUserService" policy="static"/> + <reference bind="setDatabaseService" cardinality="1..1" interface="org.eclipse.osee.framework.database.IOseeDatabaseService" name="IOseeDatabaseService" policy="static"/> </scr:component> diff --git a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/osee.database.service.ref.xml b/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/osee.database.service.ref.xml deleted file mode 100644 index 57344f8d6dc..00000000000 --- a/plugins/org.eclipse.osee.ats.core.client/OSGI-INF/osee.database.service.ref.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.osee.ats.core.client.internal.OseeDatabaseService"> - <implementation class="org.eclipse.osee.ats.core.client.internal.OseeDatabaseService"/> - <reference bind="setDatabaseService" cardinality="1..1" interface="org.eclipse.osee.framework.database.IOseeDatabaseService" name="IOseeDatabaseService" policy="static"/> -</scr:component> diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java index 79519a1eaf8..69f70dec1ab 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java @@ -81,6 +81,7 @@ import org.eclipse.osee.ats.core.workdef.AtsWorkDefinitionCache; import org.eclipse.osee.framework.core.data.IArtifactType; import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist; import org.eclipse.osee.framework.core.util.XResultData; +import org.eclipse.osee.framework.database.IOseeDatabaseService; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.type.OseeStateException; import org.eclipse.osee.framework.jdk.core.util.Conditions; @@ -117,6 +118,11 @@ public class AtsClientImpl implements IAtsClient { private IAtsNotificationService notificationService; private IAtsColumnUtilities columnUtilities; private IAtsUtilService utilService; + private IOseeDatabaseService dbService; + + public void setDatabaseService(IOseeDatabaseService dbService) { + this.dbService = dbService; + } public void setAtsWorkDefinitionService(IAtsWorkDefinitionService workDefService) { this.workDefService = workDefService; @@ -428,7 +434,7 @@ public class AtsClientImpl implements IAtsClient { @Override public ISequenceProvider getSequenceProvider() { if (sequenceProvider == null) { - sequenceProvider = new AtsSequenceProvider(OseeDatabaseService.getDbService()); + sequenceProvider = new AtsSequenceProvider(dbService); } return sequenceProvider; } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/OseeDatabaseService.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/OseeDatabaseService.java deleted file mode 100644 index 9f1c2352da0..00000000000 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/OseeDatabaseService.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014 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.ats.core.client.internal; - -import org.eclipse.osee.framework.database.IOseeDatabaseService; - -/** - * @author Donald G. Dunne - */ -public class OseeDatabaseService { - - private static IOseeDatabaseService dbService; - - public static IOseeDatabaseService getDbService() { - return dbService; - } - - public void setDatabaseService(IOseeDatabaseService dbService) { - OseeDatabaseService.dbService = dbService; - } - -} |