[kune-commits] r1677 - in trunk: . src/main/java/cc/kune/core/client/state/impl src/main/java/cc/kune/wave/client src/main/resources

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Thu Feb 9 03:29:56 CET 2012


Author: vjrj_
Date: 2012-02-09 03:29:55 +0100 (Thu, 09 Feb 2012)
New Revision: 1677

Modified:
   trunk/.classpath
   trunk/pom.xml
   trunk/src/main/java/cc/kune/core/client/state/impl/StateManagerDefault.java
   trunk/src/main/java/cc/kune/wave/client/KuneStagesProvider.java
   trunk/src/main/java/cc/kune/wave/client/WebClient.java
   trunk/src/main/resources/wave-server.properties
Log:
wave updated

Modified: trunk/.classpath
===================================================================
--- trunk/.classpath	2012-01-27 15:21:03 UTC (rev 1676)
+++ trunk/.classpath	2012-02-09 02:29:55 UTC (rev 1677)
@@ -13,19 +13,19 @@
   <classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" sourcepath="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar"/>
   <classpathentry kind="var" path="M2_REPO/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar" sourcepath="M2_REPO/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/box/0.3.9/box-0.3.9.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/box-src/0.3.9/box-src-0.3.9.jar" sourcepath="M2_REPO/org/waveprotocol/box-src/0.3.9/box-src-0.3.9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/box/0.3.10/box-0.3.10.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/box-src/0.3.10/box-src-0.3.10.jar" sourcepath="M2_REPO/org/waveprotocol/box-src/0.3.10/box-src-0.3.10-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar"/>
   <classpathentry kind="var" path="M2_REPO/c3p0/c3p0/0.9.1/c3p0-0.9.1.jar" sourcepath="M2_REPO/c3p0/c3p0/0.9.1/c3p0-0.9.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar" sourcepath="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client/0.3.9/client-0.3.9.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-common/0.3.9/client-common-0.3.9.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-common-src/0.3.9/client-common-src-0.3.9.jar" sourcepath="M2_REPO/org/waveprotocol/client-common-src/0.3.9/client-common-src-0.3.9-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-scheduler-src/0.3.9/client-scheduler-src-0.3.9.jar" sourcepath="M2_REPO/org/waveprotocol/client-scheduler-src/0.3.9/client-scheduler-src-0.3.9-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-src/0.3.9/client-src-0.3.9.jar" sourcepath="M2_REPO/org/waveprotocol/client-src/0.3.9/client-src-0.3.9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client/0.3.10/client-0.3.10.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-common/0.3.10/client-common-0.3.10.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-common-src/0.3.10/client-common-src-0.3.10.jar" sourcepath="M2_REPO/org/waveprotocol/client-common-src/0.3.10/client-common-src-0.3.10-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-scheduler-src/0.3.10/client-scheduler-src-0.3.10.jar" sourcepath="M2_REPO/org/waveprotocol/client-scheduler-src/0.3.10/client-scheduler-src-0.3.10-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-src/0.3.10/client-src-0.3.10.jar" sourcepath="M2_REPO/org/waveprotocol/client-src/0.3.10/client-src-0.3.10-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/cobogw/gwt/cobogw/1.3.1/cobogw-1.3.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/common-src/0.3.9/common-src-0.3.9.jar" sourcepath="M2_REPO/org/waveprotocol/common-src/0.3.9/common-src-0.3.9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/common-src/0.3.10/common-src-0.3.10.jar" sourcepath="M2_REPO/org/waveprotocol/common-src/0.3.10/common-src-0.3.10-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2.jar" sourcepath="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4-sources.jar"/>
@@ -34,8 +34,8 @@
   <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.3.1/commons-io-1.3.1.jar" sourcepath="M2_REPO/commons-io/commons-io/1.3.1/commons-io-1.3.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.5/commons-lang-2.5.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.5/commons-lang-2.5-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/communication-src/0.3.9/communication-src-0.3.9.jar" sourcepath="M2_REPO/org/waveprotocol/communication-src/0.3.9/communication-src-0.3.9-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/concurrencycontrol-src/0.3.9/concurrencycontrol-src-0.3.9.jar" sourcepath="M2_REPO/org/waveprotocol/concurrencycontrol-src/0.3.9/concurrencycontrol-src-0.3.9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/communication-src/0.3.10/communication-src-0.3.10.jar" sourcepath="M2_REPO/org/waveprotocol/communication-src/0.3.10/communication-src-0.3.10-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/concurrencycontrol-src/0.3.10/concurrencycontrol-src-0.3.10.jar" sourcepath="M2_REPO/org/waveprotocol/concurrencycontrol-src/0.3.10/concurrencycontrol-src-0.3.10-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/net/sourceforge/cssparser/cssparser/0.9.5/cssparser-0.9.5.jar" sourcepath="M2_REPO/net/sourceforge/cssparser/cssparser/0.9.5/cssparser-0.9.5-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/net/sf/dozer/dozer/4.0/dozer-4.0.jar" sourcepath="M2_REPO/net/sf/dozer/dozer/4.0/dozer-4.0-sources.jar"/>
@@ -57,7 +57,7 @@
   <classpathentry kind="var" path="M2_REPO/com/allen_sauer/gwt/log/gwt-log/gwt-log/3.0.1/gwt-log-3.0.1.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-servlet/2.1.1/gwt-servlet-2.1.1.jar" sourcepath="M2_REPO/com/google/gwt/gwt-servlet/2.1.1/gwt-servlet-2.1.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-user/2.1.1/gwt-user-2.1.1.jar" sourcepath="M2_REPO/com/google/gwt/gwt-user/2.1.1/gwt-user-2.1.1-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/gwt-util-src/0.3.9/gwt-util-src-0.3.9.jar" sourcepath="M2_REPO/org/waveprotocol/gwt-util-src/0.3.9/gwt-util-src-0.3.9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/gwt-util-src/0.3.10/gwt-util-src-0.3.10.jar" sourcepath="M2_REPO/org/waveprotocol/gwt-util-src/0.3.10/gwt-util-src-0.3.10-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/allen_sauer/gwt/voices/gwt-voices/gwt-voices/2.0.0/gwt-voices-2.0.0.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-all/0.5/gwtp-all-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-all/0.5/gwtp-all-0.5-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-clients-common/0.5/gwtp-clients-common-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-clients-common/0.5/gwtp-clients-common-0.5-sources.jar"/>
@@ -114,16 +114,16 @@
   <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-profile/2.0/maven-profile-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-profile/2.0/maven-profile-2.0-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-project/2.0/maven-project-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-project/2.0/maven-project-2.0-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/media-src/0.3.9/media-src-0.3.9.jar" sourcepath="M2_REPO/org/waveprotocol/media-src/0.3.9/media-src-0.3.9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/media-src/0.3.10/media-src-0.3.10.jar" sourcepath="M2_REPO/org/waveprotocol/media-src/0.3.10/media-src-0.3.10-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/mockito/mockito-core/1.8.5/mockito-core-1.8.5.jar" sourcepath="M2_REPO/org/mockito/mockito-core/1.8.5/mockito-core-1.8.5-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/model-src/0.3.9/model-src-0.3.9.jar" sourcepath="M2_REPO/org/waveprotocol/model-src/0.3.9/model-src-0.3.9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/model-src/0.3.10/model-src-0.3.10.jar" sourcepath="M2_REPO/org/waveprotocol/model-src/0.3.10/model-src-0.3.10-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/mvel/mvel2/2.0.16/mvel2-2.0.16.jar" sourcepath="M2_REPO/org/mvel/mvel2/2.0.16/mvel2-2.0.16-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/mysql/mysql-connector-java/5.1.13/mysql-connector-java-5.1.13.jar"/>
   <classpathentry kind="var" path="M2_REPO/net/sourceforge/nekohtml/nekohtml/1.9.15/nekohtml-1.9.15.jar" sourcepath="M2_REPO/net/sourceforge/nekohtml/nekohtml/1.9.15/nekohtml-1.9.15-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/objenesis/objenesis/1.0/objenesis-1.0.jar" sourcepath="M2_REPO/org/objenesis/objenesis/1.0/objenesis-1.0-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/proto-msg/0.3.9/proto-msg-0.3.9.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/proto-msg/0.3.10/proto-msg-0.3.10.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/quartz-scheduler/quartz/2.1.0/quartz-2.1.0.jar" sourcepath="M2_REPO/org/quartz-scheduler/quartz/2.1.0/quartz-2.1.0-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/w3c/css/sac/1.3/sac-1.3.jar" sourcepath="M2_REPO/org/w3c/css/sac/1.3/sac-1.3-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-android-driver/2.12.0/selenium-android-driver-2.12.0.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-android-driver/2.12.0/selenium-android-driver-2.12.0-sources.jar"/>
@@ -148,9 +148,9 @@
   <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/testng/testng/6.2.1/testng-6.2.1.jar" sourcepath="M2_REPO/org/testng/testng/6.2.1/testng-6.2.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/tigase/tigase-xmltools/3.3.5/tigase-xmltools-3.3.5.jar" sourcepath="M2_REPO/tigase/tigase-xmltools/3.3.5/tigase-xmltools-3.3.5-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/util-src/0.3.9/util-src-0.3.9.jar" sourcepath="M2_REPO/org/waveprotocol/util-src/0.3.9/util-src-0.3.9-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/util-src/0.3.10/util-src-0.3.10.jar" sourcepath="M2_REPO/org/waveprotocol/util-src/0.3.10/util-src-0.3.10-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/waveinabox-server-0.3/0.3.9/waveinabox-server-0.3-0.3.9.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/waveprotocol/waveinabox-server-0.3/0.3.10/waveinabox-server-0.3-0.3.10.jar"/>
   <classpathentry kind="var" path="M2_REPO/xalan/xalan/2.7.1/xalan-2.7.1.jar" sourcepath="M2_REPO/xalan/xalan/2.7.1/xalan-2.7.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
   <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2-sources.jar"/>

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml	2012-01-27 15:21:03 UTC (rev 1676)
+++ trunk/pom.xml	2012-02-09 02:29:55 UTC (rev 1677)
@@ -19,7 +19,7 @@
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <slf4j.version>1.6.1</slf4j.version>
     <openjpa.version>2.0.1</openjpa.version>
-    <wiab.version>0.3.9</wiab.version>
+    <wiab.version>0.3.10</wiab.version>
     <skipTests>true</skipTests>
   </properties>
   <repositories>

Modified: trunk/src/main/java/cc/kune/core/client/state/impl/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/impl/StateManagerDefault.java	2012-01-27 15:21:03 UTC (rev 1676)
+++ trunk/src/main/java/cc/kune/core/client/state/impl/StateManagerDefault.java	2012-02-09 02:29:55 UTC (rev 1677)
@@ -382,6 +382,7 @@
             }
           }
         } else if (!isSpecialHash) {
+          // FIXME This can be in the top of isWaveToken....
           if (tokenMatcher.isGroupToken(newToken)) {
             SpaceConfEvent.fire(eventBus, Space.groupSpace, newToken);
             SpaceConfEvent.fire(eventBus, Space.publicSpace, TokenUtils.preview(newToken));

Modified: trunk/src/main/java/cc/kune/wave/client/KuneStagesProvider.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/KuneStagesProvider.java	2012-01-27 15:21:03 UTC (rev 1676)
+++ trunk/src/main/java/cc/kune/wave/client/KuneStagesProvider.java	2012-02-09 02:29:55 UTC (rev 1677)
@@ -1,4 +1,3 @@
-// @formatter:off
 /**
  * Copyright 2010 Google Inc.
  *
@@ -16,7 +15,6 @@
  *
  */
 
-
 package cc.kune.wave.client;
 
 import org.waveprotocol.box.webclient.client.RemoteViewServiceMultiplexer;
@@ -38,9 +36,12 @@
 import org.waveprotocol.wave.client.wavepanel.impl.edit.EditController;
 import org.waveprotocol.wave.client.wavepanel.impl.edit.EditSession;
 import org.waveprotocol.wave.client.wavepanel.impl.edit.KeepFocusInView;
+import org.waveprotocol.wave.client.wavepanel.impl.focus.FocusBlipSelector;
 import org.waveprotocol.wave.client.wavepanel.impl.focus.FocusFramePresenter;
+import org.waveprotocol.wave.client.wavepanel.impl.focus.ViewTraverser;
 import org.waveprotocol.wave.client.wavepanel.impl.indicator.ReplyIndicatorController;
 import org.waveprotocol.wave.client.wavepanel.impl.menu.MenuController;
+import org.waveprotocol.wave.client.wavepanel.impl.reader.Reader;
 import org.waveprotocol.wave.client.wavepanel.impl.title.WaveTitleHandler;
 import org.waveprotocol.wave.client.wavepanel.impl.toolbar.ToolbarSwitcher;
 import org.waveprotocol.wave.client.wavepanel.view.BlipView;
@@ -49,11 +50,8 @@
 import org.waveprotocol.wave.client.wavepanel.view.dom.full.DomRenderer;
 import org.waveprotocol.wave.client.widget.popup.PopupChromeFactory;
 import org.waveprotocol.wave.client.widget.popup.PopupFactory;
-import org.waveprotocol.wave.model.conversation.Conversation;
-import org.waveprotocol.wave.model.conversation.ConversationBlip;
 import org.waveprotocol.wave.model.conversation.ConversationView;
 import org.waveprotocol.wave.model.id.IdGenerator;
-import org.waveprotocol.wave.model.id.ModernIdSerialiser;
 import org.waveprotocol.wave.model.wave.ParticipantId;
 import org.waveprotocol.wave.model.waveref.WaveRef;
 
@@ -64,49 +62,67 @@
 
 /**
  * Stages for loading the undercurrent Wave Panel
- *
+ * 
  * @author zdwang at google.com (David Wang)
  */
 public class KuneStagesProvider extends Stages {
 
   private final static AsyncHolder<Object> HALT = new AsyncHolder<Object>() {
     @Override
-    public void call(Accessor<Object> accessor) {
+    public void call(final Accessor<Object> accessor) {
       // Never ready, so never notify the accessor.
     }
   };
 
-  private final Element wavePanelElement;
-  private final LogicalPanel rootPanel;
-  private final WaveRef waveRef;
+  /**
+   * Finds the blip that should receive the focus and selects it.
+   */
+  private static void selectAndFocusOnBlip(final Reader reader, final ModelAsViewProvider views,
+      final ConversationView wave, final FocusFramePresenter focusFrame, final WaveRef waveRef) {
+    final FocusBlipSelector blipSelector = FocusBlipSelector.create(wave, views, reader,
+        new ViewTraverser());
+    final BlipView blipUi = blipSelector.selectBlipByWaveRef(waveRef);
+    // Focus on the selected blip.
+    if (blipUi != null) {
+      focusFrame.focus(blipUi);
+    }
+  }
   private final RemoteViewServiceMultiplexer channel;
+  private boolean closed;
   private final I18nTranslationService i18n;
   private final IdGenerator idGenerator;
-  private final ProfileManager profiles;
-  private final WaveStore waveStore;
   private final boolean isNewWave;
   private final String localDomain;
-
-  private final boolean showParticipantsPanel;
-  private boolean closed;
   private StageOne one;
-  private StageTwo two;
+  private final ProfileManager profiles;
+  private final LogicalPanel rootPanel;
+  private final boolean showParticipantsPanel;
+
   private StageThree three;
+  private StageTwo two;
   private WaveContext wave;
+  private final Element wavePanelElement;
+  private final WaveRef waveRef;
+  private final WaveStore waveStore;
 
   /**
-   * @param wavePanelElement The dom element to become the wave panel
-   * @param rootPanel A panel that this an ancestor of wavePanelElement. This is
-   *        used for adopting to the GWT widget tree.
-   * @param waveRef the id of the wave to open. If null, it means, create a new
-   *        wave.
-   * @param channel communication channel.
-   * @param isNewWave true if the wave is a new client-created wave
+   * @param wavePanelElement
+   *          The dom element to become the wave panel
+   * @param rootPanel
+   *          A panel that this an ancestor of wavePanelElement. This is used
+   *          for adopting to the GWT widget tree.
+   * @param waveRef
+   *          the id of the wave to open. If null, it means, create a new wave.
+   * @param channel
+   *          communication channel.
+   * @param isNewWave
+   *          true if the wave is a new client-created wave
    * @param idGenerator
    */
-  public KuneStagesProvider(Element wavePanelElement, LogicalPanel rootPanel, WaveRef waveRef,
-      RemoteViewServiceMultiplexer channel, IdGenerator idGenerator, ProfileManager profiles,
-      WaveStore store, boolean isNewWave, String localDomain, boolean showParticipantsPanel, I18nTranslationService i18n) {
+  public KuneStagesProvider(final Element wavePanelElement, final LogicalPanel rootPanel,
+      final WaveRef waveRef, final RemoteViewServiceMultiplexer channel, final IdGenerator idGenerator,
+      final ProfileManager profiles, final WaveStore store, final boolean isNewWave,
+      final String localDomain, final boolean showParticipantsPanel, final I18nTranslationService i18n) {
     this.wavePanelElement = wavePanelElement;
     this.rootPanel = rootPanel;
     this.waveRef = waveRef;
@@ -121,43 +137,17 @@
   }
 
   @Override
-  protected AsyncHolder<StageZero> createStageZeroLoader() {
-    return haltIfClosed(super.createStageZeroLoader());
-  }
-
-  @Override
-  protected AsyncHolder<StageOne> createStageOneLoader(StageZero zero) {
+  protected AsyncHolder<StageOne> createStageOneLoader(final StageZero zero) {
     return haltIfClosed(new StageOne.DefaultProvider(zero) {
       @Override
-      protected Element createWaveHolder() {
-        return wavePanelElement;
-      }
-
-      @Override
       protected LogicalPanel createWaveContainer() {
         return rootPanel;
       }
-    });
-  }
 
-  @Override
-  protected AsyncHolder<StageTwo> createStageTwoLoader(StageOne one) {
-    return haltIfClosed(new StageTwoProvider(
-        this.one = one, waveRef.getWaveId(), channel, isNewWave, idGenerator, profiles) {
-      // Kune patch
       @Override
-      protected DomRenderer createRenderer() {
-        return KuneFullDomWaveRendererImpl.create(getConversations(), getProfileManager(),
-            getBlipDetailer(), getViewIdMapper(), getBlipQueue(), getThreadReadStateMonitor(),
-            createViewFactories(), showParticipantsPanel);
+      protected Element createWaveHolder() {
+        return wavePanelElement;
       }
-
-      // Warning: this run into issue #73
-      //      @Override
-      //      protected void installFeatures() {
-      //        WavePanelResourceLoader.loadCss();
-      //        // KuneWavePanelResourceLoader.loadCss();
-      //      }
     });
   }
 
@@ -169,7 +159,7 @@
         // Prepend an init wave flow onto the stage continuation.
         super.create(new Accessor<StageThree>() {
           @Override
-          public void use(StageThree x) {
+          public void use(final StageThree x) {
             onStageThreeLoaded(x, whenReady);
           }
         });
@@ -179,6 +169,7 @@
       protected String getLocalDomain() {
         return localDomain;
       }
+
       @Override
       protected void install() {
         EditorStaticDeps.setPopupProvider(PopupFactory.getProvider());
@@ -199,71 +190,38 @@
         WaveTitleHandler.install(edit, models);
         ReplyIndicatorController.install(actions, edit, panel);
         EditController.install(focus, actions, panel);
-       KuneParticipantController.install(panel, models, profiles, getLocalDomain(), i18n);
+        KuneParticipantController.install(panel, models, profiles, getLocalDomain(), i18n);
         KeepFocusInView.install(edit, panel);
         stageTwo.getDiffController().upgrade(edit);
       }
     });
   }
 
-  private void onStageThreeLoaded(StageThree x, Accessor<StageThree> whenReady) {
-    if (closed) {
-      // Stop the loading process.
-      return;
-    }
-    three = x;
-    if (isNewWave) {
-      initNewWave(x);
-    } else {
-      handleExistingWave(x);
-    }
-    wave = new WaveContext(
-        two.getWave(), two.getConversations(), two.getSupplement(), two.getReadMonitor());
-    waveStore.add(wave);
-    whenReady.use(x);
-  }
+  @Override
+  protected AsyncHolder<StageTwo> createStageTwoLoader(final StageOne one) {
+    return haltIfClosed(new StageTwoProvider(this.one = one, waveRef, channel, isNewWave, idGenerator,
+        profiles) {
+      // Kune patch
+      @Override
+      protected DomRenderer createRenderer() {
+        return KuneFullDomWaveRendererImpl.create(getConversations(), getProfileManager(),
+            getBlipDetailer(), getViewIdMapper(), getBlipQueue(), getThreadReadStateMonitor(),
+            createViewFactories(), showParticipantsPanel);
+      }
 
-  private void initNewWave(StageThree three) {
-    // Do the new-wave flow.
-    ModelAsViewProvider views = two.getModelAsViewProvider();
-    BlipQueueRenderer blipQueue = two.getBlipQueue();
-    ConversationView wave = two.getConversations();
-
-    // Force rendering to finish.
-    blipQueue.flush();
-    BlipView blipUi = views.getBlipView(wave.getRoot().getRootThread().getFirstBlip());
-    three.getEditActions().startEditing(blipUi);
+      // Warning: this run into issue #73
+      // @Override
+      // protected void installFeatures() {
+      // WavePanelResourceLoader.loadCss();
+      // // KuneWavePanelResourceLoader.loadCss();
+      // }
+    });
   }
 
-  private void handleExistingWave(StageThree three) {
-    // If there's blip reference then focus on that blip.
-    String documentId = waveRef.getDocumentId();
-    if (documentId != null) {
-      ModelAsViewProvider views = two.getModelAsViewProvider();
-      BlipQueueRenderer blipQueue = two.getBlipQueue();
-      ConversationView wave = two.getConversations();
-      blipQueue.flush();
-      // Find conversation
-      Conversation conversation;
-      if (waveRef.hasWaveletId()) {
-        String id = ModernIdSerialiser.INSTANCE.serialiseWaveletId(waveRef.getWaveletId());
-        conversation = wave.getConversation(id);
-      } else {
-        // Unspecified wavelet means root.
-        conversation = wave.getRoot();
-      }
-      if (conversation != null) {
-        // Find selected blip.
-        ConversationBlip blip = wave.getRoot().getBlip(documentId);
-        if (blip != null) {
-          BlipView blipUi = views.getBlipView(blip);
-          if (blipUi != null) {
-            two.getStageOne().getFocusFrame().focus(blipUi);
+  @Override
+  protected AsyncHolder<StageZero> createStageZeroLoader() {
+    return haltIfClosed(super.createStageZeroLoader());
   }
-        }
-      }
-    }
-  }
 
   public void destroy() {
     if (wave != null) {
@@ -280,7 +238,7 @@
     }
     if (two != null) {
       try {
-      two.getConnector().close();
+        two.getConnector().close();
       } catch (final Exception e) {
         Log.info("Some exception closing connector", e);
       }
@@ -288,7 +246,7 @@
     }
     if (one != null) {
       try {
-      one.getWavePanel().destroy();
+        one.getWavePanel().destroy();
       } catch (final Exception e) {
         Log.info("Some exception destroying panel", e);
       }
@@ -301,8 +259,47 @@
    * @return a halting provider if this stage is closed. Otherwise, returns the
    *         given provider.
    */
-  @SuppressWarnings("unchecked") // HALT is safe as a holder for any type
-  private <T> AsyncHolder<T> haltIfClosed(AsyncHolder<T> provider) {
+  @SuppressWarnings("unchecked")
+  // HALT is safe as a holder for any type
+  private <T> AsyncHolder<T> haltIfClosed(final AsyncHolder<T> provider) {
     return closed ? (AsyncHolder<T>) HALT : provider;
   }
+
+  private void handleExistingWave(final StageThree three) {
+    if (waveRef.hasDocumentId()) {
+      final BlipQueueRenderer blipQueue = two.getBlipQueue();
+      blipQueue.flush();
+      selectAndFocusOnBlip(two.getReader(), two.getModelAsViewProvider(), two.getConversations(),
+          one.getFocusFrame(), waveRef);
+    }
+  }
+
+  private void initNewWave(final StageThree three) {
+    // Do the new-wave flow.
+    final ModelAsViewProvider views = two.getModelAsViewProvider();
+    final BlipQueueRenderer blipQueue = two.getBlipQueue();
+    final ConversationView wave = two.getConversations();
+
+    // Force rendering to finish.
+    blipQueue.flush();
+    final BlipView blipUi = views.getBlipView(wave.getRoot().getRootThread().getFirstBlip());
+    three.getEditActions().startEditing(blipUi);
+  }
+
+  private void onStageThreeLoaded(final StageThree x, final Accessor<StageThree> whenReady) {
+    if (closed) {
+      // Stop the loading process.
+      return;
+    }
+    three = x;
+    if (isNewWave) {
+      initNewWave(x);
+    } else {
+      handleExistingWave(x);
+    }
+    wave = new WaveContext(two.getWave(), two.getConversations(), two.getSupplement(),
+        two.getReadMonitor());
+    waveStore.add(wave);
+    whenReady.use(x);
+  }
 }

Modified: trunk/src/main/java/cc/kune/wave/client/WebClient.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/WebClient.java	2012-01-27 15:21:03 UTC (rev 1676)
+++ trunk/src/main/java/cc/kune/wave/client/WebClient.java	2012-02-09 02:29:55 UTC (rev 1677)
@@ -378,11 +378,12 @@
   }
 
   /**
-   * Returns <code>ws://yourhost[:port]/</code>.
+   * Returns <code>ws(s)://yourhost[:port]/</code>.
    */
   // XXX check formatting wrt GPE
   private native String getWebSocketBaseUrl(String moduleBase) /*-{
-		return "ws" + /:\/\/[^\/]+/.exec(moduleBase)[0] + "/";
+		return ((window.location.protocol == "https:") ? "wss" : "ws")
+				+ /:\/\/[^\/]+/.exec(moduleBase)[0] + "/";
   }-*/;
 
   @Override

Modified: trunk/src/main/resources/wave-server.properties
===================================================================
--- trunk/src/main/resources/wave-server.properties	2012-01-27 15:21:03 UTC (rev 1676)
+++ trunk/src/main/resources/wave-server.properties	2012-02-09 02:29:55 UTC (rev 1677)
@@ -96,3 +96,17 @@
 
 # Set true to disable the verification of signers (certificates)
 waveserver_disable_signer_verification = true
+
+# Set true to prevent anyone registering on your server.
+# When true, only the admin user can use the RegistrationRobot to add new accounts
+# Default value: false
+disable_registration = false
+
+# Enable SSL for all address/port combinations listed (makes the next 2 settings non-optional)
+enable_ssl = false
+
+# Path to keystore containg the ssl certificates to server
+ssl_keystore_path = ./wiab.ks
+
+#Password to the keystore
+ssl_keystore_password = changer_me




More information about the kune-commits mailing list