[kune-commits] r1239 - in trunk: . src/main/java/cc/kune/core/shared/dto src/main/java/cc/kune/domain src/main/java/cc/kune/wave/server src/main/java/org/ourproject/kune/platf/server/init src/main/java/org/ourproject/kune/platf/server/manager/impl src/main/java/org/ourproject/kune/platf/server/rpc src/main/java/org/ourproject/kune/platf/server/users src/main/resources src/test/java/org/ourproject/kune/platf/integration 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/finders src/test/java/org/ourproject/kune/platf/server/manager src/test/java/org/ourproject/kune/platf/server/mapper src/test/java/org/ourproject/kune/testhelper/ctx

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Mon Feb 7 18:33:33 CET 2011


Author: vjrj_
Date: 2011-02-07 18:33:32 +0100 (Mon, 07 Feb 2011)
New Revision: 1239

Added:
   trunk/src/main/resources/wave-server-testing.properties
   trunk/src/test/java/org/ourproject/kune/platf/server/TestConstants.java
Modified:
   trunk/
   trunk/.classpath
   trunk/COPYRIGHT
   trunk/pom.xml
   trunk/src/main/java/cc/kune/core/shared/dto/AccessRolDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/BasicMimeTypeDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/CommentDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/ContainerDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/ContainerSimpleDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/ContentSimpleDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/GroupDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/GroupListDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/GroupType.java
   trunk/src/main/java/cc/kune/core/shared/dto/I18nCountryDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/I18nLanguageDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/I18nLanguageSimpleDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/I18nTranslationDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/InitDataDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/LicenseDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/LinkDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/ParticipationDataDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/RoomDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/SearchResultDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/SocialNetworkDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/SocialNetworkDataDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/SocialNetworkRequestResult.java
   trunk/src/main/java/cc/kune/core/shared/dto/StateAbstractDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/StateContainerDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/StateContentDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/StateNoContentDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/TagDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/TimeZoneDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/ToolSimpleDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/UserBuddiesDataDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/UserDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/UserInfoDTO.java
   trunk/src/main/java/cc/kune/core/shared/dto/UserSimpleDTO.java
   trunk/src/main/java/cc/kune/domain/User.java
   trunk/src/main/java/cc/kune/wave/server/CustomUserRegistrationServlet.java
   trunk/src/main/java/cc/kune/wave/server/WaveStarter.java
   trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/GroupManagerDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/server/rpc/ContentRPC.java
   trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfo.java
   trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoServiceDefault.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTest.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/PersistencePreLoadedDataTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/TestDomainHelper.java
   trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java
   trunk/src/test/java/org/ourproject/kune/platf/server/finders/UserFinderTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/mapper/MapperTest.java
   trunk/src/test/java/org/ourproject/kune/testhelper/ctx/DomainContext.java
Log:
WIAB integration updated


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

.classpath-bien

pom.xml.*

.gwt

.jdee_sources

.jdee_classpath

prj.el

.factorypath
.apt_generated
target.old

   + pmd-eclipse.log
.pmd
www-test
screenlog.0
bin
client
public
target
target-local
Main-compile
bin
.settings
.gwt-cache
repository
derby.log
star-yellow-grey.png
run.sh
tomcat
gwt-out
synccss.sh
.externalToolBuilders
.wtpmodules
www
testRepository
kune-OLD-jcr
KuneApp.launch
KuneApp NOSERVER.launch
old_src
org.ourproject.kune.app.Kune
org.ourproject.kune.iml
org.ourproject.kune.ipr
org.ourproject.kune.iws
nbproject
hibernate.reveng.xml
.gwt-tmp
target-eclipse
.checkstyle

.classpath-bien

pom.xml.*

.gwt

.jdee_sources

.jdee_classpath

prj.el

.factorypath
.apt_generated
target.old
_accounts


Modified: trunk/.classpath
===================================================================
--- trunk/.classpath	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/.classpath	2011-02-07 17:33:32 UTC (rev 1239)
@@ -3,11 +3,13 @@
   <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
   <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
   <classpathentry kind="output" path="target/kune-0.0.7/WEB-INF/classes"/>
+  <classpathentry kind="var" path="M2_REPO/javax/inject/javax.inject/1/javax.inject-1.jar" sourcepath="M2_REPO/javax/inject/javax.inject/1/javax.inject-1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar" sourcepath="M2_REPO/javax/transaction/jta/1.1/jta-1.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar" sourcepath="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar" sourcepath="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" sourcepath="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/google/appengine/appengine-api-1.0-sdk/1.3.1/appengine-api-1.0-sdk-1.3.1.jar"/>
   <classpathentry kind="var" path="M2_REPO/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar"/>
   <classpathentry kind="var" path="M2_REPO/c3p0/c3p0/0.9.1/c3p0-0.9.1.jar" sourcepath="M2_REPO/c3p0/c3p0/0.9.1/c3p0-0.9.1-sources.jar"/>
@@ -21,6 +23,7 @@
   <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.2/commons-io-1.2.jar" sourcepath="M2_REPO/commons-io/commons-io/1.2/commons-io-1.2-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.5/commons-lang-2.5.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.5/commons-lang-2.5-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/crawl_htmlunit/r5662-gae/crawl_htmlunit-r5662-gae.jar"/>
   <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/net/sf/dozer/dozer/4.0/dozer-4.0.jar" sourcepath="M2_REPO/net/sf/dozer/dozer/4.0/dozer-4.0-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.jar" sourcepath="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA-sources.jar"/>
@@ -36,6 +39,7 @@
   <classpathentry kind="var" path="M2_REPO/com/google/code/guice/guice-servlet/2.0.1/guice-servlet-2.0.1.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/jhickman/web/gwt/gwt-customuibinder/0.1/gwt-customuibinder-0.1.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/adamtacy/gwt-fx/r464/gwt-fx-r464.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-gin/1.0-r137/gwt-gin-1.0-r137.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/allen_sauer/gwt/log/gwt-log/gwt-log/3.0.1/gwt-log-3.0.1.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-servlet/2.1.1/gwt-servlet-2.1.1.jar" sourcepath="M2_REPO/com/google/gwt/gwt-servlet/2.1.1/gwt-servlet-2.1.1-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-user/2.1.1/gwt-user-2.1.1.jar" sourcepath="M2_REPO/com/google/gwt/gwt-user/2.1.1/gwt-user-2.1.1-sources.jar"/>
@@ -43,7 +47,15 @@
   <classpathentry kind="var" path="M2_REPO/com/allen_sauer/gwt/voices/gwt-voices/gwt-voices/1.6.0/gwt-voices-1.6.0.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/gwtextux/gwtextux/0.4.0.924/gwtextux-0.4.0.924.jar"/>
-  <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp/0.5-SNAPSHOT/gwtp-0.5-SNAPSHOT.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-all/0.5/gwtp-all-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-all/0.5/gwtp-all-0.5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-clients-common/0.5/gwtp-clients-common-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-clients-common/0.5/gwtp-clients-common-0.5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-crawler/0.5/gwtp-crawler-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-crawler/0.5/gwtp-crawler-0.5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-dispatch-client/0.5/gwtp-dispatch-client-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-dispatch-client/0.5/gwtp-dispatch-client-0.5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-dispatch-server/0.5/gwtp-dispatch-server-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-dispatch-server/0.5/gwtp-dispatch-server-0.5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-dispatch-shared/0.5/gwtp-dispatch-shared-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-dispatch-shared/0.5/gwtp-dispatch-shared-0.5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-mvp-client/0.5/gwtp-mvp-client-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-mvp-client/0.5/gwtp-mvp-client-0.5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-processors/0.5/gwtp-processors-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-processors/0.5/gwtp-processors-0.5-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-tester/0.5/gwtp-tester-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-tester/0.5/gwtp-tester-0.5-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/extjs/gxt/2.2.1/gxt-2.2.1.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/jhickman/web/gwt/gxt-uibinder/0.6/gxt-uibinder-0.6.jar"/>
   <classpathentry kind="var" path="M2_REPO/com/h2database/h2/1.0.20070617/h2-1.0.20070617.jar"/>

Modified: trunk/COPYRIGHT
===================================================================
--- trunk/COPYRIGHT	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/COPYRIGHT	2011-02-07 17:33:32 UTC (rev 1239)
@@ -80,35 +80,51 @@
 
 others
 --------------------------------------------------------------------------------
-suco
-   http://suco.googlecode.com
-   Copyright: under GNU Lesser General Public License
-   http://www.gnu.org/licenses/lgpl.html
 
+wave / wave in a box
+   http://www.waveprotocol.org   
+   http://www.apache.org/licenses/LICENSE-2.0
+   http://www.waveprotocol.org/patent-license
+
 emite
    http://emite.googlecode.com
    Copyright: under GNU Lesser General Public License
    http://www.gnu.org/licenses/lgpl.html
 
+suco
+   http://suco.googlecode.com
+   Copyright: under GNU Lesser General Public License
+   http://www.gnu.org/licenses/lgpl.html
+
 fonts-min.css and reset.css
    Copyright (c) 2007, Yahoo! Inc. All rights reserved.
    Code licensed under the BSD License:
    http://developer.yahoo.net/yui/license.txt
 
-emoticons from Adium and Kopete theme
-   kopete adium theme by robotangel and original "Adiumicons" by Oscar Gruno
-   under GNU GPL license
+ext-gwt gxt library:
+   http://www.sencha.com/products/extgwt/
+   Copyright: under GNU General Public License 
+   http://www.gnu.org/copyleft/gpl.html
 
-extjs
-   http://extjs.com/
-   Copyright: under GNU Lesser General Public License
-   http://www.gnu.org/licenses/lgpl.html
-
-ext-gwt library:
+gwt-ext (deprecated) library:
    http://code.google.com/p/gwt-ext/
    Copyright: under GNU Lesser General Public License
    http://www.gnu.org/licenses/lgpl.html
 
+google-gin library:
+   https://code.google.com/p/google-gin/
+   Copyright: under Apache License 2.0
+   http://www.apache.org/licenses/LICENSE-2.0
+
+gwt-platform library:
+   https://code.google.com/p/gwt-platform/
+   Copyright: under Apache License 2.0
+   http://www.apache.org/licenses/LICENSE-2.0
+
+emoticons from Adium and Kopete theme
+   kopete adium theme by robotangel and original "Adiumicons" by Oscar Gruno
+   under GNU GPL license
+
 dom region library:
    XWiki Platform
    http://www.xwiki.org/
@@ -133,8 +149,3 @@
    from GNU Classpath
    Copyright: under GNU General Public License
    http://www.gnu.org/licenses/gpl.html
-
-qtip:
-   http://craigsworks.com/projects/qtip/docs/support/
-   Under MIT license:
-   http://creativecommons.org/licenses/MIT/ 

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/pom.xml	2011-02-07 17:33:32 UTC (rev 1239)
@@ -71,13 +71,8 @@
       <id>cobogw</id>
       <name>Cobogw repository at googlecode</name>
       <url>http://cobogw.googlecode.com/svn/maven2</url>
-    </repository>
+    </repository>    
     <repository>
-      <id>gwtp</id>
-      <name>gwtp repo</name>
-      <url>http://maven.gwt-platform.googlecode.com/hg/</url>
-    </repository>
-    <repository>
       <id>gwt-repo</id>
       <url>http://google-web-toolkit.googlecode.com/svn/2.1.0/gwt/maven/</url>
       <name>Google Web Toolkit Repository</name>
@@ -232,12 +227,30 @@
       <artifactId>cobogw</artifactId>
       <version>1.3.1</version>
     </dependency>
+<dependency>
+  <groupId>com.gwtplatform</groupId>
+  <artifactId>gwtp-all</artifactId>
+  <version>0.5</version>
+  <exclusions>
+    <exclusion>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-core</artifactId>
+    </exclusion>
+    <exclusion>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context</artifactId>
+    </exclusion>
+    <exclusion>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-beans</artifactId>
+    </exclusion>
+    <exclusion>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-web</artifactId>
+    </exclusion>
+  </exclusions> 
+</dependency>
     <dependency>
-      <groupId>com.gwtplatform</groupId>
-      <artifactId>gwtp</artifactId>
-      <version>0.5-SNAPSHOT</version>
-    </dependency>
-    <dependency>
       <groupId>org.adamtacy</groupId>
       <artifactId>gwt-fx</artifactId>
       <version>r464</version>

Modified: trunk/src/main/java/cc/kune/core/shared/dto/AccessRolDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/AccessRolDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/AccessRolDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/BasicMimeTypeDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/BasicMimeTypeDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/BasicMimeTypeDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/CommentDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/CommentDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/CommentDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/ContainerDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/ContainerDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/ContainerDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/ContainerSimpleDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/ContainerSimpleDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/ContainerSimpleDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/ContentSimpleDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/ContentSimpleDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/ContentSimpleDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/GroupDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/GroupDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/GroupDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/GroupListDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/GroupListDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/GroupListDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/GroupType.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/GroupType.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/GroupType.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/I18nCountryDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/I18nCountryDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/I18nCountryDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/I18nLanguageDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/I18nLanguageDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/I18nLanguageDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/I18nLanguageSimpleDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/I18nLanguageSimpleDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/I18nLanguageSimpleDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/I18nTranslationDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/I18nTranslationDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/I18nTranslationDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/InitDataDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/InitDataDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/InitDataDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/LicenseDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/LicenseDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/LicenseDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/LinkDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/LinkDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/LinkDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/ParticipationDataDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/ParticipationDataDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/ParticipationDataDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/RoomDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/RoomDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/RoomDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/SearchResultDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/SearchResultDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/SearchResultDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/SocialNetworkDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/SocialNetworkDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/SocialNetworkDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/SocialNetworkDataDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/SocialNetworkDataDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/SocialNetworkDataDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/SocialNetworkRequestResult.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/SocialNetworkRequestResult.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/SocialNetworkRequestResult.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/StateAbstractDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/StateAbstractDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/StateAbstractDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/StateContainerDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/StateContainerDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/StateContainerDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/StateContentDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/StateContentDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/StateContentDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/StateNoContentDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/StateNoContentDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/StateNoContentDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/TagDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/TagDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/TagDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/TimeZoneDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/TimeZoneDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/TimeZoneDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/ToolSimpleDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/ToolSimpleDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/ToolSimpleDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/UserBuddiesDataDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/UserBuddiesDataDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/UserBuddiesDataDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/UserDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/UserDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/UserDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/core/shared/dto/UserInfoDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/UserInfoDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/UserInfoDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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
@@ -24,21 +24,22 @@
 import com.google.gwt.user.client.rpc.IsSerializable;
 
 public class UserInfoDTO implements IsSerializable {
-    private UserSimpleDTO user;
     private String chatName;
     private String chatPassword;
-    private String homePage;
-    private String userHash;
+    private List<String> enabledTools;
     private List<GroupDTO> groupsIsAdmin;
     private List<GroupDTO> groupsIsCollab;
+    private String homePage;
     private boolean showDeletedContent;
-    private List<String> enabledTools;
+    private UserSimpleDTO user;
     private GroupDTO userGroup;
+    private String userHash;
 
     public String getChatName() {
         return chatName;
     }
 
+    @Deprecated
     public String getChatPassword() {
         return chatPassword;
     }
@@ -95,6 +96,7 @@
         this.chatName = chatName;
     }
 
+    @Deprecated
     public void setChatPassword(final String password) {
         this.chatPassword = password;
 

Modified: trunk/src/main/java/cc/kune/core/shared/dto/UserSimpleDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/UserSimpleDTO.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/core/shared/dto/UserSimpleDTO.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 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

Modified: trunk/src/main/java/cc/kune/domain/User.java
===================================================================
--- trunk/src/main/java/cc/kune/domain/User.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/domain/User.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -28,6 +28,7 @@
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
 import javax.persistence.Id;
+import javax.persistence.Lob;
 import javax.persistence.ManyToOne;
 import javax.persistence.OneToOne;
 import javax.persistence.Table;
@@ -76,6 +77,11 @@
     // @OneToOne(cascade = CascadeType.REMOVE)
     // private final CustomProperties customProperties;
 
+    @Basic
+    @Lob
+    @Column(nullable = false)
+    private byte[] diggest;
+
     @Column(unique = true, nullable = false)
     @Email
     @Length(min = 1)
@@ -102,6 +108,11 @@
     @Length(min = 6, max = 40)
     private String password;
 
+    @Basic
+    @Lob
+    @Column(nullable = false)
+    private byte[] salt;
+
     @Field(index = Index.UN_TOKENIZED, store = Store.NO)
     @Column(unique = true)
     // http://www.hibernate.org/hib_docs/validator/reference/en/html/validator-defineconstraints.html
@@ -120,7 +131,7 @@
     // private Properties properties;
 
     public User() {
-        this(null, null, null, null, null, null, null);
+        this(null, null, null, null, null, null, null, null, null);
     }
 
     //
@@ -133,11 +144,14 @@
     // }
 
     public User(final String shortName, final String longName, final String email, final String passwd,
-            final I18nLanguage language, final I18nCountry country, final TimeZone timezone) {
+            final byte[] diggets, final byte[] salt, final I18nLanguage language, final I18nCountry country,
+            final TimeZone timezone) {
         this.shortName = shortName;
         this.name = longName;
         this.email = email;
         this.password = passwd;
+        this.diggest = diggets;
+        this.salt = salt;
         this.userGroup = null;
         this.language = language;
         this.country = country;
@@ -180,6 +194,10 @@
     // return customProperties;
     // }
 
+    public byte[] getDiggest() {
+        return diggest;
+    }
+
     public String getEmail() {
         return email;
     }
@@ -205,13 +223,17 @@
         return name;
     }
 
+    // public Properties getProperties() {
+    // return properties;
+    // }
+
     public String getPassword() {
         return password;
     }
 
-    // public Properties getProperties() {
-    // return properties;
-    // }
+    public byte[] getSalt() {
+        return salt;
+    }
 
     public String getShortName() {
         return shortName;
@@ -243,6 +265,10 @@
         this.country = country;
     }
 
+    public void setDiggest(final byte[] diggest) {
+        this.diggest = diggest;
+    }
+
     public void setEmail(final String email) {
         this.email = email;
     }
@@ -266,13 +292,11 @@
 
     public void setPassword(final String password) {
         this.password = password;
-        // http://www.dynamic.net.au/christos/crypt/
-        // Use UnixCrypt (jetty)
     }
 
-    // public void setProperties(final Properties properties) {
-    // this.properties = properties;
-    // }
+    public void setSalt(final byte[] salt) {
+        this.salt = salt;
+    }
 
     public void setShortName(final String shortName) {
         this.shortName = shortName;

Modified: trunk/src/main/java/cc/kune/wave/server/CustomUserRegistrationServlet.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/server/CustomUserRegistrationServlet.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/wave/server/CustomUserRegistrationServlet.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -71,8 +71,15 @@
     @Override
     protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws IOException {
         req.setCharacterEncoding("UTF-8");
-        String message = tryCreateUser(req.getParameter(HttpRequestBasedCallbackHandler.ADDRESS_FIELD),
-                req.getParameter(HttpRequestBasedCallbackHandler.PASSWORD_FIELD));
+
+        final String username = req.getParameter(HttpRequestBasedCallbackHandler.ADDRESS_FIELD);
+        String passwd = req.getParameter(HttpRequestBasedCallbackHandler.PASSWORD_FIELD);
+        if (passwd == null) {
+            // Register the user with an empty password.
+            passwd = "";
+        }
+        final PasswordDigest passwordDigest = new PasswordDigest(passwd.toCharArray());
+        String message = tryCreateUser(username, passwordDigest);
         String responseType = AuthenticationServlet.RESPONSE_STATUS_SUCCESS;
 
         if (message != null) {
@@ -90,10 +97,9 @@
      * Try to create a user with the provided username and password. On error,
      * returns a string containing an error message. On success, returns null.
      */
-    public String tryCreateUser(final String username, final String password) {
+    public String tryCreateUser(final String username, final PasswordDigest passwordDigest) {
         String lusername = username;
-        String lpassword = password;
-        final String message = null;
+        // final String message = null;
         ParticipantId id = null;
 
         try {
@@ -130,12 +136,7 @@
             return "An unexpected error occured while trying to retrieve account status";
         }
 
-        if (lpassword == null) {
-            // Register the user with an empty password.
-            lpassword = "";
-        }
-
-        final HumanAccountDataImpl account = new HumanAccountDataImpl(id, new PasswordDigest(lpassword.toCharArray()));
+        final HumanAccountDataImpl account = new HumanAccountDataImpl(id, passwordDigest);
         try {
             accountStore.putAccount(account);
         } catch (final PersistenceException e) {

Modified: trunk/src/main/java/cc/kune/wave/server/WaveStarter.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/server/WaveStarter.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/cc/kune/wave/server/WaveStarter.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -66,7 +66,7 @@
 public class WaveStarter {
 
     private static final Log LOG = LogFactory.getLog(WaveStarter.class);
-    private static final String PROPERTIES_FILE_KEY = "wave-server.properties";
+    public static final String PROPERTIES_FILE_KEY = "wave-server.properties";
 
     private static Module buildFederationModule(final Injector settingsInjector, final boolean enableFederation)
             throws ConfigurationException {

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -12,6 +12,7 @@
 import org.ourproject.kune.platf.server.manager.LicenseManager;
 import org.ourproject.kune.platf.server.manager.UserManager;
 import org.ourproject.kune.platf.server.properties.DatabaseProperties;
+import org.waveprotocol.box.server.authentication.PasswordDigest;
 
 import cc.kune.core.client.errors.UserMustBeLoggedException;
 import cc.kune.core.shared.domain.ContentStatus;
@@ -59,11 +60,15 @@
         final String adminEmail = properties.getAdminEmail();
         final String adminPassword = properties.getAdminPassword();
         // FIXME:
-        final User user = new User(adminShortName, adminName, adminEmail, adminPassword,
-                languageManager.findByCode("en"), countryManager.findByCode("GB"), TimeZone.getDefault());
+
+        final PasswordDigest passwdDigest = new PasswordDigest(adminPassword.toCharArray());
+        final User user = new User(adminShortName, adminName, adminEmail, adminPassword, passwdDigest.getDigest(),
+                passwdDigest.getSalt(), languageManager.findByCode("en"), countryManager.findByCode("GB"),
+                TimeZone.getDefault());
         groupManager.createUserGroup(user, false);
         final User dummyUser = new User("dummy", "dummy user", "example at example.com", adminPassword,
-                languageManager.findByCode("en"), countryManager.findByCode("GB"), TimeZone.getDefault());
+                passwdDigest.getDigest(), passwdDigest.getSalt(), languageManager.findByCode("en"),
+                countryManager.findByCode("GB"), TimeZone.getDefault());
         groupManager.createUserGroup(dummyUser, false);
 
         final String siteName = properties.getDefaultSiteName();

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/GroupManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/GroupManagerDefault.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/GroupManagerDefault.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -205,6 +205,8 @@
             throws GroupNameInUseException {
         try {
             persist(group);
+        } catch (final IllegalStateException e) {
+            e.printStackTrace();
         } catch (final PersistenceException e) {
             if (e.getCause() instanceof ConstraintViolationException) {
                 throw new GroupNameInUseException();

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -38,6 +38,7 @@
 import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
 import org.ourproject.kune.platf.server.manager.UserManager;
 import org.ourproject.kune.platf.server.properties.ChatProperties;
+import org.waveprotocol.box.server.authentication.PasswordDigest;
 
 import cc.kune.core.client.errors.I18nNotFoundException;
 import cc.kune.core.shared.i18n.I18nTranslationService;
@@ -90,13 +91,16 @@
         } catch (final NoResultException e) {
             throw new I18nNotFoundException();
         }
-        waveUserRegister.tryCreateUser(shortName, passwd);
+        final PasswordDigest passwdDigest = new PasswordDigest(passwd.toCharArray());
+
+        waveUserRegister.tryCreateUser(shortName, passwdDigest);
         // if (userPropGroup == null) {
         // userPropGroup = propGroupManager.find(User.PROPS_ID);
         // }
         // final Properties userProp = new Properties(userPropGroup);
         // propManager.persist(userProp);
-        final User user = new User(shortName, longName, email, passwd, language, country, tz);
+        final User user = new User(shortName, longName, email, passwd, passwdDigest.getDigest(),
+                passwdDigest.getSalt(), language, country, tz);
         return user;
 
     }
@@ -120,6 +124,7 @@
     }
 
     @Override
+    @Deprecated
     public UserBuddiesData getUserBuddies(final String shortName) {
         // XEP-133 get roster by admin part is not implemented in openfire
         // also access to the openfire db is not easy with hibernate (the use of
@@ -128,6 +133,7 @@
         // In the future cache this.
         final String domain = "@" + properties.getDomain();
         final UserBuddiesData buddiesData = new UserBuddiesData();
+
         final User user = finder.getByShortName(shortName);
         final ChatConnection connection = xmppManager.login(user.getShortName() + domain, user.getPassword(), "kserver");
         final Collection<RosterEntry> roster = xmppManager.getRoster(connection);

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/rpc/ContentRPC.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rpc/ContentRPC.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/rpc/ContentRPC.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -23,8 +23,6 @@
 
 import javax.persistence.NoResultException;
 
-import org.ourproject.kune.chat.server.ChatServerTool;
-import org.ourproject.kune.chat.server.managers.ChatConnection;
 import org.ourproject.kune.chat.server.managers.XmppManager;
 import org.ourproject.kune.platf.server.UserSession;
 import org.ourproject.kune.platf.server.access.AccessRightsService;
@@ -48,7 +46,6 @@
 import cc.kune.core.client.errors.AccessViolationException;
 import cc.kune.core.client.errors.ContentNotFoundException;
 import cc.kune.core.client.errors.DefaultException;
-import cc.kune.core.client.errors.GroupNotFoundException;
 import cc.kune.core.client.errors.NoDefaultContentException;
 import cc.kune.core.client.errors.ToolNotFoundException;
 import cc.kune.core.client.rpcservices.ContentService;
@@ -80,19 +77,19 @@
 
 @Singleton
 public class ContentRPC implements ContentService, RPC {
+    private final AccessService accessService;
+    private final CommentManager commentManager;
+    private final ContainerManager containerManager;
+    private final ContentManager contentManager;
+    private final CreationService creationService;
+    private final FinderService finderService;
+    private final GroupManager groupManager;
+    private final Mapper mapper;
+    private final AccessRightsService rightsService;
     private final StateService stateService;
+    private final TagUserContentManager tagManager;
     private final Provider<UserSession> userSessionProvider;
-    private final Mapper mapper;
-    private final GroupManager groupManager;
-    private final AccessService accessService;
-    private final CreationService creationService;
     private final XmppManager xmppManager;
-    private final ContentManager contentManager;
-    private final ContainerManager containerManager;
-    private final TagUserContentManager tagManager;
-    private final CommentManager commentManager;
-    private final AccessRightsService rightsService;
-    private final FinderService finderService;
 
     @Inject
     public ContentRPC(final FinderService finderService, final Provider<UserSession> userSessionProvider,
@@ -179,26 +176,30 @@
     @Transactional(type = TransactionType.READ_WRITE)
     public StateContainerDTO addRoom(final String userHash, final StateToken parentToken, final String roomName)
             throws DefaultException {
-        final String groupShortName = parentToken.getGroup();
-        final User user = getCurrentUser();
-        final String userShortName = user.getShortName();
-        final ChatConnection connection = xmppManager.login(userShortName, user.getPassword(), userHash);
-        xmppManager.createRoom(connection, roomName, userShortName + userHash);
-        xmppManager.disconnect(connection);
-        try {
-            final Container container = createFolder(groupShortName, ContentUtils.parseId(parentToken.getFolder()),
-                    roomName, ChatServerTool.TYPE_ROOM);
-            return getState(user, container);
-        } catch (final ContentNotFoundException e) {
-            xmppManager.destroyRoom(connection, roomName);
-            throw new ContentNotFoundException();
-        } catch (final AccessViolationException e) {
-            xmppManager.destroyRoom(connection, roomName);
-            throw new AccessViolationException();
-        } catch (final GroupNotFoundException e) {
-            xmppManager.destroyRoom(connection, roomName);
-            throw new GroupNotFoundException();
-        }
+        // final String groupShortName = parentToken.getGroup();
+        // final User user = getCurrentUser();
+        // final String userShortName = user.getShortName();
+        // final ChatConnection connection = xmppManager.login(userShortName,
+        // user.getPassword(), userHash);
+        // xmppManager.createRoom(connection, roomName, userShortName +
+        // userHash);
+        // xmppManager.disconnect(connection);
+        // try {
+        // final Container container = createFolder(groupShortName,
+        // ContentUtils.parseId(parentToken.getFolder()),
+        // roomName, ChatServerTool.TYPE_ROOM);
+        // return getState(user, container);
+        // } catch (final ContentNotFoundException e) {
+        // xmppManager.destroyRoom(connection, roomName);
+        // throw new ContentNotFoundException();
+        // } catch (final AccessViolationException e) {
+        // xmppManager.destroyRoom(connection, roomName);
+        // throw new AccessViolationException();
+        // } catch (final GroupNotFoundException e) {
+        // xmppManager.destroyRoom(connection, roomName);
+        // throw new GroupNotFoundException();
+        // }
+        return null;
     }
 
     @Override
@@ -210,6 +211,24 @@
         return createContent(parentToken, "Wave embeded test", typeId, waveId);
     }
 
+    private StateContentDTO createContent(final StateToken parentToken, final String title, final String typeId,
+            final String body) {
+        final User user = getCurrentUser();
+        final Container container = accessService.accessToContainer(ContentUtils.parseId(parentToken.getFolder()),
+                user, AccessRol.Editor);
+        final Content addedContent = creationService.createContent(title, body, user, container, typeId);
+        return getState(user, addedContent);
+    }
+
+    private Container createFolder(final String groupShortName, final Long parentFolderId, final String title,
+            final String typeId) throws DefaultException {
+        final User user = getCurrentUser();
+        final Group group = groupManager.findByShortName(groupShortName);
+        final Container container = creationService.createFolder(group, parentFolderId, title, user.getLanguage(),
+                typeId);
+        return container;
+    }
+
     @Override
     @Authenticated
     @Authorizated(accessRolRequired = AccessRol.Administrator)
@@ -246,6 +265,40 @@
         }
     }
 
+    @Authenticated(mandatory = false)
+    @Authorizated(accessRolRequired = AccessRol.Viewer)
+    private StateAbstractDTO getContentOrDefContent(final String userHash, final StateToken stateToken,
+            final User user, final Content content) {
+        final Long id = content.getId();
+        if (id != null) {
+            // Content
+            return mapState(stateService.create(user, content), user);
+        } else {
+            // Container
+            final Container container = content.getContainer();
+            return mapState(stateService.create(user, container), user);
+        }
+    }
+
+    private User getCurrentUser() {
+        return getUserSession().getUser();
+    }
+
+    private StateContainerDTO getState(final User user, final Container container) {
+        final StateContainer state = stateService.create(user, container);
+        return mapState(state, user);
+    }
+
+    private StateContentDTO getState(final User user, final Content content) {
+        final StateContent state = stateService.create(user, content);
+        return mapState(state, user);
+    }
+
+    private TagCloudResult getSummaryTags(final Group group) {
+        final TagCloudResult result = tagManager.getTagCloudResultByGroup(group);
+        return result;
+    }
+
     @Override
     @Authenticated(mandatory = false)
     @Authorizated(accessRolRequired = AccessRol.Viewer)
@@ -255,6 +308,45 @@
         return getSummaryTags(group);
     }
 
+    private UserSession getUserSession() {
+        return userSessionProvider.get();
+    }
+
+    private boolean isUserLoggedIn() {
+        return getUserSession().isUserLoggedIn();
+    }
+
+    private void mapContentRightsInstate(final User user, final AccessLists groupAccessList,
+            final ContentSimpleDTO siblingDTO) {
+        final Content sibling = contentManager.find(siblingDTO.getId());
+        final AccessLists lists = sibling.hasAccessList() ? sibling.getAccessLists() : groupAccessList;
+        siblingDTO.setRights(mapper.map(rightsService.get(user, lists), AccessRights.class));
+    }
+
+    private StateContainerDTO mapState(final StateContainer state, final User user) {
+        final StateContainerDTO stateDTO = mapper.map(state, StateContainerDTO.class);
+        final AccessLists groupAccessList = state.getGroup().getSocialNetwork().getAccessLists();
+        for (final ContentSimpleDTO siblingDTO : stateDTO.getRootContainer().getContents()) {
+            mapContentRightsInstate(user, groupAccessList, siblingDTO);
+        }
+        for (final ContentSimpleDTO siblingDTO : stateDTO.getContainer().getContents()) {
+            mapContentRightsInstate(user, groupAccessList, siblingDTO);
+        }
+        return stateDTO;
+    }
+
+    private StateContentDTO mapState(final StateContent state, final User user) {
+        final StateContentDTO stateDTO = mapper.map(state, StateContentDTO.class);
+        final AccessLists groupAccessList = state.getGroup().getSocialNetwork().getAccessLists();
+        for (final ContentSimpleDTO siblingDTO : stateDTO.getRootContainer().getContents()) {
+            mapContentRightsInstate(user, groupAccessList, siblingDTO);
+        }
+        for (final ContentSimpleDTO siblingDTO : stateDTO.getContainer().getContents()) {
+            mapContentRightsInstate(user, groupAccessList, siblingDTO);
+        }
+        return stateDTO;
+    }
+
     @Override
     @Authenticated
     @Authorizated(accessRolRequired = AccessRol.Viewer)
@@ -320,6 +412,21 @@
         return getContent(userHash, token);
     }
 
+    private Content renameContent(final String documentId, final String newName) throws ContentNotFoundException,
+            DefaultException {
+        final Long contentId = ContentUtils.parseId(documentId);
+        final User user = getCurrentUser();
+        return contentManager.renameContent(user, contentId, newName);
+    }
+
+    private Container renameFolder(final String groupShortName, final Long folderId, final String newName)
+            throws DefaultException {
+        final Group group = groupManager.findByShortName(groupShortName);
+        final User user = getCurrentUser();
+        final Container container = accessService.accessToContainer(folderId, user, AccessRol.Editor);
+        return containerManager.renameFolder(group, container, newName);
+    }
+
     @Override
     @Authenticated
     @Authorizated(accessRolRequired = AccessRol.Editor, mustCheckMembership = false)
@@ -413,110 +520,4 @@
         return mapper.map(comment, CommentDTO.class);
     }
 
-    private StateContentDTO createContent(final StateToken parentToken, final String title, final String typeId,
-            final String body) {
-        final User user = getCurrentUser();
-        final Container container = accessService.accessToContainer(ContentUtils.parseId(parentToken.getFolder()),
-                user, AccessRol.Editor);
-        final Content addedContent = creationService.createContent(title, body, user, container, typeId);
-        return getState(user, addedContent);
-    }
-
-    private Container createFolder(final String groupShortName, final Long parentFolderId, final String title,
-            final String typeId) throws DefaultException {
-        final User user = getCurrentUser();
-        final Group group = groupManager.findByShortName(groupShortName);
-        final Container container = creationService.createFolder(group, parentFolderId, title, user.getLanguage(),
-                typeId);
-        return container;
-    }
-
-    @Authenticated(mandatory = false)
-    @Authorizated(accessRolRequired = AccessRol.Viewer)
-    private StateAbstractDTO getContentOrDefContent(final String userHash, final StateToken stateToken,
-            final User user, final Content content) {
-        final Long id = content.getId();
-        if (id != null) {
-            // Content
-            return mapState(stateService.create(user, content), user);
-        } else {
-            // Container
-            final Container container = content.getContainer();
-            return mapState(stateService.create(user, container), user);
-        }
-    }
-
-    private User getCurrentUser() {
-        return getUserSession().getUser();
-    }
-
-    private StateContainerDTO getState(final User user, final Container container) {
-        final StateContainer state = stateService.create(user, container);
-        return mapState(state, user);
-    }
-
-    private StateContentDTO getState(final User user, final Content content) {
-        final StateContent state = stateService.create(user, content);
-        return mapState(state, user);
-    }
-
-    private TagCloudResult getSummaryTags(final Group group) {
-        final TagCloudResult result = tagManager.getTagCloudResultByGroup(group);
-        return result;
-    }
-
-    private UserSession getUserSession() {
-        return userSessionProvider.get();
-    }
-
-    private boolean isUserLoggedIn() {
-        return getUserSession().isUserLoggedIn();
-    }
-
-    private void mapContentRightsInstate(final User user, final AccessLists groupAccessList,
-            final ContentSimpleDTO siblingDTO) {
-        final Content sibling = contentManager.find(siblingDTO.getId());
-        final AccessLists lists = sibling.hasAccessList() ? sibling.getAccessLists() : groupAccessList;
-        siblingDTO.setRights(mapper.map(rightsService.get(user, lists), AccessRights.class));
-    }
-
-    private StateContainerDTO mapState(final StateContainer state, final User user) {
-        final StateContainerDTO stateDTO = mapper.map(state, StateContainerDTO.class);
-        final AccessLists groupAccessList = state.getGroup().getSocialNetwork().getAccessLists();
-        for (final ContentSimpleDTO siblingDTO : stateDTO.getRootContainer().getContents()) {
-            mapContentRightsInstate(user, groupAccessList, siblingDTO);
-        }
-        for (final ContentSimpleDTO siblingDTO : stateDTO.getContainer().getContents()) {
-            mapContentRightsInstate(user, groupAccessList, siblingDTO);
-        }
-        return stateDTO;
-    }
-
-    private StateContentDTO mapState(final StateContent state, final User user) {
-        final StateContentDTO stateDTO = mapper.map(state, StateContentDTO.class);
-        final AccessLists groupAccessList = state.getGroup().getSocialNetwork().getAccessLists();
-        for (final ContentSimpleDTO siblingDTO : stateDTO.getRootContainer().getContents()) {
-            mapContentRightsInstate(user, groupAccessList, siblingDTO);
-        }
-        for (final ContentSimpleDTO siblingDTO : stateDTO.getContainer().getContents()) {
-            mapContentRightsInstate(user, groupAccessList, siblingDTO);
-        }
-        return stateDTO;
-    }
-
-    private Content renameContent(final String documentId, final String newName) throws ContentNotFoundException,
-            DefaultException {
-        final Long contentId = ContentUtils.parseId(documentId);
-        final User user = getCurrentUser();
-        return contentManager.renameContent(user, contentId, newName);
-    }
-
-    private Container renameFolder(final String groupShortName, final Long folderId, final String newName)
-            throws DefaultException {
-        final Group group = groupManager.findByShortName(groupShortName);
-        final User user = getCurrentUser();
-        final Container container = accessService.accessToContainer(folderId, user, AccessRol.Editor);
-        return containerManager.renameFolder(group, container, newName);
-    }
-
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfo.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfo.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfo.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -27,16 +27,16 @@
 import cc.kune.domain.User;
 
 public class UserInfo {
-    private User user;
     private String chatName;
     private String chatPassword;
-    private String homePage;
+    private List<String> enabledTools;
     private List<Group> groupsIsAdmin;
     private List<Group> groupsIsCollab;
-    private String userHash;
+    private String homePage;
     private boolean showDeletedContent;
-    private List<String> enabledTools;
+    private User user;
     private Group userGroup;
+    private String userHash;
 
     public String getChatName() {
         return chatName;
@@ -98,6 +98,7 @@
         this.chatName = chatName;
     }
 
+    @Deprecated
     public void setChatPassword(final String chatPassword) {
         this.chatPassword = chatPassword;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoServiceDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoServiceDefault.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoServiceDefault.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -34,8 +34,8 @@
 @Singleton
 public class UserInfoServiceDefault implements UserInfoService {
 
+    private final GroupManager groupManager;
     private final SocialNetworkManager socialNetworkManager;
-    private final GroupManager groupManager;
 
     @Inject
     public UserInfoServiceDefault(final SocialNetworkManager socialNetwork, final GroupManager groupManager) {
@@ -43,6 +43,7 @@
         this.groupManager = groupManager;
     }
 
+    @Override
     public UserInfo buildInfo(final User user, final String userHash) throws DefaultException {
         UserInfo userInfo = null;
         if (User.isKnownUser(user)) {

Added: trunk/src/main/resources/wave-server-testing.properties
===================================================================
--- trunk/src/main/resources/wave-server-testing.properties	                        (rev 0)
+++ trunk/src/main/resources/wave-server-testing.properties	2011-02-07 17:33:32 UTC (rev 1239)
@@ -0,0 +1,63 @@
+# Core Configuration for the Wave in a Box server
+#
+
+# Domain name of the wave server 
+wave_server_domain = localhost
+
+# A comma separated list of address on which to listen for connections.
+# Each address is a comma separated host:port pair.
+http_frontend_public_address = localhost:9898
+http_frontend_addresses = ${http_frontend_public_address}
+http_baseurl = /
+resource_base = ./target/kune-0.0.7/
+
+### Server-specific variables
+###
+
+# Settings for the different persistence stores. Currently supported: file, file, mongodb
+signer_info_store_type = memory
+
+# The location where signer info certificate data is stored on disk. This should be changed.
+# Note: This is only used when using the file signer info store. It is ignored
+# for other data store types.
+signer_info_store_directory = _certificates
+
+# Currently supported attachment types: mongodb, disk
+attachment_store_type = disk
+
+# The location where attachments are stored on disk. This should be changed.
+# Note: This is only used when using the disk attachment store. It is ignored
+# for other data store types.
+attachment_store_directory = _attachments
+
+# Currently supported account store types: fake, memory, file, mongodb
+account_store_type = memory
+
+# The location where accounts are stored on disk. This should be changed.
+# Note: This is only used when using the file account store. It is ignored
+# for other data store types.
+account_store_directory = _accounts
+
+# Currently supported delta store types: memory, file
+delta_store_type = memory
+
+# The location where deltas are stored on disk. This should be changed.
+# Note: This is only used when using the file delta store. It is ignored
+# for other data store types.
+delta_store_directory = _deltas
+
+# Set true to use Socket.IO instead of raw WebSockets in the webclient.
+use_socketio = true
+
+# To enable federation, edit the server.federation.config file and uncomment the line below
+#include = server.federation.config
+
+# These two parameters MUST appear in this file AFTER the above include of the
+# federation config file. This is necesary so that the federation config file
+# can override these two values.
+
+# Set true to disable the verification of signed deltas
+waveserver_disable_verification = true
+
+# Set true to disable the verification of signers (certificates)
+waveserver_disable_signer_verification = true


Property changes on: trunk/src/main/resources/wave-server-testing.properties
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTest.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTest.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -28,6 +28,7 @@
 import com.google.inject.Inject;
 
 public abstract class IntegrationTest {
+
     @Inject
     DatabaseProperties properties;
     @Inject

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -21,13 +21,19 @@
 
 import javax.servlet.http.HttpServletRequest;
 
+import org.apache.commons.configuration.ConfigurationException;
 import org.ourproject.kune.chat.server.ChatServerModule;
 import org.ourproject.kune.docs.server.DocumentServerModule;
 import org.ourproject.kune.platf.server.KunePersistenceService;
 import org.ourproject.kune.platf.server.PlatformServerModule;
+import org.ourproject.kune.platf.server.TestConstants;
 import org.ourproject.kune.platf.server.properties.PropertiesFileName;
 import org.ourproject.kune.wiki.server.WikiServerModule;
+import org.waveprotocol.box.server.CoreSettings;
+import org.waveprotocol.box.server.persistence.PersistenceModule;
 
+import cc.kune.wave.server.CustomSettingsBinder;
+
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -39,22 +45,32 @@
 public class IntegrationTestHelper {
 
     public static Injector createInjector() {
-        final Injector injector = Guice.createInjector(new PlatformServerModule(), new DocumentServerModule(),
-                new ChatServerModule(), new WikiServerModule(), new AbstractModule() {
-                    @Override
-                    protected void configure() {
-                        bindScope(SessionScoped.class, Scopes.SINGLETON);
-                        bindScope(RequestScoped.class, Scopes.SINGLETON);
-                        // test: use
-                        // memory
-                        // test_db: use
-                        // mysql
-                        bindConstant().annotatedWith(JpaUnit.class).to("test");
-                        bindConstant().annotatedWith(PropertiesFileName.class).to("kune.properties");
-                        bind(HttpServletRequest.class).to(HttpServletRequestMocked.class);
-                    }
-                });
-        return injector;
+        Injector injector;
+        try {
+            injector = Guice.createInjector(CustomSettingsBinder.bindSettings(TestConstants.WAVE_TEST_PROPFILE,
+                    CoreSettings.class));
+            final PersistenceModule persistenceModule = injector.getInstance(PersistenceModule.class);
+
+            final Injector childInjector = injector.createChildInjector(persistenceModule, new PlatformServerModule(),
+                    new DocumentServerModule(), new ChatServerModule(), new WikiServerModule(), new AbstractModule() {
+                        @Override
+                        protected void configure() {
+                            bindScope(SessionScoped.class, Scopes.SINGLETON);
+                            bindScope(RequestScoped.class, Scopes.SINGLETON);
+                            // test: use
+                            // memory
+                            // test_db: use
+                            // mysql
+                            bindConstant().annotatedWith(JpaUnit.class).to(TestConstants.PERSISTENCE_UNIT);
+                            bindConstant().annotatedWith(PropertiesFileName.class).to("kune.properties");
+                            bind(HttpServletRequest.class).to(HttpServletRequestMocked.class);
+                        }
+                    });
+            return childInjector;
+        } catch (final ConfigurationException e) {
+            e.printStackTrace();
+        }
+        return null;
     }
 
     public IntegrationTestHelper(final Object... tests) {

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	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -19,7 +19,9 @@
  */
 package org.ourproject.kune.platf.integration.site;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 import java.util.List;
 
@@ -49,20 +51,34 @@
 import com.google.inject.Inject;
 
 public class UserServiceTest extends IntegrationTest {
+    private I18nCountryDTO country;
     @Inject
+    I18nLanguageManager i18nLangManager;
+    private I18nLanguageDTO lang;
+    @Inject
+    Mapper mapper;
+    @Inject
     DatabaseProperties properties;
+    private TimeZoneDTO timezone;
     @Inject
-    UserService userService;
-    @Inject
     UserInfoService userInfoService;
     @Inject
-    Mapper mapper;
-    @Inject
-    I18nLanguageManager i18nLangManager;
-    private I18nLanguageDTO lang;
-    private I18nCountryDTO country;
-    private TimeZoneDTO timezone;
+    UserService userService;
 
+    private void assertEqualGroupLists(final List<GroupDTO> listDTO, final List<Group> list) {
+        assertEquals(listDTO.size(), list.size());
+        for (int i = 0; i < listDTO.size(); i++) {
+            final Object object = listDTO.get(i);
+            assertEquals(GroupDTO.class, object.getClass());
+            final GroupDTO d = (GroupDTO) object;
+            final Group l = list.get(i);
+            assertNotNull(d);
+            assertNotNull(l);
+            final GroupDTO map = mapper.map(l, GroupDTO.class);
+            assertEquals(map.getShortName(), d.getShortName());
+        }
+    }
+
     @Test(expected = EmailAddressInUseException.class)
     public void createUserExistingEmailFails() throws Exception {
         assertNull(session.getUser().getId());
@@ -118,24 +134,9 @@
         final UserInfoDTO userInfoDTO = mapper.map(userInfo, UserInfoDTO.class);
         assertEquals(userInfo.getName(), userInfoDTO.getName());
         assertEquals(userInfo.getChatName(), userInfoDTO.getChatName());
-        assertEquals(userInfo.getChatPassword(), userInfoDTO.getChatPassword());
         final List<Group> adminsGroup = userInfo.getGroupsIsAdmin();
         final List<GroupDTO> adminsGroupDTO = userInfoDTO.getGroupsIsAdmin();
         assertEqualGroupLists(adminsGroupDTO, adminsGroup);
     }
 
-    private void assertEqualGroupLists(final List<GroupDTO> listDTO, final List<Group> list) {
-        assertEquals(listDTO.size(), list.size());
-        for (int i = 0; i < listDTO.size(); i++) {
-            final Object object = listDTO.get(i);
-            assertEquals(GroupDTO.class, object.getClass());
-            final GroupDTO d = (GroupDTO) object;
-            final Group l = list.get(i);
-            assertNotNull(d);
-            assertNotNull(l);
-            final GroupDTO map = mapper.map(l, GroupDTO.class);
-            assertEquals(map.getShortName(), d.getShortName());
-        }
-    }
-
 }

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/PersistencePreLoadedDataTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/PersistencePreLoadedDataTest.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/PersistencePreLoadedDataTest.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -48,7 +48,7 @@
     protected static final String USER_EMAIL = "useremail at example.com";
     protected static final String USER_LONG_NAME = "the user long name";
     protected static final String USER_PASSWORD = "userPassword";
-    protected static final String USER_SHORT_NAME = "user-shortname";
+    protected static final String USER_SHORT_NAME = "usershortname";
 
     protected Container container;
     @Inject
@@ -81,9 +81,6 @@
     protected UserManager userManager;
 
     public PersistencePreLoadedDataTest() {
-        // test: use memory
-        // test_db: use mysql
-        // super("test_db", "kune.properties");
     }
 
     @After

Added: trunk/src/test/java/org/ourproject/kune/platf/server/TestConstants.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/TestConstants.java	                        (rev 0)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/TestConstants.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -0,0 +1,11 @@
+package org.ourproject.kune.platf.server;
+
+public final class TestConstants {
+    // test: use memory
+    // test_db: use mysql
+    public static final String PERSISTENCE_UNIT = "test_db";
+    public static final String WAVE_TEST_PROPFILE = "wave-server-testing.properties";
+
+    private TestConstants() {
+    }
+}


Property changes on: trunk/src/test/java/org/ourproject/kune/platf/server/TestConstants.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/TestDomainHelper.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/TestDomainHelper.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/TestDomainHelper.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -21,7 +21,6 @@
 
 import java.util.TimeZone;
 
-
 import cc.kune.core.shared.domain.AdmissionType;
 import cc.kune.domain.AccessLists;
 import cc.kune.domain.Container;
@@ -35,7 +34,7 @@
 
     public static AccessLists createAccessLists(final Group groupAdmin, final Group groupEditor, final Group groupViewer) {
 
-        AccessLists lists = new AccessLists();
+        final AccessLists lists = new AccessLists();
         if (groupAdmin != null) {
             lists.addAdmin(groupAdmin);
         }
@@ -49,7 +48,7 @@
     }
 
     public static String createBigText() {
-        String text = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce leo felis, cursus eget, scelerisque adipiscing, fringilla vel, sem. Vestibulum semper tristique sem. Etiam quam neque, consectetuer at, fermentum id, vulputate non, leo. Ut condimentum, mauris et sollicitudin faucibus, lectus arcu facilisis mi, eu pretium arcu tortor quis sem. Pellentesque sit amet nulla ut tellus dapibus blandit. Donec eu dolor vitae mi scelerisque pretium. Donec sit amet nunc ut risus laoreet porta. Integer dictum mi at mauris. Vivamus vulputate, dolor quis pharetra interdum, augue nisi congue eros, a consectetuer libero mi ut quam. Fusce commodo sem blandit massa. Phasellus vehicula varius felis.\n"
+        final String text = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce leo felis, cursus eget, scelerisque adipiscing, fringilla vel, sem. Vestibulum semper tristique sem. Etiam quam neque, consectetuer at, fermentum id, vulputate non, leo. Ut condimentum, mauris et sollicitudin faucibus, lectus arcu facilisis mi, eu pretium arcu tortor quis sem. Pellentesque sit amet nulla ut tellus dapibus blandit. Donec eu dolor vitae mi scelerisque pretium. Donec sit amet nunc ut risus laoreet porta. Integer dictum mi at mauris. Vivamus vulputate, dolor quis pharetra interdum, augue nisi congue eros, a consectetuer libero mi ut quam. Fusce commodo sem blandit massa. Phasellus vehicula varius felis.\n"
                 + "\n"
                 + "Aenean tempus. Ut vel elit a nisl adipiscing commodo. Suspendisse nibh. Praesent pellentesque. Curabitur fringilla tempor justo. Suspendisse bibendum faucibus ipsum. Aenean porta elementum pede. Sed vel odio et metus egestas ultrices. Nulla facilisi. Sed blandit fermentum purus. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam adipiscing. Suspendisse dapibus, est porta vehicula auctor, diam orci scelerisque risus, eu condimentum enim pede ut turpis. Nullam turpis. Aliquam erat volutpat. Integer vitae magna. Mauris sit amet turpis.\n"
                 + "\n"
@@ -198,9 +197,9 @@
     }
 
     public static Content createDescriptor(final long id, final String title, final String content) {
-        Content descriptor = new Content();
+        final Content descriptor = new Content();
         descriptor.setId(id);
-        Revision rev = new Revision(descriptor);
+        final Revision rev = new Revision(descriptor);
         descriptor.addRevision(rev);
         rev.setTitle(title);
         rev.setBody(content);
@@ -208,15 +207,15 @@
     }
 
     public static Container createFolderWithId(final long id) {
-        Container container = new Container();
+        final Container container = new Container();
         container.setId(id);
         return container;
     }
 
     public static Container createFolderWithIdAndGroupAndTool(final int i, final String groupShortName,
             final String toolName) {
-        Container container = createFolderWithIdAndToolName(i, toolName);
-        Group owner = new Group();
+        final Container container = createFolderWithIdAndToolName(i, toolName);
+        final Group owner = new Group();
         owner.setShortName(groupShortName);
         container.setOwner(owner);
         return container;
@@ -224,13 +223,13 @@
     }
 
     public static Container createFolderWithIdAndToolName(final int i, final String toolName) {
-        Container container = createFolderWithId(i);
+        final Container container = createFolderWithId(i);
         container.setToolName(toolName);
         return container;
     }
 
     public static Group createGroup(final int number) {
-        Group group = new Group("ysei" + number, "Yellow Submarine Environmental Initiative" + number);
+        final Group group = new Group("ysei" + number, "Yellow Submarine Environmental Initiative" + number);
         group.setId(Long.valueOf(number));
         return group;
     }
@@ -238,7 +237,7 @@
     public static SocialNetwork createSocialNetwork(final Group groupInAdmins, final Group groupInCollab,
             final Group groupInViewer, final Group groupInPendings) {
 
-        SocialNetwork socialNetwork = new SocialNetwork();
+        final SocialNetwork socialNetwork = new SocialNetwork();
         socialNetwork.addAdmin(groupInAdmins);
         socialNetwork.addCollaborator(groupInCollab);
         socialNetwork.addViewer(groupInViewer);
@@ -247,11 +246,11 @@
     }
 
     public static User createUser(final int number) {
-        String shortName = "shortname" + number;
-        String longName = "name" + number;
-        User user = new User(shortName, longName, "email at domain" + number, "password" + number, null, null,
-                TimeZone.getDefault());
-        Group userGroup = new Group(shortName, longName);
+        final String shortName = "shortname" + number;
+        final String longName = "name" + number;
+        final User user = new User(shortName, longName, "email at domain" + number, ("password" + number),
+                "diggest".getBytes(), "salt".getBytes(), null, null, TimeZone.getDefault());
+        final Group userGroup = new Group(shortName, longName);
         userGroup.setAdmissionType(AdmissionType.Closed);
         userGroup.setSocialNetwork(createSocialNetwork(userGroup, userGroup, userGroup, null));
         user.setUserGroup(userGroup);

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -21,38 +21,64 @@
 
 import javax.servlet.http.HttpServletRequest;
 
+import org.apache.commons.configuration.ConfigurationException;
 import org.ourproject.kune.platf.integration.HttpServletRequestMocked;
 import org.ourproject.kune.platf.server.properties.PropertiesFileName;
+import org.waveprotocol.box.server.CoreSettings;
+import org.waveprotocol.box.server.authentication.AccountStoreHolder;
+import org.waveprotocol.box.server.persistence.AccountStore;
+import org.waveprotocol.box.server.persistence.PersistenceException;
+import org.waveprotocol.box.server.persistence.PersistenceModule;
 
+import cc.kune.wave.server.CustomSettingsBinder;
+
 import com.google.inject.Binder;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
+import com.google.inject.Key;
 import com.google.inject.Module;
 import com.google.inject.Scopes;
+import com.google.inject.name.Names;
 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) {
-        final Injector injector = Guice.createInjector(module, new Module() {
-            @Override
-            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);
-            }
-        });
-        return injector;
+        try {
+            final Injector injector = Guice.createInjector(CustomSettingsBinder.bindSettings(
+                    TestConstants.WAVE_TEST_PROPFILE, CoreSettings.class));
+            final PersistenceModule persistenceModule = injector.getInstance(PersistenceModule.class);
+            final Injector childInjector = injector.createChildInjector(persistenceModule, module, new Module() {
+                @Override
+                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);
+                }
+            });
+            final AccountStore accountStore = childInjector.getInstance(AccountStore.class);
+            accountStore.initializeAccountStore();
+            AccountStoreHolder.resetForTesting();
+            AccountStoreHolder.init(accountStore,
+                    childInjector.getInstance(Key.get(String.class, Names.named(CoreSettings.WAVE_SERVER_DOMAIN))));
+            return childInjector;
+        } catch (final ConfigurationException e) {
+            e.printStackTrace();
+        } catch (final PersistenceException e) {
+            e.printStackTrace();
+        }
+        return null;
     }
 
     public static void inject(final Object target) {
         // test: use memory
         // test_db: use mysql
         // Also configurable ein PersistenceTest
-        TestHelper.create(new PlatformServerModule(), "test_db", "kune.properties").injectMembers(target);
+        TestHelper.create(new PlatformServerModule(), TestConstants.PERSISTENCE_UNIT, "kune.properties").injectMembers(
+                target);
     }
 
 }

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/finders/UserFinderTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/finders/UserFinderTest.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/finders/UserFinderTest.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -17,42 +17,44 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.finders;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-
-import java.util.List;
-import java.util.TimeZone;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.ourproject.kune.platf.server.PersistencePreLoadedDataTest;
-
-import cc.kune.domain.User;
-
-import com.google.inject.Inject;
-
-public class UserFinderTest extends PersistencePreLoadedDataTest {
-    @Inject
-    User finder;
-
-    @Test
-    public void findAll() {
-        List<User> all = finder.getAll();
-        assertEquals(3, all.size());
-    }
-
-    @Test
-    public void findByEmail() {
-        User user = finder.getByEmail("one at here.com");
-        assertNotNull(user);
-    }
-
-    @Before
-    public void initData() {
-        persist(new User("shortname1", "the name1", "one at here.com", "password1", english, gb, TimeZone.getDefault()));
-        persist(new User("shortname2", "the name2", "two at here.com", "password1", english, gb, TimeZone.getDefault()));
-    }
-
-}
+package org.ourproject.kune.platf.server.finders;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+
+import java.util.List;
+import java.util.TimeZone;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.ourproject.kune.platf.server.PersistencePreLoadedDataTest;
+
+import cc.kune.domain.User;
+
+import com.google.inject.Inject;
+
+public class UserFinderTest extends PersistencePreLoadedDataTest {
+    @Inject
+    User finder;
+
+    @Test
+    public void findAll() {
+        final List<User> all = finder.getAll();
+        assertEquals(3, all.size());
+    }
+
+    @Test
+    public void findByEmail() {
+        final User user = finder.getByEmail("one at here.com");
+        assertNotNull(user);
+    }
+
+    @Before
+    public void initData() {
+        persist(new User("shortname1", "the name1", "one at here.com", "password1", "diggest".getBytes(),
+                "salt".getBytes(), english, gb, TimeZone.getDefault()));
+        persist(new User("shortname2", "the name2", "two at here.com", "password1", "somediggest".getBytes(),
+                "salt".getBytes(), english, gb, TimeZone.getDefault()));
+    }
+
+}

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	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -45,19 +45,22 @@
 
     @Test
     public void emailCorrect() {
-        user = new User("test1", "test1 name", "test at example.com", "some passwd", english, gb, getTimeZone());
+        user = new User("test1", "test1 name", "test at example.com", "some passwd", "somediggest".getBytes(),
+                "some salt".getBytes(), english, gb, getTimeZone());
         persist(user);
     }
 
     @Test(expected = PersistenceException.class)
     public void emailEmpty() {
-        user = new User("test1", "test1 name", null, "some passwd", english, gb, getTimeZone());
+        user = new User("test1", "test1 name", null, "some passwd", "somediggest".getBytes(), "some salt".getBytes(),
+                english, gb, getTimeZone());
         persist(user);
     }
 
     @Test(expected = InvalidStateException.class)
     public void emailIncorrect() {
-        user = new User("test1", "test1 name", "falseEmail@", "some passwd", english, gb, getTimeZone());
+        user = new User("test1", "test1 name", "falseEmail@", "some passwd", "somediggest".getBytes(),
+                "some salt".getBytes(), english, gb, getTimeZone());
         persist(user);
     }
 
@@ -85,7 +88,8 @@
 
     @Test(expected = InvalidStateException.class)
     public void passwdLengthIncorrect() {
-        user = new User("test1", "test1 name", "test at example.com", "pass", english, gb, getTimeZone());
+        user = new User("test1", "test1 name", "test at example.com", "pass", "diggest".getBytes(), "salt".getBytes(),
+                english, gb, getTimeZone());
         persist(user);
     }
 
@@ -105,7 +109,8 @@
 
     @Test(expected = InvalidStateException.class)
     public void userNameLengthIncorrect() {
-        user = new User("test1", "te", "test at example.com", "some passwd", english, gb, getTimeZone());
+        user = new User("test1", "te", "test at example.com", "some passwd", "diggest".getBytes(), "salt".getBytes(),
+                english, gb, getTimeZone());
         persist(user);
     }
 
@@ -120,7 +125,8 @@
 
     @Test(expected = InvalidStateException.class)
     public void userShortNameIncorrect() {
-        user = new User("test1A", "test1 name", "test at example.com", "some passwd", english, gb, getTimeZone());
+        user = new User("test1A", "test1 name", "test at example.com", "some passwd", "diggest".getBytes(),
+                "salt".getBytes(), english, gb, getTimeZone());
         persist(user);
     }
 

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/mapper/MapperTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/mapper/MapperTest.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/mapper/MapperTest.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -19,7 +19,10 @@
  */
 package org.ourproject.kune.platf.server.mapper;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -63,13 +66,67 @@
 import com.google.inject.Inject;
 
 public class MapperTest {
+    private static final String TESTGROUPSHORTNAME = "grouptest";
     private static final String TESTTOOL = "docs";
-    private static final String TESTGROUPSHORTNAME = "grouptest";
     @Inject
+    GroupManager groupManager;
+    @Inject
     Mapper mapper;
-    @Inject
-    GroupManager groupManager;
 
+    private void assertMapping(final GroupListMode mode, final String modeName) {
+        final GroupList list = new GroupList();
+        list.setMode(mode);
+        final GroupListDTO dto = mapper.map(list, GroupListDTO.class);
+        assertEquals(modeName, dto.getMode());
+        final GroupList listBack = mapper.map(dto, GroupList.class);
+        assertEquals(mode, listBack.getMode());
+    }
+
+    private void assertValidAccessListsMapping(final GroupList groupList, final GroupListDTO groupListDTO) {
+        final List<Group> listOrig = groupList.getList();
+        final List<GroupDTO> listDto = groupListDTO.getList();
+        assertEquals(listDto.size(), listOrig.size());
+        for (int i = 0; i < listDto.size(); i++) {
+            final Object object = listDto.get(i);
+            assertEquals(GroupDTO.class, object.getClass());
+            final GroupDTO d = (GroupDTO) object;
+            final Group g = listOrig.get(i);
+            assertNotNull(d);
+            assertNotNull(g);
+            final GroupDTO map = mapper.map(g, GroupDTO.class);
+            assertEquals(map, d);
+        }
+    }
+
+    private Container createDefContainer() {
+        return createDefContainer(createDeGroup());
+    }
+
+    private Container createDefContainer(final Group group) {
+        final Container container = new Container();
+        container.setId(1L);
+        container.setToolName(TESTTOOL);
+        container.setOwner(group);
+        container.setName("folder");
+        return container;
+    }
+
+    private Content createDefContent() {
+        final Container container = createDefContainer(createDeGroup());
+        final Content d = new Content();
+        d.setId(1L);
+        final Revision revision = new Revision(d);
+        revision.setTitle("title");
+        d.addRevision(revision);
+        d.setContainer(container);
+        return d;
+    }
+
+    private Group createDeGroup() {
+        final Group group = new Group(TESTGROUPSHORTNAME, "This is a group Test");
+        return group;
+    }
+
     @Test
     public void groupHasLogo() {
         final Group group = new Group("test", "this is a test");
@@ -296,63 +353,9 @@
 
     @Test
     public void testUserToLinkMappping() {
-        final User user = new User("shortName", "longName", "", "", null, null, null);
+        final User user = new User("shortName", "longName", "", "", "".getBytes(), "".getBytes(), null, null, null);
         final LinkDTO dto = mapper.map(user, LinkDTO.class);
         assertEquals("shortName", dto.getShortName());
         assertEquals("longName", dto.getLongName());
     }
-
-    private void assertMapping(final GroupListMode mode, final String modeName) {
-        final GroupList list = new GroupList();
-        list.setMode(mode);
-        final GroupListDTO dto = mapper.map(list, GroupListDTO.class);
-        assertEquals(modeName, dto.getMode());
-        final GroupList listBack = mapper.map(dto, GroupList.class);
-        assertEquals(mode, listBack.getMode());
-    }
-
-    private void assertValidAccessListsMapping(final GroupList groupList, final GroupListDTO groupListDTO) {
-        final List<Group> listOrig = groupList.getList();
-        final List<GroupDTO> listDto = groupListDTO.getList();
-        assertEquals(listDto.size(), listOrig.size());
-        for (int i = 0; i < listDto.size(); i++) {
-            final Object object = listDto.get(i);
-            assertEquals(GroupDTO.class, object.getClass());
-            final GroupDTO d = (GroupDTO) object;
-            final Group g = listOrig.get(i);
-            assertNotNull(d);
-            assertNotNull(g);
-            final GroupDTO map = mapper.map(g, GroupDTO.class);
-            assertEquals(map, d);
-        }
-    }
-
-    private Container createDefContainer() {
-        return createDefContainer(createDeGroup());
-    }
-
-    private Container createDefContainer(final Group group) {
-        final Container container = new Container();
-        container.setId(1L);
-        container.setToolName(TESTTOOL);
-        container.setOwner(group);
-        container.setName("folder");
-        return container;
-    }
-
-    private Content createDefContent() {
-        final Container container = createDefContainer(createDeGroup());
-        final Content d = new Content();
-        d.setId(1L);
-        final Revision revision = new Revision(d);
-        revision.setTitle("title");
-        d.addRevision(revision);
-        d.setContainer(container);
-        return d;
-    }
-
-    private Group createDeGroup() {
-        final Group group = new Group(TESTGROUPSHORTNAME, "This is a group Test");
-        return group;
-    }
 }

Modified: trunk/src/test/java/org/ourproject/kune/testhelper/ctx/DomainContext.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/testhelper/ctx/DomainContext.java	2011-02-07 03:17:47 UTC (rev 1238)
+++ trunk/src/test/java/org/ourproject/kune/testhelper/ctx/DomainContext.java	2011-02-07 17:33:32 UTC (rev 1239)
@@ -22,7 +22,6 @@
 import java.util.HashMap;
 import java.util.TimeZone;
 
-
 import cc.kune.core.shared.dto.GroupType;
 import cc.kune.domain.AccessLists;
 import cc.kune.domain.Group;
@@ -32,8 +31,8 @@
 import cc.kune.domain.User;
 
 public class DomainContext {
-    private final HashMap<String, User> users;
     private final HashMap<String, Group> groups;
+    private final HashMap<String, User> users;
 
     public DomainContext() {
         this.users = new HashMap<String, User>();
@@ -42,7 +41,7 @@
 
     public void createGroups(final String... groupNames) {
         Group group;
-        for (String name : groupNames) {
+        for (final String name : groupNames) {
             group = new Group("name", "Some group: " + name);
             groups.put(name, group);
         }
@@ -50,7 +49,7 @@
 
     public void createOrphanGroup(final String... groupNames) {
         Group group;
-        for (String name : groupNames) {
+        for (final String name : groupNames) {
             group = new Group("name", "Some group: " + name);
             group.setGroupType(GroupType.ORPHANED_PROJECT);
             groups.put(name, group);
@@ -59,9 +58,9 @@
 
     public void createUsers(final String... userNames) {
         User user;
-        for (String name : userNames) {
-            user = new User(name, "long" + name, name + "@email.com", "password" + name, new I18nLanguage(),
-                    new I18nCountry(), TimeZone.getDefault());
+        for (final String name : userNames) {
+            user = new User(name, "long" + name, name + "@email.com", ("password" + name), "diggest".getBytes(),
+                    "salt".getBytes(), new I18nLanguage(), new I18nCountry(), TimeZone.getDefault());
             user.setUserGroup(new Group(name, "groupLong" + name));
             users.put(name, user);
         }
@@ -76,11 +75,17 @@
     }
 
     public Group getGroupOf(final String userName) {
-        User user = getUser(userName);
-        Group userGroup = user.getUserGroup();
+        final User user = getUser(userName);
+        final Group userGroup = user.getUserGroup();
         return userGroup;
     }
 
+    private SocialNetwork getSocialNetworkOf(final String userName) {
+        final Group userGroup = getGroupOf(userName);
+        final SocialNetwork socialNetwork = userGroup.getSocialNetwork();
+        return socialNetwork;
+    }
+
     public User getUser(final String userName) {
         return users.get(userName);
     }
@@ -89,10 +94,4 @@
         return new SocialNetworkOperator(this, getSocialNetworkOf(userName));
     }
 
-    private SocialNetwork getSocialNetworkOf(final String userName) {
-        Group userGroup = getGroupOf(userName);
-        SocialNetwork socialNetwork = userGroup.getSocialNetwork();
-        return socialNetwork;
-    }
-
 }




More information about the kune-commits mailing list