diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-09-06 16:58:43 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-09-06 17:07:49 +0300 |
commit | 4011783ed51dffe80ceb5642c02d65033de6d400 (patch) | |
tree | 46f43c481fde0b06c443269f7c84ee180ae48f2e /server/src | |
parent | a64b703b2bd714f8ff1c6cfd1b8b89908e502691 (diff) | |
download | vaadin-framework-4011783ed51dffe80ceb5642c02d65033de6d400.tar.gz vaadin-framework-4011783ed51dffe80ceb5642c02d65033de6d400.zip |
Remove Application from UIProvider API (#9402)
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/Application.java | 7 | ||||
-rw-r--r-- | server/src/com/vaadin/server/AbstractUIProvider.java | 4 | ||||
-rw-r--r-- | server/src/com/vaadin/server/DefaultUIProvider.java | 8 | ||||
-rw-r--r-- | server/src/com/vaadin/server/UIProvider.java | 7 | ||||
-rw-r--r-- | server/src/com/vaadin/server/VaadinSession.java | 10 |
5 files changed, 16 insertions, 20 deletions
diff --git a/server/src/com/vaadin/Application.java b/server/src/com/vaadin/Application.java index 121e156da8..d755817896 100644 --- a/server/src/com/vaadin/Application.java +++ b/server/src/com/vaadin/Application.java @@ -90,8 +90,7 @@ public abstract class Application extends AbstractUIProvider implements protected abstract void init(); @Override - public Class<? extends UI> getUIClass(VaadinSession application, - WrappedRequest request) { + public Class<? extends UI> getUIClass(WrappedRequest request) { UI uiInstance = getUIInstance(request); if (uiInstance != null) { return uiInstance.getClass(); @@ -100,8 +99,8 @@ public abstract class Application extends AbstractUIProvider implements } @Override - public UI createInstance(VaadinSession application, - Class<? extends UI> type, WrappedRequest request) { + public UI createInstance(Class<? extends UI> type, + WrappedRequest request) { return getUIInstance(request); } diff --git a/server/src/com/vaadin/server/AbstractUIProvider.java b/server/src/com/vaadin/server/AbstractUIProvider.java index e93e1a6ae1..321ca75f65 100644 --- a/server/src/com/vaadin/server/AbstractUIProvider.java +++ b/server/src/com/vaadin/server/AbstractUIProvider.java @@ -27,8 +27,8 @@ import com.vaadin.ui.UI; public abstract class AbstractUIProvider implements UIProvider { @Override - public UI createInstance(VaadinSession application, - Class<? extends UI> type, WrappedRequest request) { + public UI createInstance(Class<? extends UI> type, + WrappedRequest request) { try { return type.newInstance(); } catch (InstantiationException e) { diff --git a/server/src/com/vaadin/server/DefaultUIProvider.java b/server/src/com/vaadin/server/DefaultUIProvider.java index 0a5613a588..c4a8069269 100644 --- a/server/src/com/vaadin/server/DefaultUIProvider.java +++ b/server/src/com/vaadin/server/DefaultUIProvider.java @@ -21,10 +21,10 @@ import com.vaadin.ui.UI; public class DefaultUIProvider extends AbstractUIProvider { @Override - public Class<? extends UI> getUIClass(VaadinSession application, - WrappedRequest request) { - Object uiClassNameObj = application.getConfiguration() - .getInitParameters().getProperty(VaadinSession.UI_PARAMETER); + public Class<? extends UI> getUIClass(WrappedRequest request) { + Object uiClassNameObj = request.getVaadinService() + .getDeploymentConfiguration().getInitParameters() + .getProperty(VaadinSession.UI_PARAMETER); if (uiClassNameObj instanceof String) { String uiClassName = uiClassNameObj.toString(); diff --git a/server/src/com/vaadin/server/UIProvider.java b/server/src/com/vaadin/server/UIProvider.java index de68b121f0..752da3aafc 100644 --- a/server/src/com/vaadin/server/UIProvider.java +++ b/server/src/com/vaadin/server/UIProvider.java @@ -20,11 +20,10 @@ import com.vaadin.annotations.Widgetset; import com.vaadin.ui.UI; public interface UIProvider { - public Class<? extends UI> getUIClass(VaadinSession application, - WrappedRequest request); + public Class<? extends UI> getUIClass(WrappedRequest request); - public UI createInstance(VaadinSession application, - Class<? extends UI> type, WrappedRequest request); + public UI createInstance(Class<? extends UI> type, + WrappedRequest request); public String getPageTitleForUI(WrappedRequest request, Class<? extends UI> uiClass); diff --git a/server/src/com/vaadin/server/VaadinSession.java b/server/src/com/vaadin/server/VaadinSession.java index 094f3501d7..42194b2609 100644 --- a/server/src/com/vaadin/server/VaadinSession.java +++ b/server/src/com/vaadin/server/VaadinSession.java @@ -650,7 +650,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { @Deprecated public Class<? extends UI> getUIClass(WrappedRequest request) { UIProvider uiProvider = getUiProvider(request, null); - return uiProvider.getUIClass(this, request); + return uiProvider.getUIClass(request); } /** @@ -667,7 +667,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { protected <T extends UI> T createUIInstance(WrappedRequest request, Class<T> uiClass) { UIProvider uiProvider = getUiProvider(request, uiClass); - return uiClass.cast(uiProvider.createInstance(this, uiClass, request)); + return uiClass.cast(uiProvider.createInstance(uiClass, request)); } /** @@ -695,8 +695,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { .getAttribute(UIProvider.class.getName()); if (provider != null) { // Cached provider found, verify that it's a sensible selection - Class<? extends UI> providerClass = provider.getUIClass(this, - request); + Class<? extends UI> providerClass = provider.getUIClass(request); if (uiClass == null && providerClass != null) { // Use it if it gives any answer if no specific class is // required @@ -729,8 +728,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { for (int i = providersSize - 1; i >= 0; i--) { UIProvider provider = uiProviders.get(i); - Class<? extends UI> providerClass = provider.getUIClass(this, - request); + Class<? extends UI> providerClass = provider.getUIClass(request); // If we found something if (providerClass != null) { if (uiClass == null) { |