diff options
author | Artur Signell <artur@vaadin.com> | 2012-08-24 08:52:20 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-08-24 13:23:17 +0300 |
commit | 066491f708fd303c604b2bee7cbd46a8342f71bf (patch) | |
tree | 7551fc1dbc8675d0ceee844871efc27879afaffb | |
parent | da176c32c4d92676424021712a7f6d7ee8cedf76 (diff) | |
download | vaadin-framework-066491f708fd303c604b2bee7cbd46a8342f71bf.tar.gz vaadin-framework-066491f708fd303c604b2bee7cbd46a8342f71bf.zip |
Rename Root related classes and package to UI (#8908)
Automatic renames in Eclipse of:
- package com.vaadin.terminal.gwt.client.ui.root to .UI
- RootConnector to UIConnector
- RootServerRpc to UIServerRpc
- RootState to UIState
- VRoot to VUI
- RootRequiresMoreInformationException to UIRequiresMoreInformationException
26 files changed, 89 insertions, 89 deletions
diff --git a/client-compiler/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java b/client-compiler/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java index 1f5b301802..99f3a1d17b 100644 --- a/client-compiler/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java +++ b/client-compiler/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java @@ -40,7 +40,7 @@ import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; import com.vaadin.terminal.gwt.client.ServerConnector; import com.vaadin.terminal.gwt.client.ui.UnknownComponentConnector; -import com.vaadin.terminal.gwt.client.ui.root.RootConnector; +import com.vaadin.terminal.gwt.client.ui.UI.UIConnector; import com.vaadin.terminal.gwt.server.ClientConnector; /** @@ -284,7 +284,7 @@ public class WidgetMapGenerator extends Generator { if (connectorsWithInstantiator.contains(clientClass)) { continue; } - if (clientClass == RootConnector.class) { + if (clientClass == UIConnector.class) { // Roots are not instantiated by widgetset continue; } diff --git a/client/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/client/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java index 4e8871b8ac..44f52d3e7f 100644 --- a/client/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java +++ b/client/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java @@ -74,10 +74,10 @@ import com.vaadin.terminal.gwt.client.metadata.Type; import com.vaadin.terminal.gwt.client.metadata.TypeData; import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; import com.vaadin.terminal.gwt.client.ui.VContextMenu; +import com.vaadin.terminal.gwt.client.ui.UI.UIConnector; import com.vaadin.terminal.gwt.client.ui.dd.VDragAndDropManager; import com.vaadin.terminal.gwt.client.ui.notification.VNotification; import com.vaadin.terminal.gwt.client.ui.notification.VNotification.HideEvent; -import com.vaadin.terminal.gwt.client.ui.root.RootConnector; import com.vaadin.terminal.gwt.client.ui.window.WindowConnector; /** @@ -156,7 +156,7 @@ public class ApplicationConnection { private Timer loadTimer3; private Element loadElement; - private final RootConnector rootConnector; + private final UIConnector uIConnector; protected boolean applicationRunning = false; @@ -211,7 +211,7 @@ public class ApplicationConnection { // Assuming UI data is eagerly loaded ConnectorBundleLoader.get().loadBundle( ConnectorBundleLoader.EAGER_BUNDLE_NAME, null); - rootConnector = GWT.create(RootConnector.class); + uIConnector = GWT.create(UIConnector.class); rpcManager = GWT.create(RpcManager.class); layoutManager = GWT.create(LayoutManager.class); layoutManager.setConnection(this); @@ -243,7 +243,7 @@ public class ApplicationConnection { initializeClientHooks(); - rootConnector.init(cnf.getRootPanelId(), this); + uIConnector.init(cnf.getRootPanelId(), this); showLoadingIndicator(); } @@ -909,7 +909,7 @@ public class ApplicationConnection { if (loadElement == null) { loadElement = DOM.createDiv(); DOM.setStyleAttribute(loadElement, "position", "absolute"); - DOM.appendChild(rootConnector.getWidget().getElement(), loadElement); + DOM.appendChild(uIConnector.getWidget().getElement(), loadElement); VConsole.log("inserting load indicator"); } DOM.setElementProperty(loadElement, "className", "v-loading-indicator"); @@ -1093,7 +1093,7 @@ public class ApplicationConnection { meta = json.getValueMap("meta"); if (meta.containsKey("repaintAll")) { repaintAll = true; - rootConnector.getWidget().clear(); + uIConnector.getWidget().clear(); getConnectorMap().clear(); if (meta.containsKey("invalidLayouts")) { validatingLayouts = true; @@ -1361,17 +1361,17 @@ public class ApplicationConnection { if (!c.getParent().getChildren().contains(c)) { VConsole.error("ERROR: Connector is connected to a parent but the parent does not contain the connector"); } - } else if ((c instanceof RootConnector && c == getRootConnector())) { - // RootConnector for this connection, leave as-is + } else if ((c instanceof UIConnector && c == getRootConnector())) { + // UIConnector for this connection, leave as-is } else if (c instanceof WindowConnector && getRootConnector().hasSubWindow( (WindowConnector) c)) { - // Sub window attached to this RootConnector, leave + // Sub window attached to this UIConnector, leave // as-is } else { // The connector has been detached from the // hierarchy, unregister it and any possible - // children. The RootConnector should never be + // children. The UIConnector should never be // unregistered even though it has no parent. connectorMap.unregisterConnector(c); unregistered++; @@ -1406,17 +1406,17 @@ public class ApplicationConnection { .getConnectorClassByEncodedTag(connectorType); // Connector does not exist so we must create it - if (connectorClass != RootConnector.class) { + if (connectorClass != UIConnector.class) { // create, initialize and register the paintable getConnector(connectorId, connectorType); } else { - // First RootConnector update. Before this the - // RootConnector has been created but not + // First UIConnector update. Before this the + // UIConnector has been created but not // initialized as the connector id has not been // known connectorMap.registerConnector(connectorId, - rootConnector); - rootConnector.doInit(connectorId, + uIConnector); + uIConnector.doInit(connectorId, ApplicationConnection.this); } } catch (final Throwable e) { @@ -2477,8 +2477,8 @@ public class ApplicationConnection { * * @return the main view */ - public RootConnector getRootConnector() { - return rootConnector; + public UIConnector getRootConnector() { + return uIConnector; } /** diff --git a/client/src/com/vaadin/terminal/gwt/client/ComponentLocator.java b/client/src/com/vaadin/terminal/gwt/client/ComponentLocator.java index 959f03e46d..f1a2b9b925 100644 --- a/client/src/com/vaadin/terminal/gwt/client/ComponentLocator.java +++ b/client/src/com/vaadin/terminal/gwt/client/ComponentLocator.java @@ -28,9 +28,9 @@ import com.vaadin.shared.ComponentState; import com.vaadin.shared.Connector; import com.vaadin.shared.communication.SharedState; import com.vaadin.terminal.gwt.client.ui.SubPartAware; +import com.vaadin.terminal.gwt.client.ui.UI.VUI; import com.vaadin.terminal.gwt.client.ui.gridlayout.VGridLayout; import com.vaadin.terminal.gwt.client.ui.orderedlayout.VMeasuringOrderedLayout; -import com.vaadin.terminal.gwt.client.ui.root.VRoot; import com.vaadin.terminal.gwt.client.ui.tabsheet.VTabsheetPanel; import com.vaadin.terminal.gwt.client.ui.window.VWindow; import com.vaadin.terminal.gwt.client.ui.window.WindowConnector; @@ -385,7 +385,7 @@ public class ComponentLocator { return null; } - if (w instanceof VRoot) { + if (w instanceof VUI) { return ""; } else if (w instanceof VWindow) { Connector windowConnector = ConnectorMap.get(client) diff --git a/client/src/com/vaadin/terminal/gwt/client/VDebugConsole.java b/client/src/com/vaadin/terminal/gwt/client/VDebugConsole.java index 1e2a3062f1..022171f2bb 100644 --- a/client/src/com/vaadin/terminal/gwt/client/VDebugConsole.java +++ b/client/src/com/vaadin/terminal/gwt/client/VDebugConsole.java @@ -70,8 +70,8 @@ import com.google.gwt.user.client.ui.Widget; import com.vaadin.shared.Version; import com.vaadin.terminal.gwt.client.ui.VLazyExecutor; import com.vaadin.terminal.gwt.client.ui.VOverlay; +import com.vaadin.terminal.gwt.client.ui.UI.UIConnector; import com.vaadin.terminal.gwt.client.ui.notification.VNotification; -import com.vaadin.terminal.gwt.client.ui.root.RootConnector; import com.vaadin.terminal.gwt.client.ui.window.WindowConnector; /** @@ -924,7 +924,7 @@ public class VDebugConsole extends VOverlay implements Console { } protected void dumpConnectorInfo(ApplicationConnection a) { - RootConnector root = a.getRootConnector(); + UIConnector root = a.getRootConnector(); log("================"); log("Connector hierarchy for Root: " + root.getState().getCaption() + " (" + root.getConnectorId() + ")"); diff --git a/client/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java b/client/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java index faded22260..f36107e947 100644 --- a/client/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java +++ b/client/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java @@ -40,8 +40,8 @@ import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; import com.vaadin.terminal.gwt.client.metadata.NoDataException; import com.vaadin.terminal.gwt.client.metadata.Type; import com.vaadin.terminal.gwt.client.metadata.TypeData; +import com.vaadin.terminal.gwt.client.ui.UI.UIConnector; import com.vaadin.terminal.gwt.client.ui.datefield.PopupDateFieldConnector; -import com.vaadin.terminal.gwt.client.ui.root.RootConnector; public abstract class AbstractComponentConnector extends AbstractConnector implements ComponentConnector { @@ -151,7 +151,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector ServerConnector parent = getParent(); if (parent instanceof ComponentContainerConnector) { ((ComponentContainerConnector) parent).updateCaption(this); - } else if (parent == null && !(this instanceof RootConnector)) { + } else if (parent == null && !(this instanceof UIConnector)) { VConsole.error("Parent of connector " + Util.getConnectorString(this) + " is null. This is typically an indication of a broken component hierarchy"); @@ -181,7 +181,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector ServerConnector parent = getParent(); if (parent instanceof ComponentContainerConnector) { ((ComponentContainerConnector) parent).updateCaption(this); - } else if (parent == null && !(this instanceof RootConnector)) { + } else if (parent == null && !(this instanceof UIConnector)) { VConsole.error("Parent of connector " + Util.getConnectorString(this) + " is null. This is typically an indication of a broken component hierarchy"); diff --git a/client/src/com/vaadin/terminal/gwt/client/ui/root/RootConnector.java b/client/src/com/vaadin/terminal/gwt/client/ui/UI/UIConnector.java index 3321b07146..2fb48623fd 100644 --- a/client/src/com/vaadin/terminal/gwt/client/ui/root/RootConnector.java +++ b/client/src/com/vaadin/terminal/gwt/client/ui/UI/UIConnector.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.terminal.gwt.client.ui.root; +package com.vaadin.terminal.gwt.client.ui.UI; import java.util.ArrayList; import java.util.Iterator; @@ -38,8 +38,8 @@ import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; import com.vaadin.shared.ui.root.PageClientRpc; import com.vaadin.shared.ui.root.RootConstants; -import com.vaadin.shared.ui.root.RootServerRpc; -import com.vaadin.shared.ui.root.RootState; +import com.vaadin.shared.ui.root.UIServerRpc; +import com.vaadin.shared.ui.root.UIState; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.ComponentConnector; @@ -61,10 +61,10 @@ import com.vaadin.terminal.gwt.client.ui.window.WindowConnector; import com.vaadin.ui.UI; @Connect(value = UI.class, loadStyle = LoadStyle.EAGER) -public class RootConnector extends AbstractComponentContainerConnector +public class UIConnector extends AbstractComponentContainerConnector implements Paintable, MayScrollChildren { - private RootServerRpc rpc = RpcProxy.create(RootServerRpc.class, this); + private UIServerRpc rpc = RpcProxy.create(UIServerRpc.class, this); private HandlerRegistration childStateChangeHandlerRegistration; @@ -151,14 +151,14 @@ public class RootConnector extends AbstractComponentContainerConnector Scheduler.get().scheduleDeferred(new Command() { @Override public void execute() { - VRoot.goTo(url); + VUI.goTo(url); } }); } else if ("_self".equals(target)) { // This window is closing (for sure). Only other opens are // relevant in this change. See #3558, #2144 isClosed = true; - VRoot.goTo(url); + VUI.goTo(url); } else { String options; if (open.hasAttribute("border")) { @@ -333,8 +333,8 @@ public class RootConnector extends AbstractComponentContainerConnector } @Override - public VRoot getWidget() { - return (VRoot) super.getWidget(); + public VUI getWidget() { + return (VUI) super.getWidget(); } protected ComponentConnector getContent() { @@ -388,8 +388,8 @@ public class RootConnector extends AbstractComponentContainerConnector } @Override - public RootState getState() { - return (RootState) super.getState(); + public UIState getState() { + return (UIState) super.getState(); } @Override diff --git a/client/src/com/vaadin/terminal/gwt/client/ui/root/VRoot.java b/client/src/com/vaadin/terminal/gwt/client/ui/UI/VUI.java index 162e7c55a8..cb6b181f1d 100644 --- a/client/src/com/vaadin/terminal/gwt/client/ui/root/VRoot.java +++ b/client/src/com/vaadin/terminal/gwt/client/ui/UI/VUI.java @@ -14,7 +14,7 @@ * the License. */ -package com.vaadin.terminal.gwt.client.ui.root; +package com.vaadin.terminal.gwt.client.ui.UI; import java.util.ArrayList; @@ -50,7 +50,7 @@ import com.vaadin.terminal.gwt.client.ui.textfield.VTextField; /** * */ -public class VRoot extends SimplePanel implements ResizeHandler, +public class VUI extends SimplePanel implements ResizeHandler, Window.ClosingHandler, ShortcutActionHandlerOwner, Focusable, HasResizeHandlers { @@ -146,7 +146,7 @@ public class VRoot extends SimplePanel implements ResizeHandler, }); - public VRoot() { + public VUI() { super(); setStyleName(CLASSNAME); diff --git a/server/src/com/vaadin/Application.java b/server/src/com/vaadin/Application.java index 23d407e4f3..582e05d3f4 100644 --- a/server/src/com/vaadin/Application.java +++ b/server/src/com/vaadin/Application.java @@ -1845,7 +1845,7 @@ public class Application implements Terminal.ErrorListener, Serializable { * * <p> * If {@link BrowserDetails} are required to create a UI, the - * implementation can throw a {@link RootRequiresMoreInformationException} + * implementation can throw a {@link UIRequiresMoreInformationException} * exception. In this case, the framework will instruct the browser to send * the additional details, whereupon this method is invoked again with the * browser details present in the wrapped request. Throwing the exception if @@ -1864,19 +1864,19 @@ public class Application implements Terminal.ErrorListener, Serializable { * @param request * the wrapped request for which a root is needed * @return a root instance to use for the request - * @throws RootRequiresMoreInformationException + * @throws UIRequiresMoreInformationException * may be thrown by an implementation to indicate that * {@link BrowserDetails} are required to create a root * * @see #getRootClassName(WrappedRequest) * @see UI - * @see RootRequiresMoreInformationException + * @see UIRequiresMoreInformationException * @see WrappedRequest#getBrowserDetails() * * @since 7.0 */ protected UI getRoot(WrappedRequest request) - throws RootRequiresMoreInformationException { + throws UIRequiresMoreInformationException { // Iterate in reverse order - test check newest provider first for (int i = rootProviders.size() - 1; i >= 0; i--) { @@ -2151,7 +2151,7 @@ public class Application implements Terminal.ErrorListener, Serializable { * Finds the {@link UI} to which a particular request belongs. If the * request originates from an existing UI, that root is returned. In other * cases, the method attempts to create and initialize a new root and might - * throw a {@link RootRequiresMoreInformationException} if all required + * throw a {@link UIRequiresMoreInformationException} if all required * information is not available. * <p> * Please note that this method can also return a newly created @@ -2164,17 +2164,17 @@ public class Application implements Terminal.ErrorListener, Serializable { * @param request * the request for which a root is desired * @return a root belonging to the request - * @throws RootRequiresMoreInformationException + * @throws UIRequiresMoreInformationException * if no existing root could be found and creating a new root * requires additional information from the browser * * @see #getRoot(WrappedRequest) - * @see RootRequiresMoreInformationException + * @see UIRequiresMoreInformationException * * @since 7.0 */ public UI getRootForRequest(WrappedRequest request) - throws RootRequiresMoreInformationException { + throws UIRequiresMoreInformationException { UI uI = UI.getCurrent(); if (uI != null) { return uI; @@ -2194,7 +2194,7 @@ public class Application implements Terminal.ErrorListener, Serializable { Integer retainedRootId; if (!hasBrowserDetails) { - throw new RootRequiresMoreInformationException(); + throw new UIRequiresMoreInformationException(); } else { String windowName = browserDetails.getWindowName(); retainedRootId = retainOnRefreshRoots.get(windowName); diff --git a/server/src/com/vaadin/RootRequiresMoreInformationException.java b/server/src/com/vaadin/UIRequiresMoreInformationException.java index 74026dd161..682d46f207 100644 --- a/server/src/com/vaadin/RootRequiresMoreInformationException.java +++ b/server/src/com/vaadin/UIRequiresMoreInformationException.java @@ -32,6 +32,6 @@ import com.vaadin.terminal.WrappedRequest.BrowserDetails; * * @since 7.0 */ -public class RootRequiresMoreInformationException extends Exception { +public class UIRequiresMoreInformationException extends Exception { // Nothing of interest here } diff --git a/server/src/com/vaadin/terminal/DefaultRootProvider.java b/server/src/com/vaadin/terminal/DefaultRootProvider.java index 07533949a0..7e6631be56 100644 --- a/server/src/com/vaadin/terminal/DefaultRootProvider.java +++ b/server/src/com/vaadin/terminal/DefaultRootProvider.java @@ -17,14 +17,14 @@ package com.vaadin.terminal;
import com.vaadin.Application;
-import com.vaadin.RootRequiresMoreInformationException;
+import com.vaadin.UIRequiresMoreInformationException;
import com.vaadin.ui.UI;
public class DefaultRootProvider extends AbstractRootProvider {
@Override
public Class<? extends UI> getRootClass(Application application,
- WrappedRequest request) throws RootRequiresMoreInformationException {
+ WrappedRequest request) throws UIRequiresMoreInformationException {
Object rootClassNameObj = application
.getProperty(Application.ROOT_PARAMETER);
diff --git a/server/src/com/vaadin/terminal/RootProvider.java b/server/src/com/vaadin/terminal/RootProvider.java index 53173b6b94..229f2ca989 100644 --- a/server/src/com/vaadin/terminal/RootProvider.java +++ b/server/src/com/vaadin/terminal/RootProvider.java @@ -17,12 +17,12 @@ package com.vaadin.terminal;
import com.vaadin.Application;
-import com.vaadin.RootRequiresMoreInformationException;
+import com.vaadin.UIRequiresMoreInformationException;
import com.vaadin.ui.UI;
public interface RootProvider {
public Class<? extends UI> getRootClass(Application application,
- WrappedRequest request) throws RootRequiresMoreInformationException;
+ WrappedRequest request) throws UIRequiresMoreInformationException;
public UI instantiateRoot(Application application,
Class<? extends UI> type, WrappedRequest request);
diff --git a/server/src/com/vaadin/terminal/WrappedRequest.java b/server/src/com/vaadin/terminal/WrappedRequest.java index 1186d678b0..9ef98fcc41 100644 --- a/server/src/com/vaadin/terminal/WrappedRequest.java +++ b/server/src/com/vaadin/terminal/WrappedRequest.java @@ -27,7 +27,7 @@ import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; import com.vaadin.Application; -import com.vaadin.RootRequiresMoreInformationException; +import com.vaadin.UIRequiresMoreInformationException; import com.vaadin.annotations.EagerInit; import com.vaadin.terminal.gwt.server.WebBrowser; import com.vaadin.ui.UI; @@ -220,7 +220,7 @@ public interface WrappedRequest extends Serializable { * * This information is only guaranteed to be available in some special * cases, for instance when {@link Application#getRoot} is called again - * after throwing {@link RootRequiresMoreInformationException} or in + * after throwing {@link UIRequiresMoreInformationException} or in * {@link UI#init(WrappedRequest)} for a UI class not annotated with * {@link EagerInit} * diff --git a/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java b/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java index 2315a9c1d6..86668bd91f 100644 --- a/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java +++ b/server/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java @@ -56,7 +56,7 @@ import com.liferay.portal.kernel.util.PropsUtil; import com.vaadin.Application; import com.vaadin.Application.ApplicationStartEvent; import com.vaadin.Application.SystemMessages; -import com.vaadin.RootRequiresMoreInformationException; +import com.vaadin.UIRequiresMoreInformationException; import com.vaadin.terminal.DeploymentConfiguration; import com.vaadin.terminal.Terminal; import com.vaadin.terminal.WrappedRequest; @@ -500,7 +500,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet try { uI = application .getRootForRequest(wrappedRequest); - } catch (RootRequiresMoreInformationException e) { + } catch (UIRequiresMoreInformationException e) { // Ignore problem and continue without root } break; diff --git a/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java b/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java index 39475f3131..48810d2b08 100644 --- a/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java +++ b/server/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java @@ -60,7 +60,7 @@ import javax.servlet.http.HttpServletResponse; import com.vaadin.Application; import com.vaadin.Application.SystemMessages; -import com.vaadin.RootRequiresMoreInformationException; +import com.vaadin.UIRequiresMoreInformationException; import com.vaadin.annotations.JavaScript; import com.vaadin.annotations.StyleSheet; import com.vaadin.external.json.JSONArray; @@ -2457,7 +2457,7 @@ public abstract class AbstractCommunicationManager implements Serializable { // NOTE GateIn requires the buffers to be flushed to work outWriter.flush(); out.flush(); - } catch (RootRequiresMoreInformationException e) { + } catch (UIRequiresMoreInformationException e) { // Requiring more information at this point is not allowed // TODO handle in a better way throw new RuntimeException(e); diff --git a/server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java b/server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java index b6953da35e..e52c11e2c2 100644 --- a/server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java +++ b/server/src/com/vaadin/terminal/gwt/server/BootstrapHandler.java @@ -37,7 +37,7 @@ import org.jsoup.nodes.Node; import org.jsoup.parser.Tag; import com.vaadin.Application; -import com.vaadin.RootRequiresMoreInformationException; +import com.vaadin.UIRequiresMoreInformationException; import com.vaadin.external.json.JSONException; import com.vaadin.external.json.JSONObject; import com.vaadin.shared.ApplicationConstants; @@ -134,7 +134,7 @@ public abstract class BootstrapHandler implements RequestHandler { } rootId = Integer.valueOf(uI.getRootId()); - } catch (RootRequiresMoreInformationException e) { + } catch (UIRequiresMoreInformationException e) { // Just keep going without rootId } diff --git a/server/src/com/vaadin/terminal/gwt/server/BootstrapResponse.java b/server/src/com/vaadin/terminal/gwt/server/BootstrapResponse.java index 4f69dda48b..b1a52cf79e 100644 --- a/server/src/com/vaadin/terminal/gwt/server/BootstrapResponse.java +++ b/server/src/com/vaadin/terminal/gwt/server/BootstrapResponse.java @@ -19,7 +19,7 @@ package com.vaadin.terminal.gwt.server; import java.util.EventObject; import com.vaadin.Application; -import com.vaadin.RootRequiresMoreInformationException; +import com.vaadin.UIRequiresMoreInformationException; import com.vaadin.terminal.WrappedRequest; import com.vaadin.ui.UI; @@ -110,7 +110,7 @@ public abstract class BootstrapResponse extends EventObject { * * @see Application#isRootPreserved() * @see Application#getRoot(WrappedRequest) - * @see RootRequiresMoreInformationException + * @see UIRequiresMoreInformationException * * @return The UI that will be displayed in the page being generated, or * <code>null</code> if all required information is not yet diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java index 33eefff485..e2facefb33 100644 --- a/server/src/com/vaadin/ui/UI.java +++ b/server/src/com/vaadin/ui/UI.java @@ -36,8 +36,8 @@ import com.vaadin.shared.EventId; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.BorderStyle; import com.vaadin.shared.ui.root.RootConstants; -import com.vaadin.shared.ui.root.RootServerRpc; -import com.vaadin.shared.ui.root.RootState; +import com.vaadin.shared.ui.root.UIServerRpc; +import com.vaadin.shared.ui.root.UIState; import com.vaadin.terminal.Page; import com.vaadin.terminal.Page.BrowserWindowResizeEvent; import com.vaadin.terminal.Page.BrowserWindowResizeListener; @@ -429,7 +429,7 @@ public abstract class UI extends AbstractComponentContainer implements private Page page = new Page(this); - private RootServerRpc rpc = new RootServerRpc() { + private UIServerRpc rpc = new UIServerRpc() { @Override public void click(MouseEventDetails mouseDetails) { fireEvent(new ClickEvent(UI.this, mouseDetails)); @@ -498,15 +498,15 @@ public abstract class UI extends AbstractComponentContainer implements } @Override - protected RootState getState() { - return (RootState) super.getState(); + protected UIState getState() { + return (UIState) super.getState(); } @Override - public Class<? extends RootState> getStateType() { + public Class<? extends UIState> getStateType() { // This is a workaround for a problem with creating the correct state // object during build - return RootState.class; + return UIState.class; } /** diff --git a/shared/src/com/vaadin/shared/ui/root/RootServerRpc.java b/shared/src/com/vaadin/shared/ui/root/UIServerRpc.java index df2031f7d5..20cdd48f54 100644 --- a/shared/src/com/vaadin/shared/ui/root/RootServerRpc.java +++ b/shared/src/com/vaadin/shared/ui/root/UIServerRpc.java @@ -19,7 +19,7 @@ import com.vaadin.shared.annotations.Delayed; import com.vaadin.shared.communication.ServerRpc; import com.vaadin.shared.ui.ClickRpc; -public interface RootServerRpc extends ClickRpc, ServerRpc { +public interface UIServerRpc extends ClickRpc, ServerRpc { @Delayed(lastonly = true) public void resize(int viewWidth, int viewHeight, int windowWidth, int windowHeight); diff --git a/shared/src/com/vaadin/shared/ui/root/RootState.java b/shared/src/com/vaadin/shared/ui/root/UIState.java index b7c2c88ce5..f019d1ce67 100644 --- a/shared/src/com/vaadin/shared/ui/root/RootState.java +++ b/shared/src/com/vaadin/shared/ui/root/UIState.java @@ -18,7 +18,7 @@ package com.vaadin.shared.ui.root; import com.vaadin.shared.ComponentState; import com.vaadin.shared.Connector; -public class RootState extends ComponentState { +public class UIState extends ComponentState { private Connector content; public Connector getContent() { diff --git a/tests/server-side/com/vaadin/tests/server/component/root/CustomRootClassLoader.java b/tests/server-side/com/vaadin/tests/server/component/root/CustomRootClassLoader.java index 9fe486f85e..27d66ca0d0 100644 --- a/tests/server-side/com/vaadin/tests/server/component/root/CustomRootClassLoader.java +++ b/tests/server-side/com/vaadin/tests/server/component/root/CustomRootClassLoader.java @@ -10,7 +10,7 @@ import org.easymock.EasyMock; import com.vaadin.Application; import com.vaadin.Application.ApplicationStartEvent; -import com.vaadin.RootRequiresMoreInformationException; +import com.vaadin.UIRequiresMoreInformationException; import com.vaadin.terminal.DefaultRootProvider; import com.vaadin.terminal.DeploymentConfiguration; import com.vaadin.terminal.WrappedRequest; @@ -127,7 +127,7 @@ public class CustomRootClassLoader extends TestCase { @Override public UI getRootForRequest(WrappedRequest request) - throws RootRequiresMoreInformationException { + throws UIRequiresMoreInformationException { // Always create a new root for testing (can't directly use // getRoot as it's protected) return getRoot(request); diff --git a/tests/testbench/com/vaadin/launcher/ApplicationRunnerServlet.java b/tests/testbench/com/vaadin/launcher/ApplicationRunnerServlet.java index 2ac447cee3..43d4ad699e 100644 --- a/tests/testbench/com/vaadin/launcher/ApplicationRunnerServlet.java +++ b/tests/testbench/com/vaadin/launcher/ApplicationRunnerServlet.java @@ -30,7 +30,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.vaadin.Application; -import com.vaadin.RootRequiresMoreInformationException; +import com.vaadin.UIRequiresMoreInformationException; import com.vaadin.terminal.AbstractRootProvider; import com.vaadin.terminal.WrappedRequest; import com.vaadin.terminal.gwt.server.AbstractApplicationServlet; @@ -117,7 +117,7 @@ public class ApplicationRunnerServlet extends AbstractApplicationServlet { @Override public Class<? extends UI> getRootClass( Application application, WrappedRequest request) - throws RootRequiresMoreInformationException { + throws UIRequiresMoreInformationException { return (Class<? extends UI>) classToRun; } }); diff --git a/tests/testbench/com/vaadin/tests/application/RefreshStatePreserve.java b/tests/testbench/com/vaadin/tests/application/RefreshStatePreserve.java index 023a93438d..deff2bc486 100644 --- a/tests/testbench/com/vaadin/tests/application/RefreshStatePreserve.java +++ b/tests/testbench/com/vaadin/tests/application/RefreshStatePreserve.java @@ -1,7 +1,7 @@ package com.vaadin.tests.application; import com.vaadin.Application; -import com.vaadin.RootRequiresMoreInformationException; +import com.vaadin.UIRequiresMoreInformationException; import com.vaadin.terminal.AbstractRootProvider; import com.vaadin.terminal.WrappedRequest; import com.vaadin.tests.components.AbstractTestApplication; @@ -27,7 +27,7 @@ public class RefreshStatePreserve extends AbstractTestApplication { @Override public Class<? extends UI> getRootClass(Application application, WrappedRequest request) - throws RootRequiresMoreInformationException { + throws UIRequiresMoreInformationException { return RefreshStateRoot.class; } }); diff --git a/tests/testbench/com/vaadin/tests/application/ThreadLocalInstances.java b/tests/testbench/com/vaadin/tests/application/ThreadLocalInstances.java index 3323e3bb28..96380b2185 100644 --- a/tests/testbench/com/vaadin/tests/application/ThreadLocalInstances.java +++ b/tests/testbench/com/vaadin/tests/application/ThreadLocalInstances.java @@ -1,7 +1,7 @@ package com.vaadin.tests.application; import com.vaadin.Application; -import com.vaadin.RootRequiresMoreInformationException; +import com.vaadin.UIRequiresMoreInformationException; import com.vaadin.terminal.ApplicationResource; import com.vaadin.terminal.DownloadStream; import com.vaadin.terminal.PaintException; @@ -78,7 +78,7 @@ public class ThreadLocalInstances extends AbstractTestApplication { @Override protected UI getRoot(WrappedRequest request) - throws RootRequiresMoreInformationException { + throws UIRequiresMoreInformationException { return mainWindow; } diff --git a/tests/testbench/com/vaadin/tests/components/root/LazyInitRoots.java b/tests/testbench/com/vaadin/tests/components/root/LazyInitRoots.java index aca7211aec..3c7862d298 100644 --- a/tests/testbench/com/vaadin/tests/components/root/LazyInitRoots.java +++ b/tests/testbench/com/vaadin/tests/components/root/LazyInitRoots.java @@ -1,6 +1,6 @@ package com.vaadin.tests.components.root; -import com.vaadin.RootRequiresMoreInformationException; +import com.vaadin.UIRequiresMoreInformationException; import com.vaadin.annotations.EagerInit; import com.vaadin.shared.ui.label.ContentMode; import com.vaadin.terminal.ExternalResource; @@ -23,13 +23,13 @@ public class LazyInitRoots extends AbstractTestApplication { @Override public UI getRoot(WrappedRequest request) - throws RootRequiresMoreInformationException { + throws UIRequiresMoreInformationException { if (request.getParameter("lazyCreate") != null) { // UI created on second request BrowserDetails browserDetails = request.getBrowserDetails(); if (browserDetails == null || browserDetails.getUriFragment() == null) { - throw new RootRequiresMoreInformationException(); + throw new UIRequiresMoreInformationException(); } else { UI uI = new UI() { @Override diff --git a/tests/testbench/com/vaadin/tests/components/root/RootsInMultipleTabs.java b/tests/testbench/com/vaadin/tests/components/root/RootsInMultipleTabs.java index 4309b6e942..13bef59fe9 100644 --- a/tests/testbench/com/vaadin/tests/components/root/RootsInMultipleTabs.java +++ b/tests/testbench/com/vaadin/tests/components/root/RootsInMultipleTabs.java @@ -1,7 +1,7 @@ package com.vaadin.tests.components.root; import com.vaadin.Application; -import com.vaadin.RootRequiresMoreInformationException; +import com.vaadin.UIRequiresMoreInformationException; import com.vaadin.terminal.AbstractRootProvider; import com.vaadin.terminal.WrappedRequest; import com.vaadin.tests.components.AbstractTestApplication; @@ -27,7 +27,7 @@ public class RootsInMultipleTabs extends AbstractTestApplication { @Override public Class<? extends UI> getRootClass(Application application, WrappedRequest request) - throws RootRequiresMoreInformationException { + throws UIRequiresMoreInformationException { return TabRoot.class; } }); diff --git a/tests/testbench/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java b/tests/testbench/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java index a601ff2eb4..6b25f4674d 100644 --- a/tests/testbench/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java +++ b/tests/testbench/com/vaadin/tests/minitutorials/v7a1/DifferentFeaturesForDifferentClients.java @@ -17,7 +17,7 @@ package com.vaadin.tests.minitutorials.v7a1; import com.vaadin.Application; -import com.vaadin.RootRequiresMoreInformationException; +import com.vaadin.UIRequiresMoreInformationException; import com.vaadin.terminal.WrappedRequest; import com.vaadin.terminal.WrappedRequest.BrowserDetails; import com.vaadin.terminal.gwt.server.WebBrowser; @@ -36,12 +36,12 @@ public class DifferentFeaturesForDifferentClients extends Application { @Override protected UI getRoot(WrappedRequest request) - throws RootRequiresMoreInformationException { + throws UIRequiresMoreInformationException { BrowserDetails browserDetails = request.getBrowserDetails(); // This is a limitation of 7.0.0.alpha1 that there is no better way to // check if WebBrowser has been fully initialized if (browserDetails.getUriFragment() == null) { - throw new RootRequiresMoreInformationException(); + throw new UIRequiresMoreInformationException(); } // could also use screen size, browser version etc. |