Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmisinco2011-09-07 15:20:50 -0400
committerRyan D. Brooks2011-09-07 15:20:50 -0400
commitfd418e66265b005de8f3087a3723cd139b798eea (patch)
treea18accb0ce2c10c673b089c4a2bb41166e462885 /plugins/org.eclipse.osee.framework.core.datastore
parent677d9c246419d158237c5e5b9d9bbd3da3888770 (diff)
downloadorg.eclipse.osee-fd418e66265b005de8f3087a3723cd139b798eea.tar.gz
org.eclipse.osee-fd418e66265b005de8f3087a3723cd139b798eea.tar.xz
org.eclipse.osee-fd418e66265b005de8f3087a3723cd139b798eea.zip
refactor: Rename RemoteIdManager to IdentityService
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.datastore')
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/DatastoreInitOperation.java7
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/ArtifactTypeDataAccessor.java18
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/OseeCachingServiceRegistrationHandler.java5
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/ServerOseeCachingServiceFactory.java13
4 files changed, 25 insertions, 18 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/DatastoreInitOperation.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/DatastoreInitOperation.java
index b491a65431..5b8a814197 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/DatastoreInitOperation.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/DatastoreInitOperation.java
@@ -23,6 +23,7 @@ import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.core.server.IApplicationServerManager;
import org.eclipse.osee.framework.core.server.OseeServerProperties;
import org.eclipse.osee.framework.core.services.IOseeCachingService;
+import org.eclipse.osee.framework.core.services.IdentityService;
import org.eclipse.osee.framework.core.util.Conditions;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.OseeInfo;
@@ -44,8 +45,9 @@ public class DatastoreInitOperation extends AbstractOperation {
private final IOseeSchemaProvider schemaProvider;
private final SchemaCreationOptions options;
private final IApplicationServerManager appServerManager;
+ private final IdentityService identityService;
- public DatastoreInitOperation(IApplicationServerManager appServerManager, IOseeDatabaseService dbService, IOseeCachingService cachingService, IOseeBranchService branchService, IOseeSchemaProvider schemaProvider, SchemaCreationOptions options) {
+ public DatastoreInitOperation(IApplicationServerManager appServerManager, IOseeDatabaseService dbService, IOseeCachingService cachingService, IOseeBranchService branchService, IOseeSchemaProvider schemaProvider, SchemaCreationOptions options, IdentityService identityService) {
super("Datastore Initialization", Activator.PLUGIN_ID);
this.appServerManager = appServerManager;
this.dbService = dbService;
@@ -53,6 +55,7 @@ public class DatastoreInitOperation extends AbstractOperation {
this.branchService = branchService;
this.schemaProvider = schemaProvider;
this.options = options;
+ this.identityService = identityService;
}
@Override
@@ -64,7 +67,7 @@ public class DatastoreInitOperation extends AbstractOperation {
doSubWork(subOp, monitor, 0.30);
dbService.getSequence().clear();
- dbService.getRemoteIdManager().clear();
+ identityService.clear();
appServerManager.executeLookupRegistration();
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/ArtifactTypeDataAccessor.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/ArtifactTypeDataAccessor.java
index dfa77b8f60..fcc2829501 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/ArtifactTypeDataAccessor.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/ArtifactTypeDataAccessor.java
@@ -25,9 +25,9 @@ import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.cache.BranchCache;
import org.eclipse.osee.framework.core.model.cache.IOseeCache;
import org.eclipse.osee.framework.core.model.cache.IOseeDataAccessor;
+import org.eclipse.osee.framework.core.services.IdentityService;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.IOseeStatement;
-import org.eclipse.osee.framework.database.core.RemoteIdManager;
import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.resource.management.IResource;
@@ -48,13 +48,15 @@ public class ArtifactTypeDataAccessor<T extends AbstractOseeType<Long>> implemen
private final IResourceLocatorManager locatorManager;
private final IResourceManager resourceManager;
private final BranchCache branchCache;
+ private final IdentityService identityService;
- public ArtifactTypeDataAccessor(ModelingServiceProvider modelService, IOseeDatabaseService databaseService, IResourceLocatorManager locatorManager, IResourceManager resourceManager, BranchCache branchCache) {
+ public ArtifactTypeDataAccessor(ModelingServiceProvider modelService, IOseeDatabaseService databaseService, IResourceLocatorManager locatorManager, IResourceManager resourceManager, BranchCache branchCache, IdentityService identityService) {
this.modelService = modelService;
this.databaseService = databaseService;
this.locatorManager = locatorManager;
this.resourceManager = resourceManager;
this.branchCache = branchCache;
+ this.identityService = identityService;
}
@Override
@@ -75,14 +77,13 @@ public class ArtifactTypeDataAccessor<T extends AbstractOseeType<Long>> implemen
@Override
public void store(Collection<T> types) throws OseeCoreException {
- RemoteIdManager manager = databaseService.getRemoteIdManager();
Collection<Long> remoteIds = new ArrayList<Long>();
for (T type : types) {
remoteIds.add(type.getGuid());
}
- manager.store(remoteIds);
+ identityService.store(remoteIds);
for (T type : types) {
- type.setId(manager.getLocalId(type.getGuid()));
+ type.setId(identityService.getLocalId(type.getGuid()));
type.clearDirty();
}
}
@@ -90,11 +91,8 @@ public class ArtifactTypeDataAccessor<T extends AbstractOseeType<Long>> implemen
private Collection<String> findOseeTypeData() throws OseeCoreException {
Collection<String> paths = new ArrayList<String>();
- RemoteIdManager manager = databaseService.getRemoteIdManager();
-
- // john: Which attribute type store type def binary data
- Integer artifactTypeId = manager.getLocalId(CoreArtifactTypes.OseeTypeDefinition.getGuid());
- Integer attributeTypeId = manager.getLocalId(CoreAttributeTypes.UriGeneralStringData.getGuid());
+ Integer artifactTypeId = identityService.getLocalId(CoreArtifactTypes.OseeTypeDefinition.getGuid());
+ Integer attributeTypeId = identityService.getLocalId(CoreAttributeTypes.UriGeneralStringData.getGuid());
Branch commonBranch = branchCache.get(CoreBranches.COMMON);
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/OseeCachingServiceRegistrationHandler.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/OseeCachingServiceRegistrationHandler.java
index f005442324..7493ae6a5f 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/OseeCachingServiceRegistrationHandler.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/OseeCachingServiceRegistrationHandler.java
@@ -19,6 +19,7 @@ import org.eclipse.osee.framework.core.server.IApplicationServerManager;
import org.eclipse.osee.framework.core.services.IOseeCachingService;
import org.eclipse.osee.framework.core.services.IOseeCachingServiceFactory;
import org.eclipse.osee.framework.core.services.IOseeModelFactoryService;
+import org.eclipse.osee.framework.core.services.IdentityService;
import org.eclipse.osee.framework.core.translation.IDataTranslationService;
import org.eclipse.osee.framework.core.util.AbstractTrackingHandler;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
@@ -43,6 +44,7 @@ public class OseeCachingServiceRegistrationHandler extends AbstractTrackingHandl
// IOseeModelingService.class,
IResourceLocatorManager.class,
IResourceManager.class,
+ IdentityService.class,
};
//@formatter:on
@@ -81,6 +83,7 @@ public class OseeCachingServiceRegistrationHandler extends AbstractTrackingHandl
final IApplicationServerManager appManager = getService(IApplicationServerManager.class, services);
final IResourceManager resourceManager = getService(IResourceManager.class, services);
final IResourceLocatorManager resourceLocatorManager = getService(IResourceLocatorManager.class, services);
+ final IdentityService identityService = getService(IdentityService.class, services);
ModelingServiceProvider provider = new ModelingServiceProvider() {
@@ -99,6 +102,6 @@ public class OseeCachingServiceRegistrationHandler extends AbstractTrackingHandl
};
return new ServerOseeCachingServiceFactory(dbService, modelFactoryService, translationService, lookupService,
- appManager, provider, resourceLocatorManager, resourceManager);
+ appManager, provider, resourceLocatorManager, resourceManager, identityService);
}
}
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/ServerOseeCachingServiceFactory.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/ServerOseeCachingServiceFactory.java
index 68413770a9..bf32d59d3a 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/ServerOseeCachingServiceFactory.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/internal/ServerOseeCachingServiceFactory.java
@@ -30,6 +30,7 @@ import org.eclipse.osee.framework.core.server.IApplicationServerManager;
import org.eclipse.osee.framework.core.services.IOseeCachingService;
import org.eclipse.osee.framework.core.services.IOseeCachingServiceFactory;
import org.eclipse.osee.framework.core.services.IOseeModelFactoryService;
+import org.eclipse.osee.framework.core.services.IdentityService;
import org.eclipse.osee.framework.core.translation.IDataTranslationService;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.resource.management.IResourceLocatorManager;
@@ -48,8 +49,9 @@ public class ServerOseeCachingServiceFactory implements IOseeCachingServiceFacto
private final ModelingServiceProvider modelingService;
private final IResourceLocatorManager locatorManager;
private final IResourceManager resourceManager;
+ private final IdentityService identityService;
- public ServerOseeCachingServiceFactory(IOseeDatabaseService databaseService, IOseeModelFactoryService factoryService, IDataTranslationService translationService, IApplicationServerLookup serverLookUp, IApplicationServerManager appManager, ModelingServiceProvider modelingService, IResourceLocatorManager locatorManager, IResourceManager resourceManager) {
+ public ServerOseeCachingServiceFactory(IOseeDatabaseService databaseService, IOseeModelFactoryService factoryService, IDataTranslationService translationService, IApplicationServerLookup serverLookUp, IApplicationServerManager appManager, ModelingServiceProvider modelingService, IResourceLocatorManager locatorManager, IResourceManager resourceManager, IdentityService identityService) {
this.databaseService = databaseService;
this.factoryService = factoryService;
this.translationService = translationService;
@@ -58,6 +60,7 @@ public class ServerOseeCachingServiceFactory implements IOseeCachingServiceFacto
this.modelingService = modelingService;
this.locatorManager = locatorManager;
this.resourceManager = resourceManager;
+ this.identityService = identityService;
}
@Override
@@ -72,16 +75,16 @@ public class ServerOseeCachingServiceFactory implements IOseeCachingServiceFacto
OseeEnumTypeCache oseeEnumTypeCache =
new OseeEnumTypeCache(new ArtifactTypeDataAccessor<OseeEnumType>(modelingService, databaseService,
- locatorManager, resourceManager, branchCache));
+ locatorManager, resourceManager, branchCache, identityService));
AttributeTypeCache attributeCache =
new AttributeTypeCache(new ArtifactTypeDataAccessor<AttributeType>(modelingService, databaseService,
- locatorManager, resourceManager, branchCache));
+ locatorManager, resourceManager, branchCache, identityService));
ArtifactTypeCache artifactCache =
new ArtifactTypeCache(new ArtifactTypeDataAccessor<ArtifactType>(modelingService, databaseService,
- locatorManager, resourceManager, branchCache));
+ locatorManager, resourceManager, branchCache, identityService));
RelationTypeCache relationCache =
new RelationTypeCache(new ArtifactTypeDataAccessor<RelationType>(modelingService, databaseService,
- locatorManager, resourceManager, branchCache));
+ locatorManager, resourceManager, branchCache, identityService));
return new OseeCachingService(branchCache, txCache, artifactCache, attributeCache, relationCache,
oseeEnumTypeCache);

Back to the top