Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2017-08-07 15:18:21 -0400
committerRyan D. Brooks2017-08-07 18:05:23 -0400
commit7f2a5f157558e674b94e90af6ca9b7552686b9ef (patch)
tree4c6d477d7ca85366ad35b7c28c79a9f71bf4dd42
parentf7574e2c51869931030b69c9723cafec41ad90e9 (diff)
downloadorg.eclipse.osee-7f2a5f157558e674b94e90af6ca9b7552686b9ef.tar.gz
org.eclipse.osee-7f2a5f157558e674b94e90af6ca9b7552686b9ef.tar.xz
org.eclipse.osee-7f2a5f157558e674b94e90af6ca9b7552686b9ef.zip
refactor: Use shared location for ds admin keys
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataStoreAdmin.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/AdminModule.java8
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DataStoreConfigConstants.java26
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/DatastoreEndpointImpl.java8
5 files changed, 14 insertions, 33 deletions
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 ebd4d9f2d66..a12ad948510 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
@@ -19,6 +19,10 @@ import org.eclipse.osee.orcs.OrcsSession;
*/
public interface DataStoreAdmin {
+ public static final String SCHEMA_TABLE_DATA_NAMESPACE = "schema.table.data.namespace";
+ 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";
+
Callable<DataStoreInfo> createDataStore(OrcsSession session, Map<String, String> parameters);
Callable<DataStoreInfo> getDataStoreInfo(OrcsSession session);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/AdminModule.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/AdminModule.java
index 3d862947c1e..99d6c1505b5 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/AdminModule.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/AdminModule.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.orcs.db.internal;
+import com.google.common.base.Supplier;
import java.util.Map;
import java.util.concurrent.Callable;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -27,7 +28,6 @@ import org.eclipse.osee.orcs.db.internal.callable.FetchDatastoreInfoCallable;
import org.eclipse.osee.orcs.db.internal.callable.InitializeDatastoreCallable;
import org.eclipse.osee.orcs.db.internal.callable.MigrateDatastoreCallable;
import org.eclipse.osee.orcs.db.internal.util.DynamicSchemaResourceProvider;
-import com.google.common.base.Supplier;
/**
* @author Roberto E. Escobar
@@ -53,9 +53,9 @@ public class AdminModule {
return new DataStoreAdmin() {
@Override
public Callable<DataStoreInfo> createDataStore(OrcsSession session, Map<String, String> parameters) {
- getOption(parameters, DataStoreConfigConstants.SCHEMA_TABLE_DATA_NAMESPACE, "");
- getOption(parameters, DataStoreConfigConstants.SCHEMA_INDEX_DATA_NAMESPACE, "");
- getOption(parameters, DataStoreConfigConstants.SCHEMA_USER_FILE_SPECIFIED_NAMESPACE, false);
+ getOption(parameters, DataStoreAdmin.SCHEMA_TABLE_DATA_NAMESPACE, "");
+ getOption(parameters, DataStoreAdmin.SCHEMA_INDEX_DATA_NAMESPACE, "");
+ getOption(parameters, DataStoreAdmin.SCHEMA_USER_FILE_SPECIFIED_NAMESPACE, false);
Supplier<Iterable<JdbcMigrationResource>> schemaProvider = new DynamicSchemaResourceProvider(logger);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DataStoreConfigConstants.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DataStoreConfigConstants.java
deleted file mode 100644
index 60662e75512..00000000000
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DataStoreConfigConstants.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.orcs.db.internal;
-
-/**
- * @author Roberto E. Escobar
- */
-public final class DataStoreConfigConstants {
-
- private DataStoreConfigConstants() {
- // Constants class
- }
-
- public static final String SCHEMA_TABLE_DATA_NAMESPACE = "schema.table.data.namespace";
- 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";
-
-}
diff --git a/plugins/org.eclipse.osee.orcs.rest/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.orcs.rest/META-INF/MANIFEST.MF
index c8964b3cce4..f6370d5509e 100644
--- a/plugins/org.eclipse.osee.orcs.rest/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.orcs.rest/META-INF/MANIFEST.MF
@@ -40,6 +40,7 @@ Import-Package: com.google.common.base;version="15.0.0",
org.eclipse.osee.jaxrs.mvc,
org.eclipse.osee.jdbc,
org.eclipse.osee.orcs,
+ org.eclipse.osee.orcs.core.ds,
org.eclipse.osee.orcs.data,
org.eclipse.osee.orcs.rest.model,
org.eclipse.osee.orcs.rest.model.search.artifact,
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 410e35d76f5..a190d2ed44f 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
@@ -22,6 +22,7 @@ import org.eclipse.osee.activity.api.ActivityLog;
import org.eclipse.osee.orcs.OrcsAdmin;
import org.eclipse.osee.orcs.OrcsApi;
import org.eclipse.osee.orcs.OrcsMetaData;
+import org.eclipse.osee.orcs.core.ds.DataStoreAdmin;
import org.eclipse.osee.orcs.rest.model.DatastoreEndpoint;
import org.eclipse.osee.orcs.rest.model.DatastoreInfo;
import org.eclipse.osee.orcs.rest.model.DatastoreInitOptions;
@@ -69,9 +70,10 @@ public class DatastoreEndpointImpl implements DatastoreEndpoint {
OrcsAdmin adminOps = getOrcsAdmin();
Map<String, String> parameters = new HashMap<>();
- parameters.put("schema.table.data.namespace", options.getTableDataSpace());
- parameters.put("schema.index.data.namespace", options.getIndexDataSpace());
- parameters.put("schema.user.file.specified.schema.names", Boolean.toString(options.isUseFileSpecifiedSchemas()));
+ parameters.put(DataStoreAdmin.SCHEMA_TABLE_DATA_NAMESPACE, options.getTableDataSpace());
+ parameters.put(DataStoreAdmin.SCHEMA_INDEX_DATA_NAMESPACE, options.getIndexDataSpace());
+ parameters.put(DataStoreAdmin.SCHEMA_USER_FILE_SPECIFIED_NAMESPACE,
+ Boolean.toString(options.isUseFileSpecifiedSchemas()));
Callable<OrcsMetaData> callable = adminOps.createDatastore(parameters);
OrcsMetaData metaData = executeCallable(callable);

Back to the top