Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-06-24 16:26:35 -0400
committerrescobar2010-06-24 16:26:35 -0400
commit6241e39c24ed4b8a9263d0cb958f02c9f7b224b8 (patch)
tree94979bdd1864edff651fdfb6b70d0effe1d6171c /plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core
parenta330ba00ff9ed3f19e20737a6392054c1b6bcbee (diff)
downloadorg.eclipse.osee-6241e39c24ed4b8a9263d0cb958f02c9f7b224b8.tar.gz
org.eclipse.osee-6241e39c24ed4b8a9263d0cb958f02c9f7b224b8.tar.xz
org.eclipse.osee-6241e39c24ed4b8a9263d0cb958f02c9f7b224b8.zip
Move Database Schema Creation to app server
Create datastore bundle Misc. osgi service fixes
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core')
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/DatastoreInitRequest.java32
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/DataTranslationServiceFactory.java3
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/DatastoreInitRequestTranslator.java37
3 files changed, 72 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/DatastoreInitRequest.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/DatastoreInitRequest.java
new file mode 100644
index 0000000000..ec2173ca3b
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/DatastoreInitRequest.java
@@ -0,0 +1,32 @@
+/*
+ * Created on Jun 23, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.framework.core.message;
+
+public class DatastoreInitRequest {
+
+ private final String tableDataSpace;
+ private final String indexDataSpace;
+ private final boolean useFileSpecifiedSchemas;
+
+ public DatastoreInitRequest(String tableDataSpace, String indexDataSpace, boolean useFileSpecifiedSchemas) {
+ super();
+ this.tableDataSpace = tableDataSpace;
+ this.indexDataSpace = indexDataSpace;
+ this.useFileSpecifiedSchemas = useFileSpecifiedSchemas;
+ }
+
+ public String getTableDataSpace() {
+ return tableDataSpace;
+ }
+
+ public String getIndexDataSpace() {
+ return indexDataSpace;
+ }
+
+ public boolean isUseFileSpecifiedSchemas() {
+ return useFileSpecifiedSchemas;
+ }
+}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/DataTranslationServiceFactory.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/DataTranslationServiceFactory.java
index 7312b8f4c5..9a81ce0079 100644
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/DataTranslationServiceFactory.java
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/DataTranslationServiceFactory.java
@@ -28,6 +28,7 @@ import org.eclipse.osee.framework.core.message.internal.translation.ChangeItemTr
import org.eclipse.osee.framework.core.message.internal.translation.ChangeReportRequestTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.ChangeReportResponseTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.ChangeVersionTranslator;
+import org.eclipse.osee.framework.core.message.internal.translation.DatastoreInitRequestTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.OseeEnumTypeCacheUpdateResponseTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.OseeImportModelRequestTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.OseeImportModelResponseTranslator;
@@ -109,6 +110,8 @@ public class DataTranslationServiceFactory {
service.addTranslator(new OseeImportModelRequestTranslator(), CoreTranslatorId.OSEE_IMPORT_MODEL_REQUEST);
service.addTranslator(new OseeImportModelResponseTranslator(service), CoreTranslatorId.OSEE_IMPORT_MODEL_RESPONSE);
service.addTranslator(new TableDataTranslator(), CoreTranslatorId.TABLE_DATA);
+
+ service.addTranslator(new DatastoreInitRequestTranslator(), CoreTranslatorId.OSEE_DATASTORE_INIT_REQUEST);
return service;
}
}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/DatastoreInitRequestTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/DatastoreInitRequestTranslator.java
new file mode 100644
index 0000000000..3e4fe582a5
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/DatastoreInitRequestTranslator.java
@@ -0,0 +1,37 @@
+/*
+ * Created on Jun 23, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.framework.core.message.internal.translation;
+
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.message.DatastoreInitRequest;
+import org.eclipse.osee.framework.core.translation.ITranslator;
+import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
+
+public class DatastoreInitRequestTranslator implements ITranslator<DatastoreInitRequest> {
+
+ private static enum Entry {
+ INDEX_DATA_SPACE,
+ TABLE_DATA_SPACE,
+ USE_FILE_SPECIFIED_SCHEMAS;
+ }
+
+ @Override
+ public DatastoreInitRequest convert(PropertyStore store) throws OseeCoreException {
+ String tableDataSpace = store.get(Entry.TABLE_DATA_SPACE.name());
+ String indexDataSpace = store.get(Entry.INDEX_DATA_SPACE.name());
+ boolean useSchemasSpecified = store.getBoolean(Entry.USE_FILE_SPECIFIED_SCHEMAS.name());
+ return new DatastoreInitRequest(tableDataSpace, indexDataSpace, useSchemasSpecified);
+ }
+
+ @Override
+ public PropertyStore convert(DatastoreInitRequest object) throws OseeCoreException {
+ PropertyStore store = new PropertyStore();
+ store.put(Entry.INDEX_DATA_SPACE.name(), object.getIndexDataSpace());
+ store.put(Entry.TABLE_DATA_SPACE.name(), object.getTableDataSpace());
+ store.put(Entry.USE_FILE_SPECIFIED_SCHEMAS.name(), object.isUseFileSpecifiedSchemas());
+ return store;
+ }
+}

Back to the top