Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2019-01-15 16:43:42 +0000
committerRyan D. Brooks2020-12-15 21:45:04 +0000
commit313a28fdfc5a2c19da50db29d4de6ce9b4d1ecf6 (patch)
tree14f120d2ed06cc6df5a8b62b2c2b1db845619b02
parent19a60bf13717056d81cd678c679af53ea96c071c (diff)
downloadorg.eclipse.osee-313a28fdfc5a2c19da50db29d4de6ce9b4d1ecf6.tar.gz
org.eclipse.osee-313a28fdfc5a2c19da50db29d4de6ce9b4d1ecf6.tar.xz
org.eclipse.osee-313a28fdfc5a2c19da50db29d4de6ce9b4d1ecf6.zip
refinement: Store binary data path in database
-rw-r--r--plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/ResourceManager.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataStoreAdmin.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsAdminImpl.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeProviderTest.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.db/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/KeyValueModule.java7
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/AttributeProvider.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/ExchangeProvider.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/ResourceConstants.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/DatastoreEndpoint.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/DatastoreEndpointImpl.java4
-rw-r--r--plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/OrcsAdmin.java2
-rw-r--r--plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java2
14 files changed, 19 insertions, 29 deletions
diff --git a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/ResourceManager.java b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/ResourceManager.java
index 357fd381c43..7468887f63c 100644
--- a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/ResourceManager.java
+++ b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/ResourceManager.java
@@ -64,15 +64,13 @@ public class ResourceManager implements IResourceManager {
@Override
public IResource acquire(IResourceLocator locator, PropertyStore options) {
IResourceProvider provider = getProvider(locator);
- IResource toReturn = provider.acquire(locator, options);
- return toReturn;
+ return provider.acquire(locator, options);
}
@Override
public IResourceLocator save(IResourceLocator locator, IResource resource, PropertyStore options) {
IResourceProvider provider = getProvider(locator);
- IResourceLocator actualLocator = provider.save(locator, resource, options);
- return actualLocator;
+ return provider.save(locator, resource, options);
}
@Override
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataStoreAdmin.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataStoreAdmin.java
index bcc52e3615a..ea0065ea207 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataStoreAdmin.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataStoreAdmin.java
@@ -27,7 +27,7 @@ public interface DataStoreAdmin {
public static final String SCHEMA_INDEX_DATA_NAMESPACE = "schema.index.data.namespace";
public static final String SCHEMA_USER_FILE_SPECIFIED_NAMESPACE = "schema.user.file.specified.schema.names";
- void createDataStore();
+ void createDataStore(String largeAttributeStorePath);
Callable<DataStoreInfo> getDataStoreInfo(OrcsSession session);
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsAdminImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsAdminImpl.java
index b6ce412925e..459aa02a6fe 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsAdminImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsAdminImpl.java
@@ -77,11 +77,11 @@ public class OrcsAdminImpl implements OrcsAdmin {
}
@Override
- public TransactionId createDatastoreAndSystemBranches() {
+ public TransactionId createDatastoreAndSystemBranches(String largeAttributeStorePath) {
ActivityLog activityLog = orcsApi.getActivityLog();
try {
activityLog.setEnabled(false);
- dataStoreAdmin.createDataStore();
+ dataStoreAdmin.createDataStore(largeAttributeStorePath);
return new CreateSystemBranches(orcsApi).create();
} finally {
activityLog.setEnabled(true);
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java
index c944d112de7..0a4fbbcfaa7 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionBuilderImpl.java
@@ -570,11 +570,6 @@ public class TransactionBuilderImpl implements TransactionBuilder {
}
@Override
- public void addKeyValueOps(Long id, String name) {
- keyValueOps.putByKey(id, name);
- }
-
- @Override
public ArtifactToken createArtifact(ArtifactToken parent, ArtifactTypeToken artifactType, String name, Long id) {
ArtifactToken art = createArtifact(artifactType, name, id);
txManager.addChild(txData, parent, art);
@@ -589,5 +584,4 @@ public class TransactionBuilderImpl implements TransactionBuilder {
}
return art;
}
-
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeProviderTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeProviderTest.java
index dcf8ca352a3..8533dab61a3 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeProviderTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeProviderTest.java
@@ -72,12 +72,6 @@ public class AttributeProviderTest {
}
@Test(expected = OseeCoreException.class)
- public void testInitializationException2() throws Exception {
- AttributeProvider provider = new AttributeProvider();
- provider.getBinaryDataPath();
- }
-
- @Test(expected = OseeCoreException.class)
public void testInitializationException3() throws Exception {
MockSystemPreferences properties = new MockSystemPreferences() {
@Override
diff --git a/plugins/org.eclipse.osee.orcs.db/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.orcs.db/META-INF/MANIFEST.MF
index 18e020373cb..e1abcaa7ab8 100644
--- a/plugins/org.eclipse.osee.orcs.db/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.orcs.db/META-INF/MANIFEST.MF
@@ -50,5 +50,6 @@ Import-Package: com.google.common.base,
org.eclipse.osee.orcs.core.internal.tuple,
org.eclipse.osee.orcs.data,
org.eclipse.osee.orcs.search,
+ org.eclipse.osee.orcs.transaction,
org.osgi.framework,
org.osgi.service.component.annotations
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/KeyValueModule.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/KeyValueModule.java
index 2ebd78e4d3b..bd2f9e43ff8 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/KeyValueModule.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/KeyValueModule.java
@@ -15,6 +15,7 @@ package org.eclipse.osee.orcs.db.internal.branch;
import java.util.function.Consumer;
import org.apache.commons.lang.mutable.MutableLong;
+import org.eclipse.osee.framework.core.data.KeyId;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.jdbc.JdbcClient;
@@ -90,8 +91,12 @@ public class KeyValueModule {
return false;
}
- };
+ @Override
+ public boolean putByKey(KeyId key, String value) {
+ return putByKey(key.getId(), value);
+ }
+ };
}
private class MutableString {
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/AttributeProvider.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/AttributeProvider.java
index 64dfe32668a..b9c81be38c2 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/AttributeProvider.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/AttributeProvider.java
@@ -76,7 +76,7 @@ public class AttributeProvider implements IResourceProvider {
return attributeDataPath;
}
- public String getBinaryDataPath() {
+ private String getBinaryDataPath() {
ensureInitialized();
return binaryDataPath;
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/ExchangeProvider.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/ExchangeProvider.java
index 4951285ff0b..4cdf3952d54 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/ExchangeProvider.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/ExchangeProvider.java
@@ -76,7 +76,7 @@ public class ExchangeProvider implements IResourceProvider {
return exchangeDataPath;
}
- public String getBinaryDataPath() {
+ private String getBinaryDataPath() {
ensureInitialized();
return binaryDataPath;
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/ResourceConstants.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/ResourceConstants.java
index 71dc08a1cc5..a3c2cde6be5 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/ResourceConstants.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/resource/ResourceConstants.java
@@ -43,4 +43,4 @@ public final class ResourceConstants {
public static String getBinaryDataPath(SystemProperties preferences) {
return preferences.getValue(OseeClient.OSEE_APPLICATION_SERVER_DATA);
}
-}
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/DatastoreEndpoint.java b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/DatastoreEndpoint.java
index 1797909f288..89123270a06 100644
--- a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/DatastoreEndpoint.java
+++ b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/DatastoreEndpoint.java
@@ -39,7 +39,7 @@ public interface DatastoreEndpoint {
@Path("initialize")
@Consumes(MediaType.TEXT_PLAIN)
@Produces(MediaType.APPLICATION_JSON)
- TransactionId initialize();
+ TransactionId initialize(String largeAttributeStorePath);
@POST
@Path("synonyms")
diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/DatastoreEndpointImpl.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/DatastoreEndpointImpl.java
index 18052c1e42c..140873ed865 100644
--- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/DatastoreEndpointImpl.java
+++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/DatastoreEndpointImpl.java
@@ -65,8 +65,8 @@ public class DatastoreEndpointImpl implements DatastoreEndpoint {
}
@Override
- public TransactionId initialize() {
- return adminOps.createDatastoreAndSystemBranches();
+ public TransactionId initialize(String largeAttributeStorePath) {
+ return adminOps.createDatastoreAndSystemBranches(largeAttributeStorePath);
}
@Override
diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/OrcsAdmin.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/OrcsAdmin.java
index e34d1b88ffb..781d988bc81 100644
--- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/OrcsAdmin.java
+++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/OrcsAdmin.java
@@ -29,7 +29,7 @@ public interface OrcsAdmin {
Callable<OrcsMetaData> createFetchOrcsMetaData();
- TransactionId createDatastoreAndSystemBranches();
+ TransactionId createDatastoreAndSystemBranches(String largeAttributeStorePath);
Callable<OrcsMetaData> migrateDatastore();
diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java
index aaf7af51d1c..5092cbc63e3 100644
--- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java
+++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/transaction/TransactionBuilder.java
@@ -203,8 +203,6 @@ public interface TransactionBuilder {
<E1, E2, E3, E4> boolean deleteTuple4ByE1E2(Tuple4Type<E1, E2, E3, E4> tupleType, E1 e1, E2 e2);
- void addKeyValueOps(Long id, String name);
-
ArtifactToken createArtifact(ArtifactToken parent, ArtifactTypeToken artifactType, String name, Long id);
/**

Back to the top