[kune-commits] r1305 - in trunk: . src/main/java/cc/kune/client src/main/java/cc/kune/common/client/actions/gwtui src/main/java/cc/kune/common/client/actions/ui src/main/java/cc/kune/common/client/ui src/main/java/cc/kune/core/client/auth src/main/java/cc/kune/core/client/sn src/main/java/cc/kune/core/client/state src/main/java/cc/kune/core/server src/main/java/cc/kune/core/server/manager/impl src/main/java/cc/kune/core/server/rpc src/main/java/cc/kune/docs/server src/main/java/cc/kune/pspace/client src/main/java/cc/kune/wave/client src/main/java/cc/kune/wave/server src/main/resources src/test/java/cc/kune src/test/java/cc/kune/core/client/state src/test/java/cc/kune/core/server src/test/java/cc/kune/core/server/integration src/test/java/cc/kune/docs/server src/test/java/cc/kune/wave src/test/java/cc/kune/wave/server

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Wed Apr 6 03:22:53 CEST 2011


Author: vjrj_
Date: 2011-04-06 03:22:52 +0200 (Wed, 06 Apr 2011)
New Revision: 1305

Added:
   trunk/src/main/java/cc/kune/wave/server/KuneWaveManager.java
   trunk/src/main/java/cc/kune/wave/server/KuneWaveManagerDefault.java
   trunk/src/main/java/cc/kune/wave/server/ParticipantUtils.java
   trunk/src/test/java/cc/kune/wave/
   trunk/src/test/java/cc/kune/wave/server/
   trunk/src/test/java/cc/kune/wave/server/WaveServiceTest.java
Modified:
   trunk/
   trunk/INSTALL
   trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java
   trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java
   trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java
   trunk/src/main/java/cc/kune/core/client/auth/WaveClientSimpleAuthenticator.java
   trunk/src/main/java/cc/kune/core/client/sn/AbstractSNPanel.java
   trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java
   trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/rpc/SocialNetworkRPC.java
   trunk/src/main/java/cc/kune/docs/server/DocumentServerTool.java
   trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java
   trunk/src/main/java/cc/kune/wave/client/WaveClientManager.java
   trunk/src/main/resources/wave-server.properties
   trunk/src/test/java/cc/kune/core/client/state/StateManagerDefaultTest.java
   trunk/src/test/java/cc/kune/core/server/TestHelper.java
   trunk/src/test/java/cc/kune/core/server/integration/IntegrationTestHelper.java
   trunk/src/test/java/cc/kune/docs/server/DocumentServerToolTest.java
Log:
NEW - # 35: Spaces selector integration with login/logout and history 
http://kune.ourproject.org/issues/ticket/35


Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
   - pmd-eclipse.log
.pmd
www-test
screenlog.0
client
public
target
target-local
Main-compile
.settings
.gwt-cache
repository
derby.log
star-yellow-grey.png
run.sh
tomcat
gwt-out
synccss.sh
.externalToolBuilders
.wtpmodules
www
testRepository
kune-OLD-jcr
KuneApp.launch
KuneApp NOSERVER.launch
old_src
org.ourproject.kune.app.Kune
org.ourproject.kune.iml
org.ourproject.kune.ipr
org.ourproject.kune.iws
nbproject
hibernate.reveng.xml
.gwt-tmp
target-eclipse
.checkstyle
.classpath-bien
pom.xml.*
.gwt
.jdee_sources
.jdee_classpath
prj.el
.factorypath
.apt_generated
target.old
_accounts
_certificates

   + pmd-eclipse.log
.pmd
www-test
screenlog.0
client
public
target
target-local
Main-compile
.settings
.gwt-cache
repository
derby.log
star-yellow-grey.png
run.sh
tomcat
gwt-out
synccss.sh
.externalToolBuilders
.wtpmodules
www
testRepository
kune-OLD-jcr
KuneApp.launch
KuneApp NOSERVER.launch
old_src
org.ourproject.kune.app.Kune
org.ourproject.kune.iml
org.ourproject.kune.ipr
org.ourproject.kune.iws
nbproject
hibernate.reveng.xml
.gwt-tmp
target-eclipse
.checkstyle
.classpath-bien
pom.xml.*
.gwt
.jdee_sources
.jdee_classpath
prj.el
.factorypath
.apt_generated
target.old
_accounts
_certificates
_deltas


Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/INSTALL	2011-04-06 01:22:52 UTC (rev 1305)
@@ -240,3 +240,36 @@
 
 After the section 'Run the server for the first time' you'll be able to use the password of the admin user of the kune instalation (specified in kune.properties), or other admin new users you want to register using kune and configure in the authorizedUsernames attribute.
 
+==Appendix B: Apache configuration sample==
+
+Enable this modules:
+a2enmod expires
+a2enmod proxy
+a2enmod proxy_connect
+a2enmod proxy_http
+
+<VirtualHost *:80>
+    ServerName YOURSERVERNAME
+
+    ProxyRequests Off
+    <Proxy *>
+        Order deny,allow
+        Allow from all
+    </Proxy>
+
+    <Files *.cache.*>
+        ExpiresActive On
+        ExpiresDefault "modification plus 2 years"
+    </Files>
+
+    <Files *.nocache.*>
+        ExpiresActive Off
+    </Files> 
+
+    ProxyPass / http://localhost:8080/
+    ProxyPassReverse / http://localhost:8080/
+    <Location />
+        Order allow,deny
+        Allow from all
+    </Location>
+</VirtualHost>

Modified: trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneEntryPoint.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/client/KuneEntryPoint.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -71,7 +71,6 @@
         ginjector.getCorePresenter().get().forceReveal();
         ginjector.getOnAppStartFactory();
         ginjector.getStateManager();
-        ginjector.getSiteTokenListeners();
         ginjector.getGwtGuiProvider();
         ginjector.getUserNotifierPresenter();
         ginjector.getSpinerPresenter();

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -41,6 +41,11 @@
     }
 
     @Override
+    protected void clearStyles() {
+        iconLabel.setStyleName("k-none");
+    }
+
+    @Override
     public AbstractGuiItem create(final GuiActionDescrip descriptor) {
         super.descriptor = descriptor;
         iconLabel = new IconLabel("");

Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -54,7 +54,7 @@
 
     protected void clearStyles() {
         if (super.isOrWasAttached()) {
-            super.setStyleName("");
+            super.setStyleName("k-none");
         }
     }
 

Modified: trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -137,6 +137,11 @@
     }
 
     @Override
+    public void setStyleName(final String style) {
+        flow.setStyleName(style);
+    }
+
+    @Override
     public void setText(final String text) {
         label.setText(text);
     }

Modified: trunk/src/main/java/cc/kune/core/client/auth/WaveClientSimpleAuthenticator.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/WaveClientSimpleAuthenticator.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/core/client/auth/WaveClientSimpleAuthenticator.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -53,7 +53,7 @@
 
     public void doLogout(final AsyncCallback<Void> callback) {
         // Original: <a href=\"/auth/signout?r=/\">"
-        final RequestBuilder request = new RequestBuilder(RequestBuilder.POST, "/auth/signout");
+        final RequestBuilder request = new RequestBuilder(RequestBuilder.GET, "/auth/signout");
         try {
             request.setHeader("Content-Type", "application/x-www-form-urlencoded");
             final StringBuffer params = new StringBuffer();

Modified: trunk/src/main/java/cc/kune/core/client/sn/AbstractSNPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/AbstractSNPanel.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/core/client/sn/AbstractSNPanel.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -58,7 +58,6 @@
     FlowPanel mainPanel;
     @UiField
     Label mainTitle;
-    String NOAVATAR = "";
     @UiField
     Label sndCategoryCount;
     @UiField

Modified: trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -19,11 +19,11 @@
  */
 package cc.kune.core.client.state;
 
+import java.util.HashMap;
+
 import cc.kune.core.client.auth.Register;
 import cc.kune.core.client.auth.SignIn;
 import cc.kune.core.client.groups.newgroup.NewGroup;
-import cc.kune.core.client.init.AppStartEvent;
-import cc.kune.core.client.init.AppStartEvent.AppStartHandler;
 import cc.kune.core.client.sitebar.AboutKuneDialog;
 import cc.kune.core.client.sitebar.spaces.Space;
 import cc.kune.core.client.sitebar.spaces.SpaceSelectEvent;
@@ -31,69 +31,58 @@
 import com.google.gwt.event.shared.EventBus;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
-import com.google.inject.Singleton;
 
- at Singleton
-public class SiteTokenListeners {
+public class SiteTokenListeners extends HashMap<String, HistoryTokenCallback> {
     private final Provider<AboutKuneDialog> aboutKuneDialog;
     private final EventBus eventBus;
     private final Provider<NewGroup> newGroup;
     private final Provider<Register> register;
     private final Provider<SignIn> signIn;
-    private final Provider<StateManager> stateManager;
 
     @Inject
-    public SiteTokenListeners(final Session session, final EventBus eventBus,
-            final Provider<StateManager> stateManager, final Provider<SignIn> signIn,
+    public SiteTokenListeners(final Session session, final EventBus eventBus, final Provider<SignIn> signIn,
             final Provider<Register> register, final Provider<NewGroup> newGroup,
             final Provider<AboutKuneDialog> aboutKuneDialog) {
         this.eventBus = eventBus;
-        this.stateManager = stateManager;
         this.signIn = signIn;
         this.register = register;
         this.newGroup = newGroup;
         this.aboutKuneDialog = aboutKuneDialog;
         init();
-        session.onAppStart(true, new AppStartHandler() {
-            @Override
-            public void onAppStart(final AppStartEvent event) {
-            }
-        });
-
     }
 
     private void init() {
-        stateManager.get().addSiteToken(SiteTokens.HOME, new HistoryTokenCallback() {
+        put(SiteTokens.HOME, new HistoryTokenCallback() {
             @Override
             public void onHistoryToken() {
                 SpaceSelectEvent.fire(eventBus, Space.homeSpace);
             }
         });
-        stateManager.get().addSiteToken(SiteTokens.WAVEINBOX, new HistoryTokenCallback() {
+        put(SiteTokens.WAVEINBOX, new HistoryTokenCallback() {
             @Override
             public void onHistoryToken() {
                 SpaceSelectEvent.fire(eventBus, Space.userSpace);
             }
         });
-        stateManager.get().addSiteToken(SiteTokens.SIGNIN, new HistoryTokenCallback() {
+        put(SiteTokens.SIGNIN, new HistoryTokenCallback() {
             @Override
             public void onHistoryToken() {
                 signIn.get().showSignInDialog();
             }
         });
-        stateManager.get().addSiteToken(SiteTokens.REGISTER, new HistoryTokenCallback() {
+        put(SiteTokens.REGISTER, new HistoryTokenCallback() {
             @Override
             public void onHistoryToken() {
                 register.get().doRegister();
             }
         });
-        stateManager.get().addSiteToken(SiteTokens.NEWGROUP, new HistoryTokenCallback() {
+        put(SiteTokens.NEWGROUP, new HistoryTokenCallback() {
             @Override
             public void onHistoryToken() {
                 newGroup.get().doNewGroup();
             }
         });
-        stateManager.get().addSiteToken(SiteTokens.ABOUTKUNE, new HistoryTokenCallback() {
+        put(SiteTokens.ABOUTKUNE, new HistoryTokenCallback() {
             @Override
             public void onHistoryToken() {
                 // FIXME, something to come back

Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -20,8 +20,6 @@
  */
 package cc.kune.core.client.state;
 
-import java.util.HashMap;
-
 import org.waveprotocol.wave.util.escapers.GwtWaverefEncoder;
 
 import cc.kune.common.client.actions.BeforeActionCollection;
@@ -63,12 +61,12 @@
      */
     private String resumedHistoryToken;
     private final Session session;
-    private final HashMap<String, HistoryTokenCallback> siteTokens;
+    private final SiteTokenListeners siteTokens;
     private final TokenMatcher tokenMatcher;
 
     @Inject
     public StateManagerDefault(final ContentCache contentProvider, final Session session, final HistoryWrapper history,
-            final TokenMatcher tokenMatcher, final EventBus eventBus) {
+            final TokenMatcher tokenMatcher, final EventBus eventBus, final SiteTokenListeners siteTokens) {
         this.tokenMatcher = tokenMatcher;
         this.eventBus = eventBus;
         this.contentProvider = contentProvider;
@@ -77,33 +75,25 @@
         this.previousToken = null;
         this.resumedHistoryToken = null;
         tokenMatcher.init(GwtWaverefEncoder.INSTANCE);
-        siteTokens = new HashMap<String, HistoryTokenCallback>();
+        this.siteTokens = siteTokens;
         beforeStateChangeCollection = new BeforeActionCollection();
         session.onAppStart(true, new AppStartHandler() {
 
             @Override
             public void onAppStart(final AppStartEvent event) {
-                session.onUserSignIn(true, new UserSignInEvent.UserSignInHandler() {
+                session.onUserSignIn(false, new UserSignInEvent.UserSignInHandler() {
                     @Override
                     public void onUserSignIn(final UserSignInEvent event) {
-                        if (startingUp()) {
-                            processHistoryToken(history.getToken());
-                        } else {
-                            refreshCurrentGroupState();
-                        }
+                        refreshCurrentGroupState();
                     }
                 });
-                session.onUserSignOut(true, new UserSignOutEvent.UserSignOutHandler() {
+                session.onUserSignOut(false, new UserSignOutEvent.UserSignOutHandler() {
                     @Override
                     public void onUserSignOut(final UserSignOutEvent event) {
-                        if (startingUp()) {
-                            processHistoryToken(history.getToken());
-                        } else {
-                            // Other perms, then refresh state from server
-                            refreshCurrentGroupState();
-                        }
+                        refreshCurrentGroupState();
                     }
                 });
+                processHistoryToken(history.getToken());
             }
         });
     }

Modified: trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -20,8 +20,6 @@
 package cc.kune.core.server;
 
 import static cc.kune.core.server.OutermostCallInterceptor.outermostCall;
-
-
 import cc.kune.core.client.rpcservices.ContentService;
 import cc.kune.core.client.rpcservices.GroupService;
 import cc.kune.core.client.rpcservices.I18nService;
@@ -99,6 +97,9 @@
 import cc.kune.core.shared.i18n.I18nTranslationService;
 import cc.kune.domain.Comment;
 import cc.kune.domain.SocialNetwork;
+import cc.kune.wave.server.KuneWaveManager;
+import cc.kune.wave.server.KuneWaveManagerDefault;
+import cc.kune.wave.server.ParticipantUtils;
 
 import com.google.inject.matcher.Matchers;
 
@@ -131,6 +132,7 @@
         bind(CommentManager.class).to(CommentManagerDefault.class);
         bind(FileManager.class).to(FileManagerDefault.class);
         bind(ExtMediaDescripManager.class).to(ExtMediaDescripManagerDefault.class);
+        bind(KuneWaveManager.class).to(KuneWaveManagerDefault.class);
     }
 
     private void bindRPC() {
@@ -170,6 +172,7 @@
         bind(FileDownloadManager.class);
         bind(EntityLogoUploadManager.class);
         bind(EntityLogoDownloadManager.class);
+        bind(ParticipantUtils.class);
 
         bindInterceptor(Matchers.any(), Matchers.annotatedWith(Authenticated.class),
                 outermostCall(new AuthenticatedMethodInterceptor()));

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -33,10 +33,8 @@
 import org.apache.lucene.search.Query;
 import org.jivesoftware.smack.RosterEntry;
 import org.jivesoftware.smack.packet.RosterPacket.ItemType;
-import org.waveprotocol.box.server.CoreSettings;
 import org.waveprotocol.box.server.authentication.PasswordDigest;
 import org.waveprotocol.box.server.persistence.AccountStore;
-import org.waveprotocol.wave.model.wave.ParticipantId;
 
 import cc.kune.core.client.errors.GroupNameInUseException;
 import cc.kune.core.client.errors.I18nNotFoundException;
@@ -55,19 +53,21 @@
 import cc.kune.domain.finders.UserFinder;
 import cc.kune.domain.utils.UserBuddiesData;
 import cc.kune.wave.server.CustomUserRegistrationServlet;
+import cc.kune.wave.server.KuneWaveManager;
+import cc.kune.wave.server.ParticipantUtils;
 
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
-import com.google.inject.name.Named;
 
 @Singleton
 public class UserManagerDefault extends DefaultManager<User, Long> implements UserManager {
     private final I18nCountryManager countryManager;
-    private final String domain;
     private final UserFinder finder;
     private final I18nTranslationService i18n;
+    private final KuneWaveManager kuneWaveManager;
     private final I18nLanguageManager languageManager;
+    private final ParticipantUtils participantUtils;
     private final ChatProperties properties;
     private final AccountStore waveAccountStore;
     // private final PropertiesManager propManager;
@@ -79,7 +79,7 @@
             final I18nLanguageManager languageManager, final I18nCountryManager countryManager,
             final XmppManager xmppManager, final ChatProperties properties, final I18nTranslationService i18n,
             final CustomUserRegistrationServlet waveUserRegister, final AccountStore waveAccountStore,
-            @Named(CoreSettings.WAVE_SERVER_DOMAIN) final String domain) {
+            final KuneWaveManager kuneWaveManager, final ParticipantUtils participantUtils) {
         super(provider, User.class);
         this.finder = finder;
         this.languageManager = languageManager;
@@ -89,7 +89,8 @@
         this.i18n = i18n;
         this.waveUserRegister = waveUserRegister;
         this.waveAccountStore = waveAccountStore;
-        this.domain = domain;
+        this.kuneWaveManager = kuneWaveManager;
+        this.participantUtils = participantUtils;
     }
 
     @Override
@@ -130,11 +131,12 @@
         try {
             final User user = new User(shortName, longName, email, passwd, passwdDigest.getDigest(),
                     passwdDigest.getSalt(), language, country, tz);
+            kuneWaveManager.createWave(shortName, "Test wave");
             return user;
         } catch (final RuntimeException e) {
             try {
                 // Try to remove wave account
-                waveAccountStore.removeAccount(ParticipantId.of(shortName + ParticipantId.DOMAIN_PREFIX + domain));
+                waveAccountStore.removeAccount(participantUtils.of(shortName));
             } catch (final Exception e2) {
                 throw e;
             }

Modified: trunk/src/main/java/cc/kune/core/server/rpc/SocialNetworkRPC.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rpc/SocialNetworkRPC.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/core/server/rpc/SocialNetworkRPC.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -19,7 +19,6 @@
  */
 package cc.kune.core.server.rpc;
 
-
 import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.client.rpcservices.SocialNetworkService;
 import cc.kune.core.server.UserSession;
@@ -67,6 +66,7 @@
         final UserSession userSession = getUserSession();
         final User userLogged = userSession.getUser();
         final Group group = groupManager.findByShortName(groupToken.getGroup());
+        checkIsNotPersonalGroup(group);
         final Group groupToAccept = groupManager.findByShortName(groupToAcceptShortName);
         socialNetworkManager.acceptJoinGroup(userLogged, groupToAccept, group);
         return generateResponse(userLogged, group);
@@ -81,6 +81,7 @@
         final UserSession userSession = getUserSession();
         final User userLogged = userSession.getUser();
         final Group group = groupManager.findByShortName(groupToken.getGroup());
+        checkIsNotPersonalGroup(group);
         final Group groupToAdd = groupManager.findByShortName(groupToAddShortName);
         socialNetworkManager.addGroupToAdmins(userLogged, groupToAdd, group);
         return generateResponse(userLogged, group);
@@ -95,6 +96,7 @@
         final UserSession userSession = getUserSession();
         final User userLogged = userSession.getUser();
         final Group group = groupManager.findByShortName(groupToken.getGroup());
+        checkIsNotPersonalGroup(group);
         final Group groupToAdd = groupManager.findByShortName(groupToAddShortName);
         socialNetworkManager.addGroupToCollabs(userLogged, groupToAdd, group);
         return generateResponse(userLogged, group);
@@ -109,11 +111,19 @@
         final UserSession userSession = getUserSession();
         final User userLogged = userSession.getUser();
         final Group group = groupManager.findByShortName(groupToken.getGroup());
+        checkIsNotPersonalGroup(group);
         final Group groupToAdd = groupManager.findByShortName(groupToAddShortName);
         socialNetworkManager.addGroupToViewers(userLogged, groupToAdd, group);
         return generateResponse(userLogged, group);
     }
 
+    private void checkIsNotPersonalGroup(final Group group) {
+        if (group.isPersonal()) {
+            throw new DefaultException();
+        }
+        ;
+    }
+
     @Override
     @Authenticated
     @Authorizated(actionLevel = ActionLevel.group, accessRolRequired = AccessRol.Administrator)
@@ -123,6 +133,7 @@
         final UserSession userSession = getUserSession();
         final User userLogged = userSession.getUser();
         final Group group = groupManager.findByShortName(groupToken.getGroup());
+        checkIsNotPersonalGroup(group);
         final Group groupToDelete = groupManager.findByShortName(groupToDeleleShortName);
         socialNetworkManager.deleteMember(userLogged, groupToDelete, group);
         return generateResponse(userLogged, group);
@@ -137,6 +148,7 @@
         final UserSession userSession = getUserSession();
         final User userLogged = userSession.getUser();
         final Group group = groupManager.findByShortName(groupToken.getGroup());
+        checkIsNotPersonalGroup(group);
         final Group groupToDenyJoin = groupManager.findByShortName(groupToDenyShortName);
         socialNetworkManager.denyJoinGroup(userLogged, groupToDenyJoin, group);
         return generateResponse(userLogged, group);
@@ -171,6 +183,7 @@
         final UserSession userSession = getUserSession();
         final User user = userSession.getUser();
         final Group group = groupManager.findByShortName(groupToken.getGroup());
+        checkIsNotPersonalGroup(group);
         return socialNetworkManager.requestToJoin(user, group);
     }
 
@@ -183,6 +196,7 @@
         final UserSession userSession = getUserSession();
         final User userLogged = userSession.getUser();
         final Group group = groupManager.findByShortName(groupToken.getGroup());
+        checkIsNotPersonalGroup(group);
         final Group groupToSetCollab = groupManager.findByShortName(groupToSetCollabShortName);
         socialNetworkManager.setAdminAsCollab(userLogged, groupToSetCollab, group);
         return generateResponse(userLogged, group);
@@ -197,6 +211,7 @@
         final UserSession userSession = getUserSession();
         final User userLogged = userSession.getUser();
         final Group group = groupManager.findByShortName(groupToken.getGroup());
+        checkIsNotPersonalGroup(group);
         final Group groupToSetAdmin = groupManager.findByShortName(groupToSetAdminShortName);
         socialNetworkManager.setCollabAsAdmin(userLogged, groupToSetAdmin, group);
         return generateResponse(userLogged, group);
@@ -209,6 +224,7 @@
         final UserSession userSession = getUserSession();
         final User userLogged = userSession.getUser();
         final Group group = groupManager.findByShortName(groupToken.getGroup());
+        checkIsNotPersonalGroup(group);
         socialNetworkManager.unJoinGroup(userLogged.getUserGroup(), group);
         return generateResponse(userLogged, group);
     }

Modified: trunk/src/main/java/cc/kune/docs/server/DocumentServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/docs/server/DocumentServerTool.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/docs/server/DocumentServerTool.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -21,7 +21,6 @@
 
 import java.util.Date;
 
-
 import cc.kune.core.client.errors.ContainerNotPermittedException;
 import cc.kune.core.client.errors.ContentNotPermittedException;
 import cc.kune.core.server.content.ContainerManager;
@@ -37,53 +36,92 @@
 import cc.kune.domain.Group;
 import cc.kune.domain.ToolConfiguration;
 import cc.kune.domain.User;
+import cc.kune.wave.server.KuneWaveManager;
 
 import com.google.inject.Inject;
 
 public class DocumentServerTool implements ServerTool {
     public static final String NAME = "docs";
+    public static final String ROOT_NAME = "documents";
+    public static final String TYPE_DOCUMENT = NAME + "." + "doc";
+    public static final String TYPE_FOLDER = NAME + "." + "folder";
     public static final String TYPE_ROOT = NAME + "." + "root";
-    public static final String TYPE_FOLDER = NAME + "." + "folder";
-    public static final String TYPE_DOCUMENT = NAME + "." + "doc";
     public static final String TYPE_UPLOADEDFILE = NAME + "." + ServerTool.UPLOADEDFILE_SUFFIX;
+
     public static final String TYPE_WAVE = NAME + "." + ServerTool.WAVE_SUFFIX;
 
-    public static final String ROOT_NAME = "documents";
-
-    private final ContentManager contentManager;
     private final ToolConfigurationManager configurationManager;
     private final ContainerManager containerManager;
+    private final ContentManager contentManager;
     private final I18nTranslationService i18n;
+    private final KuneWaveManager kuneWaveManager;
 
     @Inject
     public DocumentServerTool(final ContentManager contentManager, final ContainerManager containerManager,
-            final ToolConfigurationManager configurationManager, final I18nTranslationService translationService) {
+            final ToolConfigurationManager configurationManager, final I18nTranslationService translationService,
+            final KuneWaveManager kuneWaveManager) {
         this.contentManager = contentManager;
         this.containerManager = containerManager;
         this.configurationManager = configurationManager;
         this.i18n = translationService;
+        this.kuneWaveManager = kuneWaveManager;
     }
 
+    void checkContainerTypeId(final String parentTypeId, final String typeId) {
+        if (typeId.equals(TYPE_FOLDER)) {
+            // ok valid container
+            if ((typeId.equals(TYPE_FOLDER) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))) {
+                // ok
+            } else {
+                throw new ContainerNotPermittedException();
+            }
+        } else {
+            throw new ContainerNotPermittedException();
+        }
+    }
+
+    void checkContentTypeId(final String parentTypeId, final String typeId) {
+        if (typeId.equals(TYPE_DOCUMENT) || typeId.equals(TYPE_UPLOADEDFILE) || typeId.equals(TYPE_WAVE)) {
+            // ok valid content
+            if ((typeId.equals(TYPE_DOCUMENT) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))
+                    || (typeId.equals(TYPE_WAVE) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))
+                    || (typeId.equals(TYPE_UPLOADEDFILE) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))) {
+                // ok
+            } else {
+                throw new ContentNotPermittedException();
+            }
+
+        } else {
+            throw new ContentNotPermittedException();
+        }
+    }
+
+    @Override
     public void checkTypesBeforeContainerCreation(final String parentTypeId, final String typeId) {
         checkContainerTypeId(parentTypeId, typeId);
     }
 
+    @Override
     public void checkTypesBeforeContentCreation(final String parentTypeId, final String typeId) {
         checkContentTypeId(parentTypeId, typeId);
     }
 
+    @Override
     public String getName() {
         return NAME;
     }
 
+    @Override
     public String getRootName() {
         return ROOT_NAME;
     }
 
+    @Override
     public ServerToolTarget getTarget() {
         return ServerToolTarget.forBoth;
     }
 
+    @Override
     public Group initGroup(final User user, final Group group) {
         final ToolConfiguration config = new ToolConfiguration();
         final Container rootFolder = containerManager.createRootFolder(group, NAME, ROOT_NAME, TYPE_ROOT);
@@ -99,46 +137,21 @@
         content.setStatus(ContentStatus.publishedOnline);
         content.setPublishedOn(new Date());
         group.setDefaultContent(content);
+        kuneWaveManager.createWave(user.getShortName(), i18n.t("About [%s]", longName));
         return group;
     }
 
+    @Override
     public void onCreateContainer(final Container container, final Container parent) {
     }
 
+    @Override
     public void onCreateContent(final Content content, final Container parent) {
     }
 
+    @Override
     @Inject
     public void register(final ServerToolRegistry registry) {
         registry.register(this);
     }
-
-    void checkContainerTypeId(final String parentTypeId, final String typeId) {
-        if (typeId.equals(TYPE_FOLDER)) {
-            // ok valid container
-            if ((typeId.equals(TYPE_FOLDER) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))) {
-                // ok
-            } else {
-                throw new ContainerNotPermittedException();
-            }
-        } else {
-            throw new ContainerNotPermittedException();
-        }
-    }
-
-    void checkContentTypeId(final String parentTypeId, final String typeId) {
-        if (typeId.equals(TYPE_DOCUMENT) || typeId.equals(TYPE_UPLOADEDFILE) || typeId.equals(TYPE_WAVE)) {
-            // ok valid content
-            if ((typeId.equals(TYPE_DOCUMENT) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))
-                    || (typeId.equals(TYPE_WAVE) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))
-                    || (typeId.equals(TYPE_UPLOADEDFILE) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))) {
-                // ok
-            } else {
-                throw new ContentNotPermittedException();
-            }
-
-        } else {
-            throw new ContentNotPermittedException();
-        }
-    }
 }

Modified: trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -20,6 +20,7 @@
 package cc.kune.pspace.client;
 
 import cc.kune.common.client.actions.ui.IsActionExtensible;
+import cc.kune.common.client.utils.TextUtils;
 import cc.kune.core.client.init.AppStartEvent;
 import cc.kune.core.client.state.Session;
 import cc.kune.core.client.state.StateChangedEvent;
@@ -93,19 +94,19 @@
     }
 
     private void setContentNotPublic() {
-        getView().getTitle().setText(i18n.t("Not Published yet"));
+        getView().getTitle().setText(i18n.t("Not Published yet") + TextUtils.IN_DEVELOPMENT_P);
         getView().getDescription().setText(
                 i18n.t("This is only a preview of how this page will looks like to the general public if you want to publish it"));
     }
 
     private void setContentNotPublicable() {
-        getView().getTitle().setText(i18n.t("Not Publicable"));
+        getView().getTitle().setText(i18n.t("Not Publicable") + TextUtils.IN_DEVELOPMENT_P);
         getView().getDescription().setText(i18n.t("This page is not publicable"));
         getView().setContentGotoPublicUrl("about:blank");
     }
 
     private void setContentPublic() {
-        getView().getTitle().setText(i18n.t("Preview"));
+        getView().getTitle().setText(i18n.t("Preview") + TextUtils.IN_DEVELOPMENT_P);
         getView().getDescription().setText(
                 i18n.t("This is only a preview of how this page looks like to the general public on the web, outside this site."));
     }
@@ -115,8 +116,8 @@
             final StateToken token = state.getStateToken();
             if (((StateContainerDTO) state).getAccessLists().getViewers().getMode().equals(GroupListDTO.EVERYONE)) {
                 final String publicUrl = stateTokenUtils.getPublicUrl(token);
-                getView().setContentGotoPublicUrl(publicUrl);
-                // getView().setContentGotoPublicUrl("http://www.google.com");
+                // getView().setContentGotoPublicUrl(publicUrl);
+                getView().setContentGotoPublicUrl("about:blank");
                 if (state instanceof StateContentDTO) {
                     final StateContentDTO content = (StateContentDTO) state;
                     if (content.getStatus().equals(ContentStatus.publishedOnline)) {

Modified: trunk/src/main/java/cc/kune/wave/client/WaveClientManager.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/WaveClientManager.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/java/cc/kune/wave/client/WaveClientManager.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -55,6 +55,9 @@
                 if (webClient != null) {
                     webClient.setVisible(false);
                 }
+                setUseSocketIO(false);
+                setSessionJSON(JsonUtils.safeEval("{}"));
+                setClientFlags(JsonUtils.safeEval("{}"));
             }
         });
     }

Added: trunk/src/main/java/cc/kune/wave/server/KuneWaveManager.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/server/KuneWaveManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/wave/server/KuneWaveManager.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -0,0 +1,8 @@
+package cc.kune.wave.server;
+
+
+public interface KuneWaveManager {
+
+    void createWave(String user, String message);
+
+}


Property changes on: trunk/src/main/java/cc/kune/wave/server/KuneWaveManager.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/src/main/java/cc/kune/wave/server/KuneWaveManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/server/KuneWaveManagerDefault.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/wave/server/KuneWaveManagerDefault.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -0,0 +1,83 @@
+package cc.kune.wave.server;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.waveprotocol.box.server.CoreSettings;
+import org.waveprotocol.box.server.robots.OperationContextImpl;
+import org.waveprotocol.box.server.robots.OperationServiceRegistry;
+import org.waveprotocol.box.server.robots.util.ConversationUtil;
+import org.waveprotocol.box.server.robots.util.OperationUtil;
+import org.waveprotocol.box.server.waveserver.WaveletProvider;
+import org.waveprotocol.box.server.waveserver.WaveletProvider.SubmitRequestListener;
+import org.waveprotocol.wave.model.version.HashedVersion;
+import org.waveprotocol.wave.model.wave.ParticipantId;
+
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+import com.google.wave.api.Markup;
+import com.google.wave.api.OperationQueue;
+import com.google.wave.api.OperationRequest;
+import com.google.wave.api.ProtocolVersion;
+import com.google.wave.api.Wavelet;
+import com.google.wave.api.data.converter.EventDataConverterManager;
+
+public class KuneWaveManagerDefault implements KuneWaveManager {
+    public static final Log LOG = LogFactory.getLog(KuneWaveManagerDefault.class);
+
+    private final ConversationUtil conversationUtil;
+    private final EventDataConverterManager converterManager;
+    private final String domain;
+    private final OperationServiceRegistry operationRegistry;
+    private final ParticipantUtils participantUtils;
+
+    private final WaveletProvider waveletProvider;
+
+    @Inject
+    public KuneWaveManagerDefault(final EventDataConverterManager converterManager,
+            @Named("DataApiRegistry") final OperationServiceRegistry operationRegistry,
+            final WaveletProvider waveletProvider, final ConversationUtil conversationUtil,
+            final ParticipantUtils participantUtils, @Named(CoreSettings.WAVE_SERVER_DOMAIN) final String domain) {
+        this.converterManager = converterManager;
+        this.waveletProvider = waveletProvider;
+        this.conversationUtil = conversationUtil;
+        this.operationRegistry = operationRegistry;
+        this.participantUtils = participantUtils;
+        this.domain = domain;
+    }
+
+    @Override
+    public void createWave(final String username, final String message) {
+        final ParticipantId user = participantUtils.of(username);
+        final OperationQueue opQueue = new OperationQueue();
+        final Set<String> users = new HashSet<String>();
+        users.add(user.toString());
+        final Wavelet newWavelet = opQueue.createWavelet(domain, users, message);
+        final Markup markup = Markup.of(message);
+        opQueue.createChildOfBlip(newWavelet.getRootBlip());
+        opQueue.appendBlipToWavelet(newWavelet, message);
+        opQueue.appendBlipToWavelet(newWavelet, message);
+        assert newWavelet.getRootBlip() != null;
+        final OperationContextImpl context = new OperationContextImpl(waveletProvider,
+                converterManager.getEventDataConverter(ProtocolVersion.DEFAULT), conversationUtil);
+        for (final OperationRequest req : opQueue.getPendingOperations()) {
+            OperationUtil.executeOperation(req, operationRegistry, context, user);
+            final String reqId = req.getId();
+            if (context.getResponse(reqId).isError()) {
+                LOG.error(context.getResponse(reqId).getErrorMessage());
+            }
+            OperationUtil.submitDeltas(context, waveletProvider, new SubmitRequestListener() {
+                @Override
+                public void onFailure(final String arg0) {
+                    LOG.error("Wave creation failed: " + arg0);
+                }
+
+                @Override
+                public void onSuccess(final int arg0, final HashedVersion arg1, final long arg2) {
+                }
+            });
+        }
+    }
+}


Property changes on: trunk/src/main/java/cc/kune/wave/server/KuneWaveManagerDefault.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/src/main/java/cc/kune/wave/server/ParticipantUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/server/ParticipantUtils.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/wave/server/ParticipantUtils.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -0,0 +1,34 @@
+package cc.kune.wave.server;
+
+import org.waveprotocol.box.server.CoreSettings;
+import org.waveprotocol.wave.model.wave.InvalidParticipantAddress;
+import org.waveprotocol.wave.model.wave.ParticipantId;
+
+import cc.kune.core.client.errors.DefaultException;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import com.google.inject.name.Named;
+
+ at Singleton
+public class ParticipantUtils {
+
+    private final String domain;
+
+    @Inject
+    public ParticipantUtils(@Named(CoreSettings.WAVE_SERVER_DOMAIN) final String domain) {
+        this.domain = domain;
+    }
+
+    public ParticipantId of(final String username) {
+        try {
+            if (username.contains(ParticipantId.DOMAIN_PREFIX)) {
+                return ParticipantId.of(username);
+            } else {
+                return ParticipantId.of(username + ParticipantId.DOMAIN_PREFIX + domain);
+            }
+        } catch (final InvalidParticipantAddress e) {
+            throw new DefaultException("Error getting Wave participant Id");
+        }
+    }
+}


Property changes on: trunk/src/main/java/cc/kune/wave/server/ParticipantUtils.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/src/main/resources/wave-server.properties
===================================================================
--- trunk/src/main/resources/wave-server.properties	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/main/resources/wave-server.properties	2011-04-06 01:22:52 UTC (rev 1305)
@@ -38,7 +38,7 @@
 account_store_directory = _accounts
 
 # Currently supported delta store types: memory, file
-delta_store_type = memory
+delta_store_type = file
 
 # The location where deltas are stored on disk. This should be changed.
 # Note: This is only used when using the file delta store. It is ignored

Modified: trunk/src/test/java/cc/kune/core/client/state/StateManagerDefaultTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/client/state/StateManagerDefaultTest.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/test/java/cc/kune/core/client/state/StateManagerDefaultTest.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -42,6 +42,7 @@
     private GroupChangedHandler groupChangeHandler;
     private HistoryWrapper history;
     private Session session;
+    private SiteTokenListeners siteTokens;
     private StateAbstractDTO state;
     private StateChangedHandler stateChangeHandler;
     private StateManagerDefault stateManager;
@@ -54,8 +55,9 @@
         session = Mockito.mock(Session.class);
         history = Mockito.mock(HistoryWrapper.class);
         tokenMatcher = Mockito.mock(TokenMatcher.class);
+        siteTokens = Mockito.mock(SiteTokenListeners.class);
         eventBus = new EventBusTester();
-        stateManager = new StateManagerDefault(contentProvider, session, history, tokenMatcher, eventBus);
+        stateManager = new StateManagerDefault(contentProvider, session, history, tokenMatcher, eventBus, siteTokens);
         Mockito.when(session.getUserHash()).thenReturn(HASH);
         state = Mockito.mock(StateAbstractDTO.class);
         stateChangeHandler = Mockito.mock(StateChangedHandler.class);
@@ -232,6 +234,7 @@
         final HistoryTokenCallback listener = Mockito.mock(HistoryTokenCallback.class);
         final String token = SiteTokens.SIGNIN;
         stateManager.addSiteToken(token, listener);
+        Mockito.when(siteTokens.get(SiteTokens.SIGNIN)).thenReturn(listener);
         stateManager.processHistoryToken(token);
         Mockito.verify(listener, Mockito.times(1)).onHistoryToken();
         Mockito.verify(contentProvider, Mockito.times(1)).getContent(Mockito.anyString(),
@@ -240,9 +243,10 @@
 
     @Test
     public void siteTokenTest() {
-        final HistoryTokenCallback siteTokenListener = Mockito.mock(HistoryTokenCallback.class);
-        stateManager.addSiteToken("signin", siteTokenListener);
+        final HistoryTokenCallback listener = Mockito.mock(HistoryTokenCallback.class);
+        stateManager.addSiteToken(SiteTokens.SIGNIN, listener);
+        Mockito.when(siteTokens.get(SiteTokens.SIGNIN)).thenReturn(listener);
         stateManager.processHistoryToken("signIn");
-        Mockito.verify(siteTokenListener, Mockito.times(1)).onHistoryToken();
+        Mockito.verify(listener, Mockito.times(1)).onHistoryToken();
     }
 }

Modified: trunk/src/test/java/cc/kune/core/server/TestHelper.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/TestHelper.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/test/java/cc/kune/core/server/TestHelper.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -28,6 +28,9 @@
 import org.waveprotocol.box.server.persistence.AccountStore;
 import org.waveprotocol.box.server.persistence.PersistenceException;
 import org.waveprotocol.box.server.persistence.PersistenceModule;
+import org.waveprotocol.box.server.robots.RobotApiModule;
+import org.waveprotocol.box.server.waveserver.WaveServerException;
+import org.waveprotocol.box.server.waveserver.WaveServerImpl;
 import org.waveprotocol.wave.federation.noop.NoOpFederationModule;
 
 import cc.kune.core.server.init.FinderRegistry;
@@ -54,7 +57,8 @@
             final PersistenceModule wavePersistModule = injector.getInstance(PersistenceModule.class);
             final NoOpFederationModule federationModule = injector.getInstance(NoOpFederationModule.class);
             final Injector childInjector = injector.createChildInjector(wavePersistModule, new ServerModule(false),
-                    federationModule, FinderRegistry.init(new JpaPersistModule(persistenceUnit)), module, new Module() {
+                    new RobotApiModule(), federationModule, FinderRegistry.init(new JpaPersistModule(persistenceUnit)),
+                    module, new Module() {
                         @Override
                         public void configure(final Binder binder) {
                             binder.bindScope(SessionScoped.class, Scopes.SINGLETON);
@@ -63,6 +67,11 @@
                             binder.bind(HttpServletRequest.class).to(HttpServletRequestMocked.class);
                         }
                     });
+            try {
+                childInjector.getInstance(WaveServerImpl.class).initialize();
+            } catch (final WaveServerException e) {
+                e.printStackTrace();
+            }
             final AccountStore accountStore = childInjector.getInstance(AccountStore.class);
             accountStore.initializeAccountStore();
             AccountStoreHolder.resetForTesting();

Modified: trunk/src/test/java/cc/kune/core/server/integration/IntegrationTestHelper.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/integration/IntegrationTestHelper.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/test/java/cc/kune/core/server/integration/IntegrationTestHelper.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -27,6 +27,9 @@
 import org.waveprotocol.box.server.CoreSettings;
 import org.waveprotocol.box.server.ServerModule;
 import org.waveprotocol.box.server.persistence.PersistenceModule;
+import org.waveprotocol.box.server.robots.RobotApiModule;
+import org.waveprotocol.box.server.waveserver.WaveServerException;
+import org.waveprotocol.box.server.waveserver.WaveServerImpl;
 import org.waveprotocol.wave.federation.noop.NoOpFederationModule;
 
 import cc.kune.core.server.KunePersistenceService;
@@ -55,7 +58,7 @@
             final PersistenceModule wavePersistModule = injector.getInstance(PersistenceModule.class);
             final NoOpFederationModule federationModule = injector.getInstance(NoOpFederationModule.class);
             final Injector childInjector = injector.createChildInjector(wavePersistModule,
-                    FinderRegistry.init(new JpaPersistModule(TestConstants.PERSISTENCE_UNIT)),
+                    FinderRegistry.init(new JpaPersistModule(TestConstants.PERSISTENCE_UNIT)), new RobotApiModule(),
                     new PlatformServerModule(), new DocumentServerModule(), new ChatServerModule(), new ServerModule(
                             false), federationModule, new WikiServerModule(), new AbstractModule() {
                         @Override
@@ -66,6 +69,11 @@
                             bind(HttpServletRequest.class).to(HttpServletRequestMocked.class);
                         }
                     });
+            try {
+                childInjector.getInstance(WaveServerImpl.class).initialize();
+            } catch (final WaveServerException e) {
+                e.printStackTrace();
+            }
             return childInjector;
         } catch (final ConfigurationException e) {
             e.printStackTrace();

Modified: trunk/src/test/java/cc/kune/docs/server/DocumentServerToolTest.java
===================================================================
--- trunk/src/test/java/cc/kune/docs/server/DocumentServerToolTest.java	2011-04-03 23:58:10 UTC (rev 1304)
+++ trunk/src/test/java/cc/kune/docs/server/DocumentServerToolTest.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -27,15 +27,13 @@
 import org.junit.Before;
 import org.junit.Test;
 
-import cc.kune.docs.server.DocumentServerTool;
-
 public class DocumentServerToolTest { // extends PersistenceTest {
 
     private DocumentServerTool serverTool;
 
     @Before
     public void before() {
-        serverTool = new DocumentServerTool(null, null, null, null);
+        serverTool = new DocumentServerTool(null, null, null, null, null);
     }
 
     @Test

Added: trunk/src/test/java/cc/kune/wave/server/WaveServiceTest.java
===================================================================
--- trunk/src/test/java/cc/kune/wave/server/WaveServiceTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/wave/server/WaveServiceTest.java	2011-04-06 01:22:52 UTC (rev 1305)
@@ -0,0 +1,12 @@
+package cc.kune.wave.server;
+
+import org.junit.Test;
+
+public class WaveServiceTest {
+
+    @Test
+    public void createWave() {
+        // WaveService.
+    }
+
+}


Property changes on: trunk/src/test/java/cc/kune/wave/server/WaveServiceTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the kune-commits mailing list