summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshawn.f.cook2011-10-19 16:50:17 (EDT)
committer Roberto E. Escobar2011-10-19 16:50:17 (EDT)
commit81053a5eabe47f9beaaee28f1824a09d820dd9cd (patch)
treebb6fe3a91bffbb50f55fc72558d6d973b6f9c96b
parentd1db7699c412eb4ba6be0cf813687543dbcf3a2d (diff)
downloadorg.eclipse.osee-81053a5eabe47f9beaaee28f1824a09d820dd9cd.zip
org.eclipse.osee-81053a5eabe47f9beaaee28f1824a09d820dd9cd.tar.gz
org.eclipse.osee-81053a5eabe47f9beaaee28f1824a09d820dd9cd.tar.bz2
feature[ats_E6W8N]: Update Presenter-UI interface files
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/components/AtsSearchHeaderComponent.java7
-rw-r--r--plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockAtsSearchHeaderComponent.java13
-rw-r--r--plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java23
-rw-r--r--plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java50
-rw-r--r--plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/search/AtsSearchHomeView.java59
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/search/OseeSearchHomeView.java59
6 files changed, 35 insertions, 176 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/components/AtsSearchHeaderComponent.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/components/AtsSearchHeaderComponent.java
index a8b86b8..8c82ce3 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/components/AtsSearchHeaderComponent.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/components/AtsSearchHeaderComponent.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.api.components;
+import org.eclipse.osee.ats.api.data.AtsSearchParameters;
import org.eclipse.osee.display.api.components.SearchHeaderComponent;
import org.eclipse.osee.display.api.data.WebId;
@@ -24,10 +25,6 @@ public interface AtsSearchHeaderComponent extends SearchHeaderComponent {
void addBuild(WebId build);
- void setSearchCriteria(WebId program, WebId build, boolean nameOnly, String searchPhrase);
-
- void setProgram(WebId program);
-
- void setBuild(WebId build);
+ void setSearchCriteria(AtsSearchParameters params);
}
diff --git a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockAtsSearchHeaderComponent.java b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockAtsSearchHeaderComponent.java
index 12d5e9f..f5a9ecd 100644
--- a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockAtsSearchHeaderComponent.java
+++ b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockAtsSearchHeaderComponent.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.ats.mocks;
import java.util.LinkedList;
import java.util.List;
import org.eclipse.osee.ats.api.components.AtsSearchHeaderComponent;
+import org.eclipse.osee.ats.api.data.AtsSearchParameters;
import org.eclipse.osee.display.api.data.WebId;
/**
@@ -78,17 +79,7 @@ public class MockAtsSearchHeaderComponent implements AtsSearchHeaderComponent {
}
@Override
- public void setSearchCriteria(WebId program, WebId build, boolean nameOnly, String searchPhrase) {
- }
-
- @Override
- public void setProgram(WebId program) {
- selectedProgram = program;
- }
-
- @Override
- public void setBuild(WebId build) {
- selectedBuild = build;
+ public void setSearchCriteria(AtsSearchParameters params) {
}
@Override
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 4362e04a..1f2116e 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
@@ -123,17 +123,18 @@ public class MockAtsWebSearchPresenter implements AtsSearchPresenter<AtsSearchHe
}
}
- private void initSearchHome(AtsSearchHeaderComponent headerComponent) {
- if (headerComponent != null) {
- headerComponent.clearAll();
- Set<Entry<WebId, Collection<WebId>>> entrySet = programsAndBuilds.entrySet();
- if (entrySet != null) {
- for (Entry<WebId, Collection<WebId>> entry : entrySet) {
- headerComponent.addProgram(entry.getKey());
- }
- }
- }
- }
+ // @Override
+ // public void initSearchHome(AtsSearchHeaderComponent headerComponent) {
+ // if (headerComponent != null) {
+ // headerComponent.clearAll();
+ // Set<Entry<WebId, Collection<WebId>>> entrySet = programsAndBuilds.entrySet();
+ // if (entrySet != null) {
+ // for (Entry<WebId, Collection<WebId>> entry : entrySet) {
+ // headerComponent.addProgram(entry.getKey());
+ // }
+ // }
+ // }
+ // }
@Override
public void selectArtifact(WebArtifact artifact, SearchNavigator oseeNavigator) {
diff --git a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java
index fe36b2a..5743849 100644
--- a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java
+++ b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java
@@ -15,7 +15,7 @@ import org.eclipse.osee.ats.api.data.AtsSearchParameters;
import org.eclipse.osee.ats.api.search.AtsSearchPresenter;
import org.eclipse.osee.ats.view.web.AtsNavigator;
import org.eclipse.osee.ats.view.web.AtsUiApplication;
-import org.eclipse.osee.ats.view.web.search.AtsSearchHomeView;
+import org.eclipse.osee.ats.view.web.search.AtsSearchResultsView;
import org.eclipse.osee.display.api.data.WebId;
import org.eclipse.osee.display.view.web.CssConstants;
import org.eclipse.osee.display.view.web.components.OseeLogoLink;
@@ -162,7 +162,7 @@ public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements At
if (showOseeTitleAbove) {
setStyleName(CssConstants.OSEE_SEARCH_HEADER_COMPONENT_LARGE);
OseeLogoLink oseeTitleLabel =
- new OseeLogoLink(navigator, CssConstants.OSEE_TITLE_LARGE_TEXT, AtsSearchHomeView.class);
+ new OseeLogoLink(navigator, CssConstants.OSEE_TITLE_LARGE_TEXT, AtsSearchResultsView.class);
hLayoutRow0.addComponent(oseeTitleLabel);
hLayoutRow0.setComponentAlignment(oseeTitleLabel, Alignment.MIDDLE_CENTER);
oseeTitleLabel.setStyleName(CssConstants.OSEE_TITLE_LARGE_TEXT);
@@ -181,7 +181,7 @@ public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements At
setStyleName(CssConstants.OSEE_SEARCH_HEADER_COMPONENT_SMALL);
OseeLogoLink oseeTitleLabel =
- new OseeLogoLink(navigator, CssConstants.OSEE_TITLE_MEDIUM_TEXT, AtsSearchHomeView.class);
+ new OseeLogoLink(navigator, CssConstants.OSEE_TITLE_MEDIUM_TEXT, AtsSearchResultsView.class);
Label spacer4 = new Label("");
spacer4.setWidth(15, UNITS_PIXELS);
oseeTitleLabel.setHeight(70, UNITS_PIXELS);
@@ -238,20 +238,22 @@ public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements At
}
@Override
- public void setSearchCriteria(WebId program, WebId build, boolean nameOnly, String searchPhrase) {
- if (programCombo != null) {
- lockProgramCombo = true;
- programCombo.setValue(program);
- lockProgramCombo = false;
- }
- if (buildCombo != null) {
- buildCombo.setValue(build);
- }
- if (nameOnlyCheckBox != null) {
- nameOnlyCheckBox.setValue(nameOnly);
- }
- if (searchTextField != null) {
- searchTextField.setValue(searchPhrase);
+ public void setSearchCriteria(AtsSearchParameters params) {
+ if (params != null) {
+ if (programCombo != null) {
+ lockProgramCombo = true;
+ programCombo.setValue(params.getProgram());
+ lockProgramCombo = false;
+ }
+ if (buildCombo != null) {
+ buildCombo.setValue(params.getBuild());
+ }
+ if (nameOnlyCheckBox != null) {
+ nameOnlyCheckBox.setValue(params.isNameOnly());
+ }
+ if (searchTextField != null) {
+ searchTextField.setValue(params.getSearchString());
+ }
}
}
@@ -274,20 +276,6 @@ public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements At
}
@Override
- public void setProgram(WebId program) {
- if (programCombo != null) {
- programCombo.setValue(program);
- }
- }
-
- @Override
- public void setBuild(WebId build) {
- if (buildCombo != null) {
- buildCombo.setValue(build);
- }
- }
-
- @Override
public void setErrorMessage(String message) {
Application app = this.getApplication();
if (app != null) {
diff --git a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/search/AtsSearchHomeView.java b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/search/AtsSearchHomeView.java
deleted file mode 100644
index c9b5718..0000000
--- a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/search/AtsSearchHomeView.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.ats.view.web.search;
-
-import org.eclipse.osee.ats.api.search.AtsSearchPresenter;
-import org.eclipse.osee.ats.view.web.AtsUiApplication;
-import org.eclipse.osee.ats.view.web.components.AtsSearchHeaderImpl;
-import org.eclipse.osee.display.view.web.search.OseeSearchHomeView;
-
-/**
- * @author Shawn F. Cook
- */
-@SuppressWarnings("serial")
-public class AtsSearchHomeView extends OseeSearchHomeView {
-
- private boolean populated = false;
- private AtsSearchPresenter searchPresenter = null;
-
- @Override
- public void attach() {
- if (!populated) {
- try {
- AtsUiApplication atsApp = (AtsUiApplication) getApplication();
- searchPresenter = atsApp.getAtsWebSearchPresenter();
- searchHeader = atsApp.getAtsSearchHeaderComponent();
- callInitSearchHome();
- createLayout();
- } catch (Exception e) {
- System.out.println("OseeArtifactNameLinkComponent.attach - CRITICAL ERROR: casting threw an exception.");
- }
- }
- populated = true;
- }
-
- private void callInitSearchHome() {
- if (searchPresenter != null) {
- try {
- AtsSearchHeaderImpl atsSearchHeaderComp = (AtsSearchHeaderImpl) searchHeader;
- // searchPresenter.initSearchHome(atsSearchHeaderComp);
- } catch (Exception e) {
- System.out.println("OseeArtifactNameLinkComponent.navigateTo - CRITICAL ERROR: casting threw an exception.");
- }
- }
- }
-
- @Override
- public void navigateTo(String requestedDataId) {
- super.navigateTo(requestedDataId);
- callInitSearchHome();
- }
-}
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/search/OseeSearchHomeView.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/search/OseeSearchHomeView.java
deleted file mode 100644
index 0230a42..0000000
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/search/OseeSearchHomeView.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.display.view.web.search;
-
-import org.eclipse.osee.vaadin.widgets.Navigator;
-import com.vaadin.Application;
-import com.vaadin.ui.Alignment;
-import com.vaadin.ui.CustomComponent;
-import com.vaadin.ui.VerticalLayout;
-
-/**
- * @author Shawn F. Cook
- */
-@SuppressWarnings("serial")
-public class OseeSearchHomeView extends CustomComponent implements Navigator.View {
-
- protected OseeSearchHeaderComponent searchHeader;
-
- protected void createLayout() {
- this.setSizeFull();
-
- final VerticalLayout vertLayout = new VerticalLayout();
- vertLayout.setSizeFull();
-
- if (searchHeader != null) {
- searchHeader.setShowOseeTitleAbove(true);
- vertLayout.addComponent(searchHeader);
- vertLayout.setComponentAlignment(searchHeader, Alignment.MIDDLE_CENTER);
- }
-
- setCompositionRoot(vertLayout);
- }
-
- @Override
- public void navigateTo(String requestedDataId) {
- if (searchHeader != null) {
- searchHeader.createLayout();
- }
- createLayout();
- }
-
- @Override
- public String getWarningForNavigatingFrom() {
- return null;
- }
-
- @Override
- public void init(Navigator navigator, Application application) {
- //Do nothing.
- }
-}