Revision: 8463
Author: unn...@google.com
Date: Mon Aug  2 15:57:18 2010
Log: Change the way we include the User Auth files, keeping more of them
checked into GWT code rather than generated by roo

Review at http://gwt-code-reviews.appspot.com/721803

Review by: rj...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8463

Added:
 /trunk/user/src/com/google/gwt/requestfactory/server/UserInformation.java
/trunk/user/src/com/google/gwt/requestfactory/shared/UserInformationRecord.java /trunk/user/src/com/google/gwt/requestfactory/shared/UserInformationRecordChanged.java /trunk/user/src/com/google/gwt/requestfactory/shared/UserInformationRequest.java
Deleted:
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/UserInformationRecord.java /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/UserInformationRecordChanged.java /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/UserInformationRequest.java /trunk/user/src/com/google/gwt/requestfactory/server/UserInformationImpl.java
 /trunk/user/src/com/google/gwt/requestfactory/shared/UserInformation.java
Modified:
 /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/Scaffold.java
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/ExpensesRequestFactory.java /trunk/bikeshed/src/com/google/gwt/sample/expenses/server/domain/GaeUserInformation.java
 /trunk/user/src/com/google/gwt/requestfactory/client/LoginWidget.java
/trunk/user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java /trunk/user/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java
 /trunk/user/src/com/google/gwt/requestfactory/shared/LoggingRequest.java

=======================================
--- /dev/null
+++ /trunk/user/src/com/google/gwt/requestfactory/server/UserInformation.java Mon Aug 2 15:57:18 2010
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2010 Google Inc.
+ *
+ * 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.google.gwt.requestfactory.server;
+
+/**
+ * A base class for providing authentication related information about the
+ * user. Services that want real authentication should subclass this class.
+ */
+public abstract class UserInformation {
+
+  /**
+   * This implementation treats the user as constantly signed in, and
+   * without any information.
+   */
+  private static class UserInformationSimpleImpl extends UserInformation {
+    private Long id = 0L;
+
+    public String getEmail() {
+      return "";
+    }
+
+    public Long getId() {
+      return this.id;
+    }
+
+    public String getLoginUrl() {
+      return "";
+    }
+
+    public String getLogoutUrl() {
+      return "";
+    }
+
+    public String getName() {
+      return "";
+    }
+
+    public boolean isUserLoggedIn() {
+      return true;
+    }
+
+    public void setId(Long id) {
+      this.id = id;
+    }
+  }
+
+  private static String userInformationImplClass = "";
+
+  public static UserInformation getCurrentUserInformation() {
+    UserInformation userInfo = null;
+    if (!userInformationImplClass.isEmpty()) {
+      try {
+        userInfo =
+ (UserInformation) Class.forName(userInformationImplClass).newInstance();
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
+    if (userInfo == null) {
+      userInfo = new UserInformationSimpleImpl();
+    }
+    return userInfo;
+  }
+
+  public static void setUserInformationImplClass(String clazz) {
+    userInformationImplClass = clazz;
+  }
+
+  private Integer version = 0;
+
+  public abstract String getEmail();
+  public abstract Long getId();
+  public abstract String getLoginUrl();
+  public abstract String getLogoutUrl();
+  public abstract String getName();
+
+  public Integer getVersion() {
+    return this.version;
+  }
+
+  public abstract boolean isUserLoggedIn();
+  public abstract void setId(Long id);
+
+  public void setVersion(Integer version) {
+    this.version = version;
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/src/com/google/gwt/requestfactory/shared/UserInformationRecord.java Mon Aug 2 15:57:18 2010
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2010 Google Inc.
+ *
+ * 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.google.gwt.requestfactory.shared;
+
+import com.google.gwt.requestfactory.server.UserInformation;
+import com.google.gwt.valuestore.shared.Property;
+import com.google.gwt.valuestore.shared.Record;
+
+/**
+ * "API Generated" DTO interface based on {...@link UserInformation}.
+ */
+...@datatransferobject(UserInformation.class)
+public interface UserInformationRecord extends Record  {
+  Property<String> email =
+    new Property<String>("email", "Email", String.class);
+  Property<String> loginUrl =
+    new Property<String>("loginUrl", "LoginUrl", String.class);
+  Property<String> logoutUrl =
+    new Property<String>("logoutUrl", "LogoutUrl", String.class);
+  Property<String> name =
+    new Property<String>("name", "Name", String.class);
+
+  String getEmail();
+  String getLoginUrl();
+  String getLogoutUrl();
+  String getName();
+
+}
=======================================
--- /dev/null
+++ /trunk/user/src/com/google/gwt/requestfactory/shared/UserInformationRecordChanged.java Mon Aug 2 15:57:18 2010
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2010 Google Inc.
+ *
+ * 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.google.gwt.requestfactory.shared;
+
+import com.google.gwt.event.shared.EventHandler;
+import com.google.gwt.event.shared.GwtEvent;
+import com.google.gwt.valuestore.shared.RecordChangedEvent;
+import com.google.gwt.valuestore.shared.WriteOperation;
+
+/**
+ * "API Generated" event posted when the values of a {...@link UserInformationRecord}
+ * change.
+ */
+public class UserInformationRecordChanged extends
+ RecordChangedEvent<UserInformationRecord, UserInformationRecordChanged.Handler> {
+
+  /**
+   * Implemented by handlers of this type of event.
+   */
+  public interface Handler extends EventHandler {
+    void onUserInformationChanged(UserInformationRecordChanged event);
+  }
+
+  public static final Type<Handler> TYPE = new Type<Handler>();
+
+ public UserInformationRecordChanged(UserInformationRecord record, WriteOperation writeOperation) {
+    super(record, writeOperation);
+  }
+
+  @Override
+  public GwtEvent.Type<Handler> getAssociatedType() {
+    return TYPE;
+  }
+
+  @Override
+  protected void dispatch(Handler handler) {
+    handler.onUserInformationChanged(this);
+  }
+}
=======================================
--- /dev/null
+++ /trunk/user/src/com/google/gwt/requestfactory/shared/UserInformationRequest.java Mon Aug 2 15:57:18 2010
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2010 Google Inc.
+ *
+ * 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.google.gwt.requestfactory.shared;
+
+import com.google.gwt.requestfactory.server.UserInformation;
+
+/**
+ * "API Generated" request selector interface implemented by objects that give
+ * client access to the methods of {...@link UserInformation}.
+ */
+...@service(UserInformation.class)
+public interface UserInformationRequest {
+
+  RecordRequest<UserInformationRecord> getCurrentUserInformation();
+
+}
=======================================
--- /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/UserInformationRecord.java Fri Jul 30 17:29:09 2010
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * 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.google.gwt.sample.expenses.gwt.request;
-
-import com.google.gwt.requestfactory.shared.DataTransferObject;
-import com.google.gwt.requestfactory.shared.UserInformation;
-import com.google.gwt.sample.expenses.server.domain.GaeUserInformation;
-import com.google.gwt.valuestore.shared.Property;
-import com.google.gwt.valuestore.shared.Record;
-
-/**
- * "API Generated" DTO interface based on
- * {...@link com.google.gwt.sample.expenses.server.domain.GaeUserInformation}.
- * <p>
- * IRL this class will be generated by a JPA-savvy tool run before compilation.
- */
-...@datatransferobject(GaeUserInformation.class)
-public interface UserInformationRecord extends Record, UserInformation {
-  Property<String> email =
-    new Property<String>("email", "Email", String.class);
-  Property<String> loginUrl =
-    new Property<String>("loginUrl", "LoginUrl", String.class);
-  Property<String> logoutUrl =
-    new Property<String>("logoutUrl", "LogoutUrl", String.class);
-  Property<String> name =
-    new Property<String>("name", "Name", String.class);
-
-  /*
-   * Most of the actual getXxx calls come from the UserInformationProvider
- * interface. Redeclare this method, even though it is already in Record.java
-   * so checkstyle does not complain about an interface with no methods
-   */
-  Long getId();
-
-}
=======================================
--- /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/UserInformationRecordChanged.java Fri Jul 23 10:49:57 2010
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * 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.google.gwt.sample.expenses.gwt.request;
-
-import com.google.gwt.event.shared.EventHandler;
-import com.google.gwt.event.shared.GwtEvent;
-import com.google.gwt.valuestore.shared.RecordChangedEvent;
-import com.google.gwt.valuestore.shared.WriteOperation;
-
-/**
- * "API Generated" event posted when the values of a {...@link UserInformationRecord}
- * change.
- * <p>
- * IRL this class will be generated by a JPA-savvy tool run before compilation.
- */
-public class UserInformationRecordChanged extends
- RecordChangedEvent<UserInformationRecord, UserInformationRecordChanged.Handler> {
-
-  /**
-   * Implemented by handlers of this type of event.
-   */
-  public interface Handler extends EventHandler {
-    void onUserInformationChanged(UserInformationRecordChanged event);
-  }
-
-  public static final Type<Handler> TYPE = new Type<Handler>();
-
- public UserInformationRecordChanged(UserInformationRecord record, WriteOperation writeOperation) {
-    super(record, writeOperation);
-  }
-
-  @Override
-  public GwtEvent.Type<Handler> getAssociatedType() {
-    return TYPE;
-  }
-
-  @Override
-  protected void dispatch(Handler handler) {
-    handler.onUserInformationChanged(this);
-  }
-}
=======================================
--- /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/UserInformationRequest.java Fri Jul 23 10:49:57 2010
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * 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.google.gwt.sample.expenses.gwt.request;
-
-import com.google.gwt.requestfactory.shared.RecordRequest;
-import com.google.gwt.requestfactory.shared.Service;
-import com.google.gwt.sample.expenses.server.domain.GaeUserInformation;
-
-/**
- * "API Generated" request selector interface implemented by objects that give
- * client access to the methods of
- * {...@link com.google.gwt.sample.expenses.server.domain.GaeUserInformation}.
- * <p>
- * IRL this class will be generated by a JPA-savvy tool run before compilation.
- */
-...@service(GaeUserInformation.class)
-public interface UserInformationRequest {
-
-  RecordRequest<UserInformationRecord> getCurrentUserInformation();
-
-}
=======================================
--- /trunk/user/src/com/google/gwt/requestfactory/server/UserInformationImpl.java Fri Jul 23 10:49:57 2010
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * 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.google.gwt.requestfactory.server;
-
-import com.google.gwt.requestfactory.shared.UserInformation;
-
-/**
- * A base class for providing authentication related information about the
- * user. This implementation treats the user as constantly signed in, and
- * without any information. Services that want real authentication should
- * subclass this class.
- */
-public class UserInformationImpl implements UserInformation {
-  public static UserInformationImpl getCurrentUserInformation() {
-    return new UserInformationImpl();
-  }
-
-  private Long id = 0L;
-  private Integer version = 0;
-
-  public UserInformationImpl() {
-  }
-
-  public String getEmail() {
-    return "";
-  }
-
-  public Long getId() {
-    return this.id;
-  }
-
-  public String getLoginUrl() {
-    return "";
-  }
-
-  public String getLogoutUrl() {
-    return "";
-  }
-
-  public String getName() {
-    return "";
-  }
-
-  public Integer getVersion() {
-    return this.version;
-  }
-
-  public boolean isUserLoggedIn() {
-    return true;
-  }
-
-  public void setId(Long id) {
-    this.id = id;
-  }
-
-  public void setVersion(Integer version) {
-    this.version = version;
-  }
-}
=======================================
--- /trunk/user/src/com/google/gwt/requestfactory/shared/UserInformation.java Fri Jul 23 10:49:57 2010
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * 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.google.gwt.requestfactory.shared;
-
-/**
- * The information which is made available to the {...@link LoginWidget} and other
- * UI elements that are interested in user information.
- */
-public interface UserInformation {
-  String getEmail();
-  String getLoginUrl();
-  String getLogoutUrl();
-  String getName();
-}
=======================================
--- /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/Scaffold.java Wed Jul 28 16:39:40 2010 +++ /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/Scaffold.java Mon Aug 2 15:57:18 2010
@@ -30,11 +30,11 @@
 import com.google.gwt.requestfactory.shared.Receiver;
 import com.google.gwt.requestfactory.shared.RequestEvent;
 import com.google.gwt.requestfactory.shared.RequestEvent.State;
+import com.google.gwt.requestfactory.shared.UserInformationRecord;
 import com.google.gwt.sample.expenses.gwt.client.place.ListScaffoldPlace;
 import com.google.gwt.sample.expenses.gwt.client.place.ScaffoldPlace;
import com.google.gwt.sample.expenses.gwt.request.ExpensesEntityTypesProcessor;
 import com.google.gwt.sample.expenses.gwt.request.ExpensesRequestFactory;
-import com.google.gwt.sample.expenses.gwt.request.UserInformationRecord;
 import com.google.gwt.sample.expenses.gwt.ui.ListActivitiesMapper;
 import com.google.gwt.sample.expenses.gwt.ui.ScaffoldListPlaceRenderer;
 import com.google.gwt.user.client.ui.RootLayoutPanel;
=======================================
--- /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/ExpensesRequestFactory.java Fri Jul 23 15:42:40 2010 +++ /trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/request/ExpensesRequestFactory.java Mon Aug 2 15:57:18 2010
@@ -16,6 +16,7 @@
 package com.google.gwt.sample.expenses.gwt.request;

 import com.google.gwt.requestfactory.shared.RequestFactory;
+import com.google.gwt.requestfactory.shared.UserInformationRequest;

 /**
* "API generated" factory interface to build request objects for the methods of
@@ -46,4 +47,5 @@
    * @return a request selector
    */
   UserInformationRequest userInformationRequest();
-}
+
+}
=======================================
--- /trunk/bikeshed/src/com/google/gwt/sample/expenses/server/domain/GaeUserInformation.java Tue Jul 27 18:10:49 2010 +++ /trunk/bikeshed/src/com/google/gwt/sample/expenses/server/domain/GaeUserInformation.java Mon Aug 2 15:57:18 2010
@@ -19,13 +19,13 @@
 import com.google.appengine.api.users.User;
 import com.google.appengine.api.users.UserService;
 import com.google.appengine.api.users.UserServiceFactory;
-import com.google.gwt.requestfactory.server.UserInformationImpl;
+import com.google.gwt.requestfactory.server.UserInformation;

 /**
  * A user information class that uses the Google App Engine authentication
  * framework.
  */
-public class GaeUserInformation extends UserInformationImpl {
+public class GaeUserInformation extends UserInformation {
private static UserService userService = UserServiceFactory.getUserService();

   public static GaeUserInformation getCurrentUserInformation() {
@@ -67,5 +67,13 @@
   public boolean isUserLoggedIn() {
     return userService.isUserLoggedIn();
   }
+
+  /**
+   * Does nothing since in GAE authentication, the unique ID is provided by
+   * the user service and is based on a hash in the User object.
+   */
+  public void setId(Long id) {
+    // Do nothing
+  }

 }
=======================================
--- /trunk/user/src/com/google/gwt/requestfactory/client/LoginWidget.java Fri Jul 23 10:49:57 2010 +++ /trunk/user/src/com/google/gwt/requestfactory/client/LoginWidget.java Mon Aug 2 15:57:18 2010
@@ -19,7 +19,7 @@
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.dom.client.SpanElement;
 import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.requestfactory.shared.UserInformation;
+import com.google.gwt.requestfactory.shared.UserInformationRecord;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
 import com.google.gwt.uibinder.client.UiHandler;
@@ -41,10 +41,10 @@
     initWidget(BINDER.createAndBindUi(this));
   }

-  public void setUserInformation(UserInformation info) {
+  public void setUserInformation(UserInformationRecord info) {
     name.setInnerText(info.getName());
-      logoutUrl = info.getLogoutUrl();
-      logoutUrl = logoutUrl.replace("RETURN_URL", Location.getHref());
+    logoutUrl = info.getLogoutUrl();
+    logoutUrl = logoutUrl.replace("RETURN_URL", Location.getHref());
   }

   @UiHandler("logoutLink")
=======================================
--- /trunk/user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java Fri Jul 30 17:29:09 2010 +++ /trunk/user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java Mon Aug 2 15:57:18 2010
@@ -313,20 +313,22 @@
String returnTypeName = requestSelector.getReturnType().getQualifiedSourceName();
       String nestedImplName = requestSelector.getName().replace('.', '_')
           + "Impl";
+      String nestedImplPackage =
+ generatorContext.getTypeOracle().findType(returnTypeName).getPackage().getName();

sw.println("public " + returnTypeName + " " + requestSelector.getName()
           + "() {");
       sw.indent();
-      sw.println("return new " + nestedImplName + "(this);");
+ sw.println("return new " + nestedImplPackage + "." + nestedImplName + "(this);");
       sw.outdent();
       sw.println("}");
       sw.println();

-      PrintWriter pw = generatorContext.tryCreate(logger, packageName,
+ PrintWriter pw = generatorContext.tryCreate(logger, nestedImplPackage,
           nestedImplName);
       if (pw != null) {
         generateRequestSelectorImplementation(logger, generatorContext, pw,
-            requestSelector, interfaceType, packageName, nestedImplName);
+ requestSelector, interfaceType, nestedImplPackage, nestedImplName);
       }
     }

=======================================
--- /trunk/user/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java Fri Jul 30 17:29:09 2010 +++ /trunk/user/src/com/google/gwt/requestfactory/server/RequestFactoryServlet.java Mon Aug 2 15:57:18 2010
@@ -50,8 +50,6 @@
 @SuppressWarnings("serial")
 public class RequestFactoryServlet extends HttpServlet {

-  private UserInformationImpl userInfo;
-
   @SuppressWarnings("unchecked")
   @Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
@@ -64,6 +62,7 @@

     try {
       // Check that user is logged in before proceeding
+ UserInformation userInfo = UserInformation.getCurrentUserInformation();
       if (!userInfo.isUserLoggedIn()) {
         response.setHeader("login", userInfo.getLoginUrl());
         response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
@@ -89,14 +88,7 @@
     // adding GAE dependencies to GWT.
String userInfoClass = getServletConfig().getInitParameter("userInfoClass");
     if (userInfoClass != null) {
-      try {
- userInfo = (UserInformationImpl) Class.forName(userInfoClass).newInstance();
-      } catch (Exception e) {
-        e.printStackTrace();
-      }
-    }
-    if (userInfo == null) {
-      userInfo = new UserInformationImpl();
+      UserInformation.setUserInformationImplClass(userInfoClass);
     }
   }

=======================================
--- /trunk/user/src/com/google/gwt/requestfactory/shared/LoggingRequest.java Fri Jul 30 11:32:15 2010 +++ /trunk/user/src/com/google/gwt/requestfactory/shared/LoggingRequest.java Mon Aug 2 15:57:18 2010
@@ -21,8 +21,6 @@
 /**
* "API Generated" request selector interface implemented by objects that give
  * client access to the methods of {...@link Logging}.
- * <p>
- * IRL this class will be generated by a JPA-savvy tool run before compilation.
  */
 @Service(Logging.class)
 public interface LoggingRequest {

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to