Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework')
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/SearchRequest.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/SearchRequestTranslator.java12
2 files changed, 6 insertions, 10 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
index 7fa12201b2e..03616089798 100644
--- 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
@@ -10,12 +10,13 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.message;
+import org.eclipse.osee.framework.core.data.HasBranch;
import org.eclipse.osee.framework.core.data.IOseeBranch;
/**
* @author Roberto E. Escobar
*/
-public class SearchRequest {
+public class SearchRequest implements HasBranch {
private final IOseeBranch branch;
private final String rawSearch;
@@ -32,6 +33,7 @@ public class SearchRequest {
this.options = options != null ? options : new SearchOptions();
}
+ @Override
public IOseeBranch getBranch() {
return branch;
}
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
index 0562d9dab18..91b15736a8e 100644
--- 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
@@ -14,7 +14,7 @@ import java.util.Collection;
import org.eclipse.osee.framework.core.data.BranchToken;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
-import org.eclipse.osee.framework.core.data.NamedIdentity;
+import org.eclipse.osee.framework.core.data.TokenFactory;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.core.message.SearchOptions;
import org.eclipse.osee.framework.core.message.SearchRequest;
@@ -43,7 +43,7 @@ public class SearchRequestTranslator implements ITranslator<SearchRequest> {
public SearchRequest convert(PropertyStore store) {
String guid = store.get(Entry.BRANCH_GUID.name());
String name = store.get(Entry.BRANCH_NAME.name());
- IOseeBranch branch = new BranchToken(guid, name);
+ IOseeBranch branch = TokenFactory.createBranch(guid, name);
String rawSearch = store.get(Entry.RAW_SEARCH.name());
SearchOptions options = new SearchOptions();
@@ -61,7 +61,7 @@ public class SearchRequestTranslator implements ITranslator<SearchRequest> {
for (int index = 0; index < typeFilterGuids.length; index++) {
guid = typeFilterGuids[index];
name = index < typeFilterNames.length ? typeFilterNames[index] : Strings.emptyString();
- IAttributeType type = new AttributeTypeFilter(guid, name);
+ IAttributeType type = TokenFactory.createAttributeType(guid, name);
options.addAttributeTypeFilter(type);
}
}
@@ -100,10 +100,4 @@ public class SearchRequestTranslator implements ITranslator<SearchRequest> {
}
return store;
}
-
- private static final class AttributeTypeFilter extends NamedIdentity implements IAttributeType {
- public AttributeTypeFilter(String guid, String name) {
- super(guid, name);
- }
- }
}

Back to the top