[kune-commits] r1135 - in trunk: . src/main/java/org/ourproject/kune/app/public/css src/main/java/org/ourproject/kune/app/server src/main/java/org/ourproject/kune/chat/server src/main/java/org/ourproject/kune/platf src/main/java/org/ourproject/kune/platf/client/errors src/main/java/org/ourproject/kune/platf/server src/main/java/org/ourproject/kune/platf/server/domain src/main/java/org/ourproject/kune/platf/server/init src/main/java/org/ourproject/kune/platf/server/manager src/main/java/org/ourproject/kune/platf/server/manager/file src/main/java/org/ourproject/kune/platf/server/manager/impl src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions src/main/resources/META-INF src/test/java/org/ourproject/kune/platf/client/actions src/test/java/org/ourproject/kune/platf/client/ui/rte/saving src/test/java/org/ourproject/kune/platf/integration src/test/java/org/ourproject/kune/platf/integration/socialnet src/test/java/org/ourproject/kune/platf/server src/test/java/org/ourproject/kune/platf/server/auth src/test/java/org/ourproject/kune/platf/server/manager/impl src/test/java/org/ourproject/kune/workspace/client/tags

vjrj vjrj at ourproject.org
Sun Jul 19 20:10:52 CEST 2009


Author: vjrj
Date: 2009-07-19 20:10:48 +0200 (Sun, 19 Jul 2009)
New Revision: 1135

Added:
   trunk/src/main/java/org/ourproject/kune/platf/client/errors/UnknownPropertyException.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/Properties.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/Property.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/PropertyGroup.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/PropertySetted.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/PropertySubgroup.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertiesManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertyGroupManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertyManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertySettedManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertySubgroupManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertiesManagerDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertyGroupManagerDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertyManagerDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertySettedManagerDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertySubgroupManagerDefault.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/PropertySettedManagerDefaultTest.java
Modified:
   trunk/TODO
   trunk/TROUBLESHOOT
   trunk/pom.xml
   trunk/src/main/java/org/ourproject/kune/app/public/css/all.css
   trunk/src/main/java/org/ourproject/kune/app/server/KuneContainerListener.java
   trunk/src/main/java/org/ourproject/kune/chat/server/ChatServerModule.java
   trunk/src/main/java/org/ourproject/kune/chat/server/ChatServerTool.java
   trunk/src/main/java/org/ourproject/kune/platf/KunePlatform.gwt.xml
   trunk/src/main/java/org/ourproject/kune/platf/RichText.gwt.xml
   trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/Group.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java
   trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/Manager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoUploadManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/DefaultManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java
   trunk/src/main/resources/META-INF/persistence.xml
   trunk/src/test/java/org/ourproject/kune/platf/client/actions/KeyStrokeTest.java
   trunk/src/test/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenterTest.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/DatabaseInitializationTest.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/socialnet/SocialNetworkMembersTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/PersistenceTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/auth/AuthorizatedMethodInterceptorTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/SocialNetworkManagerTest.java
   trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java
Log:
Incomplete - task Entity Properties (Group/User preferences) 

Complete - task Hibernate, gwt-log, gwt-voices, gwt updated

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/TODO	2009-07-19 18:10:48 UTC (rev 1135)
@@ -74,6 +74,30 @@
    "Because the Preferences API is back-end neutral, you need not care whether the data are stored in files, database tables, or a platform-specific storage such as the Windows Registry. In fact, you don't want to care, because the situation may differ across varying platforms, or even across implementations on the same platform."
    More links:
    http://stackoverflow.com/questions/194349/what-is-the-proper-way-to-store-apps-conf-data-in-java
+
+   Property
+      name
+      PropertyGroup pGroup
+      PropertySubgroup sGroup
+
+   PropertyGroup implements HasId
+      String name
+
+   PropertySubGroup implements HasId
+      String name
+
+   PropertySetted extends Property
+      String value
+
+   Properties
+      List<PropertySetted> list
+
+   User
+      Properties
+
+   Group
+      Properties
+ 
 ** vjrj Styling braimstorming
 *** layouts
     - name :: greenforrest

Modified: trunk/TROUBLESHOOT
===================================================================
--- trunk/TROUBLESHOOT	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/TROUBLESHOOT	2009-07-19 18:10:48 UTC (rev 1135)
@@ -1,24 +1,24 @@
 =TROUBLESHOOTING=
 
-==Server debug==
+== Server debug ==
 
 Server: debug with jetty in eclipse:
 http://docs.codehaus.org/display/JETTY/Debugging+with+the+Maven+Jetty+Plugin+inside+Eclipse
 
-==Client debug==
+== Client debug ==
 
 Client code: you can debug with gwt hosted mode in eclipse (see DEV-GUIDE for hosted mode instructions).
 
-==Firebug and client log levels==
+== Firebug and client log levels ==
 
 To increase client logging add ?log_level=DEBUG# to the url and use firebug firefox extension to see the output.
 
-==Emite troubleshooting==
+== Emite troubleshooting ==
 
 See:
 http://code.google.com/p/emite/wiki/Troubleshooting
 
-==Liquibase==
+== Liquibase ==
 
 === Checksum errors ===
 
@@ -26,3 +26,23 @@
 
 Don't try to update the liquibase changelogs you have already use. Better create new ones to delete, update, and so on. If you are developing and want to clear the checksums, you can use the command "clearCheckSums". See script/liquibase-* and http://www.liquibase.org/manual/command_line
 
+== Lucene ==
+
+=== Indexes problems during upgrades ===
+
+If you get errors like:
+
+org.ourproject.kune.platf.server.ServerException: Error starting persistence service
+(...)
+Caused by: org.hibernate.search.SearchException: Unable to open IndexWriter for class org.ourproject.kune.platf.server.domain.User
+(...)
+Caused by: org.apache.lucene.index.CorruptIndexException: Unknown format version: -7
+
+The indexes in /var/lib/kune/lucen/kune*/indexes/ are not compatible. For the moment the only workaround we now it's to delete the indexes.
+
+== JUnit ==
+
+Running all the Kune test from eclipse I get connection pool exceptions like:
+   Connections could not be acquired from the underlying database
+
+We have problems testing all test together from eclipse and using real db (not the h2 memory db)

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/pom.xml	2009-07-19 18:10:48 UTC (rev 1135)
@@ -12,7 +12,7 @@
   <name>kune</name>
   <url>http://kune.ourproject.org</url>
   <properties>
-    <gwtVersion>1.6.4</gwtVersion>
+    <gwtVersion>1.7.0</gwtVersion>
   </properties>
   <dependencies>
     <!-- guice -->
@@ -66,7 +66,6 @@
       <version>march-02-2009</version>
       <scope>provided</scope>
     </dependency>
-
     <!--
       <dependency> <groupId>com.extjs</groupId>
       <artifactId>gxt</artifactId> <version>1.0-beta2</version>
@@ -90,12 +89,12 @@
     <dependency>
       <groupId>com.allen_sauer.gwt.log.gwt-log</groupId>
       <artifactId>gwt-log</artifactId>
-      <version>2.6.0</version>
+      <version>2.6.2</version>
     </dependency>
     <dependency>
       <groupId>com.allen_sauer.gwt.voices.gwt-voices</groupId>
       <artifactId>gwt-voices</artifactId>
-      <version>1.5.5</version>
+      <version>1.6.0</version>
     </dependency>
 
     <!-- utilities -->
@@ -121,9 +120,9 @@
     </dependency>
     <dependency>
       <groupId>org.xwiki.platform</groupId>
-      <!-- https://yui-ext.com/forum/showthread.php?t=5762 -->
       <artifactId>xwiki-web-gwt-dom</artifactId>
-      <version>2.0-SNAPSHOT-g164</version>
+      <version>2.0-SNAPSHOT</version>
+      <!-- <version>2.0-SNAPSHOT-g164</version> -->
     </dependency>
 
     <!-- xmpp -->
@@ -159,27 +158,32 @@
     <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-search</artifactId>
-      <version>3.0.0.GA</version>
+      <version>3.1.0.GA</version>
     </dependency>
     <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate</artifactId>
-      <version>3.2.5.ga</version>
+      <version>3.2.6.ga</version>
     </dependency>
     <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-annotations</artifactId>
-      <version>3.3.0.ga</version>
+      <version>3.4.0.GA</version>
     </dependency>
     <dependency>
       <groupId>org.hibernate</groupId>
+      <artifactId>hibernate-validator</artifactId>
+      <version>3.0.0.ga</version>
+    </dependency>
+    <dependency>
+      <groupId>org.hibernate</groupId>
       <artifactId>hibernate-entitymanager</artifactId>
-      <version>3.3.1.ga</version>
+      <version>3.4.0.GA</version>
     </dependency>
     <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-tools</artifactId>
-      <version>3.2.0.beta9a</version>
+      <version>3.2.3.GA</version>
     </dependency>
     <dependency>
       <groupId>c3p0</groupId>
@@ -196,6 +200,11 @@
       <artifactId>warp-persist</artifactId>
       <version>1.0.1</version>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <version>1.5.2</version>
+    </dependency>
 
     <!-- REST: xml and json (stax) -->
     <dependency>
@@ -219,7 +228,6 @@
       <version>2.1</version>
       <classifier>jdk15</classifier>
     </dependency>
-
     <dependency>
       <groupId>commons-collections</groupId>
       <artifactId>commons-collections</artifactId>
@@ -249,7 +257,6 @@
     </dependency>
 
     <!-- db upgrades -->
-
     <dependency>
       <groupId>org.liquibase</groupId>
       <artifactId>liquibase-core</artifactId>
@@ -273,7 +280,7 @@
     </dependency>
     <dependency>
       <groupId>org.mortbay.jetty</groupId>
-  <artifactId>maven-jetty-plugin</artifactId>
+      <artifactId>maven-jetty-plugin</artifactId>
       <!--
         <artifactId>jetty-maven-plugin</artifactId>
         <version>7.0.0.1beta0</version>
@@ -281,7 +288,6 @@
       <version>6.1.5</version>
       <scope>provided</scope>
     </dependency>
-
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
@@ -323,7 +329,6 @@
       <version>0.9.4</version>
     </dependency>
   </dependencies>
-
   <!--
     http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/index.html
   -->
@@ -343,7 +348,6 @@
       </releases>
     </pluginRepository>
   </pluginRepositories>
-
   <repositories>
     <repository>
       <id>Codehaus Snapshots</id>
@@ -487,15 +491,9 @@
           <generatorRootClasses>
             <value>org.ourproject.kune.MyBean</value>
           </generatorRootClasses>
-          <generatorDestinationPackage>
-            org.ourproject.kune.app.Kune
-          </generatorDestinationPackage>
-          <generateGettersAndSetters>
-            true
-          </generateGettersAndSetters>
-          <generatePropertyChangeSupport>
-            true
-          </generatePropertyChangeSupport>
+          <generatorDestinationPackage> org.ourproject.kune.app.Kune </generatorDestinationPackage>
+          <generateGettersAndSetters> true </generateGettersAndSetters>
+          <generatePropertyChangeSupport> true </generatePropertyChangeSupport>
         </configuration>
         <executions>
           <execution>
@@ -525,11 +523,11 @@
       </plugin>
       <plugin>
         <groupId>org.mortbay.jetty</groupId>
-          <artifactId>maven-jetty-plugin</artifactId>
-          <version>6.1.5</version>
+        <artifactId>maven-jetty-plugin</artifactId>
+        <version>6.1.5</version>
         <!--
-        <artifactId>jetty-maven-plugin</artifactId>
-        <version>7.0.0.1beta0</version>
+          <artifactId>jetty-maven-plugin</artifactId>
+          <version>7.0.0.1beta0</version>
         -->
         <configuration>
           <contextPath>/</contextPath>
@@ -559,8 +557,7 @@
             <phase>process-resources</phase>
             <configuration>
               <changeLogFile>
-                src/main/resources/db/liquibase_changelog.xml
-              </changeLogFile>
+                src/main/resources/db/liquibase_changelog.xml </changeLogFile>
               <driver>com.mysql.jdbc.Driver</driver>
               <url>jdbc:mysql://localhost/kune_dev</url>
               <username>kune</username>
@@ -603,12 +600,8 @@
                 <include>**/HorizontalLine.**</include>
                 <include>**/AbstractLabel.**</include>
                 <include>**/IconLabel.**</include>
-                <include>
-                  **/EditableIconLabel.**
-                </include>
-                <include>
-                  **/EditableClickListener.**
-                </include>
+                <include> **/EditableIconLabel.** </include>
+                <include> **/EditableClickListener.** </include>
                 <include>**/KuneStringUtils.**</include>
                 <include>**/IconHyperlink*.**</include>
                 <include>**/LabelWrapper*.**</include>
@@ -639,7 +632,6 @@
           </execution>
         </executions>
       </plugin>
-
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>selenium-maven-plugin</artifactId>
@@ -682,21 +674,12 @@
         </executions>
       </plugin>
       <!--
-      <plugin>
-        <artifactId>maven-clean-plugin</artifactId>
-        <version>2.2</version>
-        <configuration>
-          <filesets>
-            <fileset>
-              <directory>src/main/webapp/gwt/</directory>
-              <includes>
-                <include>**/org.ourproject.kune.app.Kune*</include>
-                <followSymlinks>false</followSymlinks>
-              </includes>
-            </fileset>
-          </filesets>
-        </configuration>
-      </plugin>
+        <plugin> <artifactId>maven-clean-plugin</artifactId>
+        <version>2.2</version> <configuration> <filesets> <fileset>
+        <directory>src/main/webapp/gwt/</directory> <includes>
+        <include>**/org.ourproject.kune.app.Kune*</include>
+        <followSymlinks>false</followSymlinks> </includes> </fileset>
+        </filesets> </configuration> </plugin>
       -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -736,7 +719,6 @@
       </resource>
     </resources>
   </build>
-
   <reporting>
     <plugins>
       <plugin>
@@ -764,12 +746,9 @@
         <configuration>
           <systemProperties>
             <property>
-              <name>
-                net.sourceforge.cobertura.datafile
-              </name>
+              <name> net.sourceforge.cobertura.datafile </name>
               <value>
-                ${project.reporting.directory}/cobertura/cobertura.ser
-              </value>
+                ${project.reporting.directory}/cobertura/cobertura.ser </value>
             </property>
           </systemProperties>
           <forkMode>pertest</forkMode>

Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/all.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/all.css	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/all.css	2009-07-19 18:10:48 UTC (rev 1135)
@@ -35,7 +35,7 @@
 }
 */.kune-NavigationBar .topBar .gwt-Image{margin:0 2px 0 5px;}.kune-NavigationBar .Items{margin:2px 0;}.kune-NavigationBar .Items .gwt-Image{margin:2px 0;vertical-align:middle;}.kune-NavigationBar .Items .gwt-Hyperlink a{color:green;/* FIXME: other color */}.kune-NavigationBar .topBar .topBar-margin{margin-left:5px;}.kune-NavigationBar .pathMenu{vertical-align:middle;}.kune-NavigationBar .pathMenu .gwt-MenuItem{background:transparent url(img/button-bg-hard.gif) repeat-x 0 0;border-left:1px solid #AAA;border-right:1px solid #AAA;color:#999;cursor:pointer;white-space:nowrap;padding:3px 6px;}.kune-NavigationBar .pathMenu .gwt-MenuItem-selected{background:transparent url(img/button-bg-soft.gif) repeat-x 0 0;color:#000;}.kune-NavigationBar .kune-IconHyperlink{vertical-align:middle;margin-left:5px;}.kune-NavigationBar .kune-IconHyperlink a{color:green;text-decoration:none;}.kune-NavigationBar .kune-IconHyperlink .gwt-Image{margin-right:3px;vertical-align:middle;}/* Social Network */.kune-StackedDropDownPanel{}.kune-StackedDropDownPanel .gwt-StackPanelItem{border-top:1px solid #CCC;border-bottom:1px solid #CCC;background-color:#EFA;cursor:pointer;padding:1px 3px 0 6px;overflow:hidden;}.kune-StackedDropDownPanel .gwt-StackPanelItem img{margin:0 0 0 3px;vertical-align:middle;}.kune-StackedDropDownPanel .kune-DropDownInner table{width:100%;}.kune-StackedDropDownPanel .gwt-StackPanelItem-selected{}.kune-StackedDropDownPanelLink{background-color:#E6E6E6;border-top:1px solid #CCC;border-bottom:1px solid #F2F2F2;/*  white-space: nowrap; */cursor:pointer;}.kune-StackedDropDownPanel .kune-DropDownInner{padding:0;}/* StackedDropDownPanel Members */.kune-StackSubItemLabel{overflow:hidden;}.kune-StackSubItemLabel .gwt-MenuItem{white-space:nowrap;cursor:pointer;border-bottom:1px solid #F2F2F2;}.kune-StackSubItemLabel table{width:100%;}.kune-StackSubItemLabel .gwt-MenuItem img{vertical-align:middle;margin-top:1px;margin-bottom:1px;margin-left:5px;margin-right:3px;}.kune-StackSubItemLabel .gwt-MenuItem-selected{background-color:#FFE6D5;}.kune-StackSubItemActions{background-color:#F2F2F2;border:1px solid #999;vertical-align:middle;padding:5px 0;margin-left:-120px;margin-top:-2px;}.kune-StackSubItemActions .gwt-MenuItem{cursor:pointer;padding:1px 10px;white-space:nowrap;}.kune-StackSubItemActions .gwt-MenuItem img{vertical-align:middle;margin-right:3px;}.kune-StackSubItemActions .gwt-MenuItem-selected{background-color:#FFB958;}/* AccessList */.kune-AccessListSubLabel{font-style:italic;}.kune-AccessList{margin:5px;width:100%;}.kune-AccessList .gwt-DisclosurePanel{margin:5px;width:100%;}.kune-AccessList .gwt-DisclosurePanel-open{width:100%;}.kune-AccessList .gwt-DisclosurePanel-closed{width:100%;}.kune-AccessList .header{margin:0 0 3px;text-decoration:none;width:100%;background-color:#8DD35F;}.kune-AccessList .header table{margin:0 5px 0 0;width:100%;color:#FFF;}.kune-AccessList .header img{margin:0 3px 0 0;}.kune-AccessList .content{margin:0 0 0 7px;width:100%;}.kune-AccessList .content table{margin-bottom:5px;width:100%;}/* Rate */.kune-RatePanel-Label{white-space:nowrap;vertical-align:middle;}.kune-RatePanel-Stars{margin-left:5px;vertical-align:middle;}.kune-RatePanel-Stars-RateIt{cursor:pointer;}/* Licenses */.kune-License-CC-Header{color:#15428B;font-weight:700;font-size:85%;margin-top:5px;}.kune-License-CC-Header .gwt-Label{color:#15428B;font-weight:700;font-size:85%;margin-top:5px;}/* Theme */.kune-IconBottomPanel .gwt-MenuItem{cursor:pointer;background-color:#FFF;margin:2px 2px 2px 5px;}.kune-IconBottomPanel .gwt-MenuItem-selected{background-color:#F2F2F2;}.gwt-MenuBar-bottomMenu{margin-left:-60px;margin-top:-120px;}/* i18n */.kune-I18nTranslatorCell{white-space:normal;}.kune-i18nTranslator-recommend{margin:10px;}.kune-i18nTranslator-recommend h1{font-size:131%;font-weight:700;}.kune-i18nTranslator-recommend h2{font-size:116%;font-weight:700;}.kune-i18nTranslator-recommend h3{font-size:108%;font-weight:700;font-style:italic;}.kune-i18nTranslator-recommend em{font-weight:700;}.kune-i18nTranslator-recommend strong{font-weight:700;}/* Admin Context */.kune-AdminContextPanel{margin:6px;width:100%;}.kune-AdminContextPanel .gwt-StackPanelItem{background:transparent url(img/arrow-right-white.gif) no-repeat scroll 3px 2px;cursor:pointer;padding:3px 10px 1px 20px;overflow:hidden;width:100%;}.kune-AdminContextPanel .gwt-StackPanelItem img{margin:0 0 0 3px;vertical-align:middle;}.kune-AdminContextPanel .gwt-StackPanelItem-selected{background:transparent url(img/arrow-down-white.gif) no-repeat scroll 3px 2px;background-color:#DEE3DB;}.kune-AdminContextPanelLink{background-color:#E6E6E6;border-top:1px solid #CCC;border-bottom:1px solid #F2F2F2;/* white-space: nowrap; */cursor:pointer;}.kune-AdminContextPanel-inner{background-color:#FFF;}.kune-AdminContextPanel-inner-wrap{margin:5px;}.kune-EditableLabel{}.kune-EditableLabel .kune-EditableLabel-editable{}.kune-EditableLabel-high{background-color:#FFFBC1;cursor:pointer;}.kune-EditableLabel-high span{background-color:#FFFBC1;}.kune-EditableLabel a{margin-left:5px;}.kune-EditableLabel a:link{color:green;}.kune-EditableLabel a:hover{text-decoration:underline;}.kune-EditableLabel a:visited{color:olive;}.kune-EditableLabel img{margin-right:4px;vertical-align:middle;}.kune-EditableLabel-editable img{margin-right:4px;vertical-align:middle;}.kune-EditableLabel-editable span{margin:3px;}.kune-EditableLabel span{margin:3px;}.kune-BottomIconsTrayPanel{width:165px;height:21px;vertical-align:middle;background-color:#EFEFEF;}.kune-Content-Main{margin:5px;}/* Yahoo ui base.css */.kune-Content-Main h1{font-size:138.5%;}.kune-Content-Main h2{font-size:123.099998%;}.kune-Content-Main h3{font-size:108%;}.kune-Content-Main h1{margin:1em 0;}.kune-Content-Main h2{margin:1em 0;}.kune-Content-Main h3{margin:1em 0;}.kune-Content-Main h1{font-weight:700;}.kune-Content-Main h2{font-weight:700;}.kune-Content-Main h3{font-weight:700;}.kune-Content-Main h4{font-weight:700;}.kune-Content-Main h5{font-weight:700;}.kune-Content-Main h6{font-weight:700;}.kune-Content-Main strong{font-weight:700;}.kune-Content-Main abbr{border-bottom:1px dotted #000;cursor:help;}.kune-Content-Main acronym{border-bottom:1px dotted #000;cursor:help;}.kune-Content-Main em{font-style:italic;}.kune-Content-Main blockquote{margin:1em;}.kune-Content-Main ul{margin:1em;}.kune-Content-Main ol{margin:1em;}.kune-Content-Main dl{margin:1em;}.kune-Content-Main ol{margin-left:2em;}.kune-Content-Main ul{margin-left:2em;}.kune-Content-Main dl{margin-left:2em;}.kune-Content-Main ol{list-style:decimal outside;}.kune-Content-Main li{list-style:decimal outside;}.kune-Content-Main li{list-style:disc outside;}.kune-Content-Main ul{list-style:disc outside;}.kune-Content-Main dl{margin-left:1em;}.kune-Content-Main dd{margin-left:1em;}.kune-Content-Main th{border:1px solid #000;padding:.5em;font-weight:700;text-align:center;}.kune-Content-Main td{border:1px solid #000;padding:.5em;}.kune-Content-Main caption{margin-bottom:.5em;text-align:center;}.kune-Content-Main p{margin-bottom:1em;}.kune-Content-Main fieldset{margin-bottom:1em;}.kune-Content-Main table{margin-bottom:1em;}.kune-Content-Main pre{margin-bottom:1em;}.kune-Content-Main input[type=text]{width:12.25em;width:11.9em;}.kune-Content-Main input[type=password]{width:12.25em;width:11.9em;}.kune-Content-Main textarea{width:12.25em;width:11.9em;}.kune-Content-Main blockquote{border:1px dashed #DDD;padding:10px;}.search-icon{background-image:url(img/search.gif)!important;}.i18n-icon{background-image:url(img/language.gif)!important;}/* RTE Text editor */.kune-TexEditorPanel-TextArea{margin:3px;}.gwt-RichTextArea{/* border: 1px solid #000;
     background-color: #FFF; */border:1px solid #4D4D4D;background-color:#FFF;margin:5px 0 5px 10px;}.gwt-RichTextToolbar{/* background-color: #F2F2F2;
-  padding: 5px; */height:24px;vertical-align:middle;}.gwt-RichTextToolbar table{vertical-align:middle;}.gwt-RichTextToolbar .gwt-ToggleButton{float:left;margin-top:2px;}.gwt-RichTextToolbar .gwt-PushButton{float:left;margin-top:2px;}.gwt-RichTextToolbar .gwt-PushButton-up{margin-right:2px;border:1px solid #F2F2F2;}.gwt-RichTextToolbar .gwt-PushButton-up-hovering{margin-right:2px;border:1px solid #C3D9FF;border-color:#E8F1FF #9daecd #9daecd #e8f1ff;}.gwt-RichTextToolbar .gwt-PushButton-down{margin-right:2px;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .gwt-PushButton-down-hovering{margin-right:2px;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .gwt-ToggleButton-up{margin-right:2px;border:1px solid #F2F2F2;}.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering{margin-right:2px;border:1px solid #C3D9FF;border-color:#E8F1FF #9daecd #9daecd #e8f1ff;}.gwt-RichTextToolbar .gwt-ToggleButton-down{margin-right:2px;background-color:#E8F1FF;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering{margin-right:2px;background-color:#E8F1FF;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .x-btn{float:left;}.gwt-RichTextToolbar .kune-Button-Large-lSpace{float:left;}.gwt-RichTextToolbar .kune-Button-Large-lrSpace{float:left;}.RichTextToolbar-menu{float:left;margin-top:2px;z-index:4;}.RichTextToolbar-menu table{border-collapse:collapse;border-spacing:0;margin:0;z-index:4;}.RichTextToolbar-menu .gwt-MenuItem{margin-right:2px;border:1px solid #F2F2F2;}.RichTextToolbar-menu .gwt-MenuItem-selected{margin-right:2px;background-color:#E8F1FF;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.RichTextToolbar-submenu{background-color:#FFFCD5;border:1px solid #D38D5F;cursor:default;z-index:4;}.RichTextToolbar-submenu .gwt-MenuItem{cursor:default;white-space:nowrap;border:1px solid #FFFCD5;padding:0 4px;}.RichTextToolbar-submenu .gwt-MenuItem-selected{background-color:#FFB958;border:1px solid #C83737;}.kune-WebSafePalette{background-color:#FFF;border:1px solid #AAA;margin:1px;}.kune-WebSafePalette-popup{z-index:9999!important;background-color:#FFF;border:1px solid gray;}.kune-WebSafePalette td{width:12px;height:10px;}.k-site-traybar{background:transparent none repeat scroll 0 50%;}.k-blank-toolbar{background:#FFF none repeat scroll 0 50%;}.k-sitebar .kune-IconHyperlink{white-space:nowrap;}.k-sitebar .kune-IconHyperlink a:link{cursor:pointer;text-decoration:underline;color:#B3B3B3;}.k-sitebar .kune-IconHyperlink a:hover{text-decoration:underline;}.k-sitebar .kune-IconHyperlink a:visited{color:#B3B3B3;}.k-sitebar-labellink{white-space:nowrap;color:#B3B3B3;cursor:pointer;text-decoration:underline;}.k-sitebar{margin-right:10px;height:16px;}.k-sitebar .gwt-TextBox{border:1px solid #E4A374;margin:0 15px 0 3px;padding-left:1px;color:#B3B3B3;background:transparent;}.k-sitebar .gwt-Hyperlink a{white-space:nowrap;color:#B3B3B3;text-decoration:underline;cursor:pointer;}.k-sitebar .gwt-PushButton{cursor:pointer;}.k-sitebar-LabelLink{white-space:nowrap;color:#B3B3B3;cursor:pointer;text-decoration:underline;}.k-entity-summary{border-left-color:transparent;border-left-width:5px;border-bottom-color:transparent;border-bottom-width:5px;}.k-entitytextlogo-border{border:2px solid #F2F2F2;}.k-entitytextlogo-no-border{border:none;}.k-entitytextlogo{height:60px;margin:0 0 4px;overflow:hidden;width:468px;}.k-entitytextlogo table{vertical-align:middle;}.k-elogo-l-l{font-size:272%;}.k-elogo-l-m{font-size:167%;}.k-elogo-l-s{font-size:108%;}.k-entitytextlogo .gwt-Label{font-weight:700;margin:5px;height:27px;}.k-entitytextlogo-default .gwt-Label{color:#69312F;}.k-entitytextlogo-green .gwt-Label{color:#250;}.k-entitytextlogo-blue .gwt-Label{color:navy;}.k-entitytextlogo-grey .gwt-Label{color:#1A1A1A;}.k-entitytextlogo-purple .gwt-Label{color:#405;}.k-entitytextlogo-red .gwt-Label{color:maroon;}.k-elogo-plink{color:#CCC;font-size:85%;margin:5px;text-decoration:underline;white-space:nowrap;background-color:#FFF;}.k-elogop-expand{background-color:transparent;}.k-entity-default .x-layout-split,.k-entity-default .x-layout-collapsed{background:#DD8A3D none repeat scroll 0 50%;}.k-entity-green .x-layout-split,.k-entity-green .x-layout-collapsed{background:#5FD35F none repeat scroll 0 50%;}.k-entity-blue .x-layout-split,.k-entity-blue .x-layout-collapsed{background:#06F none repeat scroll 0 50%;}.k-entity-grey .x-layout-split,.k-entity-grey .x-layout-collapsed{background:#4D4D4D none repeat scroll 0 50%;}.k-entity-purple .x-layout-split,.k-entity-purple .x-layout-collapsed{background:#660080 none repeat scroll 0 50%;}.k-entity-red .x-layout-split,.k-entity-red .x-layout-collapsed{background:#D40000 none repeat scroll 0 50%;}.k-entityworkspace .x-layout-split,.k-entityworkspace .x-layout-collapsed{background:transparent none repeat scroll 0 50%;}.k-entityworkspace-default .x-layout-split,.k-entityworkspace-default .x-layout-collapsed{background:#DEAA87 none repeat scroll 0 50%;}.k-entityworkspace-green .x-layout-split,.k-entityworkspace-green .x-layout-collapsed{background:#DCE8AB none repeat scroll 0 50%;}.k-entityworkspace-blue .x-layout-split,.k-entityworkspace-blue .x-layout-collapsed{background:#D5D5FF none repeat scroll 0 50%;}.k-entityworkspace-grey .x-layout-split,.k-entityworkspace-grey .x-layout-collapsed{background:#999 none repeat scroll 0 50%;}.k-entityworkspace-purple .x-layout-split,.k-entityworkspace-purple .x-layout-collapsed{background:#A793AC none repeat scroll 0 50%;}.k-entityworkspace-red .x-layout-split,.k-entityworkspace-red .x-layout-collapsed{background:#F55 none repeat scroll 0 50%;}.k-entity-title{border-left-style:solid;border-left-width:2px;}.k-entity-title div{line-height:22px;white-space:nowrap;}.k-entity-subtitle{}.k-entity-subtitle div{line-height:22px;white-space:nowrap;}.k-entity-title-rd-default{background:#DD8A3D;}.k-entity-title-rd-green{background:#5FD35F;}.k-entity-title-rd-blue{background:#06F;}.k-entity-title-rd-grey{background:#4D4D4D;}.k-entity-title-rd-purple{background:#660080;}.k-entity-title-rd-red{background:#D40000;}.k-entity-title-default{background:#F1BB59 none repeat scroll 0 50%;border-left-color:#DD8A3D;}.k-entity-title-green{background:#AFA none repeat scroll 0 50%;border-left-color:#5FD35F;}.k-entity-title-blue{background:#AFDDE9 none repeat scroll 0 50%;border-left-color:#06F;}.k-entity-title-grey{background:#CCC none repeat scroll 0 50%;border-left-color:#4D4D4D;}.k-entity-title-purple{background:#DDAFE9 none repeat scroll 0 50%;border-left-color:#660080;}.k-entity-title-red{background:#FF8080 none repeat scroll 0 50%;border-left-color:#D40000;}.k-entity-title-default div{color:#69312F;}.k-entity-title-green div{color:#250;}.k-entity-title-blue div{color:navy;}.k-entity-title-grey div{color:#1A1A1A;}.k-entity-title-purple div{color:#405;}.k-entity-title-red div{color:maroon;}.k-entity-subtitle-default{background:#DD8A3D none repeat scroll 0 50%;}.k-entity-subtitle-green{background:#5FD35F none repeat scroll 0 50%;}.k-entity-subtitle-blue{background:#06F none repeat scroll 0 50%;}.k-entity-subtitle-grey{background:#4D4D4D none repeat scroll 0 50%;}.k-entity-subtitle-purple{background:#660080 none repeat scroll 0 50%;}.k-entity-subtitle-red{background:#D40000 none repeat scroll 0 50%;}.k-entity-subtitle-default div{color:#FFF;}.k-entity-subtitle-green div{color:#FFF;}.k-entity-subtitle-blue div{color:#FFF;}.k-entity-subtitle-grey div{color:#FFF;}.k-entity-subtitle-purple div{color:#FFF;}.k-entity-subtitle-red div{color:#FFF;}.k-entity-bottom-rd-default,.k-entity-bottom-default,.k-toolselectoritem-sel-default{background:#DD8A3D;}.k-entity-bottom-rd-green,.k-entity-bottom-green,.k-toolselectoritem-sel-green{background:#5FD35F;}.k-entity-bottom-rd-blue,.k-entity-bottom-blue,.k-toolselectoritem-sel-blue{background:#06F;}.k-entity-bottom-rd-grey,.k-entity-bottom-grey,.k-toolselectoritem-sel-grey{background:#4D4D4D;}.k-entity-bottom-rd-purple,.k-entity-bottom-purple,.k-toolselectoritem-sel-purple{background:#660080;}.k-entity-bottom-rd-red,.k-entity-bottom-red,.k-toolselectoritem-sel-red{background:#D40000;}.k-entity-context-default div,.k-entity-context-default .x-tree .x-panel-body{background:#FFD09D none repeat scroll 0 50%;}.k-entity-context-green div,.k-entity-context-green .x-tree .x-panel-body{background:#CFA none repeat scroll 0 50%;}.k-entity-context-blue div,.k-entity-context-blue .x-tree .x-panel-body{background:#ACF none repeat scroll 0 50%;}.k-entity-context-grey div,.k-entity-context-grey .x-tree .x-panel-body{background:#B3B3B3 none repeat scroll 0 50%;}.k-entity-context-purple div,.k-entity-context-purple .x-tree .x-panel-body{background:#DDAFE9 none repeat scroll 0 50%;}.k-entity-context-red div,.k-entity-context-red .x-tree .x-panel-body{background:#FAA none repeat scroll 0 50%;}.k-entity-context-purple .x-tree .x-panel-body{background:#DDAFE9 none repeat scroll 0 50%;}.k-entity-content{background:#FFF;}.k-entity-bottom div{/* line-height: 24px; */color:#FFF;}.k-toolbar-top-line{border-top-color:#d0d0d0;border-top-style:solid;border-top-width:1px;}.k-toolbar-bottom-line{border-bottom-color:#d0d0d0;border-bottom-style:solid;border-bottom-width:1px;}.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{white-space:nowrap;font:normal 100% arial, sans;line-height:19px;}.k-toolbar-sep{padding-top:4px;padding-left:5px;}/* Custom gwt-ext styles */.ytb-sep{background-image:url(../js/ext/resources/images/default/grid/grid-split.gif);background-position:center;background-repeat:no-repeat;display:block;font-size:1px;height:16px;width:4px;overflow:hidden;cursor:default;margin:0 2px;border:0;}.ytb-spacer{width:2px;}.x-grid-group-hd{border-bottom:2px solid grey;cursor:pointer;padding-top:3px;}/* Drop down */.k-dropdownouter{background-color:grey;}.k-dropdownouter-members{}.k-dropdownouter-members-default{background-color:#DF5244;}.k-dropdownouter-members-green{background-color:green;}.k-dropdownouter-members-blue{background-color:#5500D4;}.k-dropdownouter-members-grey{background-color:#4D4D4D;}.k-dropdownouter-members-purple{background-color:#672178;}.k-dropdownouter-members-red{background-color:#A02C2C;}.k-dropdownouter-part{}.k-dropdownouter-part-default{background-color:#CA5842;}.k-dropdownouter-part-green{background-color:#0A0;}.k-dropdownouter-part-blue{background-color:#60F;}.k-dropdownouter-part-grey{background-color:#666;}.k-dropdownouter-part-purple{background-color:#892CA0;}.k-dropdownouter-part-red{background-color:#C83737;}.k-dropdownouter-tags{}.k-dropdownouter-tags-default{background-color:#87501E;}.k-dropdownouter-tags-green{background-color:#00D400;}.k-dropdownouter-tags-blue{background-color:#95F;}.k-dropdownouter-tags-grey{background-color:gray;}.k-dropdownouter-tags-purple{background-color:#AB37C8;}.k-dropdownouter-tags-red{background-color:#D35F5F;}.k-dropdownouter-summary{}.k-dropdownouter-summary-default{background-color:#9F734B;}.k-dropdownouter-summary-green{background-color:#4CE14C;}.k-dropdownouter-summary-blue{background-color:#69A5FF;}.k-dropdownouter-summary-grey{background-color:#A6A6A6;}.k-dropdownouter-summary-purple{background-color:#C473D8;}.k-dropdownouter-summary-red{background-color:#E08F8F;}.k-dropdowninner{margin:0 3px 1px;background:green;background-color:#FFF;/* padding: 3px; */}.k-dropdownlabel{color:#FFF;cursor:pointer;}.k-dropdownlabel .gwt-Label{margin:0 5px 0 0;width:100%;}.k-dropdownlabel img{margin:0 3px 0 1px;}/* WsTheme */.k-wstheme-icon-default{background:#FF8C00;}.k-wstheme-icon-green{background:green;}.k-wstheme-icon-blue{background:blue;}.k-wstheme-icon-grey{background:grey;}.k-wstheme-icon-purple{background:purple;}.k-wstheme-icon-red{background:red;}/* Tool selector items */.k-toolselectoritem{width:auto;margin-bottom:5px;cursor:pointer;}.k-toolselectoritem-sel{}.k-toolselectoritem-notsel-default{background:#FFE9A5;}.k-toolselectoritem-notsel-green{background:#D6F4D6;}.k-toolselectoritem-notsel-blue{background:#D7D7F4;}.k-toolselectoritem-notsel-grey{background:#E6E6E6;}.k-toolselectoritem-notsel-purple{background:#EED7F4;}.k-toolselectoritem-notsel-red{background:#FFD5D5;}.k-toolselectoritem-sel a{color:#FFF;padding:0 9px;text-decoration:none;}.k-toolselectoritem-sel a:hover{text-decoration:none;}.k-toolselectoritem-notsel{}.k-toolselectoritem-notsel a{color:#00F;padding:0 9px;text-decoration:none;}.k-toolselectoritem-notsel a:hover{text-decoration:underline;}/* others *//*
+  padding: 5px; */height:24px;vertical-align:middle;}.gwt-RichTextToolbar table{vertical-align:middle;}.gwt-RichTextToolbar .gwt-ToggleButton{float:left;margin-top:2px;}.gwt-RichTextToolbar .gwt-PushButton{float:left;margin-top:2px;}.gwt-RichTextToolbar .gwt-PushButton-up{margin-right:2px;border:1px solid #F2F2F2;}.gwt-RichTextToolbar .gwt-PushButton-up-hovering{margin-right:2px;border:1px solid #C3D9FF;border-color:#E8F1FF #9daecd #9daecd #e8f1ff;}.gwt-RichTextToolbar .gwt-PushButton-down{margin-right:2px;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .gwt-PushButton-down-hovering{margin-right:2px;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .gwt-ToggleButton-up{margin-right:2px;border:1px solid #F2F2F2;}.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering{margin-right:2px;border:1px solid #C3D9FF;border-color:#E8F1FF #9daecd #9daecd #e8f1ff;}.gwt-RichTextToolbar .gwt-ToggleButton-down{margin-right:2px;background-color:#E8F1FF;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering{margin-right:2px;background-color:#E8F1FF;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.gwt-RichTextToolbar .x-btn{float:left;}.gwt-RichTextToolbar .kune-Button-Large-lSpace{float:left;}.gwt-RichTextToolbar .kune-Button-Large-lrSpace{float:left;}.RichTextToolbar-menu{float:left;margin-top:2px;z-index:4;}.RichTextToolbar-menu table{border-collapse:collapse;border-spacing:0;margin:0;z-index:4;}.RichTextToolbar-menu .gwt-MenuItem{margin-right:2px;border:1px solid #F2F2F2;}.RichTextToolbar-menu .gwt-MenuItem-selected{margin-right:2px;background-color:#E8F1FF;border:1px solid #C3D9FF;border-color:#9DAECD #e8f1ff #e8f1ff #9daecd;}.RichTextToolbar-submenu{background-color:#FFFCD5;border:1px solid #D38D5F;cursor:default;z-index:4;}.RichTextToolbar-submenu .gwt-MenuItem{cursor:default;white-space:nowrap;border:1px solid #FFFCD5;padding:0 4px;}.RichTextToolbar-submenu .gwt-MenuItem-selected{background-color:#FFB958;border:1px solid #C83737;}.kune-WebSafePalette{background-color:#FFF;border:1px solid #AAA;margin:1px;}.kune-WebSafePalette-popup{z-index:9999!important;background-color:#FFF;border:1px solid gray;}.kune-WebSafePalette td{width:12px;height:10px;}.k-site-traybar{background:transparent none repeat scroll 0 50%;}.k-blank-toolbar{background:#FFF none repeat scroll 0 50%;}.k-sitebar .kune-IconHyperlink{white-space:nowrap;}.k-sitebar .kune-IconHyperlink a:link{cursor:pointer;text-decoration:underline;color:#B3B3B3;}.k-sitebar .kune-IconHyperlink a:hover{text-decoration:underline;}.k-sitebar .kune-IconHyperlink a:visited{color:#B3B3B3;}.k-sitebar-labellink{white-space:nowrap;color:#B3B3B3;cursor:pointer;text-decoration:underline;}.k-sitebar{margin-right:10px;height:16px;}.k-sitebar .gwt-TextBox{border:1px solid #E4A374;margin:0 15px 0 3px;padding-left:1px;color:#B3B3B3;background:transparent;}.k-sitebar .gwt-Hyperlink a{white-space:nowrap;color:#B3B3B3;text-decoration:underline;cursor:pointer;}.k-sitebar .gwt-PushButton{cursor:pointer;}.k-sitebar-LabelLink{white-space:nowrap;color:#B3B3B3;cursor:pointer;text-decoration:underline;}.k-entity-summary{border-left-color:transparent;border-left-width:5px;border-bottom-color:transparent;border-bottom-width:5px;}.k-entitytextlogo-border{border:2px solid #F2F2F2;}.k-entitytextlogo-no-border{border:none;}.k-entitytextlogo{height:60px;margin:0 0 4px;overflow:hidden;width:468px;}.k-entitytextlogo table{vertical-align:middle;}.k-elogo-l-l{font-size:272%;}.k-elogo-l-m{font-size:167%;}.k-elogo-l-s{font-size:108%;}.k-entitytextlogo .gwt-Label{font-weight:700;margin:5px;height:27px;}.k-entitytextlogo-default .gwt-Label{color:#69312F;}.k-entitytextlogo-green .gwt-Label{color:#250;}.k-entitytextlogo-blue .gwt-Label{color:navy;}.k-entitytextlogo-grey .gwt-Label{color:#1A1A1A;}.k-entitytextlogo-purple .gwt-Label{color:#405;}.k-entitytextlogo-red .gwt-Label{color:maroon;}.k-elogo-plink{color:#CCC;font-size:85%;margin:5px;text-decoration:underline;white-space:nowrap;background-color:#FFF;}.k-elogop-expand{background-color:transparent;}.k-entity-default .x-layout-split,.k-entity-default .x-layout-collapsed{background:#DD8A3D none repeat scroll 0 50%;}.k-entity-green .x-layout-split,.k-entity-green .x-layout-collapsed{background:#5FD35F none repeat scroll 0 50%;}.k-entity-blue .x-layout-split,.k-entity-blue .x-layout-collapsed{background:#06F none repeat scroll 0 50%;}.k-entity-grey .x-layout-split,.k-entity-grey .x-layout-collapsed{background:#4D4D4D none repeat scroll 0 50%;}.k-entity-purple .x-layout-split,.k-entity-purple .x-layout-collapsed{background:#660080 none repeat scroll 0 50%;}.k-entity-red .x-layout-split,.k-entity-red .x-layout-collapsed{background:#D40000 none repeat scroll 0 50%;}.k-entityworkspace .x-layout-split,.k-entityworkspace .x-layout-collapsed{background:transparent none repeat scroll 0 50%;}.k-entityworkspace-default .x-layout-split,.k-entityworkspace-default .x-layout-collapsed{background:#DEAA87 none repeat scroll 0 50%;}.k-entityworkspace-green .x-layout-split,.k-entityworkspace-green .x-layout-collapsed{background:#DCE8AB none repeat scroll 0 50%;}.k-entityworkspace-blue .x-layout-split,.k-entityworkspace-blue .x-layout-collapsed{background:#D5D5FF none repeat scroll 0 50%;}.k-entityworkspace-grey .x-layout-split,.k-entityworkspace-grey .x-layout-collapsed{background:#999 none repeat scroll 0 50%;}.k-entityworkspace-purple .x-layout-split,.k-entityworkspace-purple .x-layout-collapsed{background:#A793AC none repeat scroll 0 50%;}.k-entityworkspace-red .x-layout-split,.k-entityworkspace-red .x-layout-collapsed{background:#F55 none repeat scroll 0 50%;}.k-entity-title{border-left-style:solid;border-left-width:5px;}.k-entity-title div{line-height:22px;white-space:nowrap;}.k-entity-subtitle{}.k-entity-subtitle div{line-height:22px;white-space:nowrap;}.k-entity-title-rd-default{background:#DD8A3D;}.k-entity-title-rd-green{background:#5FD35F;}.k-entity-title-rd-blue{background:#06F;}.k-entity-title-rd-grey{background:#4D4D4D;}.k-entity-title-rd-purple{background:#660080;}.k-entity-title-rd-red{background:#D40000;}.k-entity-title-default{background:#F1BB59 none repeat scroll 0 50%;border-left-color:#DD8A3D;}.k-entity-title-green{background:#AFA none repeat scroll 0 50%;border-left-color:#5FD35F;}.k-entity-title-blue{background:#AFDDE9 none repeat scroll 0 50%;border-left-color:#06F;}.k-entity-title-grey{background:#CCC none repeat scroll 0 50%;border-left-color:#4D4D4D;}.k-entity-title-purple{background:#DDAFE9 none repeat scroll 0 50%;border-left-color:#660080;}.k-entity-title-red{background:#FF8080 none repeat scroll 0 50%;border-left-color:#D40000;}.k-entity-title-default div{color:#69312F;}.k-entity-title-green div{color:#250;}.k-entity-title-blue div{color:navy;}.k-entity-title-grey div{color:#1A1A1A;}.k-entity-title-purple div{color:#405;}.k-entity-title-red div{color:maroon;}.k-entity-subtitle-default{background:#DD8A3D none repeat scroll 0 50%;}.k-entity-subtitle-green{background:#5FD35F none repeat scroll 0 50%;}.k-entity-subtitle-blue{background:#06F none repeat scroll 0 50%;}.k-entity-subtitle-grey{background:#4D4D4D none repeat scroll 0 50%;}.k-entity-subtitle-purple{background:#660080 none repeat scroll 0 50%;}.k-entity-subtitle-red{background:#D40000 none repeat scroll 0 50%;}.k-entity-subtitle-default div{color:#FFF;}.k-entity-subtitle-green div{color:#FFF;}.k-entity-subtitle-blue div{color:#FFF;}.k-entity-subtitle-grey div{color:#FFF;}.k-entity-subtitle-purple div{color:#FFF;}.k-entity-subtitle-red div{color:#FFF;}.k-entity-bottom-rd-default,.k-entity-bottom-default,.k-toolselectoritem-sel-default{background:#DD8A3D;}.k-entity-bottom-rd-green,.k-entity-bottom-green,.k-toolselectoritem-sel-green{background:#5FD35F;}.k-entity-bottom-rd-blue,.k-entity-bottom-blue,.k-toolselectoritem-sel-blue{background:#06F;}.k-entity-bottom-rd-grey,.k-entity-bottom-grey,.k-toolselectoritem-sel-grey{background:#4D4D4D;}.k-entity-bottom-rd-purple,.k-entity-bottom-purple,.k-toolselectoritem-sel-purple{background:#660080;}.k-entity-bottom-rd-red,.k-entity-bottom-red,.k-toolselectoritem-sel-red{background:#D40000;}.k-entity-context-default div,.k-entity-context-default .x-tree .x-panel-body{background:#FFD09D none repeat scroll 0 50%;}.k-entity-context-green div,.k-entity-context-green .x-tree .x-panel-body{background:#CFA none repeat scroll 0 50%;}.k-entity-context-blue div,.k-entity-context-blue .x-tree .x-panel-body{background:#ACF none repeat scroll 0 50%;}.k-entity-context-grey div,.k-entity-context-grey .x-tree .x-panel-body{background:#B3B3B3 none repeat scroll 0 50%;}.k-entity-context-purple div,.k-entity-context-purple .x-tree .x-panel-body{background:#DDAFE9 none repeat scroll 0 50%;}.k-entity-context-red div,.k-entity-context-red .x-tree .x-panel-body{background:#FAA none repeat scroll 0 50%;}.k-entity-context-purple .x-tree .x-panel-body{background:#DDAFE9 none repeat scroll 0 50%;}.k-entity-content{background:#FFF;}.k-entity-bottom div{/* line-height: 24px; */color:#FFF;}.k-toolbar-top-line{border-top-color:#d0d0d0;border-top-style:solid;border-top-width:1px;}.k-toolbar-bottom-line{border-bottom-color:#d0d0d0;border-bottom-style:solid;border-bottom-width:1px;}.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{white-space:nowrap;font:normal 100% arial, sans;line-height:19px;}.k-toolbar-sep{padding-top:4px;padding-left:5px;}/* Custom gwt-ext styles */.ytb-sep{background-image:url(../js/ext/resources/images/default/grid/grid-split.gif);background-position:center;background-repeat:no-repeat;display:block;font-size:1px;height:16px;width:4px;overflow:hidden;cursor:default;margin:0 2px;border:0;}.ytb-spacer{width:2px;}.x-grid-group-hd{border-bottom:2px solid grey;cursor:pointer;padding-top:3px;}/* Drop down */.k-dropdownouter{background-color:grey;}.k-dropdownouter-members{}.k-dropdownouter-members-default{background-color:#DF5244;}.k-dropdownouter-members-green{background-color:green;}.k-dropdownouter-members-blue{background-color:#5500D4;}.k-dropdownouter-members-grey{background-color:#4D4D4D;}.k-dropdownouter-members-purple{background-color:#672178;}.k-dropdownouter-members-red{background-color:#A02C2C;}.k-dropdownouter-part{}.k-dropdownouter-part-default{background-color:#CA5842;}.k-dropdownouter-part-green{background-color:#0A0;}.k-dropdownouter-part-blue{background-color:#60F;}.k-dropdownouter-part-grey{background-color:#666;}.k-dropdownouter-part-purple{background-color:#892CA0;}.k-dropdownouter-part-red{background-color:#C83737;}.k-dropdownouter-tags{}.k-dropdownouter-tags-default{background-color:#87501E;}.k-dropdownouter-tags-green{background-color:#00D400;}.k-dropdownouter-tags-blue{background-color:#95F;}.k-dropdownouter-tags-grey{background-color:gray;}.k-dropdownouter-tags-purple{background-color:#AB37C8;}.k-dropdownouter-tags-red{background-color:#D35F5F;}.k-dropdownouter-summary{}.k-dropdownouter-summary-default{background-color:#9F734B;}.k-dropdownouter-summary-green{background-color:#4CE14C;}.k-dropdownouter-summary-blue{background-color:#69A5FF;}.k-dropdownouter-summary-grey{background-color:#A6A6A6;}.k-dropdownouter-summary-purple{background-color:#C473D8;}.k-dropdownouter-summary-red{background-color:#E08F8F;}.k-dropdowninner{margin:0 3px 1px;background:green;background-color:#FFF;/* padding: 3px; */}.k-dropdownlabel{color:#FFF;cursor:pointer;}.k-dropdownlabel .gwt-Label{margin:0 5px 0 0;width:100%;}.k-dropdownlabel img{margin:0 3px 0 1px;}/* WsTheme */.k-wstheme-icon-default{background:#FF8C00;}.k-wstheme-icon-green{background:green;}.k-wstheme-icon-blue{background:blue;}.k-wstheme-icon-grey{background:grey;}.k-wstheme-icon-purple{background:purple;}.k-wstheme-icon-red{background:red;}/* Tool selector items */.k-toolselectoritem{width:auto;margin-bottom:5px;cursor:pointer;}.k-toolselectoritem-sel{}.k-toolselectoritem-notsel-default{background:#FFE9A5;}.k-toolselectoritem-notsel-green{background:#D6F4D6;}.k-toolselectoritem-notsel-blue{background:#D7D7F4;}.k-toolselectoritem-notsel-grey{background:#E6E6E6;}.k-toolselectoritem-notsel-purple{background:#EED7F4;}.k-toolselectoritem-notsel-red{background:#FFD5D5;}.k-toolselectoritem-sel a{color:#FFF;padding:0 9px;text-decoration:none;}.k-toolselectoritem-sel a:hover{text-decoration:none;}.k-toolselectoritem-notsel{}.k-toolselectoritem-notsel a{color:#00F;padding:0 9px;text-decoration:none;}.k-toolselectoritem-notsel a:hover{text-decoration:underline;}/* others *//*
 .x-tree-node a span, .x-dd-drag-ghost a span {
     color:#000000;
     padding: 1px 0px 1px 1px;

Modified: trunk/src/main/java/org/ourproject/kune/app/server/KuneContainerListener.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/server/KuneContainerListener.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/app/server/KuneContainerListener.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -30,50 +30,45 @@
 import java.util.logging.Logger;
 
 import org.apache.log4j.PropertyConfigurator;
-import org.ourproject.kune.docs.server.DocumentServerTool;
 import org.ourproject.kune.platf.server.KunePersistenceService;
-import org.ourproject.kune.platf.server.tool.ServerToolRegistry;
 import org.ourproject.kune.rack.ContainerListener;
 
 import com.google.inject.Inject;
 
-class KuneContainerListener implements ContainerListener {
-    KunePersistenceService persistenceService;
-    ServerToolRegistry toolRegistry;
-    DocumentServerTool documentTool;
-    // @PMD:REVIEWED:LoggerIsNotStaticFinal: by vjrj on 21/05/09 16:55
-    Logger logger;
+public class KuneContainerListener implements ContainerListener {
+    private final KunePersistenceService persistenceService;
+    private final Logger logger; // NOPMD by vjrj on 16/07/09 22:38
 
     @Inject
-    public KuneContainerListener(final KunePersistenceService persistenceService,
-            final ServerToolRegistry toolRegistry, final DocumentServerTool documentTool, final Logger logger) {
+    public KuneContainerListener(final KunePersistenceService persistenceService, final Logger logger) {
         this.persistenceService = persistenceService;
-        this.toolRegistry = toolRegistry;
-        this.documentTool = documentTool;
         this.logger = logger;
     }
 
+    public Logger getLogger() {
+        return logger;
+    }
+
     public void start() {
         configureLog4j();
         logger.log(Level.INFO, "starting Kune...");
-        toolRegistry.register(documentTool);
         persistenceService.start();
         logger.log(Level.INFO, "Kune server started");
     }
 
     public void stop() {
-        logger.log(Level.INFO, "stoping Kune...");
-        logger.log(Level.INFO, "Kune server stoped");
+        logger.log(Level.INFO, "stopping Kune...");
+        logger.log(Level.INFO, "Kune server stopped");
     }
 
     private void configureLog4j() {
         try {
-            Properties properties = new Properties();
-            InputStream input = Thread.currentThread().getContextClassLoader().getResourceAsStream(
+            final Properties properties = new Properties();
+            final InputStream input = Thread.currentThread().getContextClassLoader().getResourceAsStream(
                     "log4j.dev.properties");
             properties.load(input);
             PropertyConfigurator.configure(properties);
-        } catch (IOException e) {
+        } catch (final IOException e) {
             e.printStackTrace();
         }
     }

Modified: trunk/src/main/java/org/ourproject/kune/chat/server/ChatServerModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/server/ChatServerModule.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/chat/server/ChatServerModule.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -23,12 +23,13 @@
 
 public class ChatServerModule extends AbstractModule {
 
+    @Override
     public void configure() {
         // To debug Smack, descomment this
         // XMPPConnection.DEBUG_ENABLED = true;
 
-        // FIXME: Dani: check this please
         bind(ChatServerTool.class).asEagerSingleton();
+
     }
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/chat/server/ChatServerTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/server/ChatServerTool.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/chat/server/ChatServerTool.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -49,11 +49,11 @@
         this.containerManager = containerManager;
     }
 
-    public void checkTypesBeforeContainerCreation(String parentTypeId, String typeId) {
+    public void checkTypesBeforeContainerCreation(final String parentTypeId, final String typeId) {
         checkContainerTypeId(parentTypeId, typeId);
     }
 
-    public void checkTypesBeforeContentCreation(String parentTypeId, String typeId) {
+    public void checkTypesBeforeContentCreation(final String parentTypeId, final String typeId) {
         if (!parentTypeId.equals(TYPE_ROOM)) {
             throw new ContainerNotPermittedException();
         }
@@ -85,7 +85,6 @@
     }
 
     public void onCreateContent(final Content content, final Container parent) {
-
     }
 
     @Inject

Modified: trunk/src/main/java/org/ourproject/kune/platf/KunePlatform.gwt.xml
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/KunePlatform.gwt.xml	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/KunePlatform.gwt.xml	2009-07-19 18:10:48 UTC (rev 1135)
@@ -18,6 +18,7 @@
         <when-type-is
             class="org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl" />
         <when-property-is name="user.agent" value="ie6" />
+        <when-property-is name="user.agent" value="ie8" />
     </replace-with>
 
     <!-- Mozilla-specific implementation -->

Modified: trunk/src/main/java/org/ourproject/kune/platf/RichText.gwt.xml
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/RichText.gwt.xml	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/RichText.gwt.xml	2009-07-19 18:10:48 UTC (rev 1135)
@@ -24,6 +24,7 @@
 		<when-type-is
 			class="org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl" />
 		<when-property-is name="user.agent" value="ie6" />
+        <when-property-is name="user.agent" value="ie8" />
 	</replace-with>
 
 	<!-- Mozilla-specific implementation -->

Added: trunk/src/main/java/org/ourproject/kune/platf/client/errors/UnknownPropertyException.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/errors/UnknownPropertyException.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/errors/UnknownPropertyException.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.platf.client.errors;
+
+public class UnknownPropertyException extends DefaultException {
+    private static final long serialVersionUID = -5921396887476497824L;
+
+    public UnknownPropertyException(final String message) {
+        super(message);
+    }
+}

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -59,6 +59,11 @@
 import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
 import org.ourproject.kune.platf.server.manager.I18nTranslationManager;
 import org.ourproject.kune.platf.server.manager.LicenseManager;
+import org.ourproject.kune.platf.server.manager.PropertiesManager;
+import org.ourproject.kune.platf.server.manager.PropertyGroupManager;
+import org.ourproject.kune.platf.server.manager.PropertyManager;
+import org.ourproject.kune.platf.server.manager.PropertySettedManager;
+import org.ourproject.kune.platf.server.manager.PropertySubgroupManager;
 import org.ourproject.kune.platf.server.manager.RateManager;
 import org.ourproject.kune.platf.server.manager.SocialNetworkManager;
 import org.ourproject.kune.platf.server.manager.TagManager;
@@ -77,6 +82,11 @@
 import org.ourproject.kune.platf.server.manager.impl.I18nLanguageManagerDefault;
 import org.ourproject.kune.platf.server.manager.impl.I18nTranslationManagerDefault;
 import org.ourproject.kune.platf.server.manager.impl.LicenseManagerDefault;
+import org.ourproject.kune.platf.server.manager.impl.PropertiesManagerDefault;
+import org.ourproject.kune.platf.server.manager.impl.PropertyGroupManagerDefault;
+import org.ourproject.kune.platf.server.manager.impl.PropertyManagerDefault;
+import org.ourproject.kune.platf.server.manager.impl.PropertySettedManagerDefault;
+import org.ourproject.kune.platf.server.manager.impl.PropertySubgroupManagerDefault;
 import org.ourproject.kune.platf.server.manager.impl.RateManagerDefault;
 import org.ourproject.kune.platf.server.manager.impl.SocialNetworkManagerDefault;
 import org.ourproject.kune.platf.server.manager.impl.TagManagerDefault;
@@ -143,6 +153,11 @@
         bind(CommentManager.class).to(CommentManagerDefault.class);
         bind(FileManager.class).to(FileManagerDefault.class);
         bind(ExtMediaDescripManager.class).to(ExtMediaDescripManagerDefault.class);
+        bind(PropertyManager.class).to(PropertyManagerDefault.class);
+        bind(PropertySettedManager.class).to(PropertySettedManagerDefault.class);
+        bind(PropertyGroupManager.class).to(PropertyGroupManagerDefault.class);
+        bind(PropertySubgroupManager.class).to(PropertySubgroupManagerDefault.class);
+        bind(PropertiesManager.class).to(PropertiesManagerDefault.class);
     }
 
     private void bindRPC() {

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/Group.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/Group.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/Group.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -59,6 +59,7 @@
     // see: http://docs.codehaus.org/display/PICO/Good+Citizen:
     // Never expect or return null
     public static final Group NO_GROUP = null;
+    public static final String PROPS_ID = "groupprops";
 
     @Id
     @DocumentId

Added: trunk/src/main/java/org/ourproject/kune/platf/server/domain/Properties.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/Properties.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/Properties.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,79 @@
+package org.ourproject.kune.platf.server.domain;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.MapKey;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+import org.hibernate.validator.NotNull;
+
+/**
+ * Properties defined for some elements (identified by the group)
+ * 
+ */
+ at Entity
+ at Table(name = "properties")
+public class Properties implements HasId {
+
+    @Id
+    @GeneratedValue
+    private Long id;
+
+    /**
+     * Every list of properties are from a unique PropertyGroup (like User
+     * properties, or Group properties)
+     * 
+     */
+    @NotNull
+    @ManyToOne
+    private final PropertyGroup pgroup;
+
+    @OneToMany(cascade = CascadeType.ALL)
+    @MapKey(name = "property")
+    // @Cascade( { org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
+    // @OnDelete(action = OnDeleteAction.CASCADE)
+    private Map<Property, PropertySetted> list;
+
+    public Properties() {
+        this(null);
+    }
+
+    public Properties(final PropertyGroup group) {
+        pgroup = group;
+        list = new HashMap<Property, PropertySetted>();
+    }
+
+    // @Finder(query =
+    // "SELECT p FROM Properties ps JOIN ps.list p WHERE p.property.name = :pname")
+    // public PropertySetted find(@Named("pname") final String key) {
+    // return null;
+    // }
+
+    public Long getId() {
+        return id;
+    }
+
+    public Map<Property, PropertySetted> getList() {
+        return list;
+    }
+
+    public PropertyGroup getPgroup() {
+        return pgroup;
+    }
+
+    public void setId(final Long id) {
+        this.id = id;
+    }
+
+    public void setList(final Map<Property, PropertySetted> list) {
+        this.list = list;
+    }
+
+}

Added: trunk/src/main/java/org/ourproject/kune/platf/server/domain/Property.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/Property.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/Property.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,215 @@
+package org.ourproject.kune.platf.server.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+import org.hibernate.annotations.Index;
+import org.hibernate.validator.NotNull;
+import org.hibernate.validator.Pattern;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+import com.google.inject.name.Named;
+import com.wideplay.warp.persist.dao.Finder;
+
+ at Entity
+ at Table(name = "property")
+// @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
+public class Property implements HasId {
+
+    public enum Type implements IsSerializable {
+        STRING, ENUM, BOOL, LIST, HIDDEN
+    }
+
+    @Id
+    @GeneratedValue
+    // (strategy = GenerationType.TABLE)
+    private Long id;
+
+    /**
+     * Required "symbolic" name of the user preference; displayed to the user
+     * during editing if no display_name is defined. Must contain only letters,
+     * number and underscores, i.e. the regular expression ^[a-zA-Z0-9_]+$. Must
+     * be unique.
+     **/
+    @Index(name = "propname")
+    @Column(unique = true)
+    @Pattern(regex = "^[a-zA-Z0-9_]+$", message = "The name can only contain Western characters, numbers, and dashes")
+    private String name;
+
+    /**
+     * Optional string to display alongside the user preferences in the edit
+     * window (in google gadgets must be unique).
+     **/
+    private String displayName;
+
+    /**
+     * Optional string that indicates the data type of this attribute. Can be
+     * string, bool, enum, hidden (final a string that is not visible or user
+     * editable), or list (final dynamic array generated from user input). The
+     * default is string.
+     **/
+    @Enumerated(EnumType.STRING)
+    @Column(nullable = false)
+    private Type datatype;
+
+    /**
+     * Optional boolean argument (true or false) indicating whether this user
+     * preference is required. The default is false.
+     **/
+    @Basic
+    private boolean required;
+
+    /**
+     * Optional string that indicates a user preference's default value.
+     **/
+    private String defaultValue;
+
+    /**
+     * Optional string list that indicates enum valid values.
+     **/
+    @Basic
+    private ArrayList<String> enumValues;
+
+    @NotNull
+    @ManyToOne
+    private PropertyGroup pgroup;
+
+    @NotNull
+    @ManyToOne
+    private PropertySubgroup sgroup;
+
+    public Property() {
+        this(null, null, Type.STRING, false, null, new ArrayList<String>(), null, null);
+    }
+
+    public Property(final Property prop) {
+        this.name = prop.getName();
+        this.required = prop.getRequired();
+        this.datatype = prop.getDatatype();
+        this.defaultValue = prop.getDefaultValue();
+        this.displayName = prop.getDisplayName();
+        this.enumValues = prop.getEnumValues();
+        this.pgroup = prop.getPgroup();
+        this.sgroup = prop.getSgroup();
+    }
+
+    public Property(final String name, final String displayName, final Type datatype, final boolean required,
+            final String defaultValue, final ArrayList<String> enumValues, final PropertyGroup pgroup,
+            final PropertySubgroup sgroup) {
+        this.name = name;
+        this.displayName = displayName;
+        this.datatype = datatype;
+        this.required = required;
+        this.defaultValue = defaultValue;
+        this.enumValues = enumValues;
+        this.pgroup = pgroup;
+        this.sgroup = sgroup;
+    }
+
+    public Property(final String name, final String displayName, final Type datatype, final boolean required,
+            final String defaultValue, final PropertyGroup pgroup, final PropertySubgroup sgroup) {
+        this(name, displayName, datatype, required, defaultValue, new ArrayList<String>(), pgroup, sgroup);
+    }
+
+    @Finder(query = "SELECT p FROM Property p JOIN p.pgroup g WHERE g = :pgroup")
+    public List<Property> find(@Named("pgroup") final PropertyGroup pGroup) {
+        return null;
+    }
+
+    @Finder(query = "SELECT p.name FROM Property p JOIN p.sgroup g WHERE g = :sgroup")
+    public List<String> find(@Named("sgroup") final PropertySubgroup sGroup) {
+        return null;
+    }
+
+    @Finder(query = "FROM Property p WHERE p.name = :name")
+    public Property find(@Named("name") final String name) {
+        return null;
+    }
+
+    @Finder(query = "FROM Property")
+    public List<Property> getAll() {
+        return null;
+    }
+
+    public Type getDatatype() {
+        return datatype;
+    }
+
+    public String getDefaultValue() {
+        return defaultValue;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    public ArrayList<String> getEnumValues() {
+        return enumValues;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public PropertyGroup getPgroup() {
+        return pgroup;
+    }
+
+    public boolean getRequired() {
+        return required;
+    }
+
+    public PropertySubgroup getSgroup() {
+        return sgroup;
+    }
+
+    public void setDatatype(final Type datatype) {
+        this.datatype = datatype;
+    }
+
+    public void setDefaultValue(final String defaultValue) {
+        this.defaultValue = defaultValue;
+    }
+
+    public void setDisplayName(final String displayName) {
+        this.displayName = displayName;
+    }
+
+    public void setEnumValues(final ArrayList<String> enumValues) {
+        this.enumValues = enumValues;
+    }
+
+    public void setId(final Long id) {
+        this.id = id;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public void setPgroup(final PropertyGroup pgroup) {
+        this.pgroup = pgroup;
+    }
+
+    public void setRequired(final boolean required) {
+        this.required = required;
+    }
+
+    public void setSgroup(final PropertySubgroup sgroup) {
+        this.sgroup = sgroup;
+    }
+}

Added: trunk/src/main/java/org/ourproject/kune/platf/server/domain/PropertyGroup.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/PropertyGroup.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/PropertyGroup.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,92 @@
+package org.ourproject.kune.platf.server.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+import org.hibernate.annotations.OnDelete;
+import org.hibernate.annotations.OnDeleteAction;
+import org.hibernate.validator.NotNull;
+
+import com.google.inject.name.Named;
+import com.wideplay.warp.persist.dao.Finder;
+
+ at Entity
+ at Table(name = "property_group")
+public class PropertyGroup implements HasId {
+
+    @Id
+    @GeneratedValue
+    private Long id;
+
+    @OneToMany(mappedBy = "pgroup")
+    @OnDelete(action = OnDeleteAction.CASCADE)
+    private List<Property> propertyList;
+
+    @OneToMany(mappedBy = "pgroup")
+    @OnDelete(action = OnDeleteAction.CASCADE)
+    private List<Properties> propertiesList;
+
+    @NotNull
+    @Column(unique = true)
+    private String name;
+
+    public PropertyGroup() {
+        this(null);
+    }
+
+    public PropertyGroup(final String name) {
+        this.name = name;
+        propertyList = new ArrayList<Property>();
+        propertiesList = new ArrayList<Properties>();
+    }
+
+    @Finder(query = "FROM PropertyGroup pg WHERE pg.name = :groupname")
+    public PropertyGroup find(@Named("groupname") final String groupName) {
+        return null;
+    }
+
+    @Finder(query = "FROM PropertyGroup")
+    public List<PropertyGroup> getAll() {
+        return null;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public List<Properties> getPropertiesList() {
+        return propertiesList;
+    }
+
+    public List<Property> getPropertyList() {
+        return propertyList;
+    }
+
+    public void setId(final Long id) {
+        this.id = id;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public void setPropertiesList(final List<Properties> propertiesList) {
+        this.propertiesList = propertiesList;
+    }
+
+    public void setPropertyList(final List<Property> propertyList) {
+        this.propertyList = propertyList;
+    }
+
+}

Added: trunk/src/main/java/org/ourproject/kune/platf/server/domain/PropertySetted.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/PropertySetted.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/PropertySetted.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,96 @@
+package org.ourproject.kune.platf.server.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+import org.hibernate.validator.NotNull;
+import org.ourproject.kune.platf.server.domain.Property.Type;
+
+import com.wideplay.warp.persist.dao.Finder;
+
+ at Entity
+ at Table(name = "property_setted")
+public class PropertySetted implements HasId {
+
+    @Id
+    @GeneratedValue
+    private Long id;
+
+    private String value;
+
+    @NotNull
+    @ManyToOne
+    private final Property property;
+
+    public PropertySetted() {
+        this(null, null);
+    }
+
+    public PropertySetted(final Property property, final String value) {
+        this.value = value;
+        this.property = property;
+    }
+
+    @Finder(query = "FROM PropertySetted")
+    public List<PropertySetted> getAll() {
+        return null;
+    }
+
+    public Type getDatatype() {
+        return property.getDatatype();
+    }
+
+    public String getDefaultValue() {
+        return property.getDefaultValue();
+    }
+
+    public String getDisplayName() {
+        return property.getDisplayName();
+    }
+
+    public ArrayList<String> getEnumValues() {
+        return property.getEnumValues();
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public String getName() {
+        return property.getName();
+    }
+
+    public PropertyGroup getPgroup() {
+        return property.getPgroup();
+    }
+
+    public Property getProperty() {
+        return property;
+    }
+
+    public boolean getRequired() {
+        return property.getRequired();
+    }
+
+    public PropertySubgroup getSgroup() {
+        return property.getSgroup();
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setId(final Long id) {
+        this.id = id;
+    }
+
+    public void setValue(final String value) {
+        this.value = value;
+    }
+}

Added: trunk/src/main/java/org/ourproject/kune/platf/server/domain/PropertySubgroup.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/PropertySubgroup.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/PropertySubgroup.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,72 @@
+package org.ourproject.kune.platf.server.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+import org.hibernate.annotations.OnDelete;
+import org.hibernate.annotations.OnDeleteAction;
+import org.hibernate.validator.NotNull;
+
+import com.wideplay.warp.persist.dao.Finder;
+
+ at Entity
+ at Table(name = "property_subgroup")
+public class PropertySubgroup implements HasId {
+
+    @Id
+    @GeneratedValue
+    private Long id;
+
+    @NotNull
+    @Column(unique = true)
+    private String name;
+
+    @OneToMany(mappedBy = "sgroup")
+    @OnDelete(action = OnDeleteAction.CASCADE)
+    private List<Property> properties;
+
+    public PropertySubgroup() {
+        this.name = null;
+        this.properties = new ArrayList<Property>();
+    }
+
+    public PropertySubgroup(final String name) {
+        this.name = name;
+    }
+
+    @Finder(query = "FROM PropertySubgroup")
+    public List<PropertySubgroup> getAll() {
+        return null;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public List<Property> getProperties() {
+        return properties;
+    }
+
+    public void setId(final Long id) {
+        this.id = id;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    public void setProperties(final List<Property> properties) {
+        this.properties = properties;
+    }
+}

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -33,6 +33,8 @@
 import javax.persistence.Table;
 import javax.persistence.Transient;
 
+import org.hibernate.annotations.OnDelete;
+import org.hibernate.annotations.OnDeleteAction;
 import org.hibernate.search.annotations.DocumentId;
 import org.hibernate.search.annotations.Field;
 import org.hibernate.search.annotations.Index;
@@ -55,6 +57,7 @@
     // see: http://docs.codehaus.org/display/PICO/Good+Citizen:
     // Never expect or return null
     public static final User UNKNOWN_USER = new User();
+    public static final String PROPS_ID = "userprops";
 
     public static boolean isKnownUser(final User user) {
         return !user.equals(UNKNOWN_USER);
@@ -111,12 +114,21 @@
     @Basic
     private Long lastLogin;
 
+    @OneToOne
+    @OnDelete(action = OnDeleteAction.CASCADE)
+    private Properties properties;
+
     public User() {
-        this(null, null, null, null, null, null, null);
+        this(null, null, null, null, null, null, null, null);
     }
 
     public User(final String shortName, final String longName, final String email, final String passwd,
             final I18nLanguage language, final I18nCountry country, final TimeZone timezone) {
+        this(shortName, longName, email, passwd, language, country, timezone, null);
+    }
+
+    public User(final String shortName, final String longName, final String email, final String passwd,
+            final I18nLanguage language, final I18nCountry country, final TimeZone timezone, final Properties properties) {
         this.shortName = shortName;
         this.name = longName;
         this.email = email;
@@ -129,6 +141,7 @@
         buddiesVisibility = UserBuddiesVisibility.anyone;
         this.createdOn = System.currentTimeMillis();
         this.lastLogin = null;
+        this.properties = properties;
     }
 
     @Finder(query = "from User")
@@ -190,6 +203,10 @@
         return password;
     }
 
+    public Properties getProperties() {
+        return properties;
+    }
+
     public String getShortName() {
         return shortName;
     }
@@ -246,6 +263,10 @@
         // Use UnixCrypt (jetty)
     }
 
+    public void setProperties(final Properties properties) {
+        this.properties = properties;
+    }
+
     public void setShortName(final String shortName) {
         this.shortName = shortName;
     }

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	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -1,5 +1,6 @@
 package org.ourproject.kune.platf.server.init;
 
+import java.util.ArrayList;
 import java.util.TimeZone;
 
 import javax.persistence.NoResultException;
@@ -14,15 +15,22 @@
 import org.ourproject.kune.platf.server.domain.I18nLanguage;
 import org.ourproject.kune.platf.server.domain.I18nTranslation;
 import org.ourproject.kune.platf.server.domain.License;
+import org.ourproject.kune.platf.server.domain.Property;
+import org.ourproject.kune.platf.server.domain.PropertyGroup;
+import org.ourproject.kune.platf.server.domain.PropertySubgroup;
 import org.ourproject.kune.platf.server.domain.User;
 import org.ourproject.kune.platf.server.manager.GroupManager;
 import org.ourproject.kune.platf.server.manager.I18nCountryManager;
 import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
 import org.ourproject.kune.platf.server.manager.I18nTranslationManager;
 import org.ourproject.kune.platf.server.manager.LicenseManager;
+import org.ourproject.kune.platf.server.manager.PropertyGroupManager;
+import org.ourproject.kune.platf.server.manager.PropertyManager;
+import org.ourproject.kune.platf.server.manager.PropertySubgroupManager;
 import org.ourproject.kune.platf.server.manager.UserManager;
 import org.ourproject.kune.platf.server.properties.DatabaseProperties;
 
+import com.calclab.emiteuimodule.client.SubscriptionMode;
 import com.google.inject.Inject;
 import com.wideplay.warp.persist.TransactionType;
 import com.wideplay.warp.persist.Transactional;
@@ -36,12 +44,17 @@
     private final I18nCountryManager countryManager;
     private final I18nTranslationManager translationManager;
     private final ContentManager contentManager;
+    private final PropertyManager propertyManager;
+    private final PropertyGroupManager propGroupManager;
+    private final PropertySubgroupManager propSubgroupManager;
 
     @Inject
     public DatabaseInitializer(final DatabaseProperties properties, final UserManager userManager,
             final GroupManager groupManager, final LicenseManager licenseManager,
             final I18nLanguageManager languageManager, final I18nCountryManager countryManager,
-            final I18nTranslationManager translationManager, final ContentManager contentManager) {
+            final I18nTranslationManager translationManager, final ContentManager contentManager,
+            final PropertyManager propertyManager, final PropertyGroupManager propGroupManager,
+            final PropertySubgroupManager propSubgroupManager) {
         this.properties = properties;
         this.userManager = userManager;
         this.groupManager = groupManager;
@@ -50,6 +63,9 @@
         this.countryManager = countryManager;
         this.translationManager = translationManager;
         this.contentManager = contentManager;
+        this.propertyManager = propertyManager;
+        this.propGroupManager = propGroupManager;
+        this.propSubgroupManager = propSubgroupManager;
     }
 
     public void createOthers() {
@@ -78,6 +94,7 @@
     public void initDatabase() throws Exception {
         createOthers();
         createLicenses();
+        createProperties();
         createDefUsersGroup();
     }
 
@@ -180,4 +197,27 @@
                 "http://www.gnu.org/licenses/gpl.html", false, true, false, "", "images/lic/gnu-gpl.gif");
         licenseManager.persist(license);
     }
+
+    private void createProperties() {
+        final PropertyGroup groupProps = new PropertyGroup(Group.PROPS_ID);
+        final PropertyGroup userProps = new PropertyGroup(User.PROPS_ID);
+        propGroupManager.persist(userProps);
+        propGroupManager.persist(groupProps);
+        final PropertySubgroup userXmppProps = new PropertySubgroup("user-xmpp");
+        propSubgroupManager.persist(userXmppProps);
+
+        final Property colorProp = new Property("xmpp_color", "Choose your color", Property.Type.STRING, true, "blue",
+                userProps, userXmppProps);
+        final ArrayList<String> subValues = new ArrayList<String>();
+        subValues.add(SubscriptionMode.autoAcceptAll.toString());
+        subValues.add(SubscriptionMode.autoRejectAll.toString());
+        subValues.add(SubscriptionMode.manual.toString());
+        final Property subProp = new Property("xmpp_subcriptionmode", "New buddies options", Property.Type.ENUM, true,
+                SubscriptionMode.manual.toString(), subValues, userProps, userXmppProps);
+        final Property unanavProp = new Property("xmpp_unanavailableitemsvisible", "Show unavailable buddies",
+                Property.Type.BOOL, true, Boolean.toString(true), userProps, userXmppProps);
+        propertyManager.persist(colorProp);
+        propertyManager.persist(subProp);
+        propertyManager.persist(unanavProp);
+    }
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/Manager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/Manager.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/Manager.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -24,6 +24,8 @@
 
 public interface Manager<T, X> {
 
+    void clear();
+
     T find(X id);
 
     T merge(T entity);
@@ -32,6 +34,8 @@
 
     void reIndex();
 
+    void remove(T entity);
+
     SearchResult<T> search(final String query, final String[] fields, final BooleanClause.Occur[] flags,
             final Integer firstResult, final Integer maxResults);
 

Added: trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertiesManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertiesManager.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertiesManager.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,16 @@
+package org.ourproject.kune.platf.server.manager;
+
+import java.util.HashMap;
+
+import org.ourproject.kune.platf.server.domain.Properties;
+import org.ourproject.kune.platf.server.domain.PropertySetted;
+
+public interface PropertiesManager extends Manager<Properties, Long> {
+
+    HashMap<String, PropertySetted> get(Properties properties);
+
+    PropertySetted get(Properties properties, String key);
+
+    void set(Properties properties, String key, String value);
+
+}

Added: trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertyGroupManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertyGroupManager.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertyGroupManager.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,9 @@
+package org.ourproject.kune.platf.server.manager;
+
+import org.ourproject.kune.platf.server.domain.PropertyGroup;
+
+public interface PropertyGroupManager extends Manager<PropertyGroup, Long> {
+
+    PropertyGroup find(String groupName);
+
+}

Added: trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertyManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertyManager.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertyManager.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,7 @@
+package org.ourproject.kune.platf.server.manager;
+
+import org.ourproject.kune.platf.server.domain.Property;
+
+public interface PropertyManager extends Manager<Property, Long> {
+
+}

Added: trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertySettedManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertySettedManager.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertySettedManager.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,7 @@
+package org.ourproject.kune.platf.server.manager;
+
+import org.ourproject.kune.platf.server.domain.PropertySetted;
+
+public interface PropertySettedManager extends Manager<PropertySetted, Long> {
+
+}

Added: trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertySubgroupManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertySubgroupManager.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/PropertySubgroupManager.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,7 @@
+package org.ourproject.kune.platf.server.manager;
+
+import org.ourproject.kune.platf.server.domain.PropertySubgroup;
+
+public interface PropertySubgroupManager extends Manager<PropertySubgroup, Long> {
+
+}

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoUploadManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoUploadManager.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoUploadManager.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -49,10 +49,10 @@
     private static final long serialVersionUID = -4281058427935636238L;
 
     @Inject
-    GroupManager groupManager;
+    transient GroupManager groupManager;
 
     @Inject
-    I18nTranslationService i18n;
+    transient I18nTranslationService i18n;
 
     @Override
     protected void beforePostStart() {

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/DefaultManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/DefaultManager.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/DefaultManager.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -47,6 +47,10 @@
         log = LogFactory.getLog(entityClass);
     }
 
+    public void clear() {
+        getEntityManager().clear();
+    }
+
     public T find(final Long primaryKey) {
         return getEntityManager().find(entityClass, primaryKey);
     }
@@ -83,6 +87,10 @@
         fullTextEm.getSearchFactory().optimize(entityClass);
     }
 
+    public void remove(final T entity) {
+        getEntityManager().remove(entity);
+    }
+
     public SearchResult<T> search(final Query query) {
         return search(query, null, null);
     }

Added: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertiesManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertiesManagerDefault.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertiesManagerDefault.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,86 @@
+package org.ourproject.kune.platf.server.manager.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.persistence.EntityManager;
+
+import org.ourproject.kune.platf.client.errors.UnknownPropertyException;
+import org.ourproject.kune.platf.server.domain.Properties;
+import org.ourproject.kune.platf.server.domain.Property;
+import org.ourproject.kune.platf.server.domain.PropertySetted;
+import org.ourproject.kune.platf.server.manager.PropertiesManager;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class PropertiesManagerDefault extends DefaultManager<Properties, Long> implements PropertiesManager {
+
+    private final Property propFinder;
+    private final Properties propsFinder;
+
+    @Inject
+    public PropertiesManagerDefault(final Provider<EntityManager> provider, final Property propFinder,
+            final Properties propsFinder) {
+        super(provider, Properties.class);
+        this.propFinder = propFinder;
+        this.propsFinder = propsFinder;
+    }
+
+    public HashMap<String, PropertySetted> get(final Properties properties) {
+        final List<Property> defProperties = propFinder.find(properties.getPgroup());
+        final Map<Property, PropertySetted> propSetted = properties.getList();
+        final HashMap<String, PropertySetted> result = new HashMap<String, PropertySetted>();
+        for (final Property prop : defProperties) {
+            final PropertySetted setted = propSetted.get(prop);
+            if (setted == null) {
+                result.put(prop.getName(), createPropSettedFromDefault(prop));
+            } else {
+                result.put(prop.getName(), setted);
+            }
+        }
+        return result;
+    }
+
+    public PropertySetted get(final Properties properties, final String key) {
+        final Property prop = getDefProp(key);
+        PropertySetted propSet = properties.getList().get(prop);
+        if (propSet == null) {
+            propSet = createPropSettedFromDefault(prop);
+        }
+        return propSet;
+    }
+
+    public void set(final Properties properties, final String key, final String value) {
+        final PropertySetted propertySetted = get(properties, key);
+        propertySetted.setValue(value);
+        if (properties.getList().get(getDefProp(key)) == null) {
+            properties.getList().put(propertySetted.getProperty(), propertySetted);
+        }
+        persist(properties);
+    }
+
+    private PropertySetted createPropSettedFromDefault(final Property prop) {
+        return new PropertySetted(prop, prop.getDefaultValue());
+    }
+
+    private Property getDefProp(final String key) {
+        final Property prop = propFinder.find(key);
+        if (prop == null) {
+            throw new UnknownPropertyException("Unknown property: " + key);
+        }
+        return prop;
+    }
+
+    // @Override
+    // public void remove(final Properties properties) {
+    // for (final Entry<Property, PropertySetted> prop :
+    // properties.getList().entrySet()) {
+    // }
+    // super.remove(properties);
+    // }
+
+}

Added: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertyGroupManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertyGroupManagerDefault.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertyGroupManagerDefault.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,40 @@
+package org.ourproject.kune.platf.server.manager.impl;
+
+import javax.persistence.EntityManager;
+
+import org.ourproject.kune.platf.server.domain.Properties;
+import org.ourproject.kune.platf.server.domain.PropertyGroup;
+import org.ourproject.kune.platf.server.manager.PropertiesManager;
+import org.ourproject.kune.platf.server.manager.PropertyGroupManager;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class PropertyGroupManagerDefault extends DefaultManager<PropertyGroup, Long> implements PropertyGroupManager {
+
+    private final PropertyGroup finder;
+    private final PropertiesManager propertiesManager;
+
+    @Inject
+    public PropertyGroupManagerDefault(final Provider<EntityManager> provider, final PropertyGroup finder,
+            final PropertiesManager propertiesManager) {
+        super(provider, PropertyGroup.class);
+        this.finder = finder;
+        this.propertiesManager = propertiesManager;
+    }
+
+    public PropertyGroup find(final String groupName) {
+        return finder.find(groupName);
+    }
+
+    @Override
+    public void remove(final PropertyGroup pGroup) {
+        for (final Properties properties : pGroup.getPropertiesList()) {
+            propertiesManager.remove(properties);
+        }
+        super.remove(pGroup);
+    }
+
+}

Added: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertyManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertyManagerDefault.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertyManagerDefault.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,20 @@
+package org.ourproject.kune.platf.server.manager.impl;
+
+import javax.persistence.EntityManager;
+
+import org.ourproject.kune.platf.server.domain.Property;
+import org.ourproject.kune.platf.server.manager.PropertyManager;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class PropertyManagerDefault extends DefaultManager<Property, Long> implements PropertyManager {
+
+    @Inject
+    public PropertyManagerDefault(final Provider<EntityManager> provider) {
+        super(provider, Property.class);
+    }
+
+}

Added: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertySettedManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertySettedManagerDefault.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertySettedManagerDefault.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,20 @@
+package org.ourproject.kune.platf.server.manager.impl;
+
+import javax.persistence.EntityManager;
+
+import org.ourproject.kune.platf.server.domain.PropertySetted;
+import org.ourproject.kune.platf.server.manager.PropertySettedManager;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class PropertySettedManagerDefault extends DefaultManager<PropertySetted, Long> implements PropertySettedManager {
+
+    @Inject
+    public PropertySettedManagerDefault(final Provider<EntityManager> provider) {
+        super(provider, PropertySetted.class);
+    }
+
+}

Added: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertySubgroupManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertySubgroupManagerDefault.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/PropertySubgroupManagerDefault.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,21 @@
+package org.ourproject.kune.platf.server.manager.impl;
+
+import javax.persistence.EntityManager;
+
+import org.ourproject.kune.platf.server.domain.PropertySubgroup;
+import org.ourproject.kune.platf.server.manager.PropertySubgroupManager;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class PropertySubgroupManagerDefault extends DefaultManager<PropertySubgroup, Long> implements
+        PropertySubgroupManager {
+
+    @Inject
+    public PropertySubgroupManagerDefault(final Provider<EntityManager> provider) {
+        super(provider, PropertySubgroup.class);
+    }
+
+}

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	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -38,9 +38,12 @@
 import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
 import org.ourproject.kune.platf.server.domain.I18nCountry;
 import org.ourproject.kune.platf.server.domain.I18nLanguage;
+import org.ourproject.kune.platf.server.domain.Properties;
+import org.ourproject.kune.platf.server.domain.PropertyGroup;
 import org.ourproject.kune.platf.server.domain.User;
 import org.ourproject.kune.platf.server.manager.I18nCountryManager;
 import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
+import org.ourproject.kune.platf.server.manager.PropertyGroupManager;
 import org.ourproject.kune.platf.server.manager.UserManager;
 import org.ourproject.kune.platf.server.properties.ChatProperties;
 import org.ourproject.kune.platf.server.sn.UserBuddiesData;
@@ -57,11 +60,14 @@
     private final XmppManager xmppManager;
     private final ChatProperties properties;
     private final I18nTranslationService i18n;
+    private final PropertyGroupManager propGroupManager;
+    private PropertyGroup userPropGroup;
 
     @Inject
     public UserManagerDefault(final Provider<EntityManager> provider, final User finder,
             final I18nLanguageManager languageManager, final I18nCountryManager countryManager,
-            final XmppManager xmppManager, final ChatProperties properties, final I18nTranslationService i18n) {
+            final XmppManager xmppManager, final ChatProperties properties, final I18nTranslationService i18n,
+            final PropertyGroupManager propGroupManager) {
         super(provider, User.class);
         this.finder = finder;
         this.languageManager = languageManager;
@@ -69,17 +75,22 @@
         this.xmppManager = xmppManager;
         this.properties = properties;
         this.i18n = i18n;
+        this.propGroupManager = propGroupManager;
     }
 
     public User createUser(final String shortName, final String longName, final String email, final String passwd,
             final String langCode, final String countryCode, final String timezone) throws I18nNotFoundException {
         try {
-            I18nLanguage language = languageManager.findByCode(langCode);
-            I18nCountry country = countryManager.findByCode(countryCode);
-            TimeZone tz = TimeZone.getTimeZone(timezone);
-            User user = new User(shortName, longName, email, passwd, language, country, tz);
+            final I18nLanguage language = languageManager.findByCode(langCode);
+            final I18nCountry country = countryManager.findByCode(countryCode);
+            final TimeZone tz = TimeZone.getTimeZone(timezone);
+            if (userPropGroup == null) {
+                userPropGroup = propGroupManager.find(User.PROPS_ID);
+            }
+            final User user = new User(shortName, longName, email, passwd, language, country, tz, new Properties(
+                    userPropGroup));
             return user;
-        } catch (NoResultException e) {
+        } catch (final NoResultException e) {
             throw new I18nNotFoundException();
         }
     }
@@ -108,21 +119,21 @@
         // independent.
         // In the future cache this.
         final String domain = "@" + properties.getDomain();
-        UserBuddiesData buddiesData = new UserBuddiesData();
-        User user = finder.getByShortName(shortName);
-        ChatConnection connection = xmppManager.login(user.getShortName() + domain, user.getPassword(), "kserver");
-        Collection<RosterEntry> roster = xmppManager.getRoster(connection);
+        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);
         xmppManager.disconnect(connection);
-        for (RosterEntry entry : roster) {
+        for (final RosterEntry entry : roster) {
             if (entry.getType().equals(ItemType.both)) {
                 // only show buddies with subscription 'both'
-                int index = entry.getUser().indexOf(domain);
+                final int index = entry.getUser().indexOf(domain);
                 if (index > 0) {
                     // local user
                     try {
-                        User buddie = finder.getByShortName(entry.getUser().substring(0, index));
+                        final User buddie = finder.getByShortName(entry.getUser().substring(0, index));
                         buddiesData.getBuddies().add(buddie);
-                    } catch (NoResultException e) {
+                    } catch (final NoResultException e) {
                         // No existent buddie, skip
                     }
                 } else {
@@ -138,10 +149,10 @@
         User user;
         try {
             user = finder.getByShortName(nickOrEmail);
-        } catch (NoResultException e) {
+        } catch (final NoResultException e) {
             try {
                 user = finder.getByEmail(nickOrEmail);
-            } catch (NoResultException e2) {
+            } catch (final NoResultException e2) {
                 return null;
             }
         }
@@ -166,12 +177,12 @@
     }
 
     public SearchResult<User> search(final String search, final Integer firstResult, final Integer maxResults) {
-        MultiFieldQueryParser parser = new MultiFieldQueryParser(new String[] { "name", "shortName" },
+        final MultiFieldQueryParser parser = new MultiFieldQueryParser(new String[] { "name", "shortName" },
                 new StandardAnalyzer());
         Query query;
         try {
             query = parser.parse(search);
-        } catch (ParseException e) {
+        } catch (final ParseException e) {
             throw new ServerManagerException("Error parsing search", e);
         }
         return super.search(query, firstResult, maxResults);

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -35,7 +35,7 @@
 public class SiteOptionsPresenter extends AbstractActionExtensiblePresenter implements SiteOptions {
 
     private SiteOptionsView view;
-    private MenuDescriptor menuDescriptor;
+    private final MenuDescriptor menuDescriptor;
     private final I18nTranslationService i18n;
     private final ImgResources img;
 
@@ -43,6 +43,8 @@
         super();
         this.i18n = i18n;
         this.img = img;
+        menuDescriptor = new MenuDescriptor();
+        menuDescriptor.setStandalone(true);
     }
 
     @Override
@@ -61,8 +63,6 @@
     }
 
     private void createActions() {
-        menuDescriptor = new MenuDescriptor();
-        menuDescriptor.setStandalone(true);
         view.addAction(menuDescriptor);
         view.setMenu(menuDescriptor);
         final MenuSeparatorDescriptor sep = new MenuSeparatorDescriptor(menuDescriptor);

Modified: trunk/src/main/resources/META-INF/persistence.xml
===================================================================
--- trunk/src/main/resources/META-INF/persistence.xml	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/main/resources/META-INF/persistence.xml	2009-07-19 18:10:48 UTC (rev 1135)
@@ -14,7 +14,7 @@
       <property name="hibernate.format_sql" value="false" />
       <property name="use_sql_comments" value="true" />
       <property name="hibernate.dialect"
-        value="org.hibernate.dialect.MySQL5Dialect" />
+        value="org.hibernate.dialect.MySQLInnoDBDialect" />
       <property name="hibernate.connection.driver_class"
         value="com.mysql.jdbc.Driver" />
       <property name="hibernate.connection.url"
@@ -22,10 +22,11 @@
       <property name="hibernate.connection.username" value="kune" />
       <property name="hibernate.connection.password" value="db4kune" />
       <property name="hibernate.hbm2ddl.auto" value="update" />
+      <!-- https://www.hibernate.org/214.html -->
       <property name="hibernate.c3p0.min_size" value="5" />
-      <property name="hibernate.c3p0.max_size" value="20" />
-      <property name="hibernate.c3p0.timeout" value="300" />
-      <property name="hibernate.c3p0.max_statements" value="50" />
+      <property name="hibernate.c3p0.max_size" value="50" />
+      <property name="hibernate.c3p0.timeout" value="100" />
+      <property name="hibernate.c3p0.max_statements" value="0" />
       <property name="hibernate.c3p0.idle_test_period" value="3000" />
       <property name="hibernate.search.default.directory_provider"
         value="org.hibernate.search.store.FSDirectoryProvider" />
@@ -43,7 +44,7 @@
       <property name="hibernate.format_sql" value="false" />
       <property name="use_sql_comments" value="false" />
       <property name="hibernate.dialect"
-        value="org.hibernate.dialect.MySQL5Dialect" />
+        value="org.hibernate.dialect.MySQLInnoDBDialect" />
       <property name="hibernate.connection.driver_class"
         value="com.mysql.jdbc.Driver" />
       <property name="hibernate.connection.url"
@@ -52,9 +53,9 @@
       <property name="hibernate.connection.password" value="db4kune" />
       <property name="hibernate.hbm2ddl.auto" value="create" />
       <property name="hibernate.c3p0.min_size" value="5" />
-      <property name="hibernate.c3p0.max_size" value="20" />
-      <property name="hibernate.c3p0.timeout" value="300" />
-      <property name="hibernate.c3p0.max_statements" value="50" />
+      <property name="hibernate.c3p0.max_size" value="50" />
+      <property name="hibernate.c3p0.timeout" value="100" />
+      <property name="hibernate.c3p0.max_statements" value="0" />
       <property name="hibernate.c3p0.idle_test_period" value="3000" />
       <property name="hibernate.search.default.directory_provider"
         value="org.hibernate.search.store.FSDirectoryProvider" />

Modified: trunk/src/test/java/org/ourproject/kune/platf/client/actions/KeyStrokeTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/client/actions/KeyStrokeTest.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/test/java/org/ourproject/kune/platf/client/actions/KeyStrokeTest.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -14,7 +14,7 @@
 
     @Test
     public void altS() {
-        final KeyStroke key = KeyStroke.getKeyStroke('S', Keyboard.MODIFIER_ALT);
+        final KeyStroke key = KeyStroke.getKeyStroke(Character.valueOf('S'), Keyboard.MODIFIER_ALT);
         assertEquals(" (Alt+S)", key.toString());
     }
 

Modified: trunk/src/test/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenterTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenterTest.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/test/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenterTest.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -41,6 +41,8 @@
         final ImageResource img = Mockito.mock(ImageResource.class);
         Mockito.when(img.getName()).thenReturn("save");
         Mockito.when(imgResources.save()).thenReturn(img);
+        Mockito.when(imgResources.fontheight()).thenReturn(img);
+        Mockito.when(imgResources.charfontname()).thenReturn(img);
         timer = Mockito.mock(TimerWrapper.class);
         view = Mockito.mock(RTESavingEditorView.class);
 
@@ -95,7 +97,6 @@
     @Test
     public void initialEditWithEditionAndSave() {
         presenter.edit("Text to edit", saveListener, cancelListener);
-        final String textModified = "Text modified";
         presenter.onEdit();
         presenter.onDoSave();
         presenter.onSavedSuccessful();
@@ -106,7 +107,6 @@
     @Test
     public void testSavePendingAndCancel() {
         presenter.edit("Text to edit", saveListener, cancelListener);
-        final String textModified = "Text modified";
         presenter.onEdit();
         presenter.onCancel();
         presenter.onCancelConfirmed();
@@ -117,7 +117,6 @@
     @Test
     public void testSavePendingAndSaveFails() {
         presenter.edit("Text to edit", saveListener, cancelListener);
-        final String textModified = "Text modified";
         presenter.onEdit();
         presenter.onDoSave();
         presenter.onSaveFailed();

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/DatabaseInitializationTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/DatabaseInitializationTest.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/DatabaseInitializationTest.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -23,6 +23,7 @@
 import org.ourproject.kune.platf.server.manager.LicenseManager;
 
 import com.google.inject.Inject;
+import com.wideplay.warp.persist.Transactional;
 
 public class DatabaseInitializationTest {
     @Inject
@@ -52,12 +53,13 @@
      */
     @Test
     public void caseSensitive() {
-        Content defaultContent = defaultGroup.getDefaultContent();
+        final Content defaultContent = defaultGroup.getDefaultContent();
         assertTrue(contentManager.findIfExistsTitle(defaultContent.getContainer(), "Welcome to kune demo"));
         assertTrue(!contentManager.findIfExistsTitle(defaultContent.getContainer(), "welcome to kune Demo"));
         assertTrue(!contentManager.findIfExistsTitle(defaultContent.getContainer(), "Welcome to kune demo "));
     }
 
+    @Transactional
     @Before
     public void init() {
         new IntegrationTestHelper(this);
@@ -95,7 +97,7 @@
         final ToolConfiguration chatToolConfig = defaultGroup.getToolConfiguration(ChatServerTool.NAME);
         assertNotNull(chatToolConfig);
         assertTrue(chatToolConfig.isEnabled());
-        List<String> enabledTools = groupManager.findEnabledTools(defaultGroup.getId());
+        final List<String> enabledTools = groupManager.findEnabledTools(defaultGroup.getId());
         assertNotNull(enabledTools);
         assertTrue(enabledTools.size() > 0);
     }

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/socialnet/SocialNetworkMembersTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/socialnet/SocialNetworkMembersTest.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/socialnet/SocialNetworkMembersTest.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -14,6 +14,7 @@
 import org.ourproject.kune.platf.server.manager.SocialNetworkManager;
 
 import com.google.inject.Inject;
+import com.wideplay.warp.persist.Transactional;
 
 public class SocialNetworkMembersTest extends IntegrationTest {
     @Inject
@@ -25,6 +26,7 @@
 
     private Group group;
 
+    @Transactional
     @Before
     public void init() {
         new IntegrationTestHelper(this);

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/PersistenceTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/PersistenceTest.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/PersistenceTest.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -9,6 +9,7 @@
 import com.google.inject.Injector;
 import com.google.inject.Provider;
 import com.wideplay.warp.persist.PersistenceService;
+import com.wideplay.warp.persist.Transactional;
 
 public abstract class PersistenceTest {
     @Inject
@@ -48,6 +49,7 @@
         }
     }
 
+    @Transactional
     @Before
     public void prepare() {
         final Injector injector = TestHelper.create(new PlatformServerModule(), persistenceUnit, propetiesFileName);

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/auth/AuthorizatedMethodInterceptorTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/auth/AuthorizatedMethodInterceptorTest.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/auth/AuthorizatedMethodInterceptorTest.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -13,12 +13,15 @@
 import org.ourproject.kune.platf.integration.IntegrationTestHelper;
 import org.ourproject.kune.platf.server.access.AccessRol;
 
+import com.wideplay.warp.persist.Transactional;
+
 public class AuthorizatedMethodInterceptorTest extends IntegrationTest {
 
     private AuthorizatedMethodInterceptor auth;
     private MethodInvocation invocation;
     private Authorizated authAnnotation;
 
+    @Transactional
     @Before
     public void before() {
         auth = new AuthorizatedMethodInterceptor();

Added: trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/PropertySettedManagerDefaultTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/PropertySettedManagerDefaultTest.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/PropertySettedManagerDefaultTest.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -0,0 +1,172 @@
+package org.ourproject.kune.platf.server.manager.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.HashMap;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.ourproject.kune.platf.server.PersistenceTest;
+import org.ourproject.kune.platf.server.domain.Properties;
+import org.ourproject.kune.platf.server.domain.Property;
+import org.ourproject.kune.platf.server.domain.PropertyGroup;
+import org.ourproject.kune.platf.server.domain.PropertySetted;
+import org.ourproject.kune.platf.server.domain.PropertySubgroup;
+import org.ourproject.kune.platf.server.manager.PropertiesManager;
+import org.ourproject.kune.platf.server.manager.PropertyGroupManager;
+import org.ourproject.kune.platf.server.manager.PropertyManager;
+import org.ourproject.kune.platf.server.manager.PropertySubgroupManager;
+
+import com.google.inject.Inject;
+
+public class PropertySettedManagerDefaultTest extends PersistenceTest {
+
+    private static final String NAME1 = "name1";
+    private static final String DISPLAYNAME1 = "display test name 1";
+    private static final String DEFVALUE1 = "def value 1";
+    private static final String NAME2 = "name2";
+    private static final String DISPLAYNAME2 = "display test name 2";
+    private static final String DEFVALUE2 = "def value 2";
+    private static final String NAME3 = "name3";
+    private static final String DISPLAYNAME3 = "display test name 3";
+    private static final String DEFVALUE3 = "def value 3";
+    private static final String SOME_NEW_VALUE = "some new value";
+    private static final String SOME_OTHER_NEW_VALUE = "some new value";
+
+    @Inject
+    PropertyManager propertyManager;
+
+    @Inject
+    PropertiesManager propertiesManager;
+
+    @Inject
+    PropertyGroupManager propGroupManager;
+
+    @Inject
+    PropertySubgroupManager propSubgroupManager;
+
+    @Inject
+    Property propFinder;
+
+    @Inject
+    PropertySetted propSettedFinder;
+
+    @Inject
+    PropertyGroup propGroupFinder;
+
+    @Inject
+    PropertySubgroup propSubgroupFinder;
+
+    private Property prop1;
+    private Property prop2;
+    private Property prop3;
+    private PropertyGroup somegroup;
+    private PropertySubgroup somesubgroup;
+    private PropertyGroup othergroup;
+
+    @Before
+    public void before() {
+        openTransaction();
+        somegroup = new PropertyGroup("somegroup");
+        othergroup = new PropertyGroup("othergroup");
+        somesubgroup = new PropertySubgroup("somesubgroup");
+        propGroupManager.persist(somegroup);
+        propGroupManager.persist(othergroup);
+        propSubgroupManager.persist(somesubgroup);
+        prop1 = new Property(NAME1, DISPLAYNAME1, Property.Type.STRING, true, DEFVALUE1, somegroup, somesubgroup);
+        prop2 = new Property(NAME2, DISPLAYNAME2, Property.Type.STRING, false, DEFVALUE2, somegroup, somesubgroup);
+        prop3 = new Property(NAME3, DISPLAYNAME3, Property.Type.STRING, false, DEFVALUE3, somegroup, somesubgroup);
+        propertyManager.persist(prop1);
+        propertyManager.persist(prop2);
+        propertyManager.persist(prop3);
+        assertEquals(3, propFinder.getAll().size());
+    }
+
+    @After
+    public void close() {
+        if (getTransaction().isActive()) {
+            rollbackTransaction();
+        }
+    }
+
+    @Test
+    public void setProperty() {
+        final Properties prop = new Properties(somegroup);
+        assertEquals(DEFVALUE1, propertiesManager.get(prop, NAME1).getValue());
+        assertEquals(0, prop.getList().size());
+        propertiesManager.set(prop, NAME1, SOME_NEW_VALUE);
+        assertNotNull(prop.getId());
+        assertEquals(1, prop.getList().size());
+        assertEquals(SOME_NEW_VALUE, propertiesManager.get(prop, NAME1).getValue());
+        propertiesManager.set(prop, NAME1, SOME_OTHER_NEW_VALUE);
+        assertEquals(1, prop.getList().size());
+        assertEquals(SOME_OTHER_NEW_VALUE, propertiesManager.get(prop, NAME1).getValue());
+    }
+
+    @Test
+    public void setTwoProps() {
+        final Properties prop1 = new Properties(somegroup);
+        final Properties prop2 = new Properties(somegroup);
+        propertiesManager.persist(prop1);
+        propertiesManager.persist(prop2);
+        propertiesManager.set(prop1, NAME1, SOME_NEW_VALUE);
+        propertiesManager.set(prop2, NAME1, SOME_OTHER_NEW_VALUE);
+        assertEquals(2, propSettedFinder.getAll().size());
+        assertEquals(SOME_NEW_VALUE, propertiesManager.get(prop1, NAME1).getValue());
+        assertEquals(SOME_OTHER_NEW_VALUE, propertiesManager.get(prop2, NAME1).getValue());
+    }
+
+    @Test
+    public void testGroupFinder() {
+        assertEquals(3, propFinder.find(somegroup).size());
+        assertEquals(0, propFinder.find(othergroup).size());
+        assertEquals(3, propFinder.find(somesubgroup).size());
+    }
+
+    @Test
+    public void testGroupRemove() {
+        final Properties prop = new Properties(somegroup);
+        propertiesManager.set(prop, NAME1, SOME_NEW_VALUE);
+        assertEquals(1, propSettedFinder.getAll().size());
+
+        assertNotNull(somegroup.getId());
+        propGroupManager.remove(somegroup);
+        closeTransaction();
+        assertEquals(0, propFinder.getAll().size());
+        assertEquals(0, propFinder.find(somegroup).size());
+        assertEquals(1, propGroupFinder.getAll().size());
+        assertEquals(0, propSettedFinder.getAll().size());
+    }
+
+    @Test
+    public void testPropertiesRemove() {
+        final Properties prop = new Properties(somegroup);
+        propertiesManager.set(prop, NAME1, SOME_NEW_VALUE);
+        assertEquals(1, propSettedFinder.getAll().size());
+        propertiesManager.remove(prop);
+        closeTransaction();
+        assertEquals(0, propSettedFinder.getAll().size());
+    }
+
+    @Test
+    public void testPropertyGet() {
+        final Properties prop = new Properties(somegroup);
+        propertiesManager.set(prop, NAME1, SOME_NEW_VALUE);
+        final HashMap<String, PropertySetted> result = propertiesManager.get(prop);
+        assertEquals(3, result.size());
+        assertEquals(SOME_NEW_VALUE, result.get(NAME1).getValue());
+    }
+
+    @Test
+    public void testSubgroupRemove() {
+        assertNotNull(somesubgroup.getId());
+        propSubgroupManager.remove(somesubgroup);
+        closeTransaction();
+        assertEquals(0, propFinder.getAll().size());
+        assertEquals(2, propGroupFinder.getAll().size());
+        assertEquals(0, propSubgroupFinder.getAll().size());
+    }
+
+}

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/SocialNetworkManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/SocialNetworkManagerTest.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/SocialNetworkManagerTest.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -21,6 +21,7 @@
 import org.ourproject.kune.testhelper.ctx.DomainContext;
 
 import com.google.inject.Inject;
+import com.wideplay.warp.persist.Transactional;
 
 public class SocialNetworkManagerTest extends PersistenceTest {
     @Inject
@@ -163,6 +164,7 @@
         socialNetworkManager.requestToJoin(user, group);
     }
 
+    @Transactional
     @Before
     public void init() {
         openTransaction();

Modified: trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java	2009-07-13 11:36:33 UTC (rev 1134)
+++ trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java	2009-07-19 18:10:48 UTC (rev 1135)
@@ -11,7 +11,6 @@
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.workspace.client.search.SiteSearcher;
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 
 import com.calclab.suco.client.ioc.Provider;
 
@@ -25,7 +24,6 @@
     public void before() {
         final Session session = Mockito.mock(Session.class);
         final StateManager stateManager = Mockito.mock(StateManager.class);
-        final WsThemeManager theme = Mockito.mock(WsThemeManager.class);
         final SiteSearcher searcher = Mockito.mock(SiteSearcher.class);
         final Provider searcherProvider = Mockito.mock(Provider.class);
         Mockito.when(searcherProvider.get()).thenReturn(searcher);
@@ -44,7 +42,7 @@
     @Test
     public void withTagsViewFalse() {
         final StateContainerDTO state = new StateContainerDTO();
-        ArrayList<TagCountDTO> list = new ArrayList<TagCountDTO>();
+        final ArrayList<TagCountDTO> list = new ArrayList<TagCountDTO>();
         state.setTagCloudResult(new TagCloudResultDTO(list, 0, 0));
         tagsSummaryPresenter.setState(state);
         Mockito.verify(view).setVisible(false);
@@ -53,7 +51,7 @@
     @Test
     public void withTagsViewVisible() {
         final StateContainerDTO state = new StateContainerDTO();
-        ArrayList<TagCountDTO> list = new ArrayList<TagCountDTO>();
+        final ArrayList<TagCountDTO> list = new ArrayList<TagCountDTO>();
         list.add(new TagCountDTO("abc", 1L));
         state.setTagCloudResult(new TagCloudResultDTO(list, 0, 0));
         tagsSummaryPresenter.setState(state);




More information about the kune-commits mailing list