From 066491f708fd303c604b2bee7cbd46a8342f71bf Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 24 Aug 2012 08:52:20 +0300 Subject: 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 --- server/src/com/vaadin/Application.java | 18 +++++------ .../RootRequiresMoreInformationException.java | 37 ---------------------- .../vaadin/UIRequiresMoreInformationException.java | 37 ++++++++++++++++++++++ .../com/vaadin/terminal/DefaultRootProvider.java | 4 +-- server/src/com/vaadin/terminal/RootProvider.java | 4 +-- server/src/com/vaadin/terminal/WrappedRequest.java | 4 +-- .../gwt/server/AbstractApplicationPortlet.java | 4 +-- .../gwt/server/AbstractCommunicationManager.java | 4 +-- .../terminal/gwt/server/BootstrapHandler.java | 4 +-- .../terminal/gwt/server/BootstrapResponse.java | 4 +-- server/src/com/vaadin/ui/UI.java | 14 ++++---- 11 files changed, 67 insertions(+), 67 deletions(-) delete mode 100644 server/src/com/vaadin/RootRequiresMoreInformationException.java create mode 100644 server/src/com/vaadin/UIRequiresMoreInformationException.java (limited to 'server') 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 { * *

* 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. *

* 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/RootRequiresMoreInformationException.java deleted file mode 100644 index 74026dd161..0000000000 --- a/server/src/com/vaadin/RootRequiresMoreInformationException.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2011 Vaadin Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ - -package com.vaadin; - -import com.vaadin.terminal.WrappedRequest; -import com.vaadin.terminal.WrappedRequest.BrowserDetails; - -/** - * Exception that is thrown to indicate that creating or initializing the root - * requires information detailed from the web browser ({@link BrowserDetails}) - * to be present. - * - * This exception may not be thrown if that information is already present in - * the current WrappedRequest. - * - * @see Application#getRoot(WrappedRequest) - * @see WrappedRequest#getBrowserDetails() - * - * @since 7.0 - */ -public class RootRequiresMoreInformationException extends Exception { - // Nothing of interest here -} diff --git a/server/src/com/vaadin/UIRequiresMoreInformationException.java b/server/src/com/vaadin/UIRequiresMoreInformationException.java new file mode 100644 index 0000000000..682d46f207 --- /dev/null +++ b/server/src/com/vaadin/UIRequiresMoreInformationException.java @@ -0,0 +1,37 @@ +/* + * Copyright 2011 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +package com.vaadin; + +import com.vaadin.terminal.WrappedRequest; +import com.vaadin.terminal.WrappedRequest.BrowserDetails; + +/** + * Exception that is thrown to indicate that creating or initializing the root + * requires information detailed from the web browser ({@link BrowserDetails}) + * to be present. + * + * This exception may not be thrown if that information is already present in + * the current WrappedRequest. + * + * @see Application#getRoot(WrappedRequest) + * @see WrappedRequest#getBrowserDetails() + * + * @since 7.0 + */ +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 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 getRootClass(Application application, - WrappedRequest request) throws RootRequiresMoreInformationException; + WrappedRequest request) throws UIRequiresMoreInformationException; public UI instantiateRoot(Application application, Class 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 * null 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 getStateType() { + public Class getStateType() { // This is a workaround for a problem with creating the correct state // object during build - return RootState.class; + return UIState.class; } /** -- cgit v1.2.3