[kune-commits] r1139 - in trunk: . src/main/java/org/ourproject/kune/app src/main/java/org/ourproject/kune/blogs/client src/main/java/org/ourproject/kune/chat/client src/main/java/org/ourproject/kune/docs/client src/main/java/org/ourproject/kune/gallery/client src/main/java/org/ourproject/kune/platf/client/actions src/main/java/org/ourproject/kune/platf/client/actions/toolbar src/main/java/org/ourproject/kune/platf/client/actions/ui src/main/java/org/ourproject/kune/platf/client/app src/main/java/org/ourproject/kune/platf/client/rpc src/main/java/org/ourproject/kune/platf/client/services src/main/java/org/ourproject/kune/platf/client/shortcuts src/main/java/org/ourproject/kune/platf/client/state src/main/java/org/ourproject/kune/platf/client/ui/dialogs src/main/java/org/ourproject/kune/platf/client/ui/img src/main/java/org/ourproject/kune/platf/client/ui/noti src/main/java/org/ourproject/kune/platf/server src/main/java/org/ourproject/kune/platf/server/manager/file src/main/java/org/ourproject/kune/platf/server/manager/impl src/main/java/org/ourproject/kune/wiki/client src/main/java/org/ourproject/kune/workspace/client src/main/java/org/ourproject/kune/workspace/client/cnt src/main/java/org/ourproject/kune/workspace/client/cxt src/main/java/org/ourproject/kune/workspace/client/licensewizard src/main/java/org/ourproject/kune/workspace/client/newgroup src/main/java/org/ourproject/kune/workspace/client/options/tools src/main/java/org/ourproject/kune/workspace/client/signin src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign src/main/java/org/ourproject/kune/workspace/client/socialnet src/main/java/org/ourproject/kune/workspace/client/themes src/main/java/org/ourproject/kune/workspace/client/wave src/test/java/org/ourproject/kune/platf/integration src/test/java/org/ourproject/kune/platf/integration/selenium src/test/java/org/ourproject/kune/platf/integration/site src/test/java/org/ourproject/kune/platf/server src/test/java/org/ourproject/kune/platf/server/manager src/test/java/org/ourproject/kune/workspace/client src/test/java/org/ourproject/kune/workspace/client/socialnet war/WEB-INF/lib

vjrj vjrj at ourproject.org
Wed Aug 5 16:57:08 CEST 2009


Author: vjrj
Date: 2009-08-05 16:56:47 +0200 (Wed, 05 Aug 2009)
New Revision: 1139

Added:
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ChangebleObject.java
   trunk/src/main/java/org/ourproject/kune/platf/client/state/AccessRightsClientManager.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/ExtendedDialog.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/del-green.png
   trunk/src/main/java/org/ourproject/kune/workspace/client/ActionsModule.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipateAction.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolAction.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolComparator.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UIStatus.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UnjoinAction.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/wave/
   trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsert.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsertPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsertPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsertView.java
   trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/
   trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolActionTest.java
   trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolComparatorTest.java
   trunk/war/WEB-INF/lib/gwt-servlet-2.0.0-SNAPSHOT.jar
Removed:
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogExtended.java
Modified:
   trunk/TODO
   trunk/pom.xml
   trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml
   trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java
   trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java
   trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineDefault.java
   trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java
   trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
   trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java
   trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/AbstractAction.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionItem.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionManager.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionMenuItem.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPresenter.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractButtonGui.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractGuiItem.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuGui.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuItemGui.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiActionDescrip.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuCheckItemDescriptor.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuDescriptor.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuGui.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonDescriptor.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonGui.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SubMenuGui.java
   trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/client/rpc/ContentServiceAsync.java
   trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupServiceAsync.java
   trunk/src/main/java/org/ourproject/kune/platf/client/rpc/SiteService.java
   trunk/src/main/java/org/ourproject/kune/platf/client/rpc/SocialNetworkServiceAsync.java
   trunk/src/main/java/org/ourproject/kune/platf/client/rpc/UserServiceAsync.java
   trunk/src/main/java/org/ourproject/kune/platf/client/services/CoreModule.java
   trunk/src/main/java/org/ourproject/kune/platf/client/services/PlatformModule.java
   trunk/src/main/java/org/ourproject/kune/platf/client/shortcuts/GlobalShortcutRegister.java
   trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java
   trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/client/state/StateManagerDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/ImgResources.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/noti/NotifyUser.java
   trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java
   trunk/src/main/java/org/ourproject/kune/platf/server/UserSession.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/DefaultManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertiesManagerDefault.java
   trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java
   trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/FoldableContentPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextPropEditorPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/LicenseChangeAction.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManager.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/KuneSeleniumTestHelper.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java
Log:
Complete - task wave simple integration 

Complete - task guice 2.0

Incomplete - task New Actions class in SN 


Modified: trunk/TODO
===================================================================
--- trunk/TODO	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/TODO	2009-08-05 14:56:47 UTC (rev 1139)
@@ -174,8 +174,10 @@
    2007-12-21 10:35:16,197 [btpool0-5] DEBUG - ContentManagerDefault.createContent EXCEPTION => javax.persistence.Entity
 ** vjrj <v> IconHyperlink.java and IconLabel.java to gwt1.5
 
-
 * MID-TERM
+** TODO <v> Images zoom-in/out with style="cursor: url(somezoomcursor.cur);"
+http://www.w3.org/TR/SVG/interact.html#Cursors
+http://www.w3.org/TR/CSS2/ui.html
 ** TODO <v> karma, reputation, trust metrics:
 http://wiki.couchsurfing.com/en/Trust
 http://p2pfoundation.net/Trust_Metrics

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/pom.xml	2009-08-05 14:56:47 UTC (rev 1139)
@@ -12,6 +12,7 @@
   <name>kune</name>
   <url>http://kune.ourproject.org</url>
   <properties>
+    <!-- <gwtVersion>2.0.0-SNAPSHOT</gwtVersion> -->
     <gwtVersion>1.7.0</gwtVersion>
   </properties>
   <dependencies>
@@ -19,12 +20,12 @@
     <dependency>
       <groupId>com.google.code.guice</groupId>
       <artifactId>guice</artifactId>
-      <version>1.0</version>
+      <version>2.0.1</version>
     </dependency>
     <dependency>
       <groupId>com.google.code.guice</groupId>
       <artifactId>guice-servlet</artifactId>
-      <version>1.0</version>
+      <version>2.0.1</version>
     </dependency>
     <dependency>
       <groupId>aopalliance</groupId>
@@ -32,7 +33,7 @@
       <version>1.0</version>
     </dependency>
 
-    <!-- G WT deps (from central repo) -->
+    <!-- GWT deps (from central repo) -->
     <dependency>
       <groupId>com.google.gwt</groupId>
       <artifactId>gwt-servlet</artifactId>
@@ -121,8 +122,9 @@
     <dependency>
       <groupId>org.xwiki.platform</groupId>
       <artifactId>xwiki-web-gwt-dom</artifactId>
-      <version>2.0-SNAPSHOT</version>
-      <!-- <version>2.0-SNAPSHOT-g164</version> -->
+      <version>2.0-SNAPSHOT-g164</version>
+      <!-- <version>2.0-SNAPSHOT</version>  -->
+      <!-- <version>2.0-SNAPSHOT-g20s</version> -->
     </dependency>
 
     <!-- xmpp -->
@@ -208,7 +210,7 @@
     <dependency>
       <groupId>com.wideplay</groupId>
       <artifactId>warp-persist</artifactId>
-      <version>1.0.1</version>
+      <version>2.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
@@ -360,6 +362,11 @@
   </pluginRepositories>
   <repositories>
     <repository>
+      <id>guice-maven</id>
+      <name>guice maven</name>
+      <url>http://guice-maven.googlecode.com/svn/trunk</url>
+    </repository>
+    <repository>
       <id>Codehaus Snapshots</id>
       <url>http://snapshots.repository.codehaus.org/</url>
       <snapshots>
@@ -833,4 +840,4 @@
       </reporting>
     </profile>
   </profiles>
-</project>
+</project>
\ No newline at end of file

Modified: trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml	2009-08-05 14:56:47 UTC (rev 1139)
@@ -43,6 +43,11 @@
     <set-property name="log_level" value="DEBUG" />
     <set-property name="log_DivLogger" value="DISABLED" />
     <set-property name="log_FirebugLogger" value="ENABLED" />
+    <!--
+    Inspired by Apache log4j PatternLayout:
+    http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
+    -->
+    <set-configuration-property name="log_pattern" value="%d [%-5p] %m%n" />
 
     <!--
         <extend-property name="locale" values="es" />

Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -43,6 +43,7 @@
 import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
 import org.ourproject.kune.workspace.client.themes.WsBackManager;
 import org.ourproject.kune.workspace.client.upload.FileUploader;
+import org.ourproject.kune.workspace.client.wave.WaveInsert;
 
 import com.calclab.suco.client.ioc.Provider;
 
@@ -56,11 +57,12 @@
             final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
             final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
             final BlogViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
-            final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
+            final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager,
+            final Provider<WaveInsert> waveInsert) {
         super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
                 contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
                 contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
-                documentViewer, entityLogo, publicLink, wsBackManager);
+                documentViewer, entityLogo, publicLink, wsBackManager, waveInsert);
     }
 
     @Override

Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -55,6 +55,7 @@
 import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 import org.ourproject.kune.workspace.client.upload.FileUploader;
+import org.ourproject.kune.workspace.client.wave.WaveInsert;
 
 import com.calclab.suco.client.ioc.decorator.Singleton;
 import com.calclab.suco.client.ioc.module.Factory;
@@ -81,7 +82,8 @@
                         p(ContentServiceAsync.class), p(GroupServiceAsync.class), p(FileUploader.class),
                         i(ContentActionRegistry.class), i(ContextActionRegistry.class), p(FileDownloadUtils.class),
                         i(EntityHeader.class), p(ContentEditor.class), i(ErrorHandler.class), i(BlogViewer.class),
-                        p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class));
+                        p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class),
+                        p(WaveInsert.class));
             }
         });
 

Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineDefault.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineDefault.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -35,6 +35,7 @@
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.ui.WindowUtils;
 import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
+import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
 
 import com.allen_sauer.gwt.log.client.Log;
@@ -181,7 +182,7 @@
                 });
             }
         } else {
-            wskel.showAlertMessage(i18n.t("Error"), i18n.t("To join a chatroom you need to be 'online'"));
+            NotifyUser.showAlertMessage(i18n.t("Error"), i18n.t("To join a chatroom you need to be 'online'"));
         }
     }
 

Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -44,6 +44,7 @@
 import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
 import org.ourproject.kune.workspace.client.themes.WsBackManager;
 import org.ourproject.kune.workspace.client.upload.FileUploader;
+import org.ourproject.kune.workspace.client.wave.WaveInsert;
 
 import com.calclab.suco.client.ioc.Provider;
 
@@ -57,11 +58,12 @@
             final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
             final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
             final DocumentViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
-            final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
+            final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager,
+            final Provider<WaveInsert> waveInsert) {
         super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
                 contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
                 contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
-                documentViewer, entityLogo, publicLink, wsBackManager);
+                documentViewer, entityLogo, publicLink, wsBackManager, waveInsert);
     }
 
     @Override

Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -55,6 +55,7 @@
 import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 import org.ourproject.kune.workspace.client.upload.FileUploader;
+import org.ourproject.kune.workspace.client.wave.WaveInsert;
 
 import com.calclab.suco.client.ioc.decorator.Singleton;
 import com.calclab.suco.client.ioc.module.Factory;
@@ -81,7 +82,8 @@
                         p(ContentServiceAsync.class), p(GroupServiceAsync.class), p(FileUploader.class),
                         i(ContentActionRegistry.class), i(ContextActionRegistry.class), p(FileDownloadUtils.class),
                         i(EntityHeader.class), p(ContentEditor.class), i(ErrorHandler.class), i(DocumentViewer.class),
-                        p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class));
+                        p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class),
+                        p(WaveInsert.class));
             }
         });
 

Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -42,6 +42,7 @@
 import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
 import org.ourproject.kune.workspace.client.themes.WsBackManager;
 import org.ourproject.kune.workspace.client.upload.FileUploader;
+import org.ourproject.kune.workspace.client.wave.WaveInsert;
 
 import com.calclab.suco.client.ioc.Provider;
 
@@ -55,11 +56,12 @@
             final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
             final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
             final GalleryViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
-            final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
+            final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager,
+            final Provider<WaveInsert> waveInsert) {
         super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
                 contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
                 contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
-                documentViewer, entityLogo, publicLink, wsBackManager);
+                documentViewer, entityLogo, publicLink, wsBackManager, waveInsert);
     }
 
     @Override

Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -55,6 +55,7 @@
 import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 import org.ourproject.kune.workspace.client.upload.FileUploader;
+import org.ourproject.kune.workspace.client.wave.WaveInsert;
 
 import com.calclab.suco.client.ioc.decorator.Singleton;
 import com.calclab.suco.client.ioc.module.Factory;
@@ -81,7 +82,8 @@
                         p(ContentServiceAsync.class), p(GroupServiceAsync.class), p(FileUploader.class),
                         i(ContentActionRegistry.class), i(ContextActionRegistry.class), p(FileDownloadUtils.class),
                         i(EntityHeader.class), p(ContentEditor.class), i(ErrorHandler.class), i(GalleryViewer.class),
-                        p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class));
+                        p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class),
+                        p(WaveInsert.class));
             }
         });
 

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/AbstractAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/AbstractAction.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/AbstractAction.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -47,7 +47,7 @@
  * @author Andrew Selkirk
  * @author Adapted version for GWT (C) The kune development team
  */
-public abstract class AbstractAction implements Action {
+public abstract class AbstractAction extends ChangebleObject implements Action {
 
     /**
      * A flag that indicates whether or not the action is enabled.
@@ -55,16 +55,6 @@
     protected boolean enabled = true;
 
     /**
-     * Provides support for property change event notification.
-     */
-    protected PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
-
-    /**
-     * store
-     */
-    private HashMap<String, Object> store = new HashMap<String, Object>();
-
-    /**
      * Creates a new action with no properties set.
      */
     public AbstractAction() {
@@ -115,56 +105,6 @@
     }
 
     /**
-     * Registers a listener to receive {@link PropertyChangeEvent} notifications
-     * from this action.
-     * 
-     * @param listener
-     *            the listener.
-     * 
-     * @see #removePropertyChangeListener(PropertyChangeListener)
-     */
-    public void addPropertyChangeListener(final PropertyChangeListener listener) {
-        changeSupport.addPropertyChangeListener(listener);
-    }
-
-    /**
-     * Returns an array of the keys for the property values that have been
-     * defined via the {@link #putValue(String, Object)} method (or the class
-     * constructor).
-     * 
-     * @return An array of keys.
-     */
-    public Object[] getKeys() {
-        return store.keySet().toArray();
-    }
-
-    /**
-     * Returns all registered listeners.
-     * 
-     * @return An array of listeners.
-     * 
-     * @since 1.4
-     */
-    public PropertyChangeListener[] getPropertyChangeListeners() {
-        return changeSupport.getPropertyChangeListeners();
-    }
-
-    /**
-     * Returns the value associated with the specified key.
-     * 
-     * @param key
-     *            the key (not <code>null</code>).
-     * 
-     * @return The value associated with the specified key, or <code>null</code>
-     *         if the key is not found.
-     * 
-     * @see #putValue(String, Object)
-     */
-    public Object getValue(final String key) {
-        return store.get(key);
-    }
-
-    /**
      * Returns the flag that indicates whether or not the action is enabled.
      * 
      * @return The flag.
@@ -175,6 +115,7 @@
         return enabled;
     }
 
+    @Override
     /**
      * Sets the value associated with the specified key and sends a
      * {@link java.beans.PropertyChangeEvent} to all registered listeners. The
@@ -189,34 +130,18 @@
      * <li>{@link #MNEMONIC_KEY}</li>
      * </ul>
      * Any existing value associated with the key will be overwritten.
-     * 
+     *
      * @param key
      *            the key (not <code>null</code>).
      * @param value
      *            the value (<code>null</code> permitted).
      */
     public void putValue(final String key, final Object value) {
-        final Object old = getValue(key);
-        if ((old == null && value != null) || (old != null && !old.equals(value))) {
-            store.put(key, value);
-            firePropertyChange(key, old, value);
-        }
+        // TODO Auto-generated method stub
+        super.putValue(key, value);
     }
 
     /**
-     * Deregisters a listener so that it no longer receives
-     * {@link PropertyChangeEvent} notifications from this action.
-     * 
-     * @param listener
-     *            the listener.
-     * 
-     * @see #addPropertyChangeListener(PropertyChangeListener)
-     */
-    public void removePropertyChangeListener(final PropertyChangeListener listener) {
-        changeSupport.removePropertyChangeListener(listener);
-    }
-
-    /**
      * Sets the flag that indicates whether or not the action is enabled and, if
      * the value of the flag changed from the previous setting, sends a
      * {@link java.beans.PropertyChangeEvent} to all registered listeners (using
@@ -237,35 +162,4 @@
     public void setShortcut(final KeyStroke key) {
         putValue(Action.ACCELERATOR_KEY, key);
     }
-
-    /**
-     * Sends a {@link PropertyChangeEvent} for the named property to all
-     * registered listeners.
-     * 
-     * @param propertyName
-     *            the property name.
-     * @param oldValue
-     *            the old value of the property.
-     * @param newValue
-     *            the new value of the property.
-     */
-    protected void firePropertyChange(final String propertyName, final Object oldValue, final Object newValue) {
-        changeSupport.firePropertyChange(propertyName, oldValue, newValue);
-    }
-
-    /**
-     * Sends a {@link PropertyChangeEvent} for the named property to all
-     * registered listeners. This private method is called by the
-     * {@link #setEnabled(boolean)} method.
-     * 
-     * @param propertyName
-     *            the property name.
-     * @param oldValue
-     *            the old value of the property.
-     * @param newValue
-     *            the new value of the property.
-     */
-    private void firePropertyChange(final String propertyName, final boolean oldValue, final boolean newValue) {
-        changeSupport.firePropertyChange(propertyName, oldValue, newValue);
-    }
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionItem.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionItem.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionItem.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -54,12 +54,12 @@
     }
 
     public boolean mustBePressed() {
-        if (!(action instanceof ActionToolbarPushButtonDescriptor)) {
+        if (action instanceof ActionToolbarPushButtonDescriptor<?>) {
+            final ActionPressedCondition<T> mustIniPressed = ((ActionToolbarPushButtonDescriptor<T>) action).getMustInitialyPressed();
+            return mustIniPressed == null ? false : mustIniPressed.mustBePressed(getItem());
+        } else {
             Log.error("This action is not a push button");
             return false;
-        } else {
-            ActionPressedCondition<T> mustInitialyPressed = ((ActionToolbarPushButtonDescriptor<T>) action).getMustInitialyPressed();
-            return mustInitialyPressed != null ? mustInitialyPressed.mustBePressed(getItem()) : false;
         }
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionManager.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionManager.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -28,7 +28,6 @@
     public ActionManager() {
     }
 
-    @Deprecated
     public void doAction(final ActionItem<?> actionItem) {
         final ActionDescriptor<?> action = actionItem.getAction();
         final Object item = actionItem.getItem();

Added: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ChangebleObject.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ChangebleObject.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ChangebleObject.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,135 @@
+package org.ourproject.kune.platf.client.actions;
+
+import java.util.HashMap;
+
+/**
+ * A base class for implementing the {@link Action} interface.
+ * 
+ * @author Andrew Selkirk
+ * @author Adapted version for GWT (C) The kune development team
+ */
+public class ChangebleObject {
+
+    /**
+     * Provides support for property change event notification.
+     */
+    protected PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
+    /**
+     * store
+     */
+    protected HashMap<String, Object> store = new HashMap<String, Object>();
+
+    /**
+     * Registers a listener to receive {@link PropertyChangeEvent} notifications
+     * from this action.
+     * 
+     * @param listener
+     *            the listener.
+     * 
+     * @see #removePropertyChangeListener(PropertyChangeListener)
+     */
+    public void addPropertyChangeListener(final PropertyChangeListener listener) {
+        changeSupport.addPropertyChangeListener(listener);
+    }
+
+    /**
+     * Returns an array of the keys for the property values that have been
+     * defined via the {@link #putValue(String, Object)} method (or the class
+     * constructor).
+     * 
+     * @return An array of keys.
+     */
+    public Object[] getKeys() {
+        return store.keySet().toArray();
+    }
+
+    /**
+     * Returns all registered listeners.
+     * 
+     * @return An array of listeners.
+     * 
+     * @since 1.4
+     */
+    public PropertyChangeListener[] getPropertyChangeListeners() {
+        return changeSupport.getPropertyChangeListeners();
+    }
+
+    /**
+     * Returns the value associated with the specified key.
+     * 
+     * @param key
+     *            the key (not <code>null</code>).
+     * 
+     * @return The value associated with the specified key, or <code>null</code>
+     *         if the key is not found.
+     * 
+     * @see #putValue(String, Object)
+     */
+    public Object getValue(final String key) {
+        return store.get(key);
+    }
+
+    /**
+     * Sets the value associated with the specified key and sends a
+     * {@link java.beans.PropertyChangeEvent} to all registered listeners.
+     * 
+     * Any existing value associated with the key will be overwritten.
+     * 
+     * @param key
+     *            the key (not <code>null</code>).
+     * @param value
+     *            the value (<code>null</code> permitted).
+     */
+    public void putValue(final String key, final Object value) {
+        final Object old = getValue(key);
+        if ((old == null && value != null) || (old != null && !old.equals(value))) {
+            store.put(key, value);
+            firePropertyChange(key, old, value);
+        }
+    }
+
+    /**
+     * Deregisters a listener so that it no longer receives
+     * {@link PropertyChangeEvent} notifications from this action.
+     * 
+     * @param listener
+     *            the listener.
+     * 
+     * @see #addPropertyChangeListener(PropertyChangeListener)
+     */
+    public void removePropertyChangeListener(final PropertyChangeListener listener) {
+        changeSupport.removePropertyChangeListener(listener);
+    }
+
+    /**
+     * Sends a {@link PropertyChangeEvent} for the named property to all
+     * registered listeners. This private method is called by the
+     * {@link #setEnabled(boolean)} method.
+     * 
+     * @param propertyName
+     *            the property name.
+     * @param oldValue
+     *            the old value of the property.
+     * @param newValue
+     *            the new value of the property.
+     */
+    protected void firePropertyChange(final String propertyName, final boolean oldValue, final boolean newValue) {
+        changeSupport.firePropertyChange(propertyName, oldValue, newValue);
+    }
+
+    /**
+     * Sends a {@link PropertyChangeEvent} for the named property to all
+     * registered listeners.
+     * 
+     * @param propertyName
+     *            the property name.
+     * @param oldValue
+     *            the old value of the property.
+     * @param newValue
+     *            the new value of the property.
+     */
+    protected void firePropertyChange(final String propertyName, final Object oldValue, final Object newValue) {
+        changeSupport.firePropertyChange(propertyName, oldValue, newValue);
+    }
+
+}

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionMenuItem.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionMenuItem.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionMenuItem.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -18,30 +18,30 @@
 
     public ActionMenuItem(final ActionItem<T> actionItem, final String id, final Listener0 onclick) {
         final ActionToolbarMenuDescriptor<T> action = (ActionToolbarMenuDescriptor<T>) actionItem.getAction();
-        if (action instanceof ActionToolbarMenuRadioDescriptor) {
-            CheckItem checkItem = new CheckItem();
-            ActionToolbarMenuRadioDescriptor<T> radioDescriptor = (ActionToolbarMenuRadioDescriptor<T>) action;
+        if (action instanceof ActionToolbarMenuRadioDescriptor<?>) {
+            final CheckItem checkItem = new CheckItem();
+            final ActionToolbarMenuRadioDescriptor<T> radioDescriptor = (ActionToolbarMenuRadioDescriptor<T>) action;
             checkItem.setGroup(radioDescriptor.getGroup());
             checkItem.setChecked(radioDescriptor.mustBeChecked());
             item = checkItem;
-        } else if (action instanceof ActionToolbarMenuCheckItemDescriptor) {
-            CheckItem checkItem = new CheckItem();
-            ActionToolbarMenuCheckItemDescriptor<T> checkItemDescriptor = (ActionToolbarMenuCheckItemDescriptor<T>) action;
+        } else if (action instanceof ActionToolbarMenuCheckItemDescriptor<?>) {
+            final CheckItem checkItem = new CheckItem();
+            final ActionToolbarMenuCheckItemDescriptor<T> checkItemDescriptor = (ActionToolbarMenuCheckItemDescriptor<T>) action;
             checkItem.setChecked(checkItemDescriptor.getMustBeChecked().mustBeChecked());
             item = checkItem;
         } else {
             item = new Item();
         }
         item.setText(genMenuItemText(action));
-        BaseItemListenerAdapter clickListener = new BaseItemListenerAdapter() {
+        final BaseItemListenerAdapter clickListener = new BaseItemListenerAdapter() {
             @Override
             public void onClick(final BaseItem item, final EventObject e) {
                 onclick.onEvent();
             }
         };
         item.addListener(clickListener);
-        String iconCls = action.getIconCls();
-        String iconUrl = action.getIconUrl();
+        final String iconCls = action.getIconCls();
+        final String iconUrl = action.getIconUrl();
         if (iconCls != null) {
             item.setIconCls(iconCls);
         }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPresenter.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPresenter.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -132,10 +132,11 @@
     }
 
     private boolean isToolbarMenu(final ActionDescriptor<T> action) {
-        return action instanceof ActionToolbarMenuDescriptor || action instanceof ActionToolbarMenuAndItemDescriptor;
+        return action instanceof ActionToolbarMenuDescriptor<?>
+                || action instanceof ActionToolbarMenuAndItemDescriptor<?>;
     }
 
     private boolean isToolbarPushButton(final ActionDescriptor<T> action) {
-        return action instanceof ActionToolbarPushButtonDescriptor;
+        return action instanceof ActionToolbarPushButtonDescriptor<?>;
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractButtonGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractButtonGui.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractButtonGui.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -17,7 +17,7 @@
     }
 
     public AbstractButtonGui(final ButtonDescriptor buttonDescriptor, final boolean enableTongle) {
-        super();
+        super(buttonDescriptor);
         button = new Button();
         button.setEnableToggle(enableTongle);
         final String id = buttonDescriptor.getId();
@@ -28,12 +28,12 @@
         button.addListener(new ButtonListenerAdapter() {
             @Override
             public void onClick(final Button button, final EventObject event) {
-                if (action != null) {
-                    action.actionPerformed(new ActionEvent(button, event.getBrowserEvent()));
+                if (getAction() != null) {
+                    getAction().actionPerformed(new ActionEvent(button, event.getBrowserEvent()));
                 }
             }
         });
-        setAction(buttonDescriptor.action);
+        configureItemFromProperties();
     }
 
     @Override
@@ -58,7 +58,7 @@
 
     @Override
     public void setToolTipText(final String tooltip) {
-        final KeyStroke key = (KeyStroke) action.getValue(Action.ACCELERATOR_KEY);
+        final KeyStroke key = (KeyStroke) descriptor.getValue(Action.ACCELERATOR_KEY);
         if (key == null) {
             button.setTooltip(tooltip);
         } else {

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractGuiItem.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractGuiItem.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractGuiItem.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -12,104 +12,70 @@
 
 public abstract class AbstractGuiItem extends Composite implements View {
 
-    protected AbstractAction action;
+    protected final GuiActionDescrip descriptor;
 
+    public AbstractGuiItem(final GuiActionDescrip descriptor) {
+        super();
+        this.descriptor = descriptor;
+    }
+
     /**
-     * Listener the button uses to receive PropertyChangeEvents from its Action.
+     * Sets the item properties from the stored values
      */
-    protected PropertyChangeListener changeListener;
+    public void configureItemFromProperties() {
+        configure();
+    }
 
-    public void setAction(final AbstractAction newaction) {
-        if (action != null) {
-            action.removePropertyChangeListener(changeListener);
-            // removeActionListener(action);
-            if (changeListener != null) {
-                action.removePropertyChangeListener(changeListener);
-                // @PMD:REVIEWED:NullAssignment: by vjrj on 24/05/09 20:05
-                changeListener = null;
-            }
-        }
+    public AbstractAction getAction() {
+        return descriptor.getAction();
+    }
 
-        action = newaction;
-        configurePropertiesFromAction(action);
-        if (action != null) {
-            changeListener = createActionPropertyChangeListener(newaction);
-            action.addPropertyChangeListener(changeListener);
-            // addActionListener(action);
-        }
+    protected abstract void setEnabled(boolean enabled);
+
+    protected abstract void setIconStyle(String style);
+
+    protected abstract void setIconUrl(String iconUrl);
+
+    protected abstract void setText(String text);
+
+    protected abstract void setToolTipText(String text);
+
+    private void configure() {
+        configureProperties();
+        final PropertyChangeListener changeListener = createActionPropertyChangeListener();
+        descriptor.getAction().addPropertyChangeListener(changeListener);
+        descriptor.addPropertyChangeListener(changeListener);
     }
 
-    protected void configurePropertiesFromAction(final Action action) {
-        configurePropertiesFromActionImpl(action);
+    private void configureProperties() {
+        setText((String) (descriptor.getValue(Action.NAME)));
+        setIcon(descriptor.getValue(Action.SMALL_ICON));
+        setEnabled((Boolean) descriptor.getValue(AbstractAction.ENABLED));
+        setToolTipText((String) (descriptor.getValue(Action.SHORT_DESCRIPTION)));
+        setVisible((Boolean) descriptor.getValue(GuiActionDescrip.VISIBLE));
     }
 
-    protected PropertyChangeListener createActionPropertyChangeListener(final Action action) {
+    private PropertyChangeListener createActionPropertyChangeListener() {
         return new PropertyChangeListener() {
             public void propertyChange(final PropertyChangeEvent event) {
-                final Action act = (Action) (event.getSource());
+                final Object newValue = event.getNewValue();
                 if (event.getPropertyName().equals(Action.ENABLED)) {
-                    setEnabled(act.isEnabled());
+                    setEnabled((Boolean) newValue);
                 } else if (event.getPropertyName().equals(Action.NAME)) {
-                    setText((String) (act.getValue(Action.NAME)));
+                    setText((String) newValue);
                 } else if (event.getPropertyName().equals(Action.SMALL_ICON)) {
-                    setIcon(action.getValue(Action.SMALL_ICON));
+                    setIcon(newValue);
                 } else if (event.getPropertyName().equals(Action.SHORT_DESCRIPTION)) {
-                    setToolTipText((String) (act.getValue(Action.SHORT_DESCRIPTION)));
+                    setToolTipText((String) newValue);
                 } else if (event.getPropertyName().equals(GuiActionDescrip.VISIBLE)) {
-                    setVisible(act);
+                    setVisible((Boolean) newValue);
                 }
-                // else if (e.getPropertyName().equals(Action.MNEMONIC_KEY)) {
-                // if (act.getValue(Action.MNEMONIC_KEY) != null) {
-                // setMnemonic(((Integer) (act.getValue(Action.MNEMONIC_KEY)))
-                // .intValue());
-                // } else if
-                // (e.getPropertyName().equals(Action.ACTION_COMMAND_KEY)) {
-                // setActionCommand((String)
-                // (act.getValue(Action.ACTION_COMMAND_KEY)));
-                // }
-                // }
             }
         };
     }
 
-    protected abstract void setEnabled(boolean enabled);
-
-    protected abstract void setIconStyle(String style);
-
-    protected abstract void setIconUrl(String iconUrl);
-
-    protected abstract void setText(String text);
-
-    protected abstract void setToolTipText(String text);
-
-    private void configurePropertiesFromActionImpl(final Action action) {
-        if (action == null) {
-            setText(null);
-            setIcon(null);
-            setEnabled(true);
-            setToolTipText(null);
-        } else {
-            setText((String) (action.getValue(Action.NAME)));
-            setIcon(action.getValue(Action.SMALL_ICON));
-            setEnabled(action.isEnabled());
-            setToolTipText((String) (action.getValue(Action.SHORT_DESCRIPTION)));
-            setVisible(action);
-            // if (a.getValue(Action.MNEMONIC_KEY) != null) {
-            // setMnemonic(((Integer)
-            // (a.getValue(Action.MNEMONIC_KEY))).intValue());
-            // }
-            // String actionCommand = (String)
-            // (a.getValue(Action.ACTION_COMMAND_KEY));
-            //
-            // // Set actionCommand to button's text by default if it is not
-            // // specified
-            // if (actionCommand != null) {
-            // setActionCommand((String)
-            // (a.getValue(Action.ACTION_COMMAND_KEY)));
-            // } else {
-            // setActionCommand(getText());
-            // }
-        }
+    private void setEnabled(final Boolean enabled) {
+        setEnabled(enabled == null ? true : enabled);
     }
 
     private void setIcon(final Object icon) {
@@ -122,8 +88,7 @@
         }
     }
 
-    private void setVisible(final Action action) {
-        final Boolean visible = (Boolean) action.getValue(GuiActionDescrip.VISIBLE);
+    private void setVisible(final Boolean visible) {
         setVisible(visible == null ? true : visible);
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuGui.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuGui.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -1,6 +1,5 @@
 package org.ourproject.kune.platf.client.actions.ui;
 
-import org.ourproject.kune.platf.client.actions.AbstractAction;
 import org.ourproject.kune.platf.client.actions.PropertyChangeEvent;
 import org.ourproject.kune.platf.client.actions.PropertyChangeListener;
 
@@ -11,8 +10,8 @@
 
     protected final Menu menu;
 
-    public AbstractMenuGui() {
-        super();
+    public AbstractMenuGui(final GuiActionDescrip descriptor) {
+        super(descriptor);
         menu = new Menu();
         menu.setShadow(true);
     }
@@ -25,14 +24,10 @@
         menu.addSeparator();
     }
 
-    public void insert(final int position, final BaseItem item) {
-        menu.insert(position, item);
-    }
-
     @Override
-    public void setAction(final AbstractAction newaction) {
-        super.setAction(newaction);
-        action.addPropertyChangeListener(new PropertyChangeListener() {
+    public void configureItemFromProperties() {
+        super.configureItemFromProperties();
+        descriptor.addPropertyChangeListener(new PropertyChangeListener() {
             public void propertyChange(final PropertyChangeEvent event) {
                 if (event.getPropertyName().equals(MenuDescriptor.MENU_CLEAR)) {
                     menu.removeAll();
@@ -41,6 +36,10 @@
         });
     }
 
+    public void insert(final int position, final BaseItem item) {
+        menu.insert(position, item);
+    }
+
     public void show(final int x, final int y) {
         menu.showAt(x, y);
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuItemGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuItemGui.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuItemGui.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -1,5 +1,6 @@
 package org.ourproject.kune.platf.client.actions.ui;
 
+import org.ourproject.kune.platf.client.actions.AbstractAction;
 import org.ourproject.kune.platf.client.actions.Action;
 import org.ourproject.kune.platf.client.actions.ActionEvent;
 import org.ourproject.kune.platf.client.actions.KeyStroke;
@@ -20,7 +21,7 @@
     private Item item;
 
     public AbstractMenuItemGui(final MenuItemDescriptor descriptor) {
-        super();
+        super(descriptor);
         if (descriptor instanceof MenuRadioItemDescriptor) {
             final CheckItem checkItem = createCheckItem(descriptor);
             checkItem.setGroup(((MenuRadioItemDescriptor) descriptor).getGroup());
@@ -41,13 +42,14 @@
         final BaseItemListenerAdapter clickListener = new BaseItemListenerAdapter() {
             @Override
             public void onClick(final BaseItem item, final EventObject event) {
+                final AbstractAction action = getAction();
                 if (action != null) {
                     action.actionPerformed(new ActionEvent(item, event.getBrowserEvent()));
                 }
             }
         };
         item.addListener(clickListener);
-        setAction(descriptor.action);
+        configureItemFromProperties();
     }
 
     @Override
@@ -82,7 +84,7 @@
     @Override
     protected void setText(final String text) {
         if (text != null) {
-            final KeyStroke key = (KeyStroke) action.getValue(Action.ACCELERATOR_KEY);
+            final KeyStroke key = (KeyStroke) descriptor.getValue(Action.ACCELERATOR_KEY);
             if (key == null) {
                 item.setText(text);
             } else {
@@ -99,7 +101,7 @@
     }
 
     private void confCheckListener(final MenuItemDescriptor descriptor, final CheckItem checkItem) {
-        descriptor.action.addPropertyChangeListener(new PropertyChangeListener() {
+        descriptor.addPropertyChangeListener(new PropertyChangeListener() {
             public void propertyChange(final PropertyChangeEvent event) {
                 if (event.getPropertyName().equals(MenuCheckItemDescriptor.CHECKED)) {
                     checkItem.setChecked((Boolean) event.getNewValue());

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiActionDescrip.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiActionDescrip.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiActionDescrip.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -4,11 +4,13 @@
 import org.ourproject.kune.platf.client.actions.AbstractAction;
 import org.ourproject.kune.platf.client.actions.Action;
 import org.ourproject.kune.platf.client.actions.ActionEvent;
+import org.ourproject.kune.platf.client.actions.ChangebleObject;
 
 /**
  * The Class AbstractUIActionDescriptor.
  */
-public abstract class GuiActionDescrip { // NOPMD by vjrj on 9/06/09 2:00
+public abstract class GuiActionDescrip extends ChangebleObject {
+
     public static final String VISIBLE = "visibleprop";
 
     protected static final int NO_POSITION = -1;
@@ -20,7 +22,7 @@
     protected GuiActionDescrip parent;
 
     /** The action. */
-    protected AbstractAction action;
+    private final AbstractAction action;
 
     /** The position where the item will be inserted. */
     private int position;
@@ -48,6 +50,10 @@
         action.actionPerformed(event);
     }
 
+    public AbstractAction getAction() {
+        return action;
+    }
+
     public GuiAddCondition getAddCondition() {
         return addCondition;
     }
@@ -81,19 +87,17 @@
 
     public abstract Class<?> getType();
 
+    @Override
     /**
-     * Returns the value associated with the specified key.
-     * 
-     * @param key
-     *            the key (not <code>null</code>).
-     * 
-     * @return The value associated with the specified key, or <code>null</code>
-     *         if the key is not found.
-     * 
-     * @see #putValue(String, Object)
+     * We try to get the gui property (for instance the name) and if it's empty we try to get the same property in actions. This permit to have several gui items with the same action but different gui properties (like text descriptions) if necessary.
      */
     public Object getValue(final String key) {
-        return action.getValue(key);
+        final Object guiValue = super.getValue(key);
+        if (guiValue == null) {
+            return action.getValue(key);
+        } else {
+            return guiValue;
+        }
     }
 
     public boolean isChild() {
@@ -109,20 +113,6 @@
         return result;
     }
 
-    /**
-     * Sets the value associated with the specified key.
-     * 
-     * Any existing value associated with the key will be overwritten.
-     * 
-     * @param key
-     *            the key (not <code>null</code>).
-     * @param value
-     *            the value (<code>null</code> permitted).
-     */
-    public void putValue(final String key, final Object value) {
-        action.putValue(key, value);
-    }
-
     public void setAddCondition(final GuiAddCondition addCondition) {
         this.addCondition = addCondition;
     }
@@ -168,8 +158,8 @@
 
     @Override
     public String toString() {
-        final String name = (String) action.getValue(Action.NAME);
-        final String tooltip = (String) action.getValue(Action.SHORT_DESCRIPTION);
+        final String name = (String) getValue(Action.NAME);
+        final String tooltip = (String) getValue(Action.SHORT_DESCRIPTION);
         return "[GuiActionDescrip: " + action.getClass() + (name == null ? "" : " " + name)
                 + (tooltip == null ? "" : " " + tooltip) + "]";
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuCheckItemDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuCheckItemDescriptor.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuCheckItemDescriptor.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -3,6 +3,7 @@
 import org.ourproject.kune.platf.client.actions.AbstractAction;
 
 public class MenuCheckItemDescriptor extends MenuItemDescriptor {
+
     public static final String CHECKED = "checked";
 
     private boolean checked = false;
@@ -23,7 +24,7 @@
     public void setChecked(final boolean checked) {
         if (checked != this.checked) {
             this.checked = checked;
-            action.putValue(CHECKED, this.checked);
+            putValue(CHECKED, this.checked);
         }
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuDescriptor.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuDescriptor.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -54,7 +54,7 @@
     public void clear() {
         // Action detects changes in values, then we fire a change (whatever) to
         // fire this method in the UI
-        action.putValue(MENU_CLEAR, !((Boolean) action.getValue(MENU_CLEAR)));
+        putValue(MENU_CLEAR, !((Boolean) getValue(MENU_CLEAR)));
     }
 
     @Override
@@ -63,7 +63,7 @@
     }
 
     public void hide() {
-        action.putValue(MENU_HIDE, !((Boolean) action.getValue(MENU_HIDE)));
+        putValue(MENU_HIDE, !((Boolean) getValue(MENU_HIDE)));
     }
 
     public boolean isStandalone() {
@@ -82,7 +82,7 @@
     }
 
     public void setText(final String text) {
-        action.putValue(Action.NAME, text);
+        putValue(Action.NAME, text);
     }
 
     /**
@@ -92,7 +92,7 @@
      *            the element id to show menu near of it
      */
     public void show(final String id) {
-        action.putValue(MENU_SHOW_ID, id);
-        action.putValue(MENU_SHOW, !((Boolean) action.getValue(MENU_SHOW)));
+        putValue(MENU_SHOW_ID, id);
+        putValue(MENU_SHOW, !((Boolean) getValue(MENU_SHOW)));
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuGui.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuGui.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -13,7 +13,7 @@
     private ToolbarButton button = null;
 
     public MenuGui(final MenuDescriptor descriptor) {
-        super();
+        super(descriptor);
         // Standalone menus are menus without and associated button in a toolbar
         // (sometimes, a menu showed in a grid, or other special widgets)
         notStandAlone = !descriptor.isStandalone();
@@ -28,15 +28,15 @@
         } else {
             initWidget(menu);
         }
-        setAction(descriptor.action);
-        descriptor.action.addPropertyChangeListener(new PropertyChangeListener() {
+        configureItemFromProperties();
+        descriptor.addPropertyChangeListener(new PropertyChangeListener() {
             public void propertyChange(final PropertyChangeEvent event) {
                 if (event.getPropertyName().equals(MenuDescriptor.MENU_HIDE)) {
                     menu.hide(true);
                 }
             }
         });
-        descriptor.action.addPropertyChangeListener(new PropertyChangeListener() {
+        descriptor.addPropertyChangeListener(new PropertyChangeListener() {
             public void propertyChange(final PropertyChangeEvent event) {
                 if (event.getPropertyName().equals(MenuDescriptor.MENU_SHOW)) {
                     menu.show(UIObject.DEBUG_ID_PREFIX + (String) descriptor.getValue(MenuDescriptor.MENU_SHOW_ID));
@@ -67,7 +67,7 @@
     public void setIconUrl(final String imageUrl) {
         if (notStandAlone) {
             button.setIcon(imageUrl);
-            if (action.getValue(Action.NAME) != null) {
+            if (descriptor.getValue(Action.NAME) != null) {
                 button.setCls("x-btn-text-icon");
             }
         }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonDescriptor.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonDescriptor.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -13,7 +13,7 @@
     }
 
     public PushButtonDescriptor(final PushButtonDescriptor button) {
-        super(button.action);
+        super(button.getAction());
         pushed = button.pushed;
     }
 
@@ -29,7 +29,7 @@
     public void setPushed(final boolean pushed) {
         if (pushed != this.pushed) {
             this.pushed = pushed;
-            action.putValue(PUSHED, this.pushed);
+            putValue(PUSHED, this.pushed);
         }
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonGui.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonGui.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -8,7 +8,7 @@
     public PushButtonGui(final PushButtonDescriptor btn) {
         super(btn, true);
         setPressed(btn.isPushed());
-        btn.action.addPropertyChangeListener(new PropertyChangeListener() {
+        btn.addPropertyChangeListener(new PropertyChangeListener() {
             public void propertyChange(final PropertyChangeEvent event) {
                 if (event.getPropertyName().equals(PushButtonDescriptor.PUSHED)) {
                     setPressed(btn.isPushed());

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SubMenuGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SubMenuGui.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SubMenuGui.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -7,10 +7,10 @@
     private final MenuItem item;
 
     public SubMenuGui(final GuiActionDescrip descriptor) {
-        super();
+        super(descriptor);
         item = new MenuItem();
         item.setMenu(menu);
-        setAction(descriptor.action);
+        configureItemFromProperties();
         // initWidget(item);
     }
 

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -20,7 +20,6 @@
 package org.ourproject.kune.platf.client.app;
 
 import org.ourproject.kune.platf.client.dto.InitDataDTO;
-import org.ourproject.kune.platf.client.rpc.SiteService;
 import org.ourproject.kune.platf.client.rpc.SiteServiceAsync;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
@@ -44,9 +43,11 @@
     private final Session session;
     private final Event0 onAppStarting;
     private final Event<ClosingEvent> onAppClosing;
+    private final SiteServiceAsync siteService;
 
-    public ApplicationDefault(final Session session) {
+    public ApplicationDefault(final Session session, final SiteServiceAsync siteService) {
         this.session = session;
+        this.siteService = siteService;
         this.onAppStarting = new Event0("onAppStarting");
         this.onAppClosing = new Event<ClosingEvent>("onAppClossing");
         Window.addWindowClosingHandler(new ClosingHandler() {
@@ -78,8 +79,7 @@
     }
 
     private void getInitData() {
-        final SiteServiceAsync server = SiteService.App.getInstance();
-        server.getInitData(session.getUserHash(), new AsyncCallback<InitDataDTO>() {
+        siteService.getInitData(session.getUserHash(), new AsyncCallback<InitDataDTO>() {
             public void onFailure(final Throwable error) {
                 RootPanel.get("kuneinitialcurtain").setVisible(false);
                 RootPanel.get("kuneloading").setVisible(false);

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/rpc/ContentServiceAsync.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/rpc/ContentServiceAsync.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/rpc/ContentServiceAsync.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -36,7 +36,7 @@
 
 public interface ContentServiceAsync {
 
-    void addAuthor(String userHash, StateToken token, String authorShortName, AsyncCallback<?> asyncCallback);
+    void addAuthor(String userHash, StateToken token, String authorShortName, AsyncCallback<Void> asyncCallback);
 
     void addComment(String userHash, StateToken token, Long parentCommentId, String commentText,
             AsyncCallback<CommentDTO> asyncCallback);
@@ -64,21 +64,21 @@
 
     void rateContent(String userHash, StateToken token, Double value, AsyncCallback<RateResultDTO> asyncCallback);
 
-    void removeAuthor(String userHash, StateToken token, String authorShortName, AsyncCallback<?> asyncCallback);
+    void removeAuthor(String userHash, StateToken token, String authorShortName, AsyncCallback<Void> asyncCallback);
 
     void renameContainer(String userHash, StateToken token, String newName,
             AsyncCallback<StateAbstractDTO> asyncCallback);
 
     void renameContent(String userHash, StateToken token, String newName, AsyncCallback<StateAbstractDTO> asyncCallback);
 
-    void save(String user, StateToken token, String content, AsyncCallback<?> asyncCallback);
+    void save(String user, StateToken token, String content, AsyncCallback<Void> asyncCallback);
 
     void setAsDefaultContent(String userHash, StateToken token, AsyncCallback<ContentSimpleDTO> asyncCallback);
 
     void setLanguage(String userHash, StateToken token, String languageCode,
             AsyncCallback<I18nLanguageDTO> asyncCallback);
 
-    void setPublishedOn(String userHash, StateToken token, Date publishedOn, AsyncCallback<?> asyncCallback);
+    void setPublishedOn(String userHash, StateToken token, Date publishedOn, AsyncCallback<Void> asyncCallback);
 
     void setStatus(String userHash, StateToken stateToken, ContentStatusDTO status,
             AsyncCallback<StateAbstractDTO> asyncCallback);

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupServiceAsync.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupServiceAsync.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupServiceAsync.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -30,9 +30,9 @@
 public interface GroupServiceAsync {
 
     void changeDefLicense(final String userHash, final StateToken groupToken, final LicenseDTO license,
-            AsyncCallback<?> asyncCallback);
+            AsyncCallback<Void> asyncCallback);
 
-    void changeGroupWsTheme(String userHash, StateToken groupToken, String theme, AsyncCallback<?> callback);
+    void changeGroupWsTheme(String userHash, StateToken groupToken, String theme, AsyncCallback<Void> callback);
 
     void clearGroupBackImage(String userHash, StateToken token, AsyncCallback<GroupDTO> asyncCallback);
 
@@ -44,12 +44,12 @@
     void setGroupBackImage(String userHash, StateToken token, AsyncCallback<GroupDTO> asyncCallback);
 
     void setGroupNewMembersJoiningPolicy(String userHash, StateToken groupToken, AdmissionTypeDTO admissionPolicy,
-            AsyncCallback<?> asyncCallback);
+            AsyncCallback<Void> asyncCallback);
 
     void setSocialNetworkVisibility(String userHash, StateToken token, SocialNetworkVisibilityDTO visibility,
-            AsyncCallback<?> asyncCallback);
+            AsyncCallback<Void> asyncCallback);
 
     void setToolEnabled(String userHash, StateToken groupToken, String toolName, boolean enabled,
-            AsyncCallback<?> asyncCallback);
+            AsyncCallback<Void> asyncCallback);
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/rpc/SiteService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/rpc/SiteService.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/rpc/SiteService.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -22,25 +22,10 @@
 import org.ourproject.kune.platf.client.dto.InitDataDTO;
 import org.ourproject.kune.platf.client.errors.DefaultException;
 
-import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.rpc.RemoteService;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
 
 public interface SiteService extends RemoteService {
 
-    public class App {
-        private static SiteServiceAsync ourInstance = null;
-
-        public static synchronized SiteServiceAsync getInstance() {
-            if (ourInstance == null) {
-                ourInstance = (SiteServiceAsync) GWT.create(SiteService.class);
-                ((ServiceDefTarget) ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL() + "SiteService");
-            }
-            return ourInstance;
-        }
-
-    }
-
     InitDataDTO getInitData(String userHash) throws DefaultException;
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/rpc/SocialNetworkServiceAsync.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/rpc/SocialNetworkServiceAsync.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/rpc/SocialNetworkServiceAsync.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -20,6 +20,7 @@
 package org.ourproject.kune.platf.client.rpc;
 
 import org.ourproject.kune.platf.client.dto.SocialNetworkDataDTO;
+import org.ourproject.kune.platf.client.dto.SocialNetworkRequestResult;
 import org.ourproject.kune.platf.client.dto.StateToken;
 
 import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -46,7 +47,7 @@
 
     void getSocialNetwork(String hash, StateToken groupToken, AsyncCallback<SocialNetworkDataDTO> callback);
 
-    void requestJoinGroup(String hash, StateToken groupToken, AsyncCallback<?> callback);
+    void requestJoinGroup(String hash, StateToken groupToken, AsyncCallback<SocialNetworkRequestResult> callback);
 
     void setAdminAsCollab(String hash, StateToken groupToken, String groupToSetCollabShortName,
             AsyncCallback<SocialNetworkDataDTO> callback);

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/rpc/UserServiceAsync.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/rpc/UserServiceAsync.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/rpc/UserServiceAsync.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -30,17 +30,17 @@
 
     void createUser(UserDTO user, boolean wantPersonalHomepage, AsyncCallback<UserInfoDTO> asyncCallback);
 
-    void getUserAvatarBaser64(String userHash, StateToken userToken, AsyncCallback<?> asyncCallback);
+    void getUserAvatarBaser64(String userHash, StateToken userToken, AsyncCallback<String> asyncCallback);
 
     void login(String nickOrEmail, String passwd, AsyncCallback<UserInfoDTO> asyncCallback);
 
-    void logout(String userHash, AsyncCallback<?> asyncCallback);
+    void logout(String userHash, AsyncCallback<Void> asyncCallback);
 
-    void onlyCheckSession(String userHash, AsyncCallback<?> asyncCallback);
+    void onlyCheckSession(String userHash, AsyncCallback<Void> asyncCallback);
 
     void reloadUserInfo(String userHash, AsyncCallback<UserInfoDTO> asyncCallback);
 
     void setBuddiesVisibility(String userHash, StateToken groupToken, UserBuddiesVisibilityDTO visibility,
-            AsyncCallback<?> asyncCallback);
+            AsyncCallback<Void> asyncCallback);
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/CoreModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/CoreModule.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/CoreModule.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -29,6 +29,8 @@
 import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
 import org.ourproject.kune.platf.client.rpc.I18nService;
 import org.ourproject.kune.platf.client.rpc.I18nServiceAsync;
+import org.ourproject.kune.platf.client.rpc.SiteService;
+import org.ourproject.kune.platf.client.rpc.SiteServiceAsync;
 import org.ourproject.kune.platf.client.rpc.UserService;
 import org.ourproject.kune.platf.client.rpc.UserServiceAsync;
 import org.ourproject.kune.platf.client.state.ContentProvider;
@@ -80,6 +82,13 @@
                 ((ServiceDefTarget) service).setServiceEntryPoint(GWT.getModuleBaseURL() + "UserService");
                 return service;
             }
+        }, new Factory<SiteServiceAsync>(SiteServiceAsync.class) {
+            @Override
+            public SiteServiceAsync create() {
+                final SiteServiceAsync service = (SiteServiceAsync) GWT.create(SiteService.class);
+                ((ServiceDefTarget) service).setServiceEntryPoint(GWT.getModuleBaseURL() + "SiteService");
+                return service;
+            }
         });
 
         register(Singleton.class, new Factory<I18nUITranslationService>(I18nUITranslationService.class) {

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/PlatformModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/PlatformModule.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/PlatformModule.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -29,7 +29,9 @@
 import org.ourproject.kune.platf.client.i18n.I18nUITranslationService;
 import org.ourproject.kune.platf.client.i18n.Resources;
 import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
+import org.ourproject.kune.platf.client.rpc.SiteServiceAsync;
 import org.ourproject.kune.platf.client.shortcuts.GlobalShortcutRegister;
+import org.ourproject.kune.platf.client.state.AccessRightsClientManager;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.platf.client.ui.QuickTipsHelper;
@@ -179,7 +181,7 @@
         register(Singleton.class, new Factory<Application>(Application.class) {
             @Override
             public Application create() {
-                return new ApplicationDefault(i(Session.class));
+                return new ApplicationDefault(i(Session.class), i(SiteServiceAsync.class));
             }
         });
 
@@ -457,6 +459,13 @@
             }
         });
 
+        register(Singleton.class, new Factory<AccessRightsClientManager>(AccessRightsClientManager.class) {
+            @Override
+            public AccessRightsClientManager create() {
+                return new AccessRightsClientManager(i(StateManager.class));
+            }
+        });
+
         i(ApplicationComponentGroup.class).createAll();
         i(ToolGroup.class).createAll();
         i(Application.class).start();

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/shortcuts/GlobalShortcutRegister.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/shortcuts/GlobalShortcutRegister.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/shortcuts/GlobalShortcutRegister.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -2,6 +2,7 @@
 
 import org.ourproject.kune.platf.client.actions.AbstractAction;
 import org.ourproject.kune.platf.client.actions.ActionEvent;
+import org.ourproject.kune.platf.client.actions.ChangebleObject;
 import org.ourproject.kune.platf.client.actions.InputMap;
 import org.ourproject.kune.platf.client.actions.KeyStroke;
 import org.ourproject.kune.platf.client.actions.Shortcut;
@@ -50,7 +51,7 @@
 
     @Override
     public void put(final KeyStroke keystroke, final AbstractAction action) {
-        final AbstractAction previous = super.get(keystroke);
+        final ChangebleObject previous = super.get(keystroke);
         if (previous != null) {
             Log.warn("Shortcut already registed by: " + previous + "(overriding)");
         }

Added: trunk/src/main/java/org/ourproject/kune/platf/client/state/AccessRightsClientManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/state/AccessRightsClientManager.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/state/AccessRightsClientManager.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,31 @@
+package org.ourproject.kune.platf.client.state;
+
+import org.ourproject.kune.platf.client.dto.AccessRightsDTO;
+import org.ourproject.kune.platf.client.dto.StateAbstractDTO;
+
+import com.calclab.suco.client.events.Event2;
+import com.calclab.suco.client.events.Listener;
+import com.calclab.suco.client.events.Listener2;
+
+public class AccessRightsClientManager {
+    private AccessRightsDTO previousRights;
+    private final Event2<AccessRightsDTO, AccessRightsDTO> onRightsChanged;
+
+    public AccessRightsClientManager(final StateManager stateManager) {
+        this.previousRights = null;
+        this.onRightsChanged = new Event2<AccessRightsDTO, AccessRightsDTO>("onRightsChanged");
+        stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
+            public void onEvent(final StateAbstractDTO newState) {
+                final AccessRightsDTO rights = newState.getGroupRights();
+                if (!rights.equals(previousRights)) {
+                    onRightsChanged.fire(previousRights, rights);
+                    previousRights = rights;
+                }
+            }
+        });
+    }
+
+    public void onRightsChanged(final Listener2<AccessRightsDTO, AccessRightsDTO> listener) {
+        onRightsChanged.add(listener);
+    }
+}

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -67,7 +67,7 @@
 
     String USERHASH = "userHash";
 
-    void check(AsyncCallbackSimple<?> callback);
+    void check(AsyncCallbackSimple<Void> callback);
 
     StateContainerDTO getContainerState();
 
@@ -123,14 +123,14 @@
 
     Collection<ToolSimpleDTO> getUserTools();
 
-    boolean isInCurrentUserSpace();
-
     boolean inSameToken(StateToken token);
 
     boolean isCurrentStateAContent();
 
     boolean isCurrentStateAGroup();
 
+    boolean isInCurrentUserSpace();
+
     boolean isLogged();
 
     boolean isNotLogged();

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -67,7 +67,7 @@
         this.onUserSignOut = new Event0("onUserSignOut");
     }
 
-    public void check(final AsyncCallbackSimple<?> callback) {
+    public void check(final AsyncCallbackSimple<Void> callback) {
         Log.debug("Checking session (userhash: " + getUserHash() + ")");
         userServiceProvider.get().onlyCheckSession(getUserHash(), callback);
     }
@@ -189,16 +189,6 @@
         return initData.getUserTools();
     }
 
-    public boolean isInCurrentUserSpace() {
-        if (!isLogged()) {
-            return false;
-        }
-        if (getCurrentStateToken().getGroup().equals(getCurrentUser().getShortName())) {
-            return true;
-        }
-        return false;
-    }
-
     public boolean inSameToken(final StateToken token) {
         return getCurrentStateToken().equals(token);
     }
@@ -211,6 +201,16 @@
         return currentState == null ? false : !currentState.getGroup().isPersonal();
     }
 
+    public boolean isInCurrentUserSpace() {
+        if (!isLogged()) {
+            return false;
+        }
+        if (getCurrentStateToken().getGroup().equals(getCurrentUser().getShortName())) {
+            return true;
+        }
+        return false;
+    }
+
     public boolean isLogged() {
         return userHash != null;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/state/StateManagerDefault.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/state/StateManagerDefault.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -198,6 +198,7 @@
         NotifyUser.hideProgress();
         checkGroupAndToolChange(newState);
         previousToken = newState.getStateToken();
+
     }
 
     private void checkGroupAndToolChange(final StateAbstractDTO newState) {

Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogExtended.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogExtended.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogExtended.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -1,93 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.client.ui.dialogs;
-
-import com.calclab.suco.client.events.Listener0;
-import com.gwtext.client.core.EventObject;
-import com.gwtext.client.core.Ext;
-import com.gwtext.client.core.Position;
-import com.gwtext.client.widgets.Button;
-import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-import com.gwtext.client.widgets.layout.FitLayout;
-
-public class BasicDialogExtended extends BasicDialog {
-
-    private final Button cancel;
-    private final Button firstButton;
-
-    public BasicDialogExtended(final String dialogId, final String title, final boolean modal,
-            final boolean autoscroll, final int width, final int heigth, final String icon,
-            final String firstButtonTitle, final String cancelButtonTitle, final Listener0 onFirstButtonClick,
-            final Listener0 onCancelButtonClick, final int tabIndexStart) {
-        this(dialogId, title, modal, autoscroll, width, heigth, icon, firstButtonTitle, Ext.generateId(),
-                cancelButtonTitle, Ext.generateId(), onFirstButtonClick, onCancelButtonClick, tabIndexStart);
-    }
-
-    public BasicDialogExtended(final String dialogId, final String title, final boolean modal,
-            final boolean autoscroll, final int width, final int heigth, final String icon,
-            final String firstButtonTitle, final String firstButtonId, final String cancelButtonTitle,
-            final String cancelButtonId, final Listener0 onFirstButtonClick, final Listener0 onCancelButtonClick,
-            final int tabIndexStart) {
-        super(dialogId, title, modal, autoscroll, width, heigth);
-        setLayout(new FitLayout());
-        setCollapsible(false);
-        setButtonAlign(Position.RIGHT);
-        setIconCls(icon);
-
-        firstButton = new Button(firstButtonTitle);
-        firstButton.setId(firstButtonId);
-        firstButton.addListener(new ButtonListenerAdapter() {
-            @Override
-            public void onClick(final Button button, final EventObject event) {
-                onFirstButtonClick.onEvent();
-            }
-        });
-
-        firstButton.setTabIndex(tabIndexStart);
-
-        cancel = new Button(cancelButtonTitle);
-        cancel.setId(cancelButtonId);
-        cancel.addListener(new ButtonListenerAdapter() {
-            @Override
-            public void onClick(final Button button, final EventObject event) {
-                onCancelButtonClick.onEvent();
-            }
-        });
-        cancel.setTabIndex(tabIndexStart + 1);
-        addButton(firstButton);
-        addButton(cancel);
-    }
-
-    public Button getCancel() {
-        return cancel;
-    }
-
-    public Button getFirstButton() {
-        return firstButton;
-    }
-
-    public void mask(final String message) {
-        getEl().mask(message, "x-mask-loading");
-    }
-
-    public void unMask() {
-        getEl().unmask();
-    }
-}

Copied: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/ExtendedDialog.java (from rev 1121, trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogExtended.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogExtended.java	2009-06-08 14:18:03 UTC (rev 1121)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/ExtendedDialog.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,93 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.platf.client.ui.dialogs;
+
+import com.calclab.suco.client.events.Listener0;
+import com.gwtext.client.core.EventObject;
+import com.gwtext.client.core.Ext;
+import com.gwtext.client.core.Position;
+import com.gwtext.client.widgets.Button;
+import com.gwtext.client.widgets.event.ButtonListenerAdapter;
+import com.gwtext.client.widgets.layout.FitLayout;
+
+public class ExtendedDialog extends BasicDialog {
+
+    private final Button cancel;
+    private final Button firstButton;
+
+    public ExtendedDialog(final String dialogId, final String title, final boolean modal,
+            final boolean autoscroll, final int width, final int heigth, final String icon,
+            final String firstButtonTitle, final String cancelButtonTitle, final Listener0 onFirstButtonClick,
+            final Listener0 onCancelButtonClick, final int tabIndexStart) {
+        this(dialogId, title, modal, autoscroll, width, heigth, icon, firstButtonTitle, Ext.generateId(),
+                cancelButtonTitle, Ext.generateId(), onFirstButtonClick, onCancelButtonClick, tabIndexStart);
+    }
+
+    public ExtendedDialog(final String dialogId, final String title, final boolean modal,
+            final boolean autoscroll, final int width, final int heigth, final String icon,
+            final String firstButtonTitle, final String firstButtonId, final String cancelButtonTitle,
+            final String cancelButtonId, final Listener0 onFirstButtonClick, final Listener0 onCancelButtonClick,
+            final int tabIndexStart) {
+        super(dialogId, title, modal, autoscroll, width, heigth);
+        setLayout(new FitLayout());
+        setCollapsible(false);
+        setButtonAlign(Position.RIGHT);
+        setIconCls(icon);
+
+        firstButton = new Button(firstButtonTitle);
+        firstButton.setId(firstButtonId);
+        firstButton.addListener(new ButtonListenerAdapter() {
+            @Override
+            public void onClick(final Button button, final EventObject event) {
+                onFirstButtonClick.onEvent();
+            }
+        });
+
+        firstButton.setTabIndex(tabIndexStart);
+
+        cancel = new Button(cancelButtonTitle);
+        cancel.setId(cancelButtonId);
+        cancel.addListener(new ButtonListenerAdapter() {
+            @Override
+            public void onClick(final Button button, final EventObject event) {
+                onCancelButtonClick.onEvent();
+            }
+        });
+        cancel.setTabIndex(tabIndexStart + 1);
+        addButton(firstButton);
+        addButton(cancel);
+    }
+
+    public Button getCancel() {
+        return cancel;
+    }
+
+    public Button getFirstButton() {
+        return firstButton;
+    }
+
+    public void mask(final String message) {
+        getEl().mask(message, "x-mask-loading");
+    }
+
+    public void unMask() {
+        getEl().unmask();
+    }
+}

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/ImgResources.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/ImgResources.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/ImgResources.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -15,6 +15,9 @@
     @Resource("kimg.css")
     CssResource css();
 
+    @Resource("del-green.png")
+    ImageResource delGreen();
+
     @Resource("group-home.png")
     ImageResource groupHome();
 
@@ -35,5 +38,4 @@
 
     @Resource("prefs.png")
     ImageResource prefs();
-
 }
\ No newline at end of file

Added: trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/del-green.png
===================================================================
(Binary files differ)


Property changes on: trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/del-green.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/noti/NotifyUser.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/noti/NotifyUser.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/noti/NotifyUser.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -47,6 +47,15 @@
     private static Images images;
 
     public static void askConfirmation(final String confirmationTitle, final String confirmationText,
+            final Listener0 onConfirm) {
+        ON_CONFIRMATION_ASK.fire(new ConfirmationAsk(confirmationTitle, confirmationText, onConfirm, new Listener0() {
+            public void onEvent() {
+                // Do nothing
+            }
+        }));
+    }
+
+    public static void askConfirmation(final String confirmationTitle, final String confirmationText,
             final Listener0 onConfirm, final Listener0 onCancel) {
         ON_CONFIRMATION_ASK.fire(new ConfirmationAsk(confirmationTitle, confirmationText, onConfirm, onCancel));
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -124,6 +124,7 @@
         bind(KuneProperties.class).to(KunePropertiesDefault.class);
         bind(Mapper.class).to(DozerMapper.class);
         bind(ServerToolRegistry.class);
+        // bind(FileUploadManager.class).in(ServletScopes.REQUEST);
         bind(FileUploadManager.class);
         bind(FileDownloadManager.class);
         bind(EntityLogoUploadManager.class);

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/UserSession.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/UserSession.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/UserSession.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -36,24 +36,14 @@
         this.manager = manager;
     }
 
-    public void login(final User user, final String newUserHash) {
-        setUser(user);
-        setHash(newUserHash);
+    public String getHash() {
+        return userHash;
     }
 
-    public void logout() {
-        userId = null;
-        userHash = null;
-    }
-
     public User getUser() {
         return manager.find(userId);
     }
 
-    public String getHash() {
-        return userHash;
-    }
-
     public boolean isUserLoggedIn() {
         return userId != null;
     }
@@ -62,12 +52,22 @@
         return !isUserLoggedIn();
     }
 
-    private void setUser(final User user) {
-        userId = user.getId();
+    public void login(final User user, final String newUserHash) {
+        setUser(user);
+        setHash(newUserHash);
     }
 
+    public void logout() {
+        userId = null;
+        userHash = null;
+    }
+
     private void setHash(final String hash) {
         this.userHash = hash;
     }
 
+    private void setUser(final User user) {
+        userId = user.getId();
+    }
+
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManager.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManager.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -117,7 +117,7 @@
             fileUploadItem.write(file);
 
             final String mimetype = fileUploadItem.getContentType();
-            BasicMimeType basicMimeType = new BasicMimeType(mimetype);
+            final BasicMimeType basicMimeType = new BasicMimeType(mimetype);
             LOG.info("Mimetype: " + basicMimeType);
             final String extension = FileUtils.getFileNameExtension(file.getName(), false);
 
@@ -128,7 +128,7 @@
             } else if (basicMimeType.isPdf()) {
                 generateThumbs(absDir, file.getName(), "png", true);
             } else if (basicMimeType.isText()) {
-                String textPreview = new String(FileUtils.getBytesFromFile(file));
+                final String textPreview = new String(FileUtils.getBytesFromFile(file));
                 preview = "<pre>" + StringW.wordWrap(textPreview) + "</pre>";
             }
 
@@ -151,18 +151,18 @@
 
     private void generateThumbs(final String absDir, final String filename, final String extension, final boolean isPdf) {
         try {
-            String fileOrig = absDir + filename;
-            String withoutExtension = FileUtils.getFileNameWithoutExtension(filename, extension);
+            final String fileOrig = absDir + filename;
+            final String withoutExtension = FileUtils.getFileNameWithoutExtension(filename, extension);
 
-            String resizeName = absDir + withoutExtension + "." + ImageSize.sized + "." + extension;
-            String thumbName = absDir + withoutExtension + "." + ImageSize.thumb + "." + extension;
-            String iconName = absDir + withoutExtension + "." + ImageSize.ico + "." + extension;
-            String previewName = absDir + withoutExtension + "." + extension;
+            final String resizeName = absDir + withoutExtension + "." + ImageSize.sized + "." + extension;
+            final String thumbName = absDir + withoutExtension + "." + ImageSize.thumb + "." + extension;
+            final String iconName = absDir + withoutExtension + "." + ImageSize.ico + "." + extension;
+            final String previewName = absDir + withoutExtension + "." + extension;
 
-            int resizeWidth = Integer.parseInt(kuneProperties.get(KuneProperties.IMAGES_RESIZEWIDTH));
-            int thumbSize = Integer.parseInt(kuneProperties.get(KuneProperties.IMAGES_THUMBSIZE));
-            int cropSize = Integer.parseInt(kuneProperties.get(KuneProperties.IMAGES_CROPSIZE));
-            int iconSize = Integer.parseInt(kuneProperties.get(KuneProperties.IMAGES_ICONSIZE));
+            final int resizeWidth = Integer.parseInt(kuneProperties.get(KuneProperties.IMAGES_RESIZEWIDTH));
+            final int thumbSize = Integer.parseInt(kuneProperties.get(KuneProperties.IMAGES_THUMBSIZE));
+            final int cropSize = Integer.parseInt(kuneProperties.get(KuneProperties.IMAGES_CROPSIZE));
+            final int iconSize = Integer.parseInt(kuneProperties.get(KuneProperties.IMAGES_ICONSIZE));
 
             ImageUtilsDefault.scaleImageToMax(fileOrig, resizeName, resizeWidth);
             ImageUtilsDefault.createThumb(fileOrig, thumbName, thumbSize, cropSize);
@@ -170,11 +170,11 @@
             if (isPdf) {
                 ImageUtilsDefault.createThumbFromPdf(fileOrig, previewName);
             }
-        } catch (NumberFormatException e) {
+        } catch (final NumberFormatException e) {
             LOG.error("Image sizes in kune.properties are not integers", e);
-        } catch (MagickException e) {
+        } catch (final MagickException e) {
             LOG.info("Problem generating image thumb for " + filename, e);
-        } catch (FileNotFoundException e) {
+        } catch (final FileNotFoundException e) {
             LOG.info("Original image not found generating image thumb for " + filename, e);
         }
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/DefaultManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/DefaultManager.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/DefaultManager.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -76,7 +76,7 @@
     @SuppressWarnings("unchecked")
     public void reIndex() {
         // Inject this?
-        final FullTextEntityManager fullTextEm = Search.createFullTextEntityManager(getEntityManager());
+        final FullTextEntityManager fullTextEm = Search.getFullTextEntityManager(getEntityManager());
         fullTextEm.purgeAll(entityClass);
         fullTextEm.getTransaction().commit();
         fullTextEm.getTransaction().begin();
@@ -97,7 +97,7 @@
 
     @SuppressWarnings("unchecked")
     public SearchResult<T> search(final Query query, final Integer firstResult, final Integer maxResults) {
-        final FullTextQuery emQuery = Search.createFullTextEntityManager(getEntityManager()).createFullTextQuery(query,
+        final FullTextQuery emQuery = Search.getFullTextEntityManager(getEntityManager()).createFullTextQuery(query,
                 entityClass);
         if (firstResult != null && maxResults != null) {
             emQuery.setFirstResult(firstResult);

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertiesManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertiesManagerDefault.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertiesManagerDefault.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -20,14 +20,11 @@
 public class PropertiesManagerDefault extends DefaultManager<Properties, Long> implements PropertiesManager {
 
     private final Property propFinder;
-    private final Properties propsFinder;
 
     @Inject
-    public PropertiesManagerDefault(final Provider<EntityManager> provider, final Property propFinder,
-            final Properties propsFinder) {
+    public PropertiesManagerDefault(final Provider<EntityManager> provider, final Property propFinder) {
         super(provider, Properties.class);
         this.propFinder = propFinder;
-        this.propsFinder = propsFinder;
     }
 
     public HashMap<String, PropertySetted> get(final Properties properties) {

Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -43,6 +43,7 @@
 import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
 import org.ourproject.kune.workspace.client.themes.WsBackManager;
 import org.ourproject.kune.workspace.client.upload.FileUploader;
+import org.ourproject.kune.workspace.client.wave.WaveInsert;
 
 import com.calclab.suco.client.ioc.Provider;
 
@@ -56,11 +57,12 @@
             final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
             final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
             final WikiViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
-            final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
+            final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager,
+            final Provider<WaveInsert> waveInsert) {
         super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
                 contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
                 contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
-                documentViewer, entityLogo, publicLink, wsBackManager);
+                documentViewer, entityLogo, publicLink, wsBackManager, waveInsert);
     }
 
     @Override

Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -55,6 +55,7 @@
 import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 import org.ourproject.kune.workspace.client.upload.FileUploader;
+import org.ourproject.kune.workspace.client.wave.WaveInsert;
 
 import com.calclab.suco.client.ioc.decorator.Singleton;
 import com.calclab.suco.client.ioc.module.Factory;
@@ -81,7 +82,8 @@
                         p(ContentServiceAsync.class), p(GroupServiceAsync.class), p(FileUploader.class),
                         i(ContentActionRegistry.class), i(ContextActionRegistry.class), p(FileDownloadUtils.class),
                         i(EntityHeader.class), p(ContentEditor.class), i(ErrorHandler.class), i(WikiViewer.class),
-                        p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class));
+                        p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class),
+                        p(WaveInsert.class));
             }
         });
 

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -61,6 +61,7 @@
 import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
 import org.ourproject.kune.workspace.client.themes.WsBackManager;
 import org.ourproject.kune.workspace.client.upload.FileUploader;
+import org.ourproject.kune.workspace.client.wave.WaveInsert;
 
 import com.calclab.suco.client.events.Listener;
 import com.calclab.suco.client.events.Listener0;
@@ -100,6 +101,8 @@
 
     private final WsBackManager wsBackManager;
 
+    private final Provider<WaveInsert> waveInsert;
+
     public AbstractFoldableContentActions(final Session session, final StateManager stateManager,
             final I18nUITranslationService i18n, final ErrorHandler errorHandler,
             final DeferredCommandWrapper deferredCommandWrapper,
@@ -109,7 +112,8 @@
             final ContentActionRegistry contentActionRegistry, final ContextActionRegistry contextActionRegistry,
             final Provider<FileDownloadUtils> fileDownloadProvider, final Provider<ContentEditor> textEditorProvider,
             final Provider<ContextPropEditor> contextPropEditorProvider, final FoldableContent foldableContent,
-            final EntityHeader entityLogo, final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
+            final EntityHeader entityLogo, final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager,
+            final Provider<WaveInsert> waveInsert) {
         this.session = session;
         this.stateManager = stateManager;
         this.i18n = i18n;
@@ -128,6 +132,7 @@
         this.entityLogo = entityLogo;
         this.publicLink = publicLink;
         this.wsBackManager = wsBackManager;
+        this.waveInsert = waveInsert;
         createActions();
         session.onInitDataReceived(new Listener<InitDataDTO>() {
             public void onEvent(final InitDataDTO parameter) {
@@ -241,8 +246,8 @@
                 AccessRolDTO.Editor, CONTENT_TOPBAR, new Listener<StateToken>() {
                     public void onEvent(final StateToken stateToken) {
                         NotifyUser.showProgressProcessing();
-                        session.check(new AsyncCallbackSimple<Object>() {
-                            public void onSuccess(final Object result) {
+                        session.check(new AsyncCallbackSimple<Void>() {
+                            public void onSuccess(final Void result) {
                                 final ContentEditor editor = textEditorProvider.get();
                                 foldableContent.detach();
                                 contextNavigator.detach();
@@ -251,7 +256,7 @@
                                     public void onEvent(final String html) {
                                         NotifyUser.showProgressSaving();
                                         contentServiceProvider.get().save(session.getUserHash(), stateToken, html,
-                                                new AsyncCallback<Object>() {
+                                                new AsyncCallback<Void>() {
                                                     public void onFailure(final Throwable caught) {
                                                         NotifyUser.hideProgress();
                                                         if (caught instanceof SessionExpiredException) {
@@ -263,7 +268,7 @@
                                                         }
                                                     }
 
-                                                    public void onSuccess(final Object param) {
+                                                    public void onSuccess(final Void param) {
                                                         NotifyUser.hideProgress();
                                                         session.getContentState().setContent(html);
                                                         editor.onSavedSuccessful();
@@ -586,12 +591,7 @@
         final ActionToolbarMenuAndItemDescriptor<StateToken> addWave = new ActionToolbarMenuAndItemDescriptor<StateToken>(
                 AccessRolDTO.Editor, CONTEXT_TOPBAR, new Listener<StateToken>() {
                     public void onEvent(final StateToken parentToken) {
-                        contentServiceProvider.get().addWave(session.getUserHash(), parentToken, waveFileType,
-                                "wavesandbox.com!w+NdlzA9PU%B", new AsyncCallbackSimple<StateContentDTO>() {
-                                    public void onSuccess(final StateContentDTO state) {
-                                        stateManager.setRetrievedState(state);
-                                    }
-                                });
+                        waveInsert.get().show(parentToken);
                     }
                 });
         addWave.setTextDescription(i18n.t("Add Wave"));

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/ActionsModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ActionsModule.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ActionsModule.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,37 @@
+package org.ourproject.kune.workspace.client;
+
+import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
+import org.ourproject.kune.platf.client.rpc.SocialNetworkServiceAsync;
+import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
+import org.ourproject.kune.platf.client.state.AccessRightsClientManager;
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.state.StateManager;
+import org.ourproject.kune.platf.client.ui.img.ImgResources;
+import org.ourproject.kune.workspace.client.socialnet.ParticipateAction;
+import org.ourproject.kune.workspace.client.socialnet.UnjoinAction;
+
+import com.calclab.suco.client.ioc.decorator.NoDecoration;
+import com.calclab.suco.client.ioc.module.Factory;
+
+public class ActionsModule extends AbstractExtendedModule {
+    @Override
+    protected void onInstall() {
+        register(NoDecoration.class, new Factory<ParticipateAction>(ParticipateAction.class) {
+            @Override
+            public ParticipateAction create() {
+                return new ParticipateAction(i(Session.class), p(SocialNetworkServiceAsync.class),
+                        i(StateManager.class), i(AccessRightsClientManager.class), i(I18nTranslationService.class),
+                        i(ImgResources.class));
+            }
+        });
+
+        register(NoDecoration.class, new Factory<UnjoinAction>(UnjoinAction.class) {
+            @Override
+            public UnjoinAction create() {
+                return new UnjoinAction(i(Session.class), p(SocialNetworkServiceAsync.class), i(StateManager.class),
+                        i(AccessRightsClientManager.class), i(I18nTranslationService.class), i(ImgResources.class));
+            }
+        });
+
+    }
+}

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -48,6 +48,7 @@
 import org.ourproject.kune.platf.client.services.ImageUtils;
 import org.ourproject.kune.platf.client.services.Images;
 import org.ourproject.kune.platf.client.shortcuts.GlobalShortcutRegister;
+import org.ourproject.kune.platf.client.state.AccessRightsClientManager;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
@@ -254,6 +255,9 @@
 import org.ourproject.kune.workspace.client.upload.FileUploader;
 import org.ourproject.kune.workspace.client.upload.FileUploaderDialog;
 import org.ourproject.kune.workspace.client.upload.FileUploaderPresenter;
+import org.ourproject.kune.workspace.client.wave.WaveInsert;
+import org.ourproject.kune.workspace.client.wave.WaveInsertPanel;
+import org.ourproject.kune.workspace.client.wave.WaveInsertPresenter;
 
 import com.calclab.suco.client.events.Listener0;
 import com.calclab.suco.client.ioc.decorator.NoDecoration;
@@ -562,7 +566,8 @@
                         i(I18nUITranslationService.class), i(StateManager.class), i(ImageUtils.class),
                         i(Session.class), p(SocialNetworkServiceAsync.class), p(GroupServiceAsync.class),
                         p(GroupLiveSearcher.class), p(ChatEngine.class), i(GroupActionRegistry.class),
-                        i(ActionGroupSummaryToolbar.class), p(FileDownloadUtils.class));
+                        i(ActionGroupSummaryToolbar.class), p(FileDownloadUtils.class),
+                        i(AccessRightsClientManager.class), i(ImgResources.class));
                 final GroupMembersSummaryView view = new GroupMembersSummaryPanel(presenter,
                         i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), i(
                                 ActionGroupSummaryToolbar.class).getView());
@@ -586,7 +591,7 @@
                         i(Session.class), p(UserServiceAsync.class), i(UserActionRegistry.class),
                         i(I18nTranslationService.class), p(ChatEngine.class), i(ActionBuddiesSummaryToolbar.class),
                         p(FileDownloadUtils.class), i(ImageUtils.class), p(SocialNetworkServiceAsync.class),
-                        i(GroupActionRegistry.class));
+                        i(GroupActionRegistry.class), i(AccessRightsClientManager.class), i(ImgResources.class));
                 final BuddiesSummaryPanel panel = new BuddiesSummaryPanel(presenter, i(WorkspaceSkeleton.class),
                         i(I18nTranslationService.class), i(ActionManager.class),
                         i(ActionBuddiesSummaryToolbar.class).getView());
@@ -601,7 +606,8 @@
                 final ParticipationSummaryPresenter presenter = new ParticipationSummaryPresenter(
                         i(I18nUITranslationService.class), i(StateManager.class), i(ImageUtils.class),
                         i(Session.class), p(SocialNetworkServiceAsync.class), i(GroupActionRegistry.class),
-                        i(ActionParticipationToolbar.class), p(FileDownloadUtils.class));
+                        i(ActionParticipationToolbar.class), p(FileDownloadUtils.class),
+                        i(AccessRightsClientManager.class), i(ImgResources.class));
                 final ParticipationSummaryView view = new ParticipationSummaryPanel(presenter,
                         i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), i(
                                 ActionParticipationToolbar.class).getView());
@@ -1105,6 +1111,18 @@
             }
         });
 
+        register(Singleton.class, new Factory<WaveInsert>(WaveInsert.class) {
+            @Override
+            public WaveInsert create() {
+                final WaveInsertPresenter presenter = new WaveInsertPresenter(i(Session.class), i(StateManager.class),
+                        i(I18nTranslationService.class), p(ContentServiceAsync.class));
+                final WaveInsertPanel panel = new WaveInsertPanel(presenter, i(I18nTranslationService.class),
+                        i(ImgResources.class));
+                presenter.init(panel);
+                return presenter;
+            }
+        });
+
         i(GlobalShortcutRegister.class).enable();
     }
 

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/FoldableContentPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/FoldableContentPanel.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/FoldableContentPanel.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -102,7 +102,7 @@
             }
         });
         waveWidget.loadWave(waveId);
-        setContent(waveWidget);
+        setWidgetAsContent(waveWidget, false);
     }
 
     public void setWidgetAsContent(final Widget widget, final boolean setDefMargins) {

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextPropEditorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextPropEditorPresenter.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextPropEditorPresenter.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -50,7 +50,7 @@
     private final ContentCapabilitiesRegistry capabilitiesRegistry;
 
     public ContextPropEditorPresenter(final Session session, final StateManager stateManager,
-            ContentCapabilitiesRegistry capabilitiesRegistry, final Provider<TagsSummary> tagsSummaryProvider,
+            final ContentCapabilitiesRegistry capabilitiesRegistry, final Provider<TagsSummary> tagsSummaryProvider,
             final Provider<ContentServiceAsync> contentServiceProvider, final EntitySubTitle entitySubTitle) {
         this.session = session;
         this.stateManager = stateManager;
@@ -64,8 +64,8 @@
         NotifyUser.showProgressProcessing();
         final StateContainerDTO currentState = session.getContentState();
         contentServiceProvider.get().addAuthor(session.getUserHash(), currentState.getStateToken(), authorShortName,
-                new AsyncCallbackSimple<Object>() {
-                    public void onSuccess(final Object result) {
+                new AsyncCallbackSimple<Void>() {
+                    public void onSuccess(final Void result) {
                         NotifyUser.hideProgress();
                         stateManager.reload();
                     }
@@ -84,8 +84,8 @@
         NotifyUser.showProgressProcessing();
         final StateContainerDTO currentState = session.getContentState();
         contentServiceProvider.get().removeAuthor(session.getUserHash(), currentState.getStateToken(), authorShortName,
-                new AsyncCallbackSimple<Object>() {
-                    public void onSuccess(final Object result) {
+                new AsyncCallbackSimple<Void>() {
+                    public void onSuccess(final Void result) {
                         NotifyUser.hideProgress();
                         stateManager.reload();
                     }
@@ -115,8 +115,8 @@
         NotifyUser.showProgressProcessing();
         final StateContainerDTO currentState = session.getContentState();
         contentServiceProvider.get().setPublishedOn(session.getUserHash(), currentState.getStateToken(), publishedOn,
-                new AsyncCallbackSimple<Object>() {
-                    public void onSuccess(final Object result) {
+                new AsyncCallbackSimple<Void>() {
+                    public void onSuccess(final Void result) {
                         NotifyUser.hideProgress();
                         entitySubTitle.setContentDate(publishedOn);
                     }
@@ -131,7 +131,7 @@
         final String tags = state.getTags();
         final List<UserSimpleDTO> authors = state.getAuthors();
 
-        String typeId = state.getTypeId();
+        final String typeId = state.getTypeId();
         if (capabilitiesRegistry.isTranslatable(typeId)) {
             assert (language != null);
             view.setLanguage(language);

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/LicenseChangeAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/LicenseChangeAction.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/LicenseChangeAction.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -47,13 +47,13 @@
 
     public void changeLicense(final StateToken token, final LicenseDTO license, final Listener0 onSuccess) {
         NotifyUser.showProgressProcessing();
-        groupService.get().changeDefLicense(session.getUserHash(), token, license, new AsyncCallback<Object>() {
+        groupService.get().changeDefLicense(session.getUserHash(), token, license, new AsyncCallback<Void>() {
             public void onFailure(final Throwable caught) {
                 NotifyUser.hideProgress();
                 NotifyUser.error(i18n.t("Error changing default group license"));
             }
 
-            public void onSuccess(final Object result) {
+            public void onSuccess(final Void result) {
                 stateManager.reload();
                 onSuccess.onEvent();
             }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -24,7 +24,7 @@
 import org.ourproject.kune.platf.client.services.Images;
 import org.ourproject.kune.platf.client.ui.KuneUiUtils;
 import org.ourproject.kune.platf.client.ui.KuneWindowUtils;
-import org.ourproject.kune.platf.client.ui.dialogs.BasicDialogExtended;
+import org.ourproject.kune.platf.client.ui.dialogs.ExtendedDialog;
 import org.ourproject.kune.platf.client.ui.dialogs.DefaultFormUtils;
 import org.ourproject.kune.platf.client.ui.dialogs.MessageToolbar;
 import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level;
@@ -55,7 +55,7 @@
 import com.gwtext.client.widgets.form.TextField;
 import com.gwtext.client.widgets.layout.HorizontalLayout;
 
-public class NewGroupPanel extends BasicDialogExtended implements NewGroupView {
+public class NewGroupPanel extends ExtendedDialog implements NewGroupView {
     private static final String MARGIN_LEFT_105PX = "margin-left: 105px";
     private static final int LABEL_WIDTH = 100;
     public static final String SHORTNAME_FIELD = "k-ngp-short_name";

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -64,8 +64,8 @@
     }
 
     public void doNewGroup() {
-        session.check(new AsyncCallbackSimple<Object>() {
-            public void onSuccess(final Object result) {
+        session.check(new AsyncCallbackSimple<Void>() {
+            public void onSuccess(final Void result) {
                 if (session.isLogged()) {
                     NotifyUser.showProgressProcessing();
                     view.show();

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPresenter.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPresenter.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -102,13 +102,13 @@
 
     protected void setToolCheckedInServer(final boolean checked, final String toolName) {
         groupService.get().setToolEnabled(session.getUserHash(), getOperationToken(), toolName, checked,
-                new AsyncCallback<Object>() {
+                new AsyncCallback<Void>() {
                     public void onFailure(final Throwable caught) {
                         view.setChecked(toolName, !checked);
                         entityOptions.setErrorMessage(i18n.t("Error configuring the tool"), Level.error);
                     }
 
-                    public void onSuccess(final Object result) {
+                    public void onSuccess(final Void result) {
                         stateManager.reload();
                     }
                 });

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPanel.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPanel.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -24,7 +24,7 @@
 import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
 import org.ourproject.kune.platf.client.services.Images;
 import org.ourproject.kune.platf.client.state.Session;
-import org.ourproject.kune.platf.client.ui.dialogs.BasicDialogExtended;
+import org.ourproject.kune.platf.client.ui.dialogs.ExtendedDialog;
 import org.ourproject.kune.platf.client.ui.dialogs.MessageToolbar;
 import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level;
 
@@ -33,7 +33,7 @@
 import com.google.gwt.user.client.Cookies;
 import com.gwtext.client.core.Ext;
 
-public abstract class SignInAbstractPanel extends BasicDialogExtended {
+public abstract class SignInAbstractPanel extends ExtendedDialog {
 
     protected final I18nTranslationService i18n;
     private final MessageToolbar messageErrorBar;

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPresenter.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPresenter.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -74,7 +74,7 @@
 
     public void doSignOut() {
         if (beforeSignOut.checkBeforeAction()) {
-            userService.get().logout(session.getUserHash(), new AsyncCallback<Object>() {
+            userService.get().logout(session.getUserHash(), new AsyncCallback<Void>() {
                 public void onFailure(final Throwable caught) {
                     NotifyUser.hideProgress();
                     if (caught instanceof SessionExpiredException) {
@@ -86,7 +86,7 @@
                     }
                 }
 
-                public void onSuccess(final Object arg0) {
+                public void onSuccess(final Void arg0) {
                     NotifyUser.hideProgress();
                     clientUIsignOut();
                 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -41,9 +41,11 @@
 import org.ourproject.kune.platf.client.rpc.SocialNetworkServiceAsync;
 import org.ourproject.kune.platf.client.rpc.UserServiceAsync;
 import org.ourproject.kune.platf.client.services.ImageUtils;
+import org.ourproject.kune.platf.client.state.AccessRightsClientManager;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
+import org.ourproject.kune.platf.client.ui.img.ImgResources;
 import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
 import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionBuddiesSummaryToolbar;
 
@@ -64,13 +66,15 @@
     private final Provider<UserServiceAsync> userServiceAsync;
     private final Provider<FileDownloadUtils> fileDownUtilsProvider;
 
-    public BuddiesSummaryPresenter(StateManager stateManager, final Session session,
-            Provider<UserServiceAsync> userServiceAsync, UserActionRegistry actionRegistry,
-            I18nTranslationService i18n, final Provider<ChatEngine> chatEngineProvider,
-            final ActionBuddiesSummaryToolbar toolbar, Provider<FileDownloadUtils> fileDownUtilsProvider,
-            ImageUtils imageUtils, Provider<SocialNetworkServiceAsync> snServiceAsync,
-            GroupActionRegistry groupActionRegistry) {
-        super(i18n, stateManager, session, snServiceAsync, groupActionRegistry, fileDownUtilsProvider);
+    public BuddiesSummaryPresenter(final StateManager stateManager, final Session session,
+            final Provider<UserServiceAsync> userServiceAsync, final UserActionRegistry actionRegistry,
+            final I18nTranslationService i18n, final Provider<ChatEngine> chatEngineProvider,
+            final ActionBuddiesSummaryToolbar toolbar, final Provider<FileDownloadUtils> fileDownUtilsProvider,
+            final ImageUtils imageUtils, final Provider<SocialNetworkServiceAsync> snServiceAsync,
+            final GroupActionRegistry groupActionRegistry, final AccessRightsClientManager accessRightManager,
+            final ImgResources img) {
+        super(i18n, stateManager, accessRightManager, session, snServiceAsync, groupActionRegistry,
+                fileDownUtilsProvider, img);
         this.stateManager = stateManager;
         this.session = session;
         this.userServiceAsync = userServiceAsync;
@@ -80,12 +84,12 @@
         this.toolbar = toolbar;
         this.fileDownUtilsProvider = fileDownUtilsProvider;
         stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
-            public void onEvent(StateAbstractDTO state) {
+            public void onEvent(final StateAbstractDTO state) {
                 setState(state);
             }
         });
         stateManager.onSocialNetworkChanged(new Listener<StateAbstractDTO>() {
-            public void onEvent(StateAbstractDTO state) {
+            public void onEvent(final StateAbstractDTO state) {
                 setState(state);
             }
         });
@@ -96,26 +100,26 @@
         return view;
     }
 
-    public void init(BuddiesSummaryView view) {
+    public void init(final BuddiesSummaryView view) {
         this.view = view;
     }
 
-    protected void setState(StateAbstractDTO state) {
+    protected void setState(final StateAbstractDTO state) {
         if (state.getGroup().isPersonal()) {
             view.clear();
-            UserBuddiesDataDTO userBuddies = state.getUserBuddies();
+            final UserBuddiesDataDTO userBuddies = state.getUserBuddies();
             if (state.getSocialNetworkData().isBuddiesVisible()) {
-                List<UserSimpleDTO> buddies = userBuddies.getBuddies();
-                for (UserSimpleDTO user : buddies) {
-                    String avatarUrl = user.hasLogo() ? fileDownUtilsProvider.get().getLogoImageUrl(
+                final List<UserSimpleDTO> buddies = userBuddies.getBuddies();
+                for (final UserSimpleDTO user : buddies) {
+                    final String avatarUrl = user.hasLogo() ? fileDownUtilsProvider.get().getLogoImageUrl(
                             user.getStateToken()) : BuddiesSummaryView.NOAVATAR;
-                    String tooltip = super.createTooltipWithLogo(user.getShortName(), user.getStateToken(),
+                    final String tooltip = super.createTooltipWithLogo(user.getShortName(), user.getStateToken(),
                             user.hasLogo(), true);
                     view.addBuddie(user, actionRegistry.getCurrentActions(user, session.isLogged(),
                             new AccessRightsDTO(true, true, true), false), avatarUrl, user.getName(), tooltip);
                 }
-                boolean hasLocalBuddies = buddies.size() > 0;
-                int numExtBuddies = userBuddies.getOtherExtBuddies();
+                final boolean hasLocalBuddies = buddies.size() > 0;
+                final int numExtBuddies = userBuddies.getOtherExtBuddies();
                 if (numExtBuddies > 0) {
                     if (hasLocalBuddies) {
                         // i18n: plural
@@ -147,9 +151,9 @@
     }
 
     private void createAddNewBuddiesAction() {
-        ActionToolbarMenuDescriptor<UserSimpleDTO> addNewBuddiesAction = new ActionToolbarMenuDescriptor<UserSimpleDTO>(
+        final ActionToolbarMenuDescriptor<UserSimpleDTO> addNewBuddiesAction = new ActionToolbarMenuDescriptor<UserSimpleDTO>(
                 AccessRolDTO.Administrator, buddiesBottom, new Listener<UserSimpleDTO>() {
-                    public void onEvent(UserSimpleDTO parameter) {
+                    public void onEvent(final UserSimpleDTO parameter) {
                         NotifyUser.info("In development");
                     }
                 });
@@ -159,23 +163,24 @@
         actionRegistry.addAction(addNewBuddiesAction);
     }
 
-    private void createSetBuddiesVisibilityAction(String textDescription, final UserBuddiesVisibilityDTO visibility) {
-        ActionToolbarMenuRadioDescriptor<UserSimpleDTO> buddiesVisibilityAction = new ActionToolbarMenuRadioDescriptor<UserSimpleDTO>(
+    private void createSetBuddiesVisibilityAction(final String textDescription,
+            final UserBuddiesVisibilityDTO visibility) {
+        final ActionToolbarMenuRadioDescriptor<UserSimpleDTO> buddiesVisibilityAction = new ActionToolbarMenuRadioDescriptor<UserSimpleDTO>(
                 AccessRolDTO.Administrator, buddiesBottom, new Listener<UserSimpleDTO>() {
-                    public void onEvent(UserSimpleDTO parameter) {
+                    public void onEvent(final UserSimpleDTO parameter) {
                         userServiceAsync.get().setBuddiesVisibility(session.getUserHash(),
                                 session.getCurrentState().getGroup().getStateToken(), visibility,
-                                new AsyncCallbackSimple<Object>() {
-                                    public void onSuccess(Object result) {
+                                new AsyncCallbackSimple<Void>() {
+                                    public void onSuccess(final Void result) {
                                         NotifyUser.info(i18n.t("Buddies visibility changed"));
                                     }
                                 });
                     }
                 }, BUDDIES_VISIBILITY_GROUP, new RadioMustBeChecked() {
                     public boolean mustBeChecked() {
-                        StateAbstractDTO currentState = session.getCurrentState();
+                        final StateAbstractDTO currentState = session.getCurrentState();
                         if (currentState.getGroup().isPersonal()) {
-                            SocialNetworkDataDTO socialNetworkData = currentState.getSocialNetworkData();
+                            final SocialNetworkDataDTO socialNetworkData = currentState.getSocialNetworkData();
                             return socialNetworkData.getUserBuddiesVisibility().equals(visibility);
                         }
                         return false;
@@ -198,7 +203,7 @@
         addAsBuddie.setTextDescription(i18n.t("Add as a buddie"));
         addAsBuddie.setIconUrl("images/add-green.png");
         addAsBuddie.setEnableCondition(new ActionEnableCondition<UserSimpleDTO>() {
-            public boolean mustBeEnabled(UserSimpleDTO user) {
+            public boolean mustBeEnabled(final UserSimpleDTO user) {
                 return !chatEngineProvider.get().isBuddie(user.getShortName());
             }
         });

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -44,11 +44,13 @@
 import org.ourproject.kune.platf.client.rpc.SocialNetworkServiceAsync;
 import org.ourproject.kune.platf.client.services.ImageDescriptor;
 import org.ourproject.kune.platf.client.services.ImageUtils;
+import org.ourproject.kune.platf.client.state.AccessRightsClientManager;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.platf.client.ui.MenuItem;
 import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
 import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup;
+import org.ourproject.kune.platf.client.ui.img.ImgResources;
 import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
 import org.ourproject.kune.workspace.client.search.GroupLiveSearcher;
 import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionGroupSummaryToolbar;
@@ -80,8 +82,10 @@
             final Provider<GroupServiceAsync> groupServiceProvider,
             final Provider<GroupLiveSearcher> liveSearcherProvider, final Provider<ChatEngine> chatEngineProvider,
             final GroupActionRegistry groupActionRegistry, final ActionGroupSummaryToolbar toolbar,
-            final Provider<FileDownloadUtils> downloadProvider) {
-        super(i18n, stateManager, session, snServiceProvider, groupActionRegistry, downloadProvider);
+            final Provider<FileDownloadUtils> downloadProvider, final AccessRightsClientManager accessRightsManager,
+            final ImgResources img) {
+        super(i18n, stateManager, accessRightsManager, session, snServiceProvider, groupActionRegistry,
+                downloadProvider, img);
         this.i18n = i18n;
         this.stateManager = stateManager;
         this.session = session;
@@ -165,9 +169,9 @@
         addMember.setParentMenuTitle(i18n.t("Options"));
 
         groupActionRegistry.addAction(addMember);
-        groupActionRegistry.addAction(unJoin);
+        // groupActionRegistry.addAction(unJoin);
 
-        groupActionRegistry.addAction(participate);
+        // groupActionRegistry.addAction(participate);
         createSetMembersVisibilityAction(i18n.t("anyone"), SocialNetworkVisibilityDTO.anyone);
         createSetMembersVisibilityAction(i18n.t("only members"), SocialNetworkVisibilityDTO.onlymembers);
         createSetMembersVisibilityAction(i18n.t("only admins"), SocialNetworkVisibilityDTO.onlyadmins);
@@ -181,8 +185,8 @@
                     public void onEvent(final StateToken parameter) {
                         groupServiceProvider.get().setGroupNewMembersJoiningPolicy(session.getUserHash(),
                                 session.getCurrentState().getGroup().getStateToken(), admissionPolicy,
-                                new AsyncCallbackSimple<Object>() {
-                                    public void onSuccess(final Object result) {
+                                new AsyncCallbackSimple<Void>() {
+                                    public void onSuccess(final Void result) {
                                         NotifyUser.info(i18n.t("Members joining policy changed"));
                                     }
                                 });
@@ -206,8 +210,8 @@
                     public void onEvent(final StateToken parameter) {
                         groupServiceProvider.get().setSocialNetworkVisibility(session.getUserHash(),
                                 session.getCurrentState().getGroup().getStateToken(), visibility,
-                                new AsyncCallbackSimple<Object>() {
-                                    public void onSuccess(final Object result) {
+                                new AsyncCallbackSimple<Void>() {
+                                    public void onSuccess(final Void result) {
                                         NotifyUser.info(i18n.t("Members visibility changed"));
                                     }
                                 });

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipateAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipateAction.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipateAction.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,53 @@
+package org.ourproject.kune.workspace.client.socialnet;
+
+import org.ourproject.kune.platf.client.actions.ActionEvent;
+import org.ourproject.kune.platf.client.dto.AccessRolDTO;
+import org.ourproject.kune.platf.client.dto.SocialNetworkRequestResult;
+import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
+import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
+import org.ourproject.kune.platf.client.rpc.SocialNetworkServiceAsync;
+import org.ourproject.kune.platf.client.state.AccessRightsClientManager;
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.state.StateManager;
+import org.ourproject.kune.platf.client.ui.img.ImgResources;
+import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
+
+import com.calclab.suco.client.ioc.Provider;
+
+public class ParticipateAction extends RolAction {
+    private final Provider<SocialNetworkServiceAsync> snServiceProvider;
+
+    public ParticipateAction(final Session session, final Provider<SocialNetworkServiceAsync> snServiceProvider,
+            final StateManager stateManager, final AccessRightsClientManager rightsManager,
+            final I18nTranslationService i18n, final ImgResources imgResources) {
+        super(session, stateManager, rightsManager, i18n, AccessRolDTO.Viewer, i18n.t("Participate"),
+                i18n.t("Request to participate in this group"), imgResources.addGreen());
+        this.snServiceProvider = snServiceProvider;
+        super.setVisible(false, true);
+        super.setMustBeAuthenticated(false);
+    }
+
+    public void actionPerformed(final ActionEvent event) {
+        NotifyUser.showProgressProcessing();
+        snServiceProvider.get().requestJoinGroup(session.getUserHash(), session.getCurrentState().getStateToken(),
+                new AsyncCallbackSimple<SocialNetworkRequestResult>() {
+                    public void onSuccess(final SocialNetworkRequestResult result) {
+                        NotifyUser.hideProgress();
+                        switch ((result)) {
+                        case accepted:
+                            NotifyUser.info(i18n.t("You are now member of this group"));
+                            stateManager.reload();
+                            break;
+                        case denied:
+                            NotifyUser.important(i18n.t("Sorry this is a closed group"));
+                            break;
+                        case moderated:
+                            NotifyUser.info(i18n.t("Membership requested. Waiting for admins decision"));
+                            break;
+                        default:
+                            NotifyUser.info(i18n.t("Programatic error in ParticipateAction"));
+                        }
+                    }
+                });
+    }
+}

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -28,10 +28,12 @@
 import org.ourproject.kune.platf.client.i18n.I18nUITranslationService;
 import org.ourproject.kune.platf.client.rpc.SocialNetworkServiceAsync;
 import org.ourproject.kune.platf.client.services.ImageUtils;
+import org.ourproject.kune.platf.client.state.AccessRightsClientManager;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
 import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup;
+import org.ourproject.kune.platf.client.ui.img.ImgResources;
 import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionParticipationToolbar;
 
 import com.calclab.suco.client.events.Listener;
@@ -47,8 +49,11 @@
     public ParticipationSummaryPresenter(final I18nUITranslationService i18n, final StateManager stateManager,
             final ImageUtils imageUtils, final Session session,
             final Provider<SocialNetworkServiceAsync> snServiceProvider, final GroupActionRegistry groupActionRegistry,
-            final ActionParticipationToolbar actionParticipationToolbar, final Provider<FileDownloadUtils> downloadProvider) {
-        super(i18n, stateManager, session, snServiceProvider, groupActionRegistry, downloadProvider);
+            final ActionParticipationToolbar actionParticipationToolbar,
+            final Provider<FileDownloadUtils> downloadProvider, final AccessRightsClientManager accessRightsManager,
+            final ImgResources img) {
+        super(i18n, stateManager, accessRightsManager, session, snServiceProvider, groupActionRegistry,
+                downloadProvider, img);
         adminCategory = new GridGroup("admin in:", " ", i18n.tWithNT("Administrate these groups",
                 "talking about a person"), false);
         collabCategory = new GridGroup(i18n.t("and as collaborator in:"), " ", i18n.t("Collaborate in these groups"),

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolAction.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolAction.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,76 @@
+package org.ourproject.kune.workspace.client.socialnet;
+
+import org.ourproject.kune.platf.client.actions.AbstractExtendedAction;
+import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
+import org.ourproject.kune.platf.client.dto.AccessRightsDTO;
+import org.ourproject.kune.platf.client.dto.AccessRolDTO;
+import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
+import org.ourproject.kune.platf.client.state.AccessRightsClientManager;
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.state.StateManager;
+
+import com.calclab.suco.client.events.Listener2;
+import com.google.gwt.libideas.resources.client.ImageResource;
+
+public abstract class RolAction extends AbstractExtendedAction {
+
+    public static UIStatus refreshStatus(final AccessRolDTO rolRequired, final boolean authNeed,
+            final boolean isLogged, final boolean visibleForMembers, final boolean visibleForNonMemb,
+            final AccessRightsDTO newRights) {
+        boolean newVisibility = false;
+        boolean newEnabled = false;
+        if (authNeed && !isLogged) {
+            newVisibility = newEnabled = false;
+        } else {
+            // Auth ok
+            newEnabled = RolComparator.isEnabled(rolRequired, newRights);
+            if (newEnabled) {
+                final boolean isMember = RolComparator.isMember(newRights);
+                newEnabled = newVisibility = ((isMember && visibleForMembers) || (!isMember && visibleForNonMemb));
+            } else {
+                newVisibility = false;
+            }
+        }
+        return new UIStatus(newVisibility, newEnabled);
+    }
+
+    protected final Session session;
+    protected final StateManager stateManager;
+    protected final I18nTranslationService i18n;
+    private boolean visibleForNonMemb;
+    private boolean visibleForMembers;
+    private boolean authNeed;
+
+    public RolAction(final Session session, final StateManager stateManager,
+            final AccessRightsClientManager rightsManager, final I18nTranslationService i18n,
+            final AccessRolDTO rolRequired, final String text, final String tooltip, final ImageResource icon) {
+        super(text, tooltip, icon);
+        this.session = session;
+        this.stateManager = stateManager;
+        this.i18n = i18n;
+        this.visibleForMembers = true;
+        this.visibleForNonMemb = true;
+        this.authNeed = false;
+        rightsManager.onRightsChanged(new Listener2<AccessRightsDTO, AccessRightsDTO>() {
+            public void onEvent(final AccessRightsDTO prevRights, final AccessRightsDTO newRights) {
+                setStatus(refreshStatus(rolRequired, authNeed, session.isLogged(), visibleForMembers,
+                        visibleForNonMemb, newRights));
+            }
+
+        });
+    }
+
+    public void setMustBeAuthenticated(final boolean authNeed) {
+        this.authNeed = authNeed;
+    }
+
+    public void setVisible(final boolean forMembers, final boolean forNonMembers) {
+        this.visibleForMembers = forMembers;
+        this.visibleForNonMemb = forNonMembers;
+    }
+
+    private void setStatus(final UIStatus refreshStatus) {
+        setEnabled(refreshStatus.isEnabled());
+        putValue(GuiActionDescrip.VISIBLE, refreshStatus.isVisible());
+    }
+}

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolComparator.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolComparator.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolComparator.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,26 @@
+package org.ourproject.kune.workspace.client.socialnet;
+
+import org.ourproject.kune.platf.client.dto.AccessRightsDTO;
+import org.ourproject.kune.platf.client.dto.AccessRolDTO;
+
+public final class RolComparator {
+
+    public static boolean isEnabled(final AccessRolDTO rolRequired, final AccessRightsDTO rights) {
+        switch (rolRequired) {
+        case Administrator:
+            return rights.isAdministrable();
+        case Editor:
+            return rights.isEditable();
+        case Viewer:
+            return rights.isVisible();
+        }
+        return false;
+    }
+
+    public static boolean isMember(final AccessRightsDTO newRights) {
+        return newRights.isAdministrable() || newRights.isEditable();
+    }
+
+    private RolComparator() {
+    }
+}

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -19,19 +19,20 @@
  \*/
 package org.ourproject.kune.workspace.client.socialnet;
 
-import org.ourproject.kune.platf.client.actions.ActionAddCondition;
 import org.ourproject.kune.platf.client.actions.ActionToolbarButtonDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarPosition;
+import org.ourproject.kune.platf.client.actions.ui.ButtonDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.MenuDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
 import org.ourproject.kune.platf.client.dto.AccessRightsDTO;
-import org.ourproject.kune.platf.client.dto.AccessRolDTO;
 import org.ourproject.kune.platf.client.dto.GroupDTO;
 import org.ourproject.kune.platf.client.dto.SocialNetworkDataDTO;
-import org.ourproject.kune.platf.client.dto.SocialNetworkRequestResult;
 import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
 import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
 import org.ourproject.kune.platf.client.rpc.SocialNetworkServiceAsync;
+import org.ourproject.kune.platf.client.state.AccessRightsClientManager;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.platf.client.ui.MenuItem;
@@ -41,6 +42,7 @@
 import org.ourproject.kune.platf.client.ui.gridmenu.CustomMenu;
 import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup;
 import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
+import org.ourproject.kune.platf.client.ui.img.ImgResources;
 import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
 
 import com.calclab.suco.client.events.Listener;
@@ -48,9 +50,10 @@
 
 public class SocialNetworkPresenter {
 
+    private static final String MEMBERS_BOTTON = "members_bottom";
+
     protected final ActionToolbarPosition membersBottom = new ActionToolbarPosition("sn-bottomtoolbar");
     protected final ActionToolbarPosition buddiesBottom = new ActionToolbarPosition("sn-bottomtoolbar");
-
     protected MenuItem<GroupDTO> changeToCollabMenuItem;
     protected MenuItem<GroupDTO> removeMemberMenuItem;
     protected MenuItem<GroupDTO> changeToAdminMenuItem;
@@ -67,19 +70,25 @@
     private final MenuItemCollection<GroupDTO> otherLoggedOperations;
     private final MenuItemCollection<GroupDTO> otherOperationsUsers;
     private final MenuItemCollection<GroupDTO> otherLoggedOperationsUsers;
-
     protected ActionToolbarMenuDescriptor<StateToken> unJoin;
     protected ActionToolbarButtonDescriptor<StateToken> participate;
     private final Provider<FileDownloadUtils> downloadProvider;
+    private final AccessRightsClientManager rightsManager;
+    private final ImgResources imgResources;
 
+    private MenuDescriptor menuOptions;
+
     public SocialNetworkPresenter(final I18nTranslationService i18n, final StateManager stateManager,
-            final Session session, final Provider<SocialNetworkServiceAsync> snServiceProvider,
-            final GroupActionRegistry groupActionRegistry, final Provider<FileDownloadUtils> downloadProvider) {
+            final AccessRightsClientManager rightsManager, final Session session,
+            final Provider<SocialNetworkServiceAsync> snServiceProvider, final GroupActionRegistry groupActionRegistry,
+            final Provider<FileDownloadUtils> downloadProvider, final ImgResources imgResources) {
         this.i18n = i18n;
         this.stateManager = stateManager;
+        this.rightsManager = rightsManager;
         this.session = session;
         this.snServiceProvider = snServiceProvider;
         this.downloadProvider = downloadProvider;
+        this.imgResources = imgResources;
         createButtons();
         createMenuActions();
         otherOperationsUsers = new MenuItemCollection<GroupDTO>();
@@ -137,60 +146,29 @@
     }
 
     private void createButtons() {
-        participate = new ActionToolbarButtonDescriptor<StateToken>(AccessRolDTO.Viewer, membersBottom,
-                new Listener<StateToken>() {
-                    public void onEvent(final StateToken parameter) {
-                        NotifyUser.showProgressProcessing();
-                        snServiceProvider.get().requestJoinGroup(session.getUserHash(),
-                                session.getCurrentState().getStateToken(), new AsyncCallbackSimple<Object>() {
-                                    public void onSuccess(final Object result) {
-                                        NotifyUser.hideProgress();
-                                        final SocialNetworkRequestResult resultType = (SocialNetworkRequestResult) result;
-                                        switch (resultType) {
-                                        case accepted:
-                                            NotifyUser.info(i18n.t("You are now member of this group"));
-                                            stateManager.reload();
-                                            break;
-                                        case denied:
-                                            NotifyUser.important(i18n.t("Sorry this is a closed group"));
-                                            break;
-                                        case moderated:
-                                            NotifyUser.info(i18n.t("Membership requested. Waiting for admins decision"));
-                                            break;
-                                        }
-                                    }
-                                });
-                    }
-                });
-        participate.setIconUrl("images/add-green.gif");
-        participate.setTextDescription(i18n.t("Participate"));
-        participate.setToolTip(i18n.t("Request to participate in this group"));
-        participate.setMustBeAuthenticated(false);
-        participate.setAddCondition(new ActionAddCondition<StateToken>() {
-            public boolean mustBeAdded(final StateToken token) {
-                return !isMember(session.getCurrentState().getGroupRights());
+        final ParticipateAction participateAction = new ParticipateAction(session, snServiceProvider, stateManager,
+                rightsManager, i18n, imgResources);
+        final ButtonDescriptor participateBtn = new ButtonDescriptor(participateAction);
+        participateBtn.setLocation(MEMBERS_BOTTON);
+
+        menuOptions = new MenuDescriptor(i18n.t("Options"));
+
+        final UnjoinAction unjoinAction = new UnjoinAction(session, snServiceProvider, stateManager, rightsManager,
+                i18n, imgResources) {
+            @Override
+            public String getGroupName() {
+                return session.getContainerState().getGroup().getShortName();
             }
-        });
+        };
 
-        unJoin = new ActionToolbarMenuDescriptor<StateToken>(AccessRolDTO.Editor, membersBottom,
-                new Listener<StateToken>() {
-                    public void onEvent(final StateToken parameter) {
-                        removeMemberAction();
-                    }
-                });
-        unJoin.setIconUrl("images/del.gif");
-        unJoin.setTextDescription(i18n.t("Leave this group"));
-        unJoin.setToolTip(i18n.t("Do not participate anymore in this group"));
-        unJoin.setParentMenuTitle(i18n.t("Options"));
-        unJoin.setMustBeConfirmed(true);
-        unJoin.setConfirmationTitle(i18n.t("Leave this group"));
-        unJoin.setConfirmationText(i18n.t("Are you sure?"));
+        final MenuItemDescriptor unjoinBtn = new MenuItemDescriptor(menuOptions, unjoinAction);
+        unjoinBtn.setLocation(MEMBERS_BOTTON);
     }
 
     private GridItem<GroupDTO> createDefMemberMenu(final GroupDTO group, final GridGroup gridGroup) {
         final CustomMenu<GroupDTO> menu = new CustomMenu<GroupDTO>(group);
         final String longName = group.getLongName();
-        boolean hasLogo = group.hasLogo();
+        final boolean hasLogo = group.hasLogo();
         final String toolTip = createTooltipWithLogo(group.getShortName(), group.getStateToken(), hasLogo,
                 group.isPersonal());
         final String imageHtml = downloadProvider.get().getLogoAvatarHtml(group.getStateToken(), hasLogo,
@@ -226,6 +204,7 @@
                         stateManager.gotoToken(groupDTO.getShortName());
                     }
                 });
+
         unJoinMenuItem = new MenuItem<GroupDTO>("images/del.gif", i18n.t("Do not participate anymore in this group"),
                 new Listener<GroupDTO>() {
                     public void onEvent(final GroupDTO groupDTO) {
@@ -317,20 +296,6 @@
                 });
     }
 
-    private boolean isMember(final AccessRightsDTO rights) {
-        boolean userIsAdmin = rights.isAdministrable();
-        final boolean userIsCollab = !userIsAdmin && rights.isEditable();
-        return isMember(userIsAdmin, userIsCollab);
-    }
-
-    private boolean isMember(final boolean userIsAdmin, final boolean userIsCollab) {
-        return userIsAdmin || userIsCollab;
-    }
-
-    private void removeMemberAction() {
-        removeMemberAction(session.getCurrentState().getGroup());
-    }
-
     private void removeMemberAction(final GroupDTO groupDTO) {
         NotifyUser.showProgressProcessing();
         snServiceProvider.get().unJoinGroup(session.getUserHash(), new StateToken(groupDTO.getShortName()),

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UIStatus.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UIStatus.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UIStatus.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,63 @@
+package org.ourproject.kune.workspace.client.socialnet;
+
+public class UIStatus {
+
+    private boolean visible;
+    private boolean enabled;
+
+    public UIStatus(final boolean visible, final boolean enabled) {
+        this.visible = visible;
+        this.enabled = enabled;
+    }
+
+    @Override
+    public boolean equals(final Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        final UIStatus other = (UIStatus) obj;
+        if (enabled != other.enabled) {
+            return false;
+        }
+        if (visible != other.visible) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + (enabled ? 1231 : 1237);
+        result = prime * result + (visible ? 1231 : 1237);
+        return result;
+    }
+
+    public boolean isEnabled() {
+        return enabled;
+    }
+
+    public boolean isVisible() {
+        return visible;
+    }
+
+    public void setEnabled(final boolean enabled) {
+        this.enabled = enabled;
+    }
+
+    public void setVisible(final boolean visible) {
+        this.visible = visible;
+    }
+
+    @Override
+    public String toString() {
+        return "(v: " + visible + ", e:" + enabled + ")";
+    }
+}

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UnjoinAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UnjoinAction.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UnjoinAction.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,59 @@
+package org.ourproject.kune.workspace.client.socialnet;
+
+import org.ourproject.kune.platf.client.actions.ActionEvent;
+import org.ourproject.kune.platf.client.dto.AccessRolDTO;
+import org.ourproject.kune.platf.client.dto.SocialNetworkDataDTO;
+import org.ourproject.kune.platf.client.dto.StateToken;
+import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
+import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
+import org.ourproject.kune.platf.client.rpc.SocialNetworkServiceAsync;
+import org.ourproject.kune.platf.client.state.AccessRightsClientManager;
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.state.StateManager;
+import org.ourproject.kune.platf.client.ui.img.ImgResources;
+import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
+
+import com.calclab.suco.client.events.Listener0;
+import com.calclab.suco.client.ioc.Provider;
+
+public class UnjoinAction extends RolAction {
+    private final Provider<SocialNetworkServiceAsync> snServiceProvider;
+    private String groupName;
+
+    public UnjoinAction(final Session session, final Provider<SocialNetworkServiceAsync> snServiceProvider,
+            final StateManager stateManager, final AccessRightsClientManager rightsManager,
+            final I18nTranslationService i18n, final ImgResources imgResources) {
+        super(session, stateManager, rightsManager, i18n, AccessRolDTO.Editor, i18n.t("Leave this group"),
+                i18n.t("Do not participate anymore in this group"), imgResources.delGreen());
+        this.snServiceProvider = snServiceProvider;
+        super.setVisible(true, false);
+        super.setMustBeAuthenticated(true);
+    }
+
+    public void actionPerformed(final ActionEvent event) {
+        NotifyUser.askConfirmation(i18n.t("Leave this group"), i18n.t("Are you sure?"), new Listener0() {
+            public void onEvent() {
+                NotifyUser.showProgressProcessing();
+                snServiceProvider.get().unJoinGroup(session.getUserHash(), new StateToken(getGroupName()),
+                        new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+                            public void onSuccess(final SocialNetworkDataDTO result) {
+                                NotifyUser.hideProgress();
+                                NotifyUser.info(i18n.t("Removed as member"));
+                                stateManager.reload();
+                                // in the future with user info:
+                                // stateManager.reloadSocialNetwork((SocialNetworkResultDTO)
+                                // result);
+                            }
+                        });
+            }
+        });
+    }
+
+    public String getGroupName() {
+        return groupName;
+    }
+
+    public void setGroupName(final String groupName) {
+        this.groupName = groupName;
+    }
+}

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManager.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManager.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -69,8 +69,8 @@
     public void changeTheme(final StateToken token, final WsTheme newTheme) {
         NotifyUser.showProgressProcessing();
         groupServiceProvider.get().changeGroupWsTheme(session.getUserHash(), token, newTheme.getName(),
-                new AsyncCallbackSimple<Object>() {
-                    public void onSuccess(final Object result) {
+                new AsyncCallbackSimple<Void>() {
+                    public void onSuccess(final Void result) {
                         if (session.getCurrentState().getStateToken().getGroup().equals(token.getGroup())) {
                             setTheme(newTheme);
                         }
@@ -82,8 +82,8 @@
     protected void onChangeGroupWsTheme(final WsTheme newTheme) {
         NotifyUser.showProgressProcessing();
         groupServiceProvider.get().changeGroupWsTheme(session.getUserHash(), session.getCurrentState().getStateToken(),
-                newTheme.getName(), new AsyncCallbackSimple<Object>() {
-                    public void onSuccess(final Object result) {
+                newTheme.getName(), new AsyncCallbackSimple<Void>() {
+                    public void onSuccess(final Void result) {
                         setTheme(newTheme);
                         NotifyUser.hideProgress();
                     }

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsert.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsert.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsert.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,9 @@
+package org.ourproject.kune.workspace.client.wave;
+
+import org.ourproject.kune.platf.client.dto.StateToken;
+
+public interface WaveInsert {
+
+    void show(StateToken parentToken);
+
+}

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsertPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsertPanel.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsertPanel.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,100 @@
+package org.ourproject.kune.workspace.client.wave;
+
+import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
+import org.ourproject.kune.platf.client.ui.img.ImgConstants;
+import org.ourproject.kune.platf.client.ui.img.ImgResources;
+
+import com.calclab.emiteuimodule.client.dialog.BasicDialogExtended;
+import com.calclab.emiteuimodule.client.dialog.BasicDialogListener;
+import com.google.gwt.user.client.Command;
+import com.google.gwt.user.client.DeferredCommand;
+import com.gwtext.client.core.EventObject;
+import com.gwtext.client.widgets.form.Field;
+import com.gwtext.client.widgets.form.FormPanel;
+import com.gwtext.client.widgets.form.TextField;
+import com.gwtext.client.widgets.form.event.FieldListenerAdapter;
+
+public class WaveInsertPanel implements WaveInsertView {
+
+    public static final String ADD_WAVE = "wip-add-wave";
+    public static final String CANCEL = "wip-cancel-add-wave";
+    public static final String WAVE_ID = "wip-wave-id-fl";
+    private BasicDialogExtended dialog;
+    private final WaveInsertPresenter presenter;
+    private final I18nTranslationService i18n;
+    private FormPanel formPanel;
+    private TextField waveId;
+    private final ImgResources img;
+
+    public WaveInsertPanel(final WaveInsertPresenter presenter, final I18nTranslationService i18n,
+            final ImgResources img) {
+        this.presenter = presenter;
+        this.i18n = i18n;
+        this.img = img;
+    }
+
+    public String getWaveId() {
+        return waveId.getValueAsString();
+    }
+
+    public void hide() {
+        dialog.hide();
+    }
+
+    public void reset() {
+        formPanel.getForm().reset();
+    }
+
+    public void show() {
+        if (dialog == null) {
+            dialog = new BasicDialogExtended(i18n.t("Add a wave"), true, false, 320, 140,
+                    ImgConstants.toPath(img.addGreen()), i18n.t("Add"), ADD_WAVE, i18n.t("Cancel"), CANCEL,
+                    new BasicDialogListener() {
+                        public void onCancelButtonClick() {
+                            presenter.onCancel();
+                        }
+
+                        public void onFirstButtonClick() {
+                            presenter.onAdd();
+                        }
+                    });
+            dialog.setResizable(false);
+            createForm();
+        }
+        dialog.show();
+        DeferredCommand.addCommand(new Command() {
+            public void execute() {
+                waveId.focus();
+            }
+        });
+    }
+
+    private void createForm() {
+        formPanel = new FormPanel();
+        formPanel.setFrame(true);
+        formPanel.setAutoScroll(false);
+
+        formPanel.setWidth(333);
+        formPanel.setLabelWidth(100);
+        formPanel.setPaddings(10);
+
+        waveId = new TextField(i18n.t("Wave id"), "wave id", 150);
+        waveId.setTitle(i18n.t("Something like: [%s]", "wavesandbox.com!w+NdlzA9PU%B"));
+        waveId.setAllowBlank(false);
+        waveId.setValidationEvent(false);
+        // waveId.setRegex("^[a-z0-9_\\-]+$");
+        // waveId.setRegexText(i18n.t("Can only contain characters, numbers, and dashes"));
+        waveId.setId(WAVE_ID);
+        formPanel.add(waveId);
+
+        dialog.add(formPanel);
+        waveId.addListener(new FieldListenerAdapter() {
+            @Override
+            public void onSpecialKey(final Field field, final EventObject e) {
+                if (e.getKey() == 13) {
+                    presenter.onAdd();
+                }
+            }
+        });
+    }
+}

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsertPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsertPresenter.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsertPresenter.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,83 @@
+package org.ourproject.kune.workspace.client.wave;
+
+import org.ourproject.kune.docs.client.DocumentClientTool;
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.dto.StateContentDTO;
+import org.ourproject.kune.platf.client.dto.StateToken;
+import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
+import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
+import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.state.StateManager;
+import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
+
+import com.calclab.suco.client.ioc.Provider;
+
+public class WaveInsertPresenter implements WaveInsert {
+
+    private WaveInsertView view;
+    private final Session session;
+    private final StateManager stateManager;
+    private final Provider<ContentServiceAsync> contentService;
+    private final I18nTranslationService i18n;
+    private StateToken parentToken;
+
+    public WaveInsertPresenter(final Session session, final StateManager stateManager,
+            final I18nTranslationService i18n, final Provider<ContentServiceAsync> contentService) {
+        this.session = session;
+        this.stateManager = stateManager;
+        this.i18n = i18n;
+        this.contentService = contentService;
+    }
+
+    public View getView() {
+        return view;
+    }
+
+    public void init(final WaveInsertView view) {
+        this.view = view;
+    }
+
+    public void onAdd() {
+        final String waveId = view.getWaveId();
+        if (waveId.length() > 0) {
+            addWave(waveId);
+        } else {
+            NotifyUser.error(i18n.t("The wave id is incorrect"));
+            resetAndHide();
+        }
+    }
+
+    public void onCancel() {
+        resetAndHide();
+    }
+
+    public void show(final StateToken parentToken) {
+        this.parentToken = parentToken;
+        view.show();
+    }
+
+    /**
+     * 
+     * Add a wave to the current location
+     * 
+     * @param waveId
+     *            something like "wavesandbox.com!w+NdlzA9PU%B"
+     */
+    private void addWave(final String waveId) {
+        assert parentToken != null;
+        session.getContentState().getContainer().getStateToken();
+        contentService.get().addWave(session.getUserHash(), parentToken, DocumentClientTool.TYPE_WAVE, waveId,
+                new AsyncCallbackSimple<StateContentDTO>() {
+                    public void onSuccess(final StateContentDTO state) {
+                        stateManager.setRetrievedState(state);
+                    }
+                });
+        resetAndHide();
+    }
+
+    private void resetAndHide() {
+        view.hide();
+        view.reset();
+    }
+}

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsertView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsertView.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/wave/WaveInsertView.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,15 @@
+package org.ourproject.kune.workspace.client.wave;
+
+import org.ourproject.kune.platf.client.View;
+
+public interface WaveInsertView extends View {
+
+    String getWaveId();
+
+    void hide();
+
+    void reset();
+
+    void show();
+
+}

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -13,6 +13,7 @@
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.Scopes;
+import com.google.inject.servlet.RequestScoped;
 import com.google.inject.servlet.SessionScoped;
 import com.wideplay.warp.jpa.JpaUnit;
 
@@ -24,6 +25,7 @@
                     @Override
                     protected void configure() {
                         bindScope(SessionScoped.class, Scopes.SINGLETON);
+                        bindScope(RequestScoped.class, Scopes.SINGLETON);
                         // test: use
                         // memory
                         // test_db: use

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/KuneSeleniumTestHelper.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/KuneSeleniumTestHelper.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/KuneSeleniumTestHelper.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -26,7 +26,7 @@
 
 public class KuneSeleniumTestHelper extends SeleniumTestHelper {
 
-    protected static final String KUNE_BASE_URL = "/kune/?locale=en#";
+    protected static final String KUNE_BASE_URL = "/ws/?locale=en#";
 
     private static File dirCaptures;
 
@@ -125,7 +125,7 @@
     }
 
     protected void openDefPage() throws Exception {
-        open("/kune/?locale=en#site");
+        open(KUNE_BASE_URL + "#site");
         waitForTextInside(gid(EntityTitlePanel.ENTITY_TITLE_RIGHT_TITLE), "Welcome to kune");
     }
 

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -20,7 +20,6 @@
 import org.ourproject.kune.platf.client.rpc.UserService;
 import org.ourproject.kune.platf.integration.IntegrationTest;
 import org.ourproject.kune.platf.integration.IntegrationTestHelper;
-import org.ourproject.kune.platf.server.UserSession;
 import org.ourproject.kune.platf.server.domain.Group;
 import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
 import org.ourproject.kune.platf.server.mapper.Mapper;
@@ -33,8 +32,6 @@
 
 public class UserServiceTest extends IntegrationTest {
     @Inject
-    UserSession session;
-    @Inject
     DatabaseProperties properties;
     @Inject
     UserService userService;

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -9,12 +9,17 @@
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.Module;
+import com.google.inject.Scopes;
+import com.google.inject.servlet.RequestScoped;
+import com.google.inject.servlet.SessionScoped;
 import com.wideplay.warp.jpa.JpaUnit;
 
 public abstract class TestHelper {
     public static Injector create(final Module module, final String persistenceUnit, final String propetiesFileName) {
-        Injector injector = Guice.createInjector(module, new Module() {
-            public void configure(Binder binder) {
+        final Injector injector = Guice.createInjector(module, new Module() {
+            public void configure(final Binder binder) {
+                binder.bindScope(SessionScoped.class, Scopes.SINGLETON);
+                binder.bindScope(RequestScoped.class, Scopes.SINGLETON);
                 binder.bindConstant().annotatedWith(JpaUnit.class).to(persistenceUnit);
                 binder.bindConstant().annotatedWith(PropertiesFileName.class).to(propetiesFileName);
                 binder.bind(HttpServletRequest.class).to(HttpServletRequestMocked.class);

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -6,7 +6,7 @@
 
 import java.util.TimeZone;
 
-import javax.persistence.PersistenceException;
+import javax.persistence.EntityExistsException;
 
 import org.apache.lucene.queryParser.ParseException;
 import org.hibernate.validator.InvalidStateException;
@@ -65,7 +65,11 @@
         persist(user);
     }
 
-    @Test(expected = PersistenceException.class)
+    /**
+     * This is not working:
+     * http://opensource.atlassian.com/projects/hibernate/browse/EJB-382
+     */
+    @Test(expected = EntityExistsException.class)
     public void testUserExist() throws I18nNotFoundException {
         final User user1 = userManager.createUser("test", "test 1 name", "test1 at example.com", "some password", "en",
                 "GB", "GMT");

Added: trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolActionTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolActionTest.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolActionTest.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,80 @@
+package org.ourproject.kune.workspace.client.socialnet;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.ourproject.kune.platf.client.dto.AccessRightsDTO;
+import org.ourproject.kune.platf.client.dto.AccessRolDTO;
+
+public class RolActionTest {
+
+    private AccessRightsDTO adminRights;
+    private AccessRightsDTO editorRights;
+    private AccessRightsDTO viewerRights;
+    private AccessRightsDTO noPermRights;
+    private UIStatus ff;
+    private UIStatus tt;
+
+    @Before
+    public void before() {
+        adminRights = new AccessRightsDTO(true, true, true);
+        editorRights = new AccessRightsDTO(false, true, true);
+        viewerRights = new AccessRightsDTO(false, false, true);
+        noPermRights = new AccessRightsDTO(false, false, false);
+        ff = new UIStatus(false, false);
+        tt = new UIStatus(true, true);
+    }
+
+    @Test
+    public void testRefreshStatus() {
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Viewer, false, false, true, true, noPermRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Viewer, true, false, true, true, noPermRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Viewer, true, true, true, true, noPermRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Viewer, true, true, false, true, noPermRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Viewer, true, true, false, false, noPermRights));
+
+        assertEquals(tt, RolAction.refreshStatus(AccessRolDTO.Viewer, false, false, true, true, viewerRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Viewer, true, false, true, true, viewerRights));
+        assertEquals(tt, RolAction.refreshStatus(AccessRolDTO.Viewer, true, true, true, true, viewerRights));
+        assertEquals(tt, RolAction.refreshStatus(AccessRolDTO.Viewer, true, true, false, true, viewerRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Viewer, true, true, false, false, viewerRights));
+
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Editor, false, false, true, true, viewerRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Editor, true, false, true, true, viewerRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Editor, true, true, true, true, viewerRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Editor, true, true, false, true, viewerRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Editor, true, true, false, false, viewerRights));
+
+        assertEquals(tt, RolAction.refreshStatus(AccessRolDTO.Editor, false, false, true, true, editorRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Editor, true, false, true, true, editorRights));
+        assertEquals(tt, RolAction.refreshStatus(AccessRolDTO.Editor, true, true, true, true, editorRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Editor, true, true, false, true, editorRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Editor, true, true, false, false, editorRights));
+
+        assertEquals(tt, RolAction.refreshStatus(AccessRolDTO.Editor, false, false, true, true, adminRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Editor, true, false, true, true, adminRights));
+        assertEquals(tt, RolAction.refreshStatus(AccessRolDTO.Editor, true, true, true, true, adminRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Editor, true, true, false, true, adminRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Editor, true, true, false, false, adminRights));
+
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Administrator, false, false, true, true, viewerRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Administrator, true, false, true, true, viewerRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Administrator, true, true, true, true, viewerRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Administrator, true, true, false, true, viewerRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Administrator, true, true, false, false, viewerRights));
+
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Administrator, false, false, true, true, editorRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Administrator, true, false, true, true, editorRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Administrator, true, true, true, true, editorRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Administrator, true, true, false, true, editorRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Administrator, true, true, false, false, editorRights));
+
+        assertEquals(tt, RolAction.refreshStatus(AccessRolDTO.Administrator, false, false, true, true, adminRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Administrator, true, false, true, true, adminRights));
+        assertEquals(tt, RolAction.refreshStatus(AccessRolDTO.Administrator, true, true, true, true, adminRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Administrator, true, true, false, true, adminRights));
+        assertEquals(ff, RolAction.refreshStatus(AccessRolDTO.Administrator, true, true, false, false, adminRights));
+
+    }
+}

Added: trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolComparatorTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolComparatorTest.java	2009-07-22 20:31:08 UTC (rev 1138)
+++ trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolComparatorTest.java	2009-08-05 14:56:47 UTC (rev 1139)
@@ -0,0 +1,40 @@
+package org.ourproject.kune.workspace.client.socialnet;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.ourproject.kune.platf.client.dto.AccessRightsDTO;
+import org.ourproject.kune.platf.client.dto.AccessRolDTO;
+
+public class RolComparatorTest {
+
+    @Test
+    public void testIsEnabled() {
+        final AccessRightsDTO adminRights = new AccessRightsDTO(true, true, true);
+        final AccessRightsDTO editorRights = new AccessRightsDTO(false, true, true);
+        final AccessRightsDTO viewerRights = new AccessRightsDTO(false, false, true);
+        final AccessRightsDTO noPermRights = new AccessRightsDTO(false, false, false);
+        assertTrue(RolComparator.isEnabled(AccessRolDTO.Administrator, adminRights));
+        assertFalse(RolComparator.isEnabled(AccessRolDTO.Administrator, editorRights));
+        assertFalse(RolComparator.isEnabled(AccessRolDTO.Administrator, viewerRights));
+        assertFalse(RolComparator.isEnabled(AccessRolDTO.Administrator, noPermRights));
+        assertTrue(RolComparator.isEnabled(AccessRolDTO.Editor, adminRights));
+        assertTrue(RolComparator.isEnabled(AccessRolDTO.Editor, editorRights));
+        assertFalse(RolComparator.isEnabled(AccessRolDTO.Editor, viewerRights));
+        assertFalse(RolComparator.isEnabled(AccessRolDTO.Editor, noPermRights));
+        assertTrue(RolComparator.isEnabled(AccessRolDTO.Viewer, adminRights));
+        assertTrue(RolComparator.isEnabled(AccessRolDTO.Viewer, editorRights));
+        assertTrue(RolComparator.isEnabled(AccessRolDTO.Viewer, viewerRights));
+        assertFalse(RolComparator.isEnabled(AccessRolDTO.Viewer, noPermRights));
+    }
+
+    @Test
+    public void testIsMember() {
+        assertFalse(RolComparator.isMember(new AccessRightsDTO(false, false, false)));
+        assertFalse(RolComparator.isMember(new AccessRightsDTO(false, false, true)));
+        assertTrue(RolComparator.isMember(new AccessRightsDTO(false, true, true)));
+        assertTrue(RolComparator.isMember(new AccessRightsDTO(true, true, true)));
+    }
+
+}

Added: trunk/war/WEB-INF/lib/gwt-servlet-2.0.0-SNAPSHOT.jar
===================================================================
(Binary files differ)


Property changes on: trunk/war/WEB-INF/lib/gwt-servlet-2.0.0-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream




More information about the kune-commits mailing list