Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-09-15 18:04:54 -0400
committerRyan D. Brooks2010-09-15 18:04:54 -0400
commit08eee9aefa627a8d6455e556da0d74b1d3776d4b (patch)
tree43a9a0397db04c17182fc71f2059fb5042647464 /plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core
parent63518f90be8a8eae9b65af5a15ec69778b4ef255 (diff)
downloadorg.eclipse.osee-08eee9aefa627a8d6455e556da0d74b1d3776d4b.tar.gz
org.eclipse.osee-08eee9aefa627a8d6455e556da0d74b1d3776d4b.tar.xz
org.eclipse.osee-08eee9aefa627a8d6455e556da0d74b1d3776d4b.zip
bug[ats_UNJKK]: Convert SearchEngine messages to standard format
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/SearchRequest.java67
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchResponse.java18
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/DataTranslationServiceFactory.java5
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchRequestTranslator.java30
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchResponseTranslator.java30
5 files changed, 150 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchRequest.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchRequest.java
new file mode 100644
index 0000000000..202772a70d
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchRequest.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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.framework.core.message;
+
+import java.util.Collection;
+import java.util.HashSet;
+
+/**
+ * @author Roberto E. Escobar
+ */
+public class SearchRequest {
+
+ private final int branchId;
+ private final String rawSearch;
+ private boolean isIncludeDeleted;
+ private boolean isMatchWordOrder;
+ private boolean isCaseSensive;
+ private boolean isFindAllLocationsEnabled;
+ private final Collection<String> attributeTypeGuids;
+
+ public SearchRequest(int branchId, String rawSearch) {
+ super();
+ this.attributeTypeGuids = new HashSet<String>();
+ this.branchId = branchId;
+ this.rawSearch = rawSearch;
+ }
+
+ public int getBranchId() {
+ return branchId;
+ }
+
+ public String getRawSearch() {
+ return rawSearch;
+ }
+
+ public boolean isIncludeDeleted() {
+ return isIncludeDeleted;
+ }
+
+ public boolean isMatchWordOrder() {
+ return isMatchWordOrder;
+ }
+
+ public boolean isCaseSensive() {
+ return isCaseSensive;
+ }
+
+ public boolean isFindAllLocationsEnabled() {
+ return isFindAllLocationsEnabled;
+ }
+
+ public Collection<String> getAttributeTypeFilter() {
+ return attributeTypeGuids;
+ }
+
+ public boolean isAttributeTypeFiltered() {
+ return !attributeTypeGuids.isEmpty();
+ }
+}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchResponse.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchResponse.java
new file mode 100644
index 0000000000..735050c89b
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchResponse.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * 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.framework.core.message;
+
+/**
+ * @author Roberto E. Escobar
+ */
+public class SearchResponse {
+
+}
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 f56db4176a..ec66002813 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
@@ -34,6 +34,8 @@ import org.eclipse.osee.framework.core.message.internal.translation.OseeImportMo
import org.eclipse.osee.framework.core.message.internal.translation.OseeImportModelResponseTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.PurgeBranchRequestTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.RelationTypeCacheUpdateResponseTranslator;
+import org.eclipse.osee.framework.core.message.internal.translation.SearchRequestTranslator;
+import org.eclipse.osee.framework.core.message.internal.translation.SearchResponseTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.TableDataTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.TransactionCacheUpdateResponseTranslator;
import org.eclipse.osee.framework.core.message.internal.translation.TransactionRecordTranslator;
@@ -97,6 +99,9 @@ public class DataTranslationServiceFactory {
service.addTranslator(new TableDataTranslator(), CoreTranslatorId.TABLE_DATA);
service.addTranslator(new DatastoreInitRequestTranslator(), CoreTranslatorId.OSEE_DATASTORE_INIT_REQUEST);
+
+ service.addTranslator(new SearchRequestTranslator(), CoreTranslatorId.SEARCH_REQUEST);
+ service.addTranslator(new SearchResponseTranslator(), CoreTranslatorId.SEARCH_RESPONSE);
return service;
}
}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchRequestTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchRequestTranslator.java
new file mode 100644
index 0000000000..3fbfd7951f
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchRequestTranslator.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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.framework.core.message.internal.translation;
+
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.message.SearchRequest;
+import org.eclipse.osee.framework.core.translation.ITranslator;
+import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
+
+public class SearchRequestTranslator implements ITranslator<SearchRequest> {
+
+ @Override
+ public SearchRequest convert(PropertyStore propertyStore) throws OseeCoreException {
+ return null;
+ }
+
+ @Override
+ public PropertyStore convert(SearchRequest object) throws OseeCoreException {
+ return null;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchResponseTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchResponseTranslator.java
new file mode 100644
index 0000000000..40d4ff43b4
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchResponseTranslator.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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.framework.core.message.internal.translation;
+
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.message.SearchRequest;
+import org.eclipse.osee.framework.core.translation.ITranslator;
+import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
+
+public class SearchResponseTranslator implements ITranslator<SearchRequest> {
+
+ @Override
+ public SearchRequest convert(PropertyStore propertyStore) throws OseeCoreException {
+ return null;
+ }
+
+ @Override
+ public PropertyStore convert(SearchRequest object) throws OseeCoreException {
+ return null;
+ }
+
+}

Back to the top