summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmisinco2011-10-24 11:43:57 -0400
committerRoberto E. Escobar2011-10-24 11:43:57 -0400
commit683c5e1fcdbeb340539d8322c87cb64f16dac72d (patch)
tree9323e170803efa788d1e14bf2494959281fe740d
parent6571c958e276f3538860bca7b9f8276e741d3e98 (diff)
downloadorg.eclipse.osee-683c5e1fcdbeb340539d8322c87cb64f16dac72d.tar.gz
org.eclipse.osee-683c5e1fcdbeb340539d8322c87cb64f16dac72d.tar.xz
org.eclipse.osee-683c5e1fcdbeb340539d8322c87cb64f16dac72d.zip
feature[ats_9WGDG]: Clean-up presenter bundles
-rw-r--r--plugins/org.eclipse.osee.ats.presenter/src/org/eclipse/osee/ats/presenter/internal/AtsSearchPresenterImpl.java4
-rw-r--r--plugins/org.eclipse.osee.display.presenter.test/pom.xml2
-rw-r--r--plugins/org.eclipse.osee.display.presenter.test/src/org/eclipse/osee/display/presenter/SearchPresenterTestSuite.java (renamed from plugins/org.eclipse.osee.display.presenter.test/src/org/eclipse/osee/display/presenter/DisplayPresenterTestSuite.java)6
-rw-r--r--plugins/org.eclipse.osee.display.presenter.test/src/org/eclipse/osee/display/presenter/internal/SearchPresenterTest.java (renamed from plugins/org.eclipse.osee.display.presenter.test/src/org/eclipse/osee/display/presenter/internal/DisplayPresenterTest.java)26
-rw-r--r--plugins/org.eclipse.osee.display.presenter/src/org/eclipse/osee/display/presenter/SearchPresenterImpl.java (renamed from plugins/org.eclipse.osee.display.presenter/src/org/eclipse/osee/display/presenter/DisplayPresenter.java)4
5 files changed, 21 insertions, 21 deletions
diff --git a/plugins/org.eclipse.osee.ats.presenter/src/org/eclipse/osee/ats/presenter/internal/AtsSearchPresenterImpl.java b/plugins/org.eclipse.osee.ats.presenter/src/org/eclipse/osee/ats/presenter/internal/AtsSearchPresenterImpl.java
index cc93ed8838..2e86fcf5ab 100644
--- a/plugins/org.eclipse.osee.ats.presenter/src/org/eclipse/osee/ats/presenter/internal/AtsSearchPresenterImpl.java
+++ b/plugins/org.eclipse.osee.ats.presenter/src/org/eclipse/osee/ats/presenter/internal/AtsSearchPresenterImpl.java
@@ -23,7 +23,7 @@ import org.eclipse.osee.ats.api.search.AtsSearchPresenter;
import org.eclipse.osee.display.api.components.SearchResultsListComponent;
import org.eclipse.osee.display.api.data.ViewId;
import org.eclipse.osee.display.api.search.SearchNavigator;
-import org.eclipse.osee.display.presenter.DisplayPresenter;
+import org.eclipse.osee.display.presenter.SearchPresenterImpl;
import org.eclipse.osee.display.presenter.Utility;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -32,7 +32,7 @@ import org.eclipse.osee.orcs.data.ReadableArtifact;
/**
* @author John Misinco
*/
-public class AtsSearchPresenterImpl<T extends AtsSearchHeaderComponent> extends DisplayPresenter<T> implements AtsSearchPresenter<T> {
+public class AtsSearchPresenterImpl<T extends AtsSearchHeaderComponent, K extends AtsSearchParameters> extends SearchPresenterImpl<T, K> implements AtsSearchPresenter<T, K> {
private final AtsArtifactProvider atsArtifactProvider;
diff --git a/plugins/org.eclipse.osee.display.presenter.test/pom.xml b/plugins/org.eclipse.osee.display.presenter.test/pom.xml
index f3f6122606..83352268ae 100644
--- a/plugins/org.eclipse.osee.display.presenter.test/pom.xml
+++ b/plugins/org.eclipse.osee.display.presenter.test/pom.xml
@@ -29,7 +29,7 @@
<version>${tycho-version}</version>
<configuration>
<testSuite>org.eclipse.osee.display.presenter.test</testSuite>
- <testClass>org.eclipse.osee.display.presenter.DisplayPresenterTestSuite</testClass>
+ <testClass>org.eclipse.osee.display.presenter.SearchPresenterTestSuite</testClass>
</configuration>
</plugin>
</plugins>
diff --git a/plugins/org.eclipse.osee.display.presenter.test/src/org/eclipse/osee/display/presenter/DisplayPresenterTestSuite.java b/plugins/org.eclipse.osee.display.presenter.test/src/org/eclipse/osee/display/presenter/SearchPresenterTestSuite.java
index 1b8fb247de..34d1533665 100644
--- a/plugins/org.eclipse.osee.display.presenter.test/src/org/eclipse/osee/display/presenter/DisplayPresenterTestSuite.java
+++ b/plugins/org.eclipse.osee.display.presenter.test/src/org/eclipse/osee/display/presenter/SearchPresenterTestSuite.java
@@ -10,15 +10,15 @@
*******************************************************************************/
package org.eclipse.osee.display.presenter;
-import org.eclipse.osee.display.presenter.internal.DisplayPresenterTest;
+import org.eclipse.osee.display.presenter.internal.SearchPresenterTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses({DisplayPresenterTest.class, UtilityTest.class})
+@Suite.SuiteClasses({SearchPresenterTest.class, UtilityTest.class})
/**
* @author John Misinco
*/
-public class DisplayPresenterTestSuite {
+public class SearchPresenterTestSuite {
//Test Suite class
}
diff --git a/plugins/org.eclipse.osee.display.presenter.test/src/org/eclipse/osee/display/presenter/internal/DisplayPresenterTest.java b/plugins/org.eclipse.osee.display.presenter.test/src/org/eclipse/osee/display/presenter/internal/SearchPresenterTest.java
index b2efb63b4a..a5ec6f11a4 100644
--- a/plugins/org.eclipse.osee.display.presenter.test/src/org/eclipse/osee/display/presenter/internal/DisplayPresenterTest.java
+++ b/plugins/org.eclipse.osee.display.presenter.test/src/org/eclipse/osee/display/presenter/internal/SearchPresenterTest.java
@@ -19,7 +19,7 @@ import org.eclipse.osee.display.api.components.SearchHeaderComponent;
import org.eclipse.osee.display.api.data.ViewArtifact;
import org.eclipse.osee.display.api.data.ViewId;
import org.eclipse.osee.display.api.search.ArtifactProvider;
-import org.eclipse.osee.display.presenter.DisplayPresenter;
+import org.eclipse.osee.display.presenter.SearchPresenterImpl;
import org.eclipse.osee.display.presenter.Utility;
import org.eclipse.osee.display.presenter.mocks.MockArtifactHeaderComponent;
import org.eclipse.osee.display.presenter.mocks.MockArtifactProvider;
@@ -50,7 +50,7 @@ import org.junit.Test;
/**
* @author John R. Misinco
*/
-public class DisplayPresenterTest {
+public class SearchPresenterTest {
@SuppressWarnings({"rawtypes", "unchecked"})
private List<Match<ReadableArtifact, ReadableAttribute<?>>> getSearchResults() {
@@ -67,7 +67,7 @@ public class DisplayPresenterTest {
public void testInitSearchResults() throws UnsupportedEncodingException {
MockArtifactProvider provider = new MockArtifactProvider();
provider.setResultList(getSearchResults());
- DisplayPresenter<SearchHeaderComponent> presenter = new DisplayPresenter<SearchHeaderComponent>(provider);
+ SearchPresenterImpl<SearchHeaderComponent> presenter = new SearchPresenterImpl<SearchHeaderComponent>(provider);
MockSearchHeaderComponent searchHeaderComp = new MockSearchHeaderComponent();
MockSearchResultsListComponent searchResultsComp = new MockSearchResultsListComponent();
String url =
@@ -79,7 +79,7 @@ public class DisplayPresenterTest {
@Test
public void testInitSearchResultsErrors() throws UnsupportedEncodingException {
- DisplayPresenter<SearchHeaderComponent> presenter = new DisplayPresenter<SearchHeaderComponent>(null);
+ SearchPresenterImpl<SearchHeaderComponent> presenter = new SearchPresenterImpl<SearchHeaderComponent>(null);
MockSearchHeaderComponent searchHeaderComp = new MockSearchHeaderComponent();
MockSearchResultsListComponent searchResultsComp = new MockSearchResultsListComponent();
String url = "badUrl";
@@ -87,7 +87,7 @@ public class DisplayPresenterTest {
Assert.assertNotNull(searchResultsComp.getErrorMessage());
ExceptionArtifactProvider provider = new ExceptionArtifactProvider();
- presenter = new DisplayPresenter<SearchHeaderComponent>(provider);
+ presenter = new SearchPresenterImpl<SearchHeaderComponent>(provider);
searchHeaderComp = new MockSearchHeaderComponent();
searchResultsComp = new MockSearchResultsListComponent();
url = "/branch=" + Utility.encode(GUID.create()) + "&nameOnly=true&search=" + Utility.encode("this is a test");
@@ -98,7 +98,7 @@ public class DisplayPresenterTest {
@Test
public void testSelectArtifact() throws UnsupportedEncodingException {
MockSearchNavigator navigator = new MockSearchNavigator();
- DisplayPresenter<SearchHeaderComponent> presenter = new DisplayPresenter<SearchHeaderComponent>(null);
+ SearchPresenterImpl<SearchHeaderComponent> presenter = new SearchPresenterImpl<SearchHeaderComponent>(null);
String branchGuid = GUID.create();
String artGuid = GUID.create();
ViewArtifact artifact = new ViewArtifact(artGuid, "name", "type", null, new ViewId(branchGuid, "branchName"));
@@ -111,7 +111,7 @@ public class DisplayPresenterTest {
public void testInitArtifactPage() throws UnsupportedEncodingException {
MockArtifactProvider provider = new MockArtifactProvider();
provider.setResultList(getSearchResults());
- DisplayPresenter<SearchHeaderComponent> presenter = new DisplayPresenter<SearchHeaderComponent>(provider);
+ SearchPresenterImpl<SearchHeaderComponent> presenter = new SearchPresenterImpl<SearchHeaderComponent>(provider);
String artGuid = GUID.create();
MockArtifact testArt = new MockArtifact(artGuid, "name");
MockArtifact parentArt = new MockArtifact(GUID.create(), "parent");
@@ -134,7 +134,7 @@ public class DisplayPresenterTest {
Assert.assertEquals(1, attrComp.getAttributes().keySet().size());
provider = new MockArtifactProvider();
- presenter = new DisplayPresenter<SearchHeaderComponent>(provider);
+ presenter = new SearchPresenterImpl<SearchHeaderComponent>(provider);
presenter.initArtifactPage(url, searchHeaderComp, artHeaderComp, relComp, attrComp);
Assert.assertNotNull(artHeaderComp.getErrorMessage());
}
@@ -142,7 +142,7 @@ public class DisplayPresenterTest {
@Test
public void testInitArtifactPageErrors() throws UnsupportedEncodingException {
String url = "badUrl";
- DisplayPresenter<SearchHeaderComponent> presenter = new DisplayPresenter<SearchHeaderComponent>(null);
+ SearchPresenterImpl<SearchHeaderComponent> presenter = new SearchPresenterImpl<SearchHeaderComponent>(null);
MockSearchHeaderComponent searchHeaderComp = new MockSearchHeaderComponent();
MockArtifactHeaderComponent artHeaderComp = new MockArtifactHeaderComponent();
MockRelationComponent relComp = new MockRelationComponent();
@@ -152,7 +152,7 @@ public class DisplayPresenterTest {
url = "/branch=" + Utility.encode(GUID.create()) + "&artifact=" + Utility.encode(GUID.create());
ExceptionArtifactProvider provider = new ExceptionArtifactProvider();
- presenter = new DisplayPresenter<SearchHeaderComponent>(provider);
+ presenter = new SearchPresenterImpl<SearchHeaderComponent>(provider);
searchHeaderComp = new MockSearchHeaderComponent();
artHeaderComp = new MockArtifactHeaderComponent();
relComp = new MockRelationComponent();
@@ -167,7 +167,7 @@ public class DisplayPresenterTest {
MockRelationComponent relComp = new MockRelationComponent();
provider.setResultList(getSearchResults());
- DisplayPresenter<SearchHeaderComponent> presenter = new DisplayPresenter<SearchHeaderComponent>(provider);
+ SearchPresenterImpl<SearchHeaderComponent> presenter = new SearchPresenterImpl<SearchHeaderComponent>(provider);
String artGuid = GUID.create();
String artGuidA = GUID.create();
String artGuidB = GUID.create();
@@ -212,7 +212,7 @@ public class DisplayPresenterTest {
@Test
public void testSelectRelationTypeErrors() {
- DisplayPresenter<SearchHeaderComponent> presenter = new DisplayPresenter<SearchHeaderComponent>(null);
+ SearchPresenterImpl<SearchHeaderComponent> presenter = new SearchPresenterImpl<SearchHeaderComponent>(null);
MockRelationComponent relComp = new MockRelationComponent();
ViewId relation = new ViewId("0", "Name");
presenter.selectRelationType(null, relation, relComp);
@@ -226,7 +226,7 @@ public class DisplayPresenterTest {
ExceptionArtifactProvider provider = new ExceptionArtifactProvider();
relComp = new MockRelationComponent();
- presenter = new DisplayPresenter<SearchHeaderComponent>(provider);
+ presenter = new SearchPresenterImpl<SearchHeaderComponent>(provider);
presenter.selectRelationType(artifact, relation, relComp);
Assert.assertNotNull(relComp.getErrorMessage());
}
diff --git a/plugins/org.eclipse.osee.display.presenter/src/org/eclipse/osee/display/presenter/DisplayPresenter.java b/plugins/org.eclipse.osee.display.presenter/src/org/eclipse/osee/display/presenter/SearchPresenterImpl.java
index 62f70b5c11..dc51838710 100644
--- a/plugins/org.eclipse.osee.display.presenter/src/org/eclipse/osee/display/presenter/DisplayPresenter.java
+++ b/plugins/org.eclipse.osee.display.presenter/src/org/eclipse/osee/display/presenter/SearchPresenterImpl.java
@@ -49,14 +49,14 @@ import org.eclipse.osee.orcs.search.Match;
/**
* @author John Misinco
*/
-public class DisplayPresenter<T extends SearchHeaderComponent> implements SearchPresenter<T> {
+public abstract class SearchPresenterImpl<T extends SearchHeaderComponent, K extends ViewSearchParameters> implements SearchPresenter<T, K> {
protected final ArtifactProvider artifactProvider;
private final static String SIDE_A_KEY = "sideAName";
private final static String SIDE_B_KEY = "sideBName";
- public DisplayPresenter(ArtifactProvider artifactProvider) {
+ public SearchPresenterImpl(ArtifactProvider artifactProvider) {
this.artifactProvider = artifactProvider;
}