Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-09-23 22:42:17 -0400
committerRyan D. Brooks2010-09-23 22:42:17 -0400
commit8885710c96fd5a85058b3103cfd081169dfeea76 (patch)
tree89ee31e3336b77d248a20ad1f64d4850857704a1
parent47b4411c167982b9818e5f337a46ab02ad5f5708 (diff)
downloadorg.eclipse.osee-8885710c96fd5a85058b3103cfd081169dfeea76.tar.gz
org.eclipse.osee-8885710c96fd5a85058b3103cfd081169dfeea76.tar.xz
org.eclipse.osee-8885710c96fd5a85058b3103cfd081169dfeea76.zip
refactor: Make service accessor methods in server admin Activator static
-rw-r--r--plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/commit/CommitDbOperation.java6
-rw-r--r--plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/creation/CreateBranchOperation.java21
-rw-r--r--plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/internal/OseeBranchService.java10
-rw-r--r--plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/purge/PurgeBranchOperation.java30
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/BranchMoveOperation.java6
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/BranchStoreOperation.java8
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseBranchAccessor.java13
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/CreateSchemaOperation.java6
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/OperationFactory.java9
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java13
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java6
-rw-r--r--plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/UnsubscribeServlet.java9
-rw-r--r--plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/UnsubscribeTransaction.java6
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/app/DataStoreBackupApplication.java12
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/BranchExportWorker.java2
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/BranchImportWorker.java3
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/ExchangeIntegrityWorker.java2
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/conversion/CompressedContentFix.java4
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/internal/Activator.java33
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/AddServerVersionWorker.java4
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ClearCachesWorker.java2
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ConsolidateArtifactVersionsCommand.java5
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/FinishPartiallyArchivedBranchesCommand.java8
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/GetServerVersionWorker.java2
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ReloadCachesWorker.java2
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/RemoveServerVersionWorker.java4
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerRequestsWorker.java2
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerShutdownWorker.java2
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerStats.java4
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/SearchStats.java2
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/SearchTaggerCommands.java4
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TagItemWorker.java2
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TaggerAllWorker.java4
-rw-r--r--plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TaggerStats.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/DeletionTest.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/PurgeTransactionTest.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/TransactionEventTest.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeTransactionOperation.java10
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ConsolidateRelations.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ConsolidateRelationsTxOperation.java6
41 files changed, 122 insertions, 159 deletions
diff --git a/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/commit/CommitDbOperation.java b/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/commit/CommitDbOperation.java
index 854f60a0978..c3ccc3e748a 100644
--- a/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/commit/CommitDbOperation.java
+++ b/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/commit/CommitDbOperation.java
@@ -35,7 +35,7 @@ import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.cache.BranchCache;
import org.eclipse.osee.framework.core.services.IOseeModelFactoryServiceProvider;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
+import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.AbstractDbTxOperation;
import org.eclipse.osee.framework.database.core.OseeConnection;
import org.eclipse.osee.framework.jdk.core.util.time.GlobalTime;
@@ -77,8 +77,8 @@ public class CommitDbOperation extends AbstractDbTxOperation {
private OseeConnection connection;
private boolean success;
- public CommitDbOperation(IOseeDatabaseServiceProvider databaseProvider, BranchCache branchCache, int userArtId, Branch sourceBranch, Branch destinationBranch, Branch mergeBranch, List<ChangeItem> changes, BranchCommitResponse txHolder, IOseeModelFactoryServiceProvider modelFactory) {
- super(databaseProvider, "Commit Database Operation", Activator.PLUGIN_ID);
+ public CommitDbOperation(IOseeDatabaseService databaseService, BranchCache branchCache, int userArtId, Branch sourceBranch, Branch destinationBranch, Branch mergeBranch, List<ChangeItem> changes, BranchCommitResponse txHolder, IOseeModelFactoryServiceProvider modelFactory) {
+ super(databaseService, "Commit Database Operation", Activator.PLUGIN_ID);
this.savedBranchStates = new HashMap<Branch, BranchState>();
this.branchCache = branchCache;
this.userArtId = userArtId;
diff --git a/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/creation/CreateBranchOperation.java b/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/creation/CreateBranchOperation.java
index cfe63bea499..44cf8743648 100644
--- a/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/creation/CreateBranchOperation.java
+++ b/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/creation/CreateBranchOperation.java
@@ -33,9 +33,9 @@ import org.eclipse.osee.framework.core.model.MergeBranch;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.cache.BranchCache;
import org.eclipse.osee.framework.core.model.cache.TransactionCache;
-import org.eclipse.osee.framework.core.services.IOseeCachingServiceProvider;
+import org.eclipse.osee.framework.core.services.IOseeCachingService;
import org.eclipse.osee.framework.core.services.IOseeModelFactoryServiceProvider;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
+import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.AbstractDbTxOperation;
import org.eclipse.osee.framework.database.core.IOseeStatement;
import org.eclipse.osee.framework.database.core.OseeConnection;
@@ -74,16 +74,15 @@ public class CreateBranchOperation extends AbstractDbTxOperation {
private boolean wasSuccessful;
private int systemUserId;
- private final IOseeCachingServiceProvider cachingService;
+ private final IOseeCachingService cachingService;
private final IOseeModelFactoryServiceProvider factoryService;
private final BranchCreationRequest request;
private final BranchCreationResponse response;
private Branch branch;
- public CreateBranchOperation(IOseeDatabaseServiceProvider provider, IOseeModelFactoryServiceProvider factoryService, IOseeCachingServiceProvider cachingService, BranchCreationRequest request, BranchCreationResponse response) {
- super(provider,
- String.format("Create Branch: [%s from %s]", request.getBranchName(), request.getParentBranchId()),
- Activator.PLUGIN_ID);
+ public CreateBranchOperation(IOseeDatabaseService databaseService, IOseeModelFactoryServiceProvider factoryService, IOseeCachingService cachingService, BranchCreationRequest request, BranchCreationResponse response) {
+ super(databaseService, String.format("Create Branch: [%s from %s]", request.getBranchName(),
+ request.getParentBranchId()), Activator.PLUGIN_ID);
this.cachingService = cachingService;
this.factoryService = factoryService;
this.request = request;
@@ -129,7 +128,7 @@ public class CreateBranchOperation extends AbstractDbTxOperation {
@SuppressWarnings("unchecked")
@Override
protected void doTxWork(IProgressMonitor monitor, OseeConnection connection) throws OseeCoreException {
- BranchCache branchCache = cachingService.getOseeCachingService().getBranchCache();
+ BranchCache branchCache = cachingService.getBranchCache();
Branch parentBranch = branchCache.getById(request.getParentBranchId());
Branch destinationBranch = branchCache.getById(request.getDestinationBranchId());
@@ -137,7 +136,7 @@ public class CreateBranchOperation extends AbstractDbTxOperation {
checkPreconditions(monitor, parentBranch, destinationBranch);
passedPreConditions = true;
- TransactionCache txCache = cachingService.getOseeCachingService().getTransactionCache();
+ TransactionCache txCache = cachingService.getTransactionCache();
String guid = request.getBranchGuid();
if (!GUID.isValid(guid)) {
@@ -194,7 +193,7 @@ public class CreateBranchOperation extends AbstractDbTxOperation {
protected void handleTxException(IProgressMonitor monitor, Exception ex) {
if (passedPreConditions) {
try {
- BranchCache branchCache = cachingService.getOseeCachingService().getBranchCache();
+ BranchCache branchCache = cachingService.getBranchCache();
branch.setStorageState(StorageState.PURGED);
branchCache.storeItems(branch);
} catch (OseeCoreException ex1) {
@@ -206,7 +205,7 @@ public class CreateBranchOperation extends AbstractDbTxOperation {
@Override
protected void handleTxFinally(IProgressMonitor monitor) throws OseeCoreException {
if (wasSuccessful) {
- BranchCache branchCache = cachingService.getOseeCachingService().getBranchCache();
+ BranchCache branchCache = cachingService.getBranchCache();
branch.setBranchState(BranchState.CREATED);
branchCache.storeItems(branch);
response.setBranchId(branch.getId());
diff --git a/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/internal/OseeBranchService.java b/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/internal/OseeBranchService.java
index 8ed1ba844ad..556f00c020d 100644
--- a/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/internal/OseeBranchService.java
+++ b/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/internal/OseeBranchService.java
@@ -91,8 +91,8 @@ public class OseeBranchService implements IOseeBranchService {
List<IOperation> ops = new ArrayList<IOperation>();
ops.add(new LoadDeltasBetweenBranches(oseeDatabaseProvider, txDelta, mergeTx, changes));
ops.add(new ComputeNetChangeOperation(changes));
- ops.add(new CommitDbOperation(oseeDatabaseProvider, branchCache, userId, sourceBranch, destinationBranch,
- mergeBranch, changes, response, modelFactory));
+ ops.add(new CommitDbOperation(oseeDatabaseProvider.getOseeDatabaseService(), branchCache, userId, sourceBranch,
+ destinationBranch, mergeBranch, changes, response, modelFactory));
String opName =
String.format("Commit: [%s]->[%s]", sourceBranch.getShortName(), destinationBranch.getShortName());
@@ -110,7 +110,8 @@ public class OseeBranchService implements IOseeBranchService {
@Override
public IOperation createBranch(IProgressMonitor monitor, BranchCreationRequest request, BranchCreationResponse response) throws OseeCoreException {
- return new CreateBranchOperation(oseeDatabaseProvider, modelFactory, cachingService, request, response);
+ return new CreateBranchOperation(oseeDatabaseProvider.getOseeDatabaseService(), modelFactory,
+ cachingService.getOseeCachingService(), request, response);
}
@Override
@@ -145,7 +146,8 @@ public class OseeBranchService implements IOseeBranchService {
@Override
public IOperation purge(IProgressMonitor monitor, PurgeBranchRequest request) throws OseeCoreException {
BranchCache branchCache = cachingService.getOseeCachingService().getBranchCache();
- return new PurgeBranchOperation(branchCache.getById(request.getBranchId()), cachingService, oseeDatabaseProvider);
+ return new PurgeBranchOperation(branchCache.getById(request.getBranchId()), cachingService,
+ oseeDatabaseProvider.getOseeDatabaseService());
}
@Override
diff --git a/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/purge/PurgeBranchOperation.java b/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/purge/PurgeBranchOperation.java
index 45bd443f625..267fb70a673 100644
--- a/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/purge/PurgeBranchOperation.java
+++ b/plugins/org.eclipse.osee.framework.branch.management/src/org/eclipse/osee/framework/branch/management/purge/PurgeBranchOperation.java
@@ -21,7 +21,7 @@ import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.cache.BranchCache;
import org.eclipse.osee.framework.core.services.IOseeCachingServiceProvider;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
+import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.AbstractDbTxOperation;
import org.eclipse.osee.framework.database.core.IOseeStatement;
import org.eclipse.osee.framework.database.core.OseeConnection;
@@ -61,32 +61,28 @@ public class PurgeBranchOperation extends AbstractDbTxOperation {
private IProgressMonitor monitor;
private String sourceTableName;
private final IOseeCachingServiceProvider cachingService;
- private final IOseeDatabaseServiceProvider oseeDatabaseProvider;
+ private final IOseeDatabaseService databaseService;
- public PurgeBranchOperation(Branch branch, IOseeCachingServiceProvider cachingService, IOseeDatabaseServiceProvider oseeDatabaseProvider) {
- super(oseeDatabaseProvider, String.format("Purge Branch: [(%s)-%s]", branch.getId(), branch.getShortName()),
+ public PurgeBranchOperation(Branch branch, IOseeCachingServiceProvider cachingService, IOseeDatabaseService databaseService) {
+ super(databaseService, String.format("Purge Branch: [(%s)-%s]", branch.getId(), branch.getShortName()),
Activator.PLUGIN_ID);
this.branch = branch;
this.sourceTableName = branch.getArchiveState().isArchived() ? "osee_txs_archived" : "osee_txs";
this.cachingService = cachingService;
- this.oseeDatabaseProvider = oseeDatabaseProvider;
+ this.databaseService = databaseService;
}
@Override
protected void doTxWork(IProgressMonitor monitor, OseeConnection connection) throws OseeCoreException {
this.connection = connection;
this.monitor = monitor;
- int numberOfChildren =
- oseeDatabaseProvider.getOseeDatabaseService().runPreparedQueryFetchObject(0, COUNT_CHILD_BRANCHES,
- branch.getId());
+ int numberOfChildren = databaseService.runPreparedQueryFetchObject(0, COUNT_CHILD_BRANCHES, branch.getId());
if (numberOfChildren > 0) {
- throw new OseeArgumentException("Unable to purge a branch containing children: branchId[%s]",
- branch.getId());
+ throw new OseeArgumentException("Unable to purge a branch containing children: branchId[%s]", branch.getId());
}
boolean isAddressingArchived =
- oseeDatabaseProvider.getOseeDatabaseService().runPreparedQueryFetchObject(0, TEST_TXS,
- branch.getBaseTransaction().getId()) == 0;
+ databaseService.runPreparedQueryFetchObject(0, TEST_TXS, branch.getBaseTransaction().getId()) == 0;
if (isAddressingArchived) {
sourceTableName = "osee_txs_archived";
} else {
@@ -118,7 +114,7 @@ public class PurgeBranchOperation extends AbstractDbTxOperation {
monitor.setTaskName(String.format("Purge from %s", tableName));
checkForCancelledStatus(monitor);
String sql = String.format(PURGE_GAMMAS, tableName);
- oseeDatabaseProvider.getOseeDatabaseService().runBatchUpdate(connection, sql, deleteableGammas);
+ databaseService.runBatchUpdate(connection, sql, deleteableGammas);
}
monitor.worked(calculateWork(percentage));
}
@@ -126,12 +122,12 @@ public class PurgeBranchOperation extends AbstractDbTxOperation {
private void purgeFromTable(String tableName, String sql, double percentage, Object... data) throws OseeCoreException {
monitor.setTaskName(String.format("Purge from %s", tableName));
checkForCancelledStatus(monitor);
- oseeDatabaseProvider.getOseeDatabaseService().runPreparedUpdate(connection, sql, data);
+ databaseService.runPreparedUpdate(connection, sql, data);
monitor.worked(calculateWork(percentage));
}
private void findDeleteableGammas(String sql, double percentage) throws OseeCoreException {
- IOseeStatement chStmt = oseeDatabaseProvider.getOseeDatabaseService().getStatement(connection);
+ IOseeStatement chStmt = databaseService.getStatement(connection);
try {
chStmt.runPreparedQuery(10000, sql, branch.getId(), branch.getBaseTransaction().getId());
while (chStmt.next()) {
@@ -145,7 +141,7 @@ public class PurgeBranchOperation extends AbstractDbTxOperation {
private void purgeAddressing(double percentage) throws OseeCoreException {
monitor.setTaskName("Purge txs addressing");
- IOseeStatement chStmt = oseeDatabaseProvider.getOseeDatabaseService().getStatement(connection);
+ IOseeStatement chStmt = databaseService.getStatement(connection);
List<Object[]> addressing = new ArrayList<Object[]>();
String sql = String.format(SELECT_ADDRESSING_BY_BRANCH, sourceTableName);
@@ -159,7 +155,7 @@ public class PurgeBranchOperation extends AbstractDbTxOperation {
}
sql = String.format("delete from %s where transaction_id = ? and gamma_id = ?", sourceTableName);
- oseeDatabaseProvider.getOseeDatabaseService().runBatchUpdate(connection, sql, addressing);
+ databaseService.runBatchUpdate(connection, sql, addressing);
monitor.worked(calculateWork(percentage));
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/BranchMoveOperation.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/BranchMoveOperation.java
index d285bced22c..86311c27bbf 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/BranchMoveOperation.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/BranchMoveOperation.java
@@ -14,7 +14,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.framework.core.datastore.internal.Activator;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.Branch;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
+import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.AbstractDbTxOperation;
import org.eclipse.osee.framework.database.core.OseeConnection;
@@ -30,8 +30,8 @@ public class BranchMoveOperation extends AbstractDbTxOperation {
private final boolean archive;
private final Branch branch;
- public BranchMoveOperation(IOseeDatabaseServiceProvider provider, boolean archive, Branch branch) {
- super(provider, "Branch Move", Activator.PLUGIN_ID);
+ public BranchMoveOperation(IOseeDatabaseService databaseService, boolean archive, Branch branch) {
+ super(databaseService, "Branch Move", Activator.PLUGIN_ID);
this.archive = archive;
this.branch = branch;
}
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/BranchStoreOperation.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/BranchStoreOperation.java
index 5275a3fb7e8..142ee213b41 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/BranchStoreOperation.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/BranchStoreOperation.java
@@ -23,7 +23,7 @@ import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.BranchField;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.operation.Operations;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
+import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.AbstractDbTxOperation;
import org.eclipse.osee.framework.database.core.OseeConnection;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -45,8 +45,8 @@ public class BranchStoreOperation extends AbstractDbTxOperation {
private final IBranchUpdateEvent eventSender;
private final Collection<Branch> branches;
- public BranchStoreOperation(IOseeDatabaseServiceProvider provider, IBranchUpdateEvent eventSender, Collection<Branch> branches) {
- super(provider, "Branch Archive Operation", Activator.PLUGIN_ID);
+ public BranchStoreOperation(IOseeDatabaseService databaseService, IBranchUpdateEvent eventSender, Collection<Branch> branches) {
+ super(databaseService, "Branch Archive Operation", Activator.PLUGIN_ID);
this.eventSender = eventSender;
this.branches = branches;
}
@@ -115,7 +115,7 @@ public class BranchStoreOperation extends AbstractDbTxOperation {
}
}
if (branch.isFieldDirty(BranchField.BRANCH_ARCHIVED_STATE_FIELD_KEY)) {
- Operations.executeAsJob(new BranchMoveOperation(getDatabaseServiceProvider(),
+ Operations.executeAsJob(new BranchMoveOperation(getDatabaseService(),
branch.getArchiveState().isArchived(), branch), false);
}
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseBranchAccessor.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseBranchAccessor.java
index bf74fa70cb1..60550051c68 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseBranchAccessor.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseBranchAccessor.java
@@ -33,7 +33,6 @@ import org.eclipse.osee.framework.core.model.cache.IOseeCache;
import org.eclipse.osee.framework.core.model.cache.TransactionCache;
import org.eclipse.osee.framework.core.operation.Operations;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
import org.eclipse.osee.framework.database.core.IOseeStatement;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -174,14 +173,6 @@ public class DatabaseBranchAccessor extends AbstractDatabaseAccessor<Branch> {
@Override
public void store(Collection<Branch> branches) throws OseeCoreException {
- IOseeDatabaseServiceProvider dbServiceProvider = new IOseeDatabaseServiceProvider() {
-
- @Override
- public IOseeDatabaseService getOseeDatabaseService() {
- return getDatabaseService();
- }
- };
- Operations.executeWorkAndCheckStatus(new BranchStoreOperation(dbServiceProvider, eventSender, branches));
+ Operations.executeWorkAndCheckStatus(new BranchStoreOperation(getDatabaseService(), eventSender, branches));
}
-
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/CreateSchemaOperation.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/CreateSchemaOperation.java
index 8dbd7b0cefb..211a1add070 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/CreateSchemaOperation.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/CreateSchemaOperation.java
@@ -20,7 +20,7 @@ import org.eclipse.osee.framework.core.datastore.schema.sql.SchemaSqlUtil;
import org.eclipse.osee.framework.core.datastore.schema.sql.SqlFactory;
import org.eclipse.osee.framework.core.datastore.schema.sql.SqlManager;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
+import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.AbstractDbTxOperation;
import org.eclipse.osee.framework.database.core.OseeConnection;
import org.eclipse.osee.framework.database.core.SupportedDatabase;
@@ -32,8 +32,8 @@ public class CreateSchemaOperation extends AbstractDbTxOperation {
private final Map<String, SchemaData> userSchema;
private final Map<String, SchemaData> dbSchema;
- public CreateSchemaOperation(IOseeDatabaseServiceProvider provider, Map<String, SchemaData> userSchema, Map<String, SchemaData> dbSchema) {
- super(provider, "Create Schema", Activator.PLUGIN_ID);
+ public CreateSchemaOperation(IOseeDatabaseService databaseService, Map<String, SchemaData> userSchema, Map<String, SchemaData> dbSchema) {
+ super(databaseService, "Create Schema", Activator.PLUGIN_ID);
this.userSchema = userSchema;
this.dbSchema = dbSchema;
}
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/OperationFactory.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/OperationFactory.java
index dac751cd43c..7debb510aa4 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/OperationFactory.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/OperationFactory.java
@@ -21,7 +21,6 @@ import org.eclipse.osee.framework.core.datastore.schema.data.SchemaData;
import org.eclipse.osee.framework.core.operation.CompositeOperation;
import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
/**
* @author Roberto E. Escobar
@@ -39,13 +38,7 @@ public final class OperationFactory {
List<IOperation> ops = new ArrayList<IOperation>();
ops.add(new LoadUserSchemasOperation(userSpecifiedConfig, schemaProvider, options));
ops.add(new ExtractDatabaseSchemaOperation(databaseService, userSpecifiedConfig.keySet(), currentDatabaseConfig));
- ops.add(new CreateSchemaOperation(new IOseeDatabaseServiceProvider() {
-
- @Override
- public IOseeDatabaseService getOseeDatabaseService() {
- return databaseService;
- }
- }, userSpecifiedConfig, currentDatabaseConfig));
+ ops.add(new CreateSchemaOperation(databaseService, userSpecifiedConfig, currentDatabaseConfig));
return new CompositeOperation("Create OSEE Schema", Activator.PLUGIN_ID, ops);
}
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java
index 4a62e2d3655..b7f9b61ddd0 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/AbstractDbTxOperation.java
@@ -15,26 +15,21 @@ import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.core.operation.AbstractOperation;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
/**
* @author Roberto E. Escobar
*/
public abstract class AbstractDbTxOperation extends AbstractOperation {
- private final IOseeDatabaseServiceProvider provider;
+ private final IOseeDatabaseService databaseService;
- public AbstractDbTxOperation(IOseeDatabaseServiceProvider provider, String operationName, String pluginId) {
+ public AbstractDbTxOperation(IOseeDatabaseService databaseService, String operationName, String pluginId) {
super(operationName, pluginId);
- this.provider = provider;
+ this.databaseService = databaseService;
}
protected IOseeDatabaseService getDatabaseService() throws OseeDataStoreException {
- return provider.getOseeDatabaseService();
- }
-
- protected IOseeDatabaseServiceProvider getDatabaseServiceProvider() throws OseeDataStoreException {
- return provider;
+ return databaseService;
}
@Override
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java
index 2f164050e60..fb5752a9730 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java
@@ -18,7 +18,7 @@ import org.eclipse.osee.framework.core.enums.TxChange;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeStateException;
import org.eclipse.osee.framework.core.operation.OperationReporter;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
+import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.AbstractDbTxOperation;
import org.eclipse.osee.framework.database.core.IOseeStatement;
import org.eclipse.osee.framework.database.core.JoinUtility;
@@ -75,8 +75,8 @@ public class ConsolidateArtifactVersionTxOperation extends AbstractDbTxOperation
private int updateTxsCounter;
private int deleteTxsCounter;
- public ConsolidateArtifactVersionTxOperation(IOseeDatabaseServiceProvider provider, OperationReporter reporter) {
- super(provider, "Consolidate Artifact Versions", Activator.PLUGIN_ID);
+ public ConsolidateArtifactVersionTxOperation(IOseeDatabaseService databaseService, OperationReporter reporter) {
+ super(databaseService, "Consolidate Artifact Versions", Activator.PLUGIN_ID);
this.reporter = reporter;
}
diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/UnsubscribeServlet.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/UnsubscribeServlet.java
index 03d43582b1a..7f47103fa1d 100644
--- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/UnsubscribeServlet.java
+++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/UnsubscribeServlet.java
@@ -21,7 +21,6 @@ import org.eclipse.osee.framework.core.operation.Operations;
import org.eclipse.osee.framework.core.server.UnsecuredOseeHttpServlet;
import org.eclipse.osee.framework.core.services.IOseeCachingService;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.manager.servlet.internal.Activator;
@@ -84,13 +83,7 @@ public class UnsubscribeServlet extends UnsecuredOseeHttpServlet {
protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws IOException {
try {
UnsubscribeRequest data = UnsubscribeRequest.createFromXML(request);
- UnsubscribeTransaction del = new UnsubscribeTransaction(new IOseeDatabaseServiceProvider() {
-
- @Override
- public IOseeDatabaseService getOseeDatabaseService() {
- return databaseService;
- }
- }, cacheService, data);
+ UnsubscribeTransaction del = new UnsubscribeTransaction(databaseService, cacheService, data);
Operations.executeWorkAndCheckStatus(del, new LogProgressMonitor());
response.setStatus(HttpServletResponse.SC_OK);
response.setContentType("text/plain");
diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/UnsubscribeTransaction.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/UnsubscribeTransaction.java
index 8119b6a3756..948bc40cb5f 100644
--- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/UnsubscribeTransaction.java
+++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/UnsubscribeTransaction.java
@@ -22,7 +22,7 @@ import org.eclipse.osee.framework.core.exception.OseeStateException;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.type.RelationType;
import org.eclipse.osee.framework.core.services.IOseeCachingService;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
+import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.AbstractDbTxOperation;
import org.eclipse.osee.framework.database.core.IOseeStatement;
import org.eclipse.osee.framework.database.core.OseeConnection;
@@ -45,8 +45,8 @@ public final class UnsubscribeTransaction extends AbstractDbTxOperation {
private final IOseeCachingService cacheService;
private String completionMethod;
- public UnsubscribeTransaction(IOseeDatabaseServiceProvider provider, IOseeCachingService cacheService, UnsubscribeRequest unsubscribeData) {
- super(provider, "Delete Relation", Activator.PLUGIN_ID);
+ public UnsubscribeTransaction(IOseeDatabaseService databaseService, IOseeCachingService cacheService, UnsubscribeRequest unsubscribeData) {
+ super(databaseService, "Delete Relation", Activator.PLUGIN_ID);
this.unsubscribeData = unsubscribeData;
this.cacheService = cacheService;
}
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/app/DataStoreBackupApplication.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/app/DataStoreBackupApplication.java
index ad60a2f6bd2..9728bd6cf10 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/app/DataStoreBackupApplication.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/app/DataStoreBackupApplication.java
@@ -56,7 +56,7 @@ public class DataStoreBackupApplication implements IApplication {
InputStream inputStream = null;
OutputStream outputStream = null;
try {
- IResource resource = Activator.getInstance().getResourceManager().acquire(locator, new Options());
+ IResource resource = Activator.getResourceManager().acquire(locator, new Options());
inputStream = resource.getContent();
outputStream = new BufferedOutputStream(new FileOutputStream(new File(backupFolder, resource.getName())));
@@ -90,14 +90,12 @@ public class DataStoreBackupApplication implements IApplication {
OseeLog.log(Activator.class, Level.INFO,
String.format("Exporting [%s] branch%s", totalBranches, totalBranches == 1 ? "" : "es"));
- IResourceLocator exportLocator =
- Activator.getInstance().getBranchExchange().exportBranch(backupName, options, branchIds);
+ IResourceLocator exportLocator = Activator.getBranchExchange().exportBranch(backupName, options, branchIds);
OseeLog.log(Activator.class, Level.INFO,
String.format("Verifying export file integrity [%s]", exportLocator.getLocation()));
- IResourceLocator exportCheckLocator =
- Activator.getInstance().getBranchExchange().checkIntegrity(exportLocator);
+ IResourceLocator exportCheckLocator = Activator.getBranchExchange().checkIntegrity(exportLocator);
OseeLog.log(Activator.class, Level.INFO, String.format("Verified [%s]", exportCheckLocator.getLocation()));
OseeLog.log(Activator.class, Level.INFO,
@@ -113,8 +111,8 @@ public class DataStoreBackupApplication implements IApplication {
transferToBackupLocation(exportLocator, backupFolder);
transferToBackupLocation(exportCheckLocator, backupFolder);
- Activator.getInstance().getResourceManager().delete(exportLocator);
- Activator.getInstance().getResourceManager().delete(exportCheckLocator);
+ Activator.getResourceManager().delete(exportLocator);
+ Activator.getResourceManager().delete(exportCheckLocator);
}
} catch (Throwable ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex);
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/BranchExportWorker.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/BranchExportWorker.java
index 5e6c4cac821..ef654e0aae5 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/BranchExportWorker.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/BranchExportWorker.java
@@ -92,6 +92,6 @@ public class BranchExportWorker extends BaseServerCommand {
}
println(String.format("Exporting: [%s] branches\n", branchIds.size()));
- Activator.getInstance().getBranchExchange().exportBranch(exportFileName, options, branchIds);
+ Activator.getBranchExchange().exportBranch(exportFileName, options, branchIds);
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/BranchImportWorker.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/BranchImportWorker.java
index c68b4e9d9c8..9ae8a4a08b6 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/BranchImportWorker.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/BranchImportWorker.java
@@ -91,8 +91,7 @@ public class BranchImportWorker extends BaseServerCommand {
for (File fileToImport : importFiles) {
URI uri = new URI("exchange://" + fileToImport.toURI().toASCIIString());
OperationReporter reporter = new CommandInterpreterReporter(getCommandInterpreter());
- Activator.getInstance().getBranchExchange().importBranch(new ResourceLocator(uri), options, branchIds,
- reporter);
+ Activator.getBranchExchange().importBranch(new ResourceLocator(uri), options, branchIds, reporter);
}
}
}
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/ExchangeIntegrityWorker.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/ExchangeIntegrityWorker.java
index 83ef83e79ac..6c1ab9fddb0 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/ExchangeIntegrityWorker.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/branch/ExchangeIntegrityWorker.java
@@ -63,7 +63,7 @@ public class ExchangeIntegrityWorker extends BaseServerCommand {
for (File fileToImport : importFiles) {
URI uri = new URI("exchange://" + fileToImport.toURI().toASCIIString());
- Activator.getInstance().getBranchExchange().checkIntegrity(new ResourceLocator(uri));
+ Activator.getBranchExchange().checkIntegrity(new ResourceLocator(uri));
}
}
}
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/conversion/CompressedContentFix.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/conversion/CompressedContentFix.java
index 5b8520e62a2..39eaabcb51e 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/conversion/CompressedContentFix.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/conversion/CompressedContentFix.java
@@ -82,8 +82,8 @@ public class CompressedContentFix {
private Worker(CommandInterpreter cmdi) {
ci = cmdi;
- resourceManager = Activator.getInstance().getResourceManager();
- locatorManager = Activator.getInstance().getResourceLocatorManager();
+ resourceManager = Activator.getResourceManager();
+ locatorManager = Activator.getResourceLocatorManager();
nativeExtension = null;
nameMap = null;
}
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/internal/Activator.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/internal/Activator.java
index b128a40ba49..02d55612a99 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/internal/Activator.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/internal/Activator.java
@@ -14,12 +14,10 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.osee.framework.branch.management.IBranchExchange;
import org.eclipse.osee.framework.core.enums.OseeServiceTrackerId;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.core.server.IApplicationServerManager;
import org.eclipse.osee.framework.core.server.ISessionManager;
import org.eclipse.osee.framework.core.services.IOseeCachingService;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
import org.eclipse.osee.framework.resource.management.IResourceLocatorManager;
import org.eclipse.osee.framework.resource.management.IResourceManager;
import org.eclipse.osee.framework.search.engine.ISearchEngine;
@@ -28,7 +26,7 @@ import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.util.tracker.ServiceTracker;
-public class Activator implements BundleActivator, IOseeDatabaseServiceProvider {
+public class Activator implements BundleActivator {
public static final String PLUGIN_ID = "org.eclipse.osee.framework.server.admin";
private static Activator instance;
@@ -63,8 +61,7 @@ public class Activator implements BundleActivator, IOseeDatabaseServiceProvider
instance = null;
}
- @Override
- public IOseeDatabaseService getOseeDatabaseService() throws OseeDataStoreException {
+ public static IOseeDatabaseService getOseeDatabaseService() {
return getTracker(OseeServiceTrackerId.OSEE_DATABASE_SERVICE, IOseeDatabaseService.class);
}
@@ -74,45 +71,41 @@ public class Activator implements BundleActivator, IOseeDatabaseServiceProvider
mappedTrackers.put(trackerId, tracker);
}
- public IBranchExchange getBranchExchange() {
+ public static IBranchExchange getBranchExchange() {
return getTracker(OseeServiceTrackerId.BRANCH_EXCHANGE, IBranchExchange.class);
}
- public IResourceManager getResourceManager() {
+ public static IResourceManager getResourceManager() {
return getTracker(OseeServiceTrackerId.RESOURCE_MANAGER, IResourceManager.class);
}
- public IResourceLocatorManager getResourceLocatorManager() {
+ public static IResourceLocatorManager getResourceLocatorManager() {
return getTracker(OseeServiceTrackerId.RESOURCE_LOCATOR, IResourceLocatorManager.class);
}
- public ISearchEngineTagger getSearchTagger() {
+ public static ISearchEngineTagger getSearchTagger() {
return getTracker(OseeServiceTrackerId.SEARCH_TAGGER, ISearchEngineTagger.class);
}
- public ISearchEngine getSearchEngine() {
+ public static ISearchEngine getSearchEngine() {
return getTracker(OseeServiceTrackerId.SEARCH_ENGINE, ISearchEngine.class);
}
- public IOseeCachingService getOseeCachingService() {
+ public static IOseeCachingService getOseeCachingService() {
return getTracker(OseeServiceTrackerId.OSEE_CACHING_SERVICE, IOseeCachingService.class);
}
- public IApplicationServerManager getApplicationServerManager() {
+ public static IApplicationServerManager getApplicationServerManager() {
return getTracker(OseeServiceTrackerId.APPLICATION_MANAGER, IApplicationServerManager.class);
}
- public ISessionManager getSessionManager() {
+ public static ISessionManager getSessionManager() {
return getTracker(OseeServiceTrackerId.SESSION_MANAGER, ISessionManager.class);
}
- private <T> T getTracker(OseeServiceTrackerId trackerId, Class<T> clazz) {
- ServiceTracker tracker = mappedTrackers.get(trackerId);
+ private static <T> T getTracker(OseeServiceTrackerId trackerId, Class<T> clazz) {
+ ServiceTracker tracker = instance.mappedTrackers.get(trackerId);
Object service = tracker.getService();
return clazz.cast(service);
}
-
- public static Activator getInstance() {
- return Activator.instance;
- }
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/AddServerVersionWorker.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/AddServerVersionWorker.java
index 52adb74f2c7..a77bfe41aa1 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/AddServerVersionWorker.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/AddServerVersionWorker.java
@@ -27,10 +27,10 @@ public class AddServerVersionWorker extends BaseServerCommand {
@Override
protected void doCommandWork(IProgressMonitor monitor) throws Exception {
String versionToAdd = getCommandInterpreter().nextArgument();
- Activator.getInstance().getApplicationServerManager().addSupportedVersion(versionToAdd);
+ Activator.getApplicationServerManager().addSupportedVersion(versionToAdd);
StringBuffer buffer = new StringBuffer();
buffer.append("Osee Application Server: ");
- buffer.append(Arrays.deepToString(Activator.getInstance().getApplicationServerManager().getSupportedVersions()));
+ buffer.append(Arrays.deepToString(Activator.getApplicationServerManager().getSupportedVersions()));
buffer.append("\n");
println(buffer.toString());
}
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ClearCachesWorker.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ClearCachesWorker.java
index f36f643673f..c15c97b3477 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ClearCachesWorker.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ClearCachesWorker.java
@@ -32,7 +32,7 @@ public class ClearCachesWorker extends BaseServerCommand {
@Override
protected void doCommandWork(IProgressMonitor monitor) throws Exception {
- IOseeCachingService service = Activator.getInstance().getOseeCachingService();
+ IOseeCachingService service = Activator.getOseeCachingService();
Collection<OseeCacheEnum> cacheIds = getSelectedCaches();
if (cacheIds.isEmpty()) {
service.clearAll();
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ConsolidateArtifactVersionsCommand.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ConsolidateArtifactVersionsCommand.java
index 7fef35d8753..b7006d896ce 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ConsolidateArtifactVersionsCommand.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ConsolidateArtifactVersionsCommand.java
@@ -31,8 +31,9 @@ public class ConsolidateArtifactVersionsCommand extends BaseServerCommand {
@Override
protected void doCommandWork(IProgressMonitor monitor) throws Exception {
try {
- Operations.executeWorkAndCheckStatus(new ConsolidateArtifactVersionTxOperation(Activator.getInstance(),
- new CommandInterpreterReporter(getCommandInterpreter())), monitor);
+ Operations.executeWorkAndCheckStatus(
+ new ConsolidateArtifactVersionTxOperation(Activator.getOseeDatabaseService(),
+ new CommandInterpreterReporter(getCommandInterpreter())), monitor);
} catch (OseeCoreException ex) {
printStackTrace(ex);
}
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/FinishPartiallyArchivedBranchesCommand.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/FinishPartiallyArchivedBranchesCommand.java
index 3f1c7b1f66d..d74a87767b1 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/FinishPartiallyArchivedBranchesCommand.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/FinishPartiallyArchivedBranchesCommand.java
@@ -40,18 +40,18 @@ public class FinishPartiallyArchivedBranchesCommand extends BaseServerCommand {
"select branch_id from osee_branch br where exists (select 1 from osee_txs txs where txs.branch_id = br.branch_id and br.archived = " + BranchArchivedState.ARCHIVED.getValue() + ")";
IOseeStatement chStmt = null;
try {
- IOseeDatabaseService databaseService = Activator.getInstance().getOseeDatabaseService();
+ IOseeDatabaseService databaseService = Activator.getOseeDatabaseService();
chStmt = databaseService.getStatement();
List<Branch> branches = new ArrayList<Branch>(100);
chStmt.runPreparedQuery(100, sql);
- BranchCache branchCache = Activator.getInstance().getOseeCachingService().getBranchCache();
+ BranchCache branchCache = Activator.getOseeCachingService().getBranchCache();
while (chStmt.next()) {
branches.add(branchCache.getById(chStmt.getInt("branch_id")));
}
for (Branch branch : branches) {
- Operations.executeWorkAndCheckStatus(new BranchMoveOperation(Activator.getInstance(), true, branch),
- monitor);
+ Operations.executeWorkAndCheckStatus(new BranchMoveOperation(Activator.getOseeDatabaseService(), true,
+ branch), monitor);
}
} catch (OseeCoreException ex) {
printStackTrace(ex);
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/GetServerVersionWorker.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/GetServerVersionWorker.java
index b3ca0f31a49..89c9083ba18 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/GetServerVersionWorker.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/GetServerVersionWorker.java
@@ -28,7 +28,7 @@ public class GetServerVersionWorker extends BaseServerCommand {
protected void doCommandWork(IProgressMonitor monitor) throws Exception {
StringBuffer buffer = new StringBuffer();
buffer.append("Osee Application Server: ");
- buffer.append(Arrays.deepToString(Activator.getInstance().getApplicationServerManager().getSupportedVersions()));
+ buffer.append(Arrays.deepToString(Activator.getApplicationServerManager().getSupportedVersions()));
buffer.append("\n");
println(buffer.toString());
}
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ReloadCachesWorker.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ReloadCachesWorker.java
index a3336e00757..fabfe3bca06 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ReloadCachesWorker.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ReloadCachesWorker.java
@@ -32,7 +32,7 @@ public class ReloadCachesWorker extends BaseServerCommand {
@Override
protected void doCommandWork(IProgressMonitor monitor) throws Exception {
- IOseeCachingService service = Activator.getInstance().getOseeCachingService();
+ IOseeCachingService service = Activator.getOseeCachingService();
Collection<OseeCacheEnum> cacheIds = getSelectedCaches();
if (cacheIds.isEmpty()) {
service.reloadAll();
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/RemoveServerVersionWorker.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/RemoveServerVersionWorker.java
index 9d77e31b77f..e21b94cd0a7 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/RemoveServerVersionWorker.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/RemoveServerVersionWorker.java
@@ -27,10 +27,10 @@ public class RemoveServerVersionWorker extends BaseServerCommand {
@Override
protected void doCommandWork(IProgressMonitor monitor) throws Exception {
String versionToRemove = getCommandInterpreter().nextArgument();
- Activator.getInstance().getApplicationServerManager().removeSupportedVersion(versionToRemove);
+ Activator.getApplicationServerManager().removeSupportedVersion(versionToRemove);
StringBuffer buffer = new StringBuffer();
buffer.append("Osee Application Server: ");
- buffer.append(Arrays.deepToString(Activator.getInstance().getApplicationServerManager().getSupportedVersions()));
+ buffer.append(Arrays.deepToString(Activator.getApplicationServerManager().getSupportedVersions()));
buffer.append("\n");
println(buffer.toString());
}
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerRequestsWorker.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerRequestsWorker.java
index 4c69e3a1da4..30fa3193759 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerRequestsWorker.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerRequestsWorker.java
@@ -26,6 +26,6 @@ public class ServerRequestsWorker extends BaseServerCommand {
@Override
protected void doCommandWork(IProgressMonitor monitor) throws Exception {
String value = getCommandInterpreter().nextArgument();
- Activator.getInstance().getApplicationServerManager().setServletRequestsAllowed(new Boolean(value));
+ Activator.getApplicationServerManager().setServletRequestsAllowed(new Boolean(value));
}
}
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerShutdownWorker.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerShutdownWorker.java
index ec4fc15bcf6..04268042bac 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerShutdownWorker.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerShutdownWorker.java
@@ -36,7 +36,7 @@ class ServerShutdownWorker extends BaseServerCommand {
@Override
protected void doCommandWork(IProgressMonitor monitor) throws Exception {
- IApplicationServerManager manager = Activator.getInstance().getApplicationServerManager();
+ IApplicationServerManager manager = Activator.getApplicationServerManager();
Bundle equinoxHttpBundle = Platform.getBundle("org.eclipse.equinox.http.jetty");
equinoxHttpBundle.stop();
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerStats.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerStats.java
index 9a77dfc5d3a..eace32adbe9 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerStats.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/management/ServerStats.java
@@ -38,8 +38,8 @@ class ServerStats extends BaseServerCommand {
@Override
protected void doCommandWork(IProgressMonitor monitor) throws Exception {
- IApplicationServerManager manager = Activator.getInstance().getApplicationServerManager();
- ISessionManager sessionManager = Activator.getInstance().getSessionManager();
+ IApplicationServerManager manager = Activator.getApplicationServerManager();
+ ISessionManager sessionManager = Activator.getSessionManager();
StringBuffer buffer = new StringBuffer();
buffer.append("\n----------------------------------------------\n");
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/SearchStats.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/SearchStats.java
index 5a1e814b9d7..03d9439c163 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/SearchStats.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/SearchStats.java
@@ -26,7 +26,7 @@ class SearchStats extends BaseServerCommand {
@Override
protected void doCommandWork(IProgressMonitor monitor) throws Exception {
- ISearchStatistics stats = Activator.getInstance().getSearchEngine().getStatistics();
+ ISearchStatistics stats = Activator.getSearchEngine().getStatistics();
StringBuffer buffer = new StringBuffer();
buffer.append("\n----------------------------------------------\n");
buffer.append(" Search Stats \n");
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/SearchTaggerCommands.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/SearchTaggerCommands.java
index eca56e44323..148f0472196 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/SearchTaggerCommands.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/SearchTaggerCommands.java
@@ -117,7 +117,7 @@ public class SearchTaggerCommands {
}
public void clearTaggerStats() {
- Activator.getInstance().getSearchTagger().clearStatistics();
+ Activator.getSearchTagger().clearStatistics();
}
public void getSearchStatistics(CommandInterpreter ci) {
@@ -128,6 +128,6 @@ public class SearchTaggerCommands {
}
public void clearSearchStats() {
- Activator.getInstance().getSearchEngine().clearStatistics();
+ Activator.getSearchEngine().clearStatistics();
}
}
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TagItemWorker.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TagItemWorker.java
index 79ff07ca5e4..164b74a93e5 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TagItemWorker.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TagItemWorker.java
@@ -63,7 +63,7 @@ public class TagItemWorker extends BaseServerCommand {
joinQuery.store();
tagListener = new TagListener();
- Activator.getInstance().getSearchTagger().tagByQueueQueryId(tagListener, joinQuery.getQueryId());
+ Activator.getSearchTagger().tagByQueueQueryId(tagListener, joinQuery.getQueryId());
synchronized (tagListener) {
try {
tagListener.wait();
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TaggerAllWorker.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TaggerAllWorker.java
index 9e9219e5b69..759e85e8cd8 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TaggerAllWorker.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TaggerAllWorker.java
@@ -125,14 +125,14 @@ class TaggerAllWorker extends BaseServerCommand {
toStop[index] = item;
index++;
}
- Activator.getInstance().getSearchTagger().stopTaggingByQueueQueryId(toStop);
+ Activator.getSearchTagger().stopTaggingByQueueQueryId(toStop);
}
public void storeAndAddQueryId(OseeConnection connection, TagQueueJoinQuery joinQuery) throws OseeCoreException {
if (joinQuery.size() > 0) {
joinQuery.store(connection);
this.queryIdMap.put(joinQuery.getQueryId(), joinQuery);
- Activator.getInstance().getSearchTagger().tagByQueueQueryId(this, joinQuery.getQueryId());
+ Activator.getSearchTagger().tagByQueueQueryId(this, joinQuery.getQueryId());
}
}
diff --git a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TaggerStats.java b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TaggerStats.java
index e567f2d2250..db668af47fc 100644
--- a/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TaggerStats.java
+++ b/plugins/org.eclipse.osee.framework.server.admin/src/org/eclipse/osee/framework/server/admin/search/TaggerStats.java
@@ -33,7 +33,7 @@ class TaggerStats extends BaseServerCommand {
@Override
protected void doCommandWork(IProgressMonitor monitor) throws Exception {
- ISearchEngineTagger tagger = Activator.getInstance().getSearchTagger();
+ ISearchEngineTagger tagger = Activator.getSearchTagger();
ITaggerStatistics stats = tagger.getStatistics();
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/DeletionTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/DeletionTest.java
index 63f6b2f699d..0b709d8f54a 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/DeletionTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/DeletionTest.java
@@ -169,7 +169,8 @@ public class DeletionTest {
if (DELETE_TRANSACTION_TEST) {
IOseeDatabaseServiceProvider databaseProvider = Activator.getInstance();
- PurgeTransactionOperation purgeOp = new PurgeTransactionOperation(databaseProvider, true, deletionTransaction);
+ PurgeTransactionOperation purgeOp =
+ new PurgeTransactionOperation(databaseProvider.getOseeDatabaseService(), true, deletionTransaction);
Operations.executeWorkAndCheckStatus(purgeOp);
if (DEBUG) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/PurgeTransactionTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/PurgeTransactionTest.java
index 119cfe70dfa..510ec86fcc7 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/PurgeTransactionTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/cases/PurgeTransactionTest.java
@@ -21,7 +21,6 @@ import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.operation.Operations;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
import org.eclipse.osee.framework.database.core.ConnectionHandler;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
@@ -100,8 +99,8 @@ public class PurgeTransactionTest {
}
private void purge(int transactionId, Map<String, Integer> dbCount) throws Exception {
- IOseeDatabaseServiceProvider databaseProvider = Activator.getInstance();
- PurgeTransactionOperation purgeOp = new PurgeTransactionOperation(databaseProvider, transactionId);
+ PurgeTransactionOperation purgeOp =
+ new PurgeTransactionOperation(Activator.getInstance().getOseeDatabaseService(), transactionId);
Operations.executeWorkAndCheckStatus(purgeOp);
DbUtil.getTableRowCounts(dbCount, tables);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/TransactionEventTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/TransactionEventTest.java
index 1043da7409d..18b84557d55 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/TransactionEventTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/test/event/TransactionEventTest.java
@@ -98,7 +98,8 @@ public class TransactionEventTest {
Assert.assertEquals(1, OseeEventManager.getNumberOfListeners());
// Delete it
- IOperation operation = new PurgeTransactionOperation(Activator.getInstance(), false, transIdToDelete);
+ IOperation operation =
+ new PurgeTransactionOperation(Activator.getInstance().getOseeDatabaseService(), false, transIdToDelete);
Operations.executeWork(operation);
// Verify that all stuff reverted
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
index 6bf51795b6f..7d2fb8406a3 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
@@ -291,7 +291,8 @@ public class BranchManager {
* Permanently removes transactions and any of their backing data that is not referenced by any other transactions.
*/
public static Job purgeTransactions(IJobChangeListener jobChangeListener, boolean force, final int... transactionIdNumbers) {
- IOperation op = new PurgeTransactionOperation(Activator.getInstance(), force, transactionIdNumbers);
+ IOperation op =
+ new PurgeTransactionOperation(Activator.getInstance().getOseeDatabaseService(), force, transactionIdNumbers);
return Operations.executeAsJob(op, true, Job.LONG, jobChangeListener);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeTransactionOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeTransactionOperation.java
index b3d5e8d7afb..69484edf616 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeTransactionOperation.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeTransactionOperation.java
@@ -28,7 +28,7 @@ import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.core.operation.Operations;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
+import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.AbstractDbTxOperation;
import org.eclipse.osee.framework.database.core.ConnectionHandler;
import org.eclipse.osee.framework.database.core.IOseeStatement;
@@ -83,15 +83,15 @@ public class PurgeTransactionOperation extends AbstractDbTxOperation {
private final boolean force;
private int artifactJoinId;
- public PurgeTransactionOperation(IOseeDatabaseServiceProvider serviceProvider, boolean force, int... txIdsToDelete) {
- super(serviceProvider, String.format("Delete transactions: %s", Arrays.toString(txIdsToDelete)),
+ public PurgeTransactionOperation(IOseeDatabaseService databaseService, boolean force, int... txIdsToDelete) {
+ super(databaseService, String.format("Delete transactions: %s", Arrays.toString(txIdsToDelete)),
Activator.PLUGIN_ID);
this.txIdsToDelete = txIdsToDelete;
this.force = force;
}
- public PurgeTransactionOperation(IOseeDatabaseServiceProvider serviceProvider, int... txIdsToDelete) {
- this(serviceProvider, true, txIdsToDelete);
+ public PurgeTransactionOperation(IOseeDatabaseService databaseService, int... txIdsToDelete) {
+ this(databaseService, true, txIdsToDelete);
}
@Override
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ConsolidateRelations.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ConsolidateRelations.java
index b83c1abc92e..bb2353d4596 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ConsolidateRelations.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ConsolidateRelations.java
@@ -31,7 +31,8 @@ public class ConsolidateRelations extends AbstractBlam {
@Override
public void runOperation(VariableMap variableMap, IProgressMonitor monitor) throws Exception {
- IOperation operation = new ConsolidateRelationsTxOperation(SkynetGuiPlugin.getInstance());
+ IOperation operation =
+ new ConsolidateRelationsTxOperation(SkynetGuiPlugin.getInstance().getOseeDatabaseService());
Operations.executeWorkAndCheckStatus(operation, monitor);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ConsolidateRelationsTxOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ConsolidateRelationsTxOperation.java
index c7da05b1f3d..4fafa163491 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ConsolidateRelationsTxOperation.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ConsolidateRelationsTxOperation.java
@@ -23,7 +23,7 @@ import org.eclipse.osee.framework.core.enums.TxChange;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeExceptions;
import org.eclipse.osee.framework.core.exception.OseeStateException;
-import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
+import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.AbstractDbTxOperation;
import org.eclipse.osee.framework.database.core.ConnectionHandler;
import org.eclipse.osee.framework.database.core.IOseeStatement;
@@ -76,8 +76,8 @@ public class ConsolidateRelationsTxOperation extends AbstractDbTxOperation {
ModificationType netModType;
TxChange netTxCurrent;
- public ConsolidateRelationsTxOperation(IOseeDatabaseServiceProvider provider) {
- super(provider, "Consolidate Relations", SkynetGuiPlugin.PLUGIN_ID);
+ public ConsolidateRelationsTxOperation(IOseeDatabaseService databaseService) {
+ super(databaseService, "Consolidate Relations", SkynetGuiPlugin.PLUGIN_ID);
}
private void init() throws OseeCoreException, IOException {

Back to the top