* 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
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);
*
* <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
* @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)
* 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
* @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;
+++ /dev/null
-/*
-@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
-}
--- /dev/null
+/*
+@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
+}
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;
*
* 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}
*
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;
try {
root = application
.getRootForRequest(wrappedRequest);
- } catch (RootRequiresMoreInformation e) {
+ } catch (RootRequiresMoreInformationException e) {
// Ignore problem and continue without root
}
break;
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;
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);
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;
}
rootId = root.getRootId();
- } catch (RootRequiresMoreInformation e) {
+ } catch (RootRequiresMoreInformationException e) {
rootId = application.registerPendingRoot(request);
}
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;
@Override
protected Root getRoot(WrappedRequest request)
- throws RootRequiresMoreInformation {
+ throws RootRequiresMoreInformationException {
return mainWindow;
}
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;
@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