summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/terminal
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-08-24 11:27:11 +0300
committerArtur Signell <artur@vaadin.com>2012-08-24 13:23:18 +0300
commitff0761f787f94a157d12af2a37e10e808d43fc59 (patch)
tree854cb79113c6c1f95e0529efd88e981638f1a463 /server/src/com/vaadin/terminal
parent066491f708fd303c604b2bee7cbd46a8342f71bf (diff)
downloadvaadin-framework-ff0761f787f94a157d12af2a37e10e808d43fc59.tar.gz
vaadin-framework-ff0761f787f94a157d12af2a37e10e808d43fc59.zip
Renamed Application and UI methods and fields from "Root" to "UI" (#8908).
Diffstat (limited to 'server/src/com/vaadin/terminal')
-rw-r--r--server/src/com/vaadin/terminal/AbstractRootProvider.java4
-rw-r--r--server/src/com/vaadin/terminal/DefaultRootProvider.java4
-rw-r--r--server/src/com/vaadin/terminal/UIProvider.java (renamed from server/src/com/vaadin/terminal/RootProvider.java)6
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java6
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java2
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java14
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/ApplicationServlet.java2
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java10
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/BootstrapResponse.java6
-rw-r--r--server/src/com/vaadin/terminal/gwt/server/ServletPortletHelper.java4
10 files changed, 29 insertions, 29 deletions
diff --git a/server/src/com/vaadin/terminal/AbstractRootProvider.java b/server/src/com/vaadin/terminal/AbstractRootProvider.java
index b340c62448..f316a58f15 100644
--- a/server/src/com/vaadin/terminal/AbstractRootProvider.java
+++ b/server/src/com/vaadin/terminal/AbstractRootProvider.java
@@ -19,10 +19,10 @@ package com.vaadin.terminal;
import com.vaadin.Application;
import com.vaadin.ui.UI;
-public abstract class AbstractRootProvider implements RootProvider {
+public abstract class AbstractRootProvider implements UIProvider {
@Override
- public UI instantiateRoot(Application application,
+ public UI instantiateUI(Application application,
Class<? extends UI> type, WrappedRequest request) {
try {
return type.newInstance();
diff --git a/server/src/com/vaadin/terminal/DefaultRootProvider.java b/server/src/com/vaadin/terminal/DefaultRootProvider.java
index 7e6631be56..b201be513d 100644
--- a/server/src/com/vaadin/terminal/DefaultRootProvider.java
+++ b/server/src/com/vaadin/terminal/DefaultRootProvider.java
@@ -23,10 +23,10 @@ import com.vaadin.ui.UI;
public class DefaultRootProvider extends AbstractRootProvider {
@Override
- public Class<? extends UI> getRootClass(Application application,
+ public Class<? extends UI> getUIClass(Application application,
WrappedRequest request) throws UIRequiresMoreInformationException {
Object rootClassNameObj = application
- .getProperty(Application.ROOT_PARAMETER);
+ .getProperty(Application.UI_PARAMETER);
if (rootClassNameObj instanceof String) {
String rootClassName = rootClassNameObj.toString();
diff --git a/server/src/com/vaadin/terminal/RootProvider.java b/server/src/com/vaadin/terminal/UIProvider.java
index 229f2ca989..27b63fbcac 100644
--- a/server/src/com/vaadin/terminal/RootProvider.java
+++ b/server/src/com/vaadin/terminal/UIProvider.java
@@ -20,10 +20,10 @@ import com.vaadin.Application;
import com.vaadin.UIRequiresMoreInformationException;
import com.vaadin.ui.UI;
-public interface RootProvider {
- public Class<? extends UI> getRootClass(Application application,
+public interface UIProvider {
+ public Class<? extends UI> getUIClass(Application application,
WrappedRequest request) throws UIRequiresMoreInformationException;
- public UI instantiateRoot(Application application,
+ public UI instantiateUI(Application application,
Class<? extends UI> type, WrappedRequest request);
}
diff --git a/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java b/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
index 86668bd91f..7a69a4c2b0 100644
--- a/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
+++ b/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
@@ -499,7 +499,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
// and then do a second request
try {
uI = application
- .getRootForRequest(wrappedRequest);
+ .getUIForRequest(wrappedRequest);
} catch (UIRequiresMoreInformationException e) {
// Ignore problem and continue without root
}
@@ -517,7 +517,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
break;
default:
uI = application
- .getRootForRequest(wrappedRequest);
+ .getUIForRequest(wrappedRequest);
}
// if window not found, not a problem - use null
}
@@ -895,7 +895,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
throws PortletException {
try {
final Application application = getApplicationClass().newInstance();
- application.setRootPreserved(true);
+ application.setUiPreserved(true);
return application;
} catch (final IllegalAccessException e) {
throw new PortletException("getNewApplication failed", e);
diff --git a/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
index b17ef20cde..b71c6ec20c 100644
--- a/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
+++ b/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
@@ -319,7 +319,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
response);
return;
} else if (requestType == RequestType.UIDL) {
- UI uI = application.getRootForRequest(request);
+ UI uI = application.getUIForRequest(request);
if (uI == null) {
throw new ServletException(ERROR_NO_ROOT_FOUND);
}
diff --git a/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java b/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
index 48810d2b08..7662564233 100644
--- a/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
+++ b/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
@@ -1390,7 +1390,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
}
private ClientCache getClientCache(UI uI) {
- Integer rootId = Integer.valueOf(uI.getRootId());
+ Integer rootId = Integer.valueOf(uI.getUIId());
ClientCache cache = rootToClientCache.get(rootId);
if (cache == null) {
cache = new ClientCache();
@@ -1515,7 +1515,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
}
private String getTheme(UI uI) {
- String themeName = uI.getApplication().getThemeForRoot(uI);
+ String themeName = uI.getApplication().getThemeForUI(uI);
String requestThemeName = getRequestTheme();
if (requestThemeName != null) {
@@ -2353,7 +2353,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
* handling post
*/
String paintableId = owner.getConnectorId();
- int rootId = owner.getRoot().getRootId();
+ int rootId = owner.getRoot().getUIId();
String key = rootId + "/" + paintableId + "/" + name;
if (pidToNameToStreamVariable == null) {
@@ -2422,13 +2422,13 @@ public abstract class AbstractCommunicationManager implements Serializable {
try {
CombinedRequest combinedRequest = new CombinedRequest(request);
- UI uI = application.getRootForRequest(combinedRequest);
+ UI uI = application.getUIForRequest(combinedRequest);
response.setContentType("application/json; charset=UTF-8");
// Use the same logic as for determined roots
BootstrapHandler bootstrapHandler = getBootstrapHandler();
BootstrapContext context = bootstrapHandler.createContext(
- combinedRequest, response, application, uI.getRootId());
+ combinedRequest, response, application, uI.getUIId());
String widgetset = context.getWidgetsetName();
String theme = context.getThemeName();
@@ -2440,7 +2440,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
params.put("widgetset", widgetset);
params.put("themeUri", themeUri);
// UI id might have changed based on e.g. window.name
- params.put(ApplicationConstants.ROOT_ID_PARAMETER, uI.getRootId());
+ params.put(ApplicationConstants.ROOT_ID_PARAMETER, uI.getUIId());
if (sendUIDL) {
String initialUIDL = getInitialUIDL(combinedRequest, uI);
params.put("uidl", initialUIDL);
@@ -2628,7 +2628,7 @@ public abstract class AbstractCommunicationManager implements Serializable {
String rootId = parts[0];
String connectorId = parts[1];
String variableName = parts[2];
- UI uI = application.getRootById(Integer.parseInt(rootId));
+ UI uI = application.getUIById(Integer.parseInt(rootId));
UI.setCurrent(uI);
StreamVariable streamVariable = getStreamVariable(connectorId,
diff --git a/server/src/com/vaadin/terminal/gwt/server/ApplicationServlet.java b/server/src/com/vaadin/terminal/gwt/server/ApplicationServlet.java
index 52885f3fbb..14500b01de 100644
--- a/server/src/com/vaadin/terminal/gwt/server/ApplicationServlet.java
+++ b/server/src/com/vaadin/terminal/gwt/server/ApplicationServlet.java
@@ -70,7 +70,7 @@ public class ApplicationServlet extends AbstractApplicationServlet {
// Creates a new application instance
try {
final Application application = getApplicationClass().newInstance();
- application.addRootProvider(new DefaultRootProvider());
+ application.addUIProvider(new DefaultRootProvider());
return application;
} catch (final IllegalAccessException e) {
diff --git a/server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java b/server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java
index e52c11e2c2..1dfe9d1685 100644
--- a/server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java
+++ b/server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java
@@ -127,13 +127,13 @@ public abstract class BootstrapHandler implements RequestHandler {
// TODO Should all urls be handled here?
Integer rootId = null;
try {
- UI uI = application.getRootForRequest(request);
+ UI uI = application.getUIForRequest(request);
if (uI == null) {
writeError(response, new Throwable("No UI found"));
return true;
}
- rootId = Integer.valueOf(uI.getRootId());
+ rootId = Integer.valueOf(uI.getUIId());
} catch (UIRequiresMoreInformationException e) {
// Just keep going without rootId
}
@@ -297,7 +297,7 @@ public abstract class BootstrapHandler implements RequestHandler {
UI uI = context.getRoot();
WrappedRequest request = context.getRequest();
- String widgetset = uI.getApplication().getWidgetsetForRoot(uI);
+ String widgetset = uI.getApplication().getWidgetsetForUI(uI);
if (widgetset == null) {
widgetset = request.getDeploymentConfiguration()
.getConfiguredWidgetset(request);
@@ -437,7 +437,7 @@ public abstract class BootstrapHandler implements RequestHandler {
appConfig.put("widgetset", context.getWidgetsetName());
- if (rootId == null || application.isRootInitPending(rootId.intValue())) {
+ if (rootId == null || application.isUIInitPending(rootId.intValue())) {
appConfig.put("initialPath", context.getRequest()
.getRequestPathInfo());
@@ -533,7 +533,7 @@ public abstract class BootstrapHandler implements RequestHandler {
* @return
*/
public String getThemeName(BootstrapContext context) {
- return context.getApplication().getThemeForRoot(context.getRoot());
+ return context.getApplication().getThemeForUI(context.getRoot());
}
/**
diff --git a/server/src/com/vaadin/terminal/gwt/server/BootstrapResponse.java b/server/src/com/vaadin/terminal/gwt/server/BootstrapResponse.java
index b1a52cf79e..2518f7080e 100644
--- a/server/src/com/vaadin/terminal/gwt/server/BootstrapResponse.java
+++ b/server/src/com/vaadin/terminal/gwt/server/BootstrapResponse.java
@@ -92,7 +92,7 @@ public abstract class BootstrapResponse extends EventObject {
/**
* Gets the root id that has been generated for this response. Please note
- * that if {@link Application#isRootPreserved()} is enabled, a previously
+ * that if {@link Application#isUiPreserved()} is enabled, a previously
* created UI with a different id might eventually end up being used.
*
* @return the root id
@@ -108,8 +108,8 @@ public abstract class BootstrapResponse extends EventObject {
* browser has been sent back. This method will return <code>null</code> if
* no UI instance is yet available.
*
- * @see Application#isRootPreserved()
- * @see Application#getRoot(WrappedRequest)
+ * @see Application#isUiPreserved()
+ * @see Application#getUI(WrappedRequest)
* @see UIRequiresMoreInformationException
*
* @return The UI that will be displayed in the page being generated, or
diff --git a/server/src/com/vaadin/terminal/gwt/server/ServletPortletHelper.java b/server/src/com/vaadin/terminal/gwt/server/ServletPortletHelper.java
index 13d558e66e..7e669d939c 100644
--- a/server/src/com/vaadin/terminal/gwt/server/ServletPortletHelper.java
+++ b/server/src/com/vaadin/terminal/gwt/server/ServletPortletHelper.java
@@ -44,7 +44,7 @@ class ServletPortletHelper implements Serializable {
String applicationParameter = deploymentConfiguration
.getInitParameters().getProperty("application");
String rootParameter = deploymentConfiguration.getInitParameters()
- .getProperty(Application.ROOT_PARAMETER);
+ .getProperty(Application.UI_PARAMETER);
ClassLoader classLoader = deploymentConfiguration.getClassLoader();
if (applicationParameter == null) {
@@ -69,7 +69,7 @@ class ServletPortletHelper implements Serializable {
private static void verifyRootClass(String className,
ClassLoader classLoader) throws ApplicationClassException {
if (className == null) {
- throw new ApplicationClassException(Application.ROOT_PARAMETER
+ throw new ApplicationClassException(Application.UI_PARAMETER
+ " init parameter not defined");
}