summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshawn.f.cook2011-10-11 12:12:23 (EDT)
committer Roberto E. Escobar2011-10-11 12:12:23 (EDT)
commitce89fde780920953bf65dcc66d7e92925284e8a1 (patch)
treea60d4df2772ac27614936c271ad46bf05e6092b3
parent824e9d5b7de8999239598ec2d67272aad44ebf51 (diff)
downloadorg.eclipse.osee-ce89fde780920953bf65dcc66d7e92925284e8a1.zip
org.eclipse.osee-ce89fde780920953bf65dcc66d7e92925284e8a1.tar.gz
org.eclipse.osee-ce89fde780920953bf65dcc66d7e92925284e8a1.tar.bz2
feature[ats_Q9NLC]: Switch to SearchPres via service
Conflicts: plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiApplication.java
-rw-r--r--plugins/org.eclipse.osee.ats.view.web/OSGI-INF/ats.ui.app.factory.xml1
-rw-r--r--plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiApplication.java11
-rw-r--r--plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiApplicationFactory.java14
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/OseeUiApplication.java6
4 files changed, 23 insertions, 9 deletions
diff --git a/plugins/org.eclipse.osee.ats.view.web/OSGI-INF/ats.ui.app.factory.xml b/plugins/org.eclipse.osee.ats.view.web/OSGI-INF/ats.ui.app.factory.xml
index 791c999..eba1b46 100644
--- a/plugins/org.eclipse.osee.ats.view.web/OSGI-INF/ats.ui.app.factory.xml
+++ b/plugins/org.eclipse.osee.ats.view.web/OSGI-INF/ats.ui.app.factory.xml
@@ -5,4 +5,5 @@
<service>
<provide interface="org.eclipse.osee.vaadin.ApplicationFactory"/>
</service>
+ <reference bind="setPresenterFactory" cardinality="1..1" interface="org.eclipse.osee.ats.api.search.AtsPresenterFactory" name="AtsPresenterFactory" policy="static"/>
</scr:component>
diff --git a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiApplication.java b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiApplication.java
index 7acbf95..ccaae23 100644
--- a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiApplication.java
+++ b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiApplication.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.ats.view.web;
import org.eclipse.osee.ats.api.search.AtsSearchPresenter;
import org.eclipse.osee.display.api.search.SearchNavigator;
-import org.eclipse.osee.display.api.search.SearchPresenter;
import org.eclipse.osee.display.view.web.OseeUiApplication;
import org.eclipse.osee.vaadin.widgets.HasViews;
import com.vaadin.ui.Window;
@@ -23,6 +22,10 @@ import com.vaadin.ui.Window;
@SuppressWarnings("serial")
public class AtsUiApplication extends OseeUiApplication {
+ public AtsUiApplication(AtsSearchPresenter searchPresenter) {
+ super(searchPresenter);
+ }
+
@Override
public void init() {
super.init();
@@ -58,10 +61,4 @@ public class AtsUiApplication extends OseeUiApplication {
protected SearchNavigator createNavigator() {
return new AtsNavigator();
}
-
- @Override
- protected SearchPresenter createSearchPresenter() {
- return null;
- }
-
}
diff --git a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiApplicationFactory.java b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiApplicationFactory.java
index 5807c46..3d5492e 100644
--- a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiApplicationFactory.java
+++ b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsUiApplicationFactory.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.ats.view.web;
+import org.eclipse.osee.ats.api.search.AtsPresenterFactory;
+import org.eclipse.osee.ats.api.search.AtsSearchPresenter;
import org.eclipse.osee.vaadin.ApplicationFactory;
import com.vaadin.Application;
@@ -18,9 +20,15 @@ import com.vaadin.Application;
*/
public class AtsUiApplicationFactory implements ApplicationFactory {
+ private AtsPresenterFactory presenterFactory;
+
@Override
public Application createInstance() {
- return new AtsUiApplication();
+ AtsSearchPresenter searchPresenter = null;
+ if (presenterFactory != null) {
+ searchPresenter = presenterFactory.createInstance();
+ }
+ return new AtsUiApplication(searchPresenter);
}
@Override
@@ -28,4 +36,8 @@ public class AtsUiApplicationFactory implements ApplicationFactory {
return AtsUiApplication.class;
}
+ public void setPresenterFactory(AtsPresenterFactory presenterFactory) {
+ this.presenterFactory = presenterFactory;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/OseeUiApplication.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/OseeUiApplication.java
index d54b3c3..ac18522 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/OseeUiApplication.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/OseeUiApplication.java
@@ -22,7 +22,11 @@ import com.vaadin.Application;
public class OseeUiApplication extends Application {
protected final SearchNavigator navigator = createNavigator();
- protected final SearchPresenter searchPresenter = createSearchPresenter();
+ protected SearchPresenter searchPresenter;
+
+ public OseeUiApplication(SearchPresenter searchPresenter) {
+ this.searchPresenter = searchPresenter;
+ }
@Override
public void init() {