indexabout

This is a web interface for Eclipse Git repositories. Many projects also use the Gerrit Code Review. For more information about Git, please see the Git Wiki page.

The contents of the Git repositories are made available under the terms and conditions of the Eclipse.org Software User Agreement.

options
context:
space:
mode:
authorshawn.f.cook2011-10-19 12:17:57 -0400
committerRoberto E. Escobar2011-10-19 12:17:57 -0400
commitf9dbf10978fe6698f8b0fee161cf8b454e01a5d4 (patch)
tree5ead67dfd97ad7618e96dd6283702e56e8a19382
parent2944006c097acea980c1448264c6f6ebb8ef93f0 (diff)
downloadorg.eclipse.osee-f9dbf10978fe6698f8b0fee161cf8b454e01a5d4.zip
org.eclipse.osee-f9dbf10978fe6698f8b0fee161cf8b454e01a5d4.tar.gz
org.eclipse.osee-f9dbf10978fe6698f8b0fee161cf8b454e01a5d4.tar.xz
feature[ats_E6W8N]: Remove web splash page
-rw-r--r--plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java47
-rw-r--r--plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiViews.java4
-rw-r--r--plugins/org.eclipse.osee.display.api/src/org/eclipse/osee/display/api/components/SearchResultComponent.java2
-rw-r--r--plugins/org.eclipse.osee.display.presenter.mocks/src/org/eclipse/osee/display/presenter/mocks/MockSearchResultComponent.java4
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultComponent.java1
5 files changed, 40 insertions, 18 deletions
diff --git a/plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java b/plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java
index 30559f5..4362e04a 100644
--- a/plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java
+++ b/plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java
@@ -237,25 +237,56 @@ public class MockAtsWebSearchPresenter implements AtsSearchPresenter<AtsSearchHe
@Override
public void initSearchResults(String url, AtsSearchHeaderComponent searchHeaderComponent, SearchResultsListComponent resultsComponent) {
+ if ((url == null || url.isEmpty()) && searchHeaderComponent != null) {
+ searchHeaderComponent.clearAll();
+ Set<Entry<WebId, Collection<WebId>>> entrySet = programsAndBuilds.entrySet();
+ if (entrySet != null) {
+ for (Entry<WebId, Collection<WebId>> entry : entrySet) {
+ searchHeaderComponent.addProgram(entry.getKey());
+ }
+ }
+ }
+
if (resultsComponent != null) {
boolean showVerboseSearchResults = true;
+ String searchPhrase = "";
+ boolean nameOnly = false;
Map<String, String> params = requestStringToParameterMap(url);
if (params != null && params.size() > 0) {
String showVerbose_str = params.get(UrlParamNameConstants.PARAMNAME_SHOWVERBOSE);
if (showVerbose_str != null && !showVerbose_str.isEmpty()) {
showVerboseSearchResults = showVerbose_str.equalsIgnoreCase("true");
}
+
+ searchPhrase = params.get(UrlParamNameConstants.PARAMNAME_SEARCHPHRASE);
+ if (searchPhrase == null) {
+ searchPhrase = "";
+ }
+
+ String nameOnly_str = params.get(UrlParamNameConstants.PARAMNAME_NAMEONLY);
+ if (nameOnly_str != null && !nameOnly_str.isEmpty()) {
+ nameOnly = nameOnly_str.equalsIgnoreCase("true");
+ }
}
resultsComponent.clearAll();
- Set<Entry<String, WebArtifact>> entrySet = artifacts.entrySet();
- for (Entry<String, WebArtifact> artifactEntry : entrySet) {
- SearchResultComponent searchResultComp = resultsComponent.createSearchResult();
- if (searchResultComp != null) {
+ if (!searchPhrase.isEmpty()) {
+ Set<Entry<String, WebArtifact>> entrySet = artifacts.entrySet();
+ for (Entry<String, WebArtifact> artifactEntry : entrySet) {
WebArtifact artifact = artifactEntry.getValue();
- searchResultComp.setShowVerboseSearchResults(showVerboseSearchResults);
- searchResultComp.setArtifact(artifact);
- searchResultComp.addSearchResultMatch(new SearchResultMatch("Word Template Content", "...{COM_PAGE}...",
- 10));
+ if (artifact.getArtifactName().toLowerCase().contains(searchPhrase.toLowerCase())) {
+ SearchResultComponent searchResultComp = resultsComponent.createSearchResult();
+ if (searchResultComp != null) {
+ if (showVerboseSearchResults) {
+ artifact =
+ new WebArtifact(artifact.getGuid(), artifact.getArtifactName(), artifact.getArtifactType());
+ }
+ searchResultComp.setArtifact(artifact);
+ if (!nameOnly && !showVerboseSearchResults) {
+ searchResultComp.addSearchResultMatch(new SearchResultMatch("Word Template Content",
+ "...{COM_PAGE}...", 10));
+ }
+ }
+ }
}
}
}
diff --git a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiViews.java b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiViews.java
index 2d7d74e..ed02a3c 100644
--- a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiViews.java
+++ b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiViews.java
@@ -13,7 +13,6 @@ package org.eclipse.osee.ats.view.web;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.osee.ats.view.web.search.AtsArtifactView;
-import org.eclipse.osee.ats.view.web.search.AtsSearchHomeView;
import org.eclipse.osee.ats.view.web.search.AtsSearchResultsView;
import org.eclipse.osee.vaadin.widgets.HasViews;
import org.eclipse.osee.vaadin.widgets.Navigator;
@@ -25,9 +24,8 @@ public class AtsUiViews implements HasViews {
@Override
public List<Class<? extends Navigator.View>> getViews() {
- // Dynamic View Registration?
List<Class<? extends Navigator.View>> views = new ArrayList<Class<? extends Navigator.View>>();
- views.add(AtsSearchHomeView.class);
+ // views.add(AtsSearchHomeView.class);
views.add(AtsSearchResultsView.class);
views.add(AtsArtifactView.class);
return views;
diff --git a/plugins/org.eclipse.osee.display.api/src/org/eclipse/osee/display/api/components/SearchResultComponent.java b/plugins/org.eclipse.osee.display.api/src/org/eclipse/osee/display/api/components/SearchResultComponent.java
index bfe0454..40c63bb 100644
--- a/plugins/org.eclipse.osee.display.api/src/org/eclipse/osee/display/api/components/SearchResultComponent.java
+++ b/plugins/org.eclipse.osee.display.api/src/org/eclipse/osee/display/api/components/SearchResultComponent.java
@@ -18,8 +18,6 @@ import org.eclipse.osee.display.api.data.WebArtifact;
*/
public interface SearchResultComponent extends DisplaysErrorComponent {
- void setShowVerboseSearchResults(boolean showVerboseSearchResults);
-
void setArtifact(WebArtifact artifact);
void addSearchResultMatch(SearchResultMatch match);
diff --git a/plugins/org.eclipse.osee.display.presenter.mocks/src/org/eclipse/osee/display/presenter/mocks/MockSearchResultComponent.java b/plugins/org.eclipse.osee.display.presenter.mocks/src/org/eclipse/osee/display/presenter/mocks/MockSearchResultComponent.java
index 433f988..d194c1a 100644
--- a/plugins/org.eclipse.osee.display.presenter.mocks/src/org/eclipse/osee/display/presenter/mocks/MockSearchResultComponent.java
+++ b/plugins/org.eclipse.osee.display.presenter.mocks/src/org/eclipse/osee/display/presenter/mocks/MockSearchResultComponent.java
@@ -45,8 +45,4 @@ public class MockSearchResultComponent implements SearchResultComponent {
@Override
public void setErrorMessage(String message) {
}
-
- @Override
- public void setShowVerboseSearchResults(boolean showVerboseSearchResults) {
- }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultComponent.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultComponent.java
index dbd814e..c8d1f20 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultComponent.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeSearchResultComponent.java
@@ -118,7 +118,6 @@ public class OseeSearchResultComponent extends VerticalLayout implements SearchR
public void setErrorMessage(String message) {
}
- @Override
public void setShowVerboseSearchResults(boolean showVerboseSearchResults) {
this.showVerboseSearchResults = showVerboseSearchResults;
removeAllComponents();