]> source.dussan.org Git - vaadin-framework.git/commitdiff
RootRequiresMoreInformation -> RootRequiresMoreInformationException
authorLeif Åstrand <leif@vaadin.com>
Thu, 22 Dec 2011 07:42:16 +0000 (09:42 +0200)
committerLeif Åstrand <leif@vaadin.com>
Thu, 22 Dec 2011 08:19:47 +0000 (10:19 +0200)
src/com/vaadin/Application.java
src/com/vaadin/RootRequiresMoreInformation.java [deleted file]
src/com/vaadin/RootRequiresMoreInformationException.java [new file with mode: 0644]
src/com/vaadin/terminal/WrappedRequest.java
src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
src/com/vaadin/terminal/gwt/server/BootstrapHandler.java
tests/testbench/com/vaadin/tests/application/ThreadLocalInstances.java
tests/testbench/com/vaadin/tests/components/root/LazyInitRoots.java

index 3875dfa860f4d09a5643baba4306c5ce9495053d..15945d69718cf258e15dce3c64f13e1a0ed24e03 100644 (file)
@@ -134,12 +134,12 @@ public class Application implements Terminal.ErrorListener, Serializable {
          *            the request to get the root for
          * @return integer id of the root, or <code>null</code> if no root is
          *         found
-         * @throws RootRequiresMoreInformation
+         * @throws RootRequiresMoreInformationException
          *             if full details from the browser are required to resolve
          *             the root
          */
         public Integer getPreservedRootForRequest(WrappedRequest request)
-                throws RootRequiresMoreInformation;
+                throws RootRequiresMoreInformationException;
 
         /**
          * Used to tell whether the browser details are required when
@@ -171,13 +171,13 @@ public class Application implements Terminal.ErrorListener, Serializable {
         private final Map<String, Integer> retainOnRefreshRoots = new HashMap<String, Integer>();
 
         public Integer getPreservedRootForRequest(WrappedRequest request)
-                throws RootRequiresMoreInformation {
+                throws RootRequiresMoreInformationException {
             if (retainOnRefreshRoots.isEmpty()) {
                 return null;
             }
             BrowserDetails browserDetails = request.getBrowserDetails();
             if (browserDetails == null) {
-                throw new RootRequiresMoreInformation();
+                throw new RootRequiresMoreInformationException();
             } else {
                 String windowName = browserDetails.getWindowName();
                 return retainOnRefreshRoots.get(windowName);
@@ -1885,7 +1885,7 @@ public class Application implements Terminal.ErrorListener, Serializable {
      * 
      * <p>
      * If {@link BrowserDetails} are required to create a Root, the
-     * implementation can throw a {@link RootRequiresMoreInformation} exception.
+     * implementation can throw a {@link RootRequiresMoreInformationException} 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
@@ -1901,19 +1901,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 RootRequiresMoreInformation
+     * @throws RootRequiresMoreInformationException
      *             may be thrown by an implementation to indicate that
      *             {@link BrowserDetails} are required to create a root
      * 
      * @see #getRootClassName(WrappedRequest)
      * @see Root
-     * @see RootRequiresMoreInformation
+     * @see RootRequiresMoreInformationException
      * @see WrappedRequest#getBrowserDetails()
      * 
      * @since 7.0
      */
     protected Root getRoot(WrappedRequest request)
-            throws RootRequiresMoreInformation {
+            throws RootRequiresMoreInformationException {
         String rootClassName = getRootClassName(request);
         try {
             Class<? extends Root> rootClass = Class.forName(rootClassName)
@@ -2260,7 +2260,7 @@ public class Application implements Terminal.ErrorListener, Serializable {
      * Finds the {@link Root} to which a particular request belongs. If the
      * request originates from an existing Root, that root is returned. In other
      * cases, the method attempts to create and initialize a new root and might
-     * throw a {@link RootRequiresMoreInformation} if all required information
+     * throw a {@link RootRequiresMoreInformationException} if all required information
      * is not available.
      * <p>
      * Please note that this method can also return a newly created
@@ -2273,17 +2273,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 RootRequiresMoreInformation
+     * @throws RootRequiresMoreInformationException
      *             if no existing root could be found and creating a new root
      *             requires additional information from the browser
      * 
      * @see #getRoot(WrappedRequest)
-     * @see RootRequiresMoreInformation
+     * @see RootRequiresMoreInformationException
      * 
      * @since 7.0
      */
     public Root getRootForRequest(WrappedRequest request)
-            throws RootRequiresMoreInformation {
+            throws RootRequiresMoreInformationException {
         Root root = Root.getCurrentRoot();
         if (root != null) {
             return root;
diff --git a/src/com/vaadin/RootRequiresMoreInformation.java b/src/com/vaadin/RootRequiresMoreInformation.java
deleted file mode 100644 (file)
index 1268081..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-@VaadinApache2LicenseForJavaFiles@
- */
-
-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 RootRequiresMoreInformation extends Exception {
-    // Nothing of interest here
-}
diff --git a/src/com/vaadin/RootRequiresMoreInformationException.java b/src/com/vaadin/RootRequiresMoreInformationException.java
new file mode 100644 (file)
index 0000000..ed0fa41
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+
+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
+}
index 89be8a32e43c96cdd4418bbc2b0a044fae01127a..235a0513c731653095c34a8c4ca1ec003bbea2d4 100644 (file)
@@ -15,7 +15,7 @@ import javax.servlet.ServletRequest;
 import javax.servlet.http.HttpServletRequest;
 
 import com.vaadin.Application;
-import com.vaadin.RootRequiresMoreInformation;
+import com.vaadin.RootRequiresMoreInformationException;
 import com.vaadin.annotations.RootInitRequiresBrowserDetails;
 import com.vaadin.terminal.gwt.server.WebBrowser;
 import com.vaadin.ui.Root;
@@ -208,7 +208,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 RootRequiresMoreInformation} or in
+     * after throwing {@link RootRequiresMoreInformationException} or in
      * {@link Root#init(WrappedRequest)} if the Root class is annotated with
      * {@link RootInitRequiresBrowserDetails}
      * 
index a28b9e53ecfea8cdca63e8032ca9d07c5b73ec57..1b558158e32a7442e4ef3c771d13904b10c10d78 100644 (file)
@@ -44,7 +44,7 @@ import com.liferay.portal.kernel.util.PortalClassInvoker;
 import com.liferay.portal.kernel.util.PropsUtil;
 import com.vaadin.Application;
 import com.vaadin.Application.SystemMessages;
-import com.vaadin.RootRequiresMoreInformation;
+import com.vaadin.RootRequiresMoreInformationException;
 import com.vaadin.terminal.DeploymentConfiguration;
 import com.vaadin.terminal.Terminal;
 import com.vaadin.terminal.WrappedRequest;
@@ -606,7 +606,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet
                             try {
                                 root = application
                                         .getRootForRequest(wrappedRequest);
-                            } catch (RootRequiresMoreInformation e) {
+                            } catch (RootRequiresMoreInformationException e) {
                                 // Ignore problem and continue without root
                             }
                             break;
index 021908ab6efe6a6e039452b00878dddb34b8b6a1..97d31df827543862446b32f4df5dba1a9d82c44f 100644 (file)
@@ -44,7 +44,7 @@ import java.util.logging.Logger;
 
 import com.vaadin.Application;
 import com.vaadin.Application.SystemMessages;
-import com.vaadin.RootRequiresMoreInformation;
+import com.vaadin.RootRequiresMoreInformationException;
 import com.vaadin.external.json.JSONException;
 import com.vaadin.external.json.JSONObject;
 import com.vaadin.terminal.CombinedRequest;
@@ -2007,7 +2007,7 @@ public abstract class AbstractCommunicationManager implements
                 params.put("uidl", initialUIDL);
             }
             response.getWriter().write(params.toString());
-        } catch (RootRequiresMoreInformation e) {
+        } catch (RootRequiresMoreInformationException e) {
             // Requiring more information at this point is not allowed
             // TODO handle in a better way
             throw new RuntimeException(e);
index cfd65aa6f7b9e8d6f6a90ec6961f7bef4babe991..13a4ea3e1fb8ce600583b772e23b09231b649a53 100644 (file)
@@ -13,7 +13,7 @@ import java.io.Writer;
 import javax.servlet.http.HttpServletResponse;
 
 import com.vaadin.Application;
-import com.vaadin.RootRequiresMoreInformation;
+import com.vaadin.RootRequiresMoreInformationException;
 import com.vaadin.external.json.JSONException;
 import com.vaadin.external.json.JSONObject;
 import com.vaadin.terminal.DeploymentConfiguration;
@@ -142,7 +142,7 @@ public abstract class BootstrapHandler implements RequestHandler {
             }
 
             rootId = root.getRootId();
-        } catch (RootRequiresMoreInformation e) {
+        } catch (RootRequiresMoreInformationException e) {
             rootId = application.registerPendingRoot(request);
         }
 
index bb05853b5ba8779b691218e50c998505859b2b4e..68a0bb380598db0d1cde742356e7bc6e6de71092 100644 (file)
@@ -1,7 +1,7 @@
 package com.vaadin.tests.application;
 
 import com.vaadin.Application;
-import com.vaadin.RootRequiresMoreInformation;
+import com.vaadin.RootRequiresMoreInformationException;
 import com.vaadin.terminal.ApplicationResource;
 import com.vaadin.terminal.DownloadStream;
 import com.vaadin.terminal.PaintException;
@@ -77,7 +77,7 @@ public class ThreadLocalInstances extends AbstractTestApplication {
 
     @Override
     protected Root getRoot(WrappedRequest request)
-            throws RootRequiresMoreInformation {
+            throws RootRequiresMoreInformationException {
         return mainWindow;
     }
 
index f112f7a6d28a1a5c9c03b62e1cc0ea4be76c5555..f40de927772cb01c0a86c5e5debe6e72376f14fe 100644 (file)
@@ -1,6 +1,6 @@
 package com.vaadin.tests.components.root;
 
-import com.vaadin.RootRequiresMoreInformation;
+import com.vaadin.RootRequiresMoreInformationException;
 import com.vaadin.annotations.RootInitRequiresBrowserDetails;
 import com.vaadin.terminal.ExternalResource;
 import com.vaadin.terminal.WrappedRequest;
@@ -25,12 +25,12 @@ public class LazyInitRoots extends AbstractTestApplication {
 
     @Override
     public Root getRoot(WrappedRequest request)
-            throws RootRequiresMoreInformation {
+            throws RootRequiresMoreInformationException {
         if (request.getParameter("lazyCreate") != null) {
             // Root created on second request
             final BrowserDetails browserDetails = request.getBrowserDetails();
             if (browserDetails == null) {
-                throw new RootRequiresMoreInformation();
+                throw new RootRequiresMoreInformationException();
             } else {
                 Root root = new Root() {
                     @Override