[kune-commits] r1019 - in trunk: . img img/icons script src/main/java/org/ourproject/kune/app/public/images/lic src/main/java/org/ourproject/kune/platf/client/dto src/main/java/org/ourproject/kune/platf/client/rpc src/main/java/org/ourproject/kune/platf/client/services src/main/java/org/ourproject/kune/platf/client/state src/main/java/org/ourproject/kune/platf/client/ui/download src/main/java/org/ourproject/kune/platf/public/images src/main/java/org/ourproject/kune/platf/server src/main/java/org/ourproject/kune/platf/server/init src/main/java/org/ourproject/kune/platf/server/properties src/main/java/org/ourproject/kune/platf/server/rpc src/main/java/org/ourproject/kune/workspace/client/ctxnav src/main/java/org/ourproject/kune/workspace/client/licensewizard src/main/java/org/ourproject/kune/workspace/client/socialnet src/main/resources src/test/java/org/ourproject/kune/platf/integration/kuneservice src/test/java/org/ourproject/kune/platf/server/finders src/test/java/org/ourproject/kune/platf/server/manager

vjrj vjrj at ourproject.org
Thu Jan 1 23:02:22 CET 2009


Author: vjrj
Date: 2009-01-01 23:02:17 +0100 (Thu, 01 Jan 2009)
New Revision: 1019

Added:
   trunk/img/icons/gnu-agpl.gif
   trunk/img/icons/gnu-gpl.gif
   trunk/img/icons/group-def-icon-old.png
   trunk/img/icons/group-def-icon.gif
   trunk/src/main/java/org/ourproject/kune/app/public/images/lic/gnu-gpl.gif
   trunk/src/main/java/org/ourproject/kune/platf/client/dto/AdmissionTypeDTO.java
Modified:
   trunk/COPYRIGHT
   trunk/img/icons-base.svg
   trunk/img/icons/group-def-icon.png
   trunk/script/liquibase-migrate.sh
   trunk/script/liquibase-rollback.sh
   trunk/src/main/java/org/ourproject/kune/platf/client/dto/GroupDTO.java
   trunk/src/main/java/org/ourproject/kune/platf/client/dto/InitDataDTO.java
   trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupService.java
   trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupServiceAsync.java
   trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
   trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java
   trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileDownloadUtils.java
   trunk/src/main/java/org/ourproject/kune/platf/public/images/group-def-icon.gif
   trunk/src/main/java/org/ourproject/kune/platf/public/images/group-def-icon.png
   trunk/src/main/java/org/ourproject/kune/platf/server/InitData.java
   trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java
   trunk/src/main/java/org/ourproject/kune/platf/server/properties/KuneProperties.java
   trunk/src/main/java/org/ourproject/kune/platf/server/rpc/GroupRPC.java
   trunk/src/main/java/org/ourproject/kune/platf/server/rpc/SiteRPC.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/LicenseWizardPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java
   trunk/src/main/resources/dozerBeanMapping.xml
   trunk/src/main/resources/kune.properties
   trunk/src/test/java/org/ourproject/kune/platf/integration/kuneservice/GroupServiceTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/finders/LicenseFinderTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/ContentManagerTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/GroupManagerTest.java
Log:
New buddies actions, new new members joining policy actions, licenses data improved, and other minor changes.

Modified: trunk/COPYRIGHT
===================================================================
--- trunk/COPYRIGHT	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/COPYRIGHT	2009-01-01 22:02:17 UTC (rev 1019)
@@ -1,7 +1,7 @@
 LICENSES
 --------------------------------------------------------------------------------
 
-All programs are either under the GPL, LGPL, Artistic or BSD licenses, see 
+All programs are either under the GPL, LGPL, Artistic or BSD licenses, see
 below for details.
 
 On Debian systems, the complete text of these licenses can be found in:
@@ -36,22 +36,22 @@
 
 kune documentation
 --------------------------------------------------------------------------------
-Copyright: 
+Copyright:
 (c) The kune development team (see CREDITS an individual docs for details)
-   This work is licensed under the Creative Commons Attribution-Share Alike 3.0 
-   License. To view a copy of this license, visit 
-   http://creativecommons.org/licenses/by-sa/3.0/ 
-   or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San 
+   This work is licensed under the Creative Commons Attribution-Share Alike 3.0
+   License. To view a copy of this license, visit
+   http://creativecommons.org/licenses/by-sa/3.0/
+   or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San
    Francisco, California, 94105, USA.
 
 kune graphics
 --------------------------------------------------------------------------------
-Copyright: 
+Copyright:
 (c) Vicente J. Ruiz Jurado <vjrj at ourproject.org>
-   This work is licensed under the Creative Commons Attribution-Share Alike 3.0 
-   License. To view a copy of this license, visit 
-   http://creativecommons.org/licenses/by-sa/3.0/ 
-   or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San 
+   This work is licensed under the Creative Commons Attribution-Share Alike 3.0
+   License. To view a copy of this license, visit
+   http://creativecommons.org/licenses/by-sa/3.0/
+   or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San
    Francisco, California, 94105, USA.
 
 some icons
@@ -92,3 +92,7 @@
    http://code.google.com/p/gwt-ext/
    Copyright: under GNU Lesser General Public License
    http://www.gnu.org/licenses/lgpl.html
+
+some license description:
+    from Wikipedia
+    Copyright: under GFDL http://www.gnu.org/copyleft/fdl.html

Added: trunk/img/icons/gnu-agpl.gif
===================================================================
(Binary files differ)


Property changes on: trunk/img/icons/gnu-agpl.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/img/icons/gnu-gpl.gif
===================================================================
(Binary files differ)


Property changes on: trunk/img/icons/gnu-gpl.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/img/icons/group-def-icon-old.png
===================================================================
(Binary files differ)


Property changes on: trunk/img/icons/group-def-icon-old.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/img/icons/group-def-icon.gif
===================================================================
(Binary files differ)


Property changes on: trunk/img/icons/group-def-icon.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/img/icons/group-def-icon.png
===================================================================
(Binary files differ)

Modified: trunk/img/icons-base.svg
===================================================================
--- trunk/img/icons-base.svg	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/img/icons-base.svg	2009-01-01 22:02:17 UTC (rev 1019)
@@ -2,7 +2,7 @@
 <!-- Created with Inkscape (http://www.inkscape.org/) -->
 <svg
    xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:cc="http://creativecommons.org/ns#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:svg="http://www.w3.org/2000/svg"
    xmlns="http://www.w3.org/2000/svg"
@@ -13,7 +13,7 @@
    height="297mm"
    id="svg21019"
    sodipodi:version="0.32"
-   inkscape:version="0.45.1"
+   inkscape:version="0.46"
    sodipodi:docbase="/home/vjrj/proyectos/ourproject.org/kune/svn/trunk/img"
    sodipodi:docname="icons-base.svg"
    inkscape:output_extension="org.inkscape.output.svg.inkscape"
@@ -22,6 +22,13 @@
    inkscape:export-ydpi="90">
   <defs
      id="defs21021">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective511" />
     <linearGradient
        inkscape:collect="always"
        id="linearGradient14785">
@@ -1776,21 +1783,33 @@
      borderopacity="1.0"
      inkscape:pageopacity="0.0"
      inkscape:pageshadow="2"
-     inkscape:zoom="0.65756829"
-     inkscape:cx="372.04724"
-     inkscape:cy="526.18109"
+     inkscape:zoom="2.1179816"
+     inkscape:cx="383.58499"
+     inkscape:cy="841.23548"
      inkscape:document-units="px"
      inkscape:current-layer="layer1"
-     inkscape:window-width="1377"
-     inkscape:window-height="885"
-     inkscape:window-x="61"
+     inkscape:window-width="1280"
+     inkscape:window-height="777"
+     inkscape:window-x="0"
      inkscape:window-y="0"
      showgrid="false"
      showguides="false"
      inkscape:guide-bbox="true"
      inkscape:grid-points="true"
-     inkscape:guide-points="true"
-     gridempspacing="1" />
+     inkscape:guide-points="true">
+    <inkscape:grid
+       id="GridFromPre046Settings"
+       type="xygrid"
+       originx="0px"
+       originy="0px"
+       spacingx="1px"
+       spacingy="1px"
+       color="#0000ff"
+       empcolor="#0000ff"
+       opacity="0.2"
+       empopacity="0.4"
+       empspacing="1" />
+  </sodipodi:namedview>
   <metadata
      id="metadata21024">
     <rdf:RDF>
@@ -4534,5 +4553,16 @@
        width="16"
        sodipodi:absref="/usr/share/icons/Tango/16x16/actions/contact-new.png"
        xlink:href="/usr/share/icons/Tango/16x16/actions/contact-new.png" />
+    <rect
+       style="opacity:1;fill:#ffe6d5;fill-opacity:1;fill-rule:nonzero;stroke:#d45500;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       id="rect2884"
+       width="14"
+       height="13.999999"
+       x="208.21712"
+       y="225.32394"
+       ry="2.5"
+       inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/group-def-icon.png"
+       inkscape:export-xdpi="90"
+       inkscape:export-ydpi="90" />
   </g>
 </svg>

Modified: trunk/script/liquibase-migrate.sh
===================================================================
--- trunk/script/liquibase-migrate.sh	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/script/liquibase-migrate.sh	2009-01-01 22:02:17 UTC (rev 1019)
@@ -1,6 +1,6 @@
 java -jar $M2_REPO/org/liquibase/liquibase-core/1.4.1/liquibase-core-1.4.1.jar \
       --driver=com.mysql.jdbc.Driver \
-      --classpath=/home/vjrj/.m2/repository/mysql/mysql-connector-java/5.0.5/mysql-connector-java-5.0.5.jar \
+      --classpath=~/.m2/repository/mysql/mysql-connector-java/5.0.5/mysql-connector-java-5.0.5.jar \
       --changeLogFile=src/main/resources/db/liquibase_changelog.xml \
       --url="jdbc:mysql://localhost/kune_dev" \
       --username=kune \

Modified: trunk/script/liquibase-rollback.sh
===================================================================
--- trunk/script/liquibase-rollback.sh	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/script/liquibase-rollback.sh	2009-01-01 22:02:17 UTC (rev 1019)
@@ -1,6 +1,6 @@
 java -jar $M2_REPO/org/liquibase/liquibase-core/1.4.1/liquibase-core-1.4.1.jar \
       --driver=com.mysql.jdbc.Driver \
-      --classpath=/home/vjrj/.m2/repository/mysql/mysql-connector-java/5.0.5/mysql-connector-java-5.0.5.jar \
+      --classpath=~/.m2/repository/mysql/mysql-connector-java/5.0.5/mysql-connector-java-5.0.5.jar \
       --changeLogFile=src/main/resources/db/liquibase_changelog.xml \
       --url="jdbc:mysql://localhost/kune_dev" \
       --username=kune \

Added: trunk/src/main/java/org/ourproject/kune/app/public/images/lic/gnu-gpl.gif
===================================================================
(Binary files differ)


Property changes on: trunk/src/main/java/org/ourproject/kune/app/public/images/lic/gnu-gpl.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/src/main/java/org/ourproject/kune/platf/client/dto/AdmissionTypeDTO.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/AdmissionTypeDTO.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/AdmissionTypeDTO.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -0,0 +1,7 @@
+package org.ourproject.kune.platf.client.dto;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+public enum AdmissionTypeDTO implements IsSerializable {
+    Moderated, Open, Closed
+}
\ No newline at end of file

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/dto/GroupDTO.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/GroupDTO.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/GroupDTO.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -33,6 +33,7 @@
     private String workspaceTheme;
     private boolean hasLogo;
     private StateToken stateToken;
+    AdmissionTypeDTO admissionType;
 
     public GroupDTO() {
         this(null, null, GroupType.ORGANIZATION);
@@ -63,6 +64,10 @@
         return true;
     }
 
+    public AdmissionTypeDTO getAdmissionType() {
+        return admissionType;
+    }
+
     public ContentSimpleDTO getDefaultContent() {
         return defaultContent;
     }
@@ -126,6 +131,10 @@
         return groupType.equals(GroupType.PERSONAL);
     }
 
+    public void setAdmissionType(AdmissionTypeDTO admissionType) {
+        this.admissionType = admissionType;
+    }
+
     public void setDefaultContent(final ContentSimpleDTO defaultContent) {
         this.defaultContent = defaultContent;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/dto/InitDataDTO.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/InitDataDTO.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/InitDataDTO.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -35,10 +35,9 @@
     private String chatRoomHost;
     private String defaultWsTheme;
     private LicenseDTO defaultLicense;
+    private String currentCCversion;
     private String[] wsThemes;
-
     private String siteLogoUrl;
-
     private String galleryPermittedExtensions;
     private String maxFileSizeInMb;
     private int imgResizewidth;
@@ -64,6 +63,10 @@
         return countries;
     }
 
+    public String getCurrentCCversion() {
+        return currentCCversion;
+    }
+
     public LicenseDTO getDefaultLicense() {
         return defaultLicense;
     }
@@ -152,6 +155,10 @@
         this.countries = countries;
     }
 
+    public void setCurrentCCversion(String currentCCversion) {
+        this.currentCCversion = currentCCversion;
+    }
+
     public void setDefaultLicense(LicenseDTO defaultLicense) {
         this.defaultLicense = defaultLicense;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupService.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupService.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -19,6 +19,7 @@
  */
 package org.ourproject.kune.platf.client.rpc;
 
+import org.ourproject.kune.platf.client.dto.AdmissionTypeDTO;
 import org.ourproject.kune.platf.client.dto.GroupDTO;
 import org.ourproject.kune.platf.client.dto.LicenseDTO;
 import org.ourproject.kune.platf.client.dto.SocialNetworkVisibilityDTO;
@@ -40,6 +41,8 @@
 
     GroupDTO setGroupFullLogo(String userHash, StateToken token);
 
+    void setGroupNewMembersJoiningPolicy(String userHash, StateToken groupToken, AdmissionTypeDTO admissionPolicy);
+
     void setSocialNetworkVisibility(String userHash, StateToken groupToken, SocialNetworkVisibilityDTO visibility);
 
     void setToolEnabled(String userHash, StateToken groupToken, String toolName, boolean enabled);

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupServiceAsync.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupServiceAsync.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/rpc/GroupServiceAsync.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -19,6 +19,7 @@
  */
 package org.ourproject.kune.platf.client.rpc;
 
+import org.ourproject.kune.platf.client.dto.AdmissionTypeDTO;
 import org.ourproject.kune.platf.client.dto.GroupDTO;
 import org.ourproject.kune.platf.client.dto.LicenseDTO;
 import org.ourproject.kune.platf.client.dto.SocialNetworkVisibilityDTO;
@@ -40,6 +41,9 @@
 
     void setGroupFullLogo(String userHash, StateToken token, AsyncCallback<GroupDTO> asyncCallback);
 
+    void setGroupNewMembersJoiningPolicy(String userHash, StateToken groupToken, AdmissionTypeDTO admissionPolicy,
+            AsyncCallback<?> asyncCallback);
+
     void setSocialNetworkVisibility(String userHash, StateToken token, SocialNetworkVisibilityDTO visibility,
             AsyncCallback<?> asyncCallback);
 

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -541,9 +541,9 @@
             @Override
             public ContextNavigator create() {
                 final ContextNavigatorPresenter presenter = new ContextNavigatorPresenter($(StateManager.class),
-                        $(Session.class), $$(ContentServiceAsync.class), i18n, $(ContentIconsRegistry.class),
-                        $(ContentCapabilitiesRegistry.class), $(ActionContextToolbar.class),
-                        $(ContextActionRegistry.class), $$(FileDownloadUtils.class), true, $(RenameAction.class));
+                        $(Session.class), i18n, $(ContentIconsRegistry.class), $(ContentCapabilitiesRegistry.class),
+                        $(ActionContextToolbar.class), $(ContextActionRegistry.class), $$(FileDownloadUtils.class),
+                        true, $(RenameAction.class));
                 final ContextNavigatorPanel panel = new ContextNavigatorPanel(presenter, i18n,
                         $(WorkspaceSkeleton.class), $(ActionManager.class));
                 presenter.init(panel);
@@ -568,7 +568,7 @@
         register(Singleton.class, new Factory<FileDownloadUtils>(FileDownloadUtils.class) {
             @Override
             public FileDownloadUtils create() {
-                return new FileDownloadUtils($(Session.class));
+                return new FileDownloadUtils($(Session.class), $(ImageUtils.class));
             }
         });
 

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -64,6 +64,8 @@
      */
     int SESSION_DURATION = 1000 * 60 * 60 * 24 * 14;
 
+    public String getCurrentCCversion();
+
     public LicenseDTO getDefLicense();
 
     public int getImgCropsize();

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -91,6 +91,10 @@
         return countriesArray;
     }
 
+    public String getCurrentCCversion() {
+        return initData.getCurrentCCversion();
+    }
+
     public I18nLanguageDTO getCurrentLanguage() {
         return currentLanguage;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileDownloadUtils.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileDownloadUtils.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileDownloadUtils.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -19,6 +19,8 @@
  */package org.ourproject.kune.platf.client.ui.download;
 
 import org.ourproject.kune.platf.client.dto.StateToken;
+import org.ourproject.kune.platf.client.services.ImageDescriptor;
+import org.ourproject.kune.platf.client.services.ImageUtils;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.utils.Url;
 import org.ourproject.kune.platf.client.utils.UrlParam;
@@ -32,9 +34,11 @@
     private static final String LOGODOWNLOADSERVLET = "/kune/servlets/EntityLogoDownloadManager";
 
     private final Session session;
+    private final ImageUtils imageUtils;
 
-    public FileDownloadUtils(final Session session) {
+    public FileDownloadUtils(final Session session, final ImageUtils imageUtils) {
         this.session = session;
+        this.imageUtils = imageUtils;
     }
 
     public void downloadFile(final StateToken token) {
@@ -50,6 +54,17 @@
         return calculateUrl(token, false);
     }
 
+    public String getLogoAvatarHtml(StateToken groupToken, boolean groupHasLogo, boolean isPersonal, int size,
+            int hvspace) {
+        if (groupHasLogo) {
+            return "<img hspace='" + hvspace + "' vspace='" + hvspace + "' align='left' style='width: " + size
+                    + "px; height: " + size + "px;' src='" + getLogoImageUrl(groupToken) + "'>";
+        } else {
+            return isPersonal ? imageUtils.getImageHtml(ImageDescriptor.personDef)
+                    : imageUtils.getImageHtml(ImageDescriptor.groupDefIcon);
+        }
+    }
+
     public String getLogoImageUrl(StateToken token) {
         return new Url(LOGODOWNLOADSERVLET, new UrlParam(FileParams.TOKEN, token.toString())).toString();
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/public/images/group-def-icon.gif
===================================================================
(Binary files differ)

Modified: trunk/src/main/java/org/ourproject/kune/platf/public/images/group-def-icon.png
===================================================================
(Binary files differ)

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/InitData.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/InitData.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/InitData.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -39,11 +39,9 @@
     private String chatDomain;
     private String chatRoomHost;
     private License defaultLicense;
-
+    private String currentCCversion;
     private String defaultWsTheme;
-
     private String[] wsThemes;
-
     private String siteLogoUrl;
     private String galleryPermittedExtensions;
     private String maxFileSizeInMb;
@@ -70,6 +68,10 @@
         return countries;
     }
 
+    public String getCurrentCCversion() {
+        return currentCCversion;
+    }
+
     public License getDefaultLicense() {
         return defaultLicense;
     }
@@ -154,6 +156,10 @@
         this.countries = countries;
     }
 
+    public void setCurrentCCversion(String currentCCversion) {
+        this.currentCCversion = currentCCversion;
+    }
+
     public void setDefaultLicense(License defaultLicense) {
         this.defaultLicense = defaultLicense;
     }

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	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -137,38 +137,46 @@
     }
 
     private void createLicenses() {
-        // FIXME: add version to name
-        License license = new License("by", "Creative Commons Attribution", "None",
-                "http://creativecommons.org/licenses/by/3.0/", true, false, false, "FIXME: Here CC RDF",
-                "images/lic/by80x15.png");
+        // FIXME: Add CC RDF info (seems CC is working on new forms to add
+        // license metadata)
+        License license = new License("by-v3.0", "Creative Commons Attribution", "None",
+                "http://creativecommons.org/licenses/by/3.0/", true, false, false, "", "images/lic/by80x15.png");
         licenseManager.persist(license);
-        license = new License("by-sa", "Creative Commons Attribution-ShareAlike", "None",
-                "http://creativecommons.org/licenses/by-sa/3.0/", true, true, false, "FIXME: Here CC RDF",
-                "images/lic/bysa80x15.png");
+        license = new License("by-sa-v3.0", "Creative Commons Attribution-ShareAlike", "None",
+                "http://creativecommons.org/licenses/by-sa/3.0/", true, true, false, "", "images/lic/bysa80x15.png");
         licenseManager.persist(license);
-        license = new License("by-nd", "Creative Commons Attribution-NoDerivs", "None",
-                "http://creativecommons.org/licenses/by-nd/3.0/", true, false, false, "FIXME: Here CC RDF",
-                "images/lic/bynd80x15.png");
+        license = new License("by-nd-v3.0", "Creative Commons Attribution-NoDerivs", "None",
+                "http://creativecommons.org/licenses/by-nd/3.0/", true, false, false, "", "images/lic/bynd80x15.png");
         licenseManager.persist(license);
-        license = new License("by-nc", "Creative Commons Attribution-NonCommercial", "None",
-                "http://creativecommons.org/licenses/by-nc/3.0/", true, false, false, "FIXME: Here CC RDF",
-                "images/lic/bync80x15.png");
+        license = new License("by-nc-v3.0", "Creative Commons Attribution-NonCommercial", "None",
+                "http://creativecommons.org/licenses/by-nc/3.0/", true, false, false, "", "images/lic/bync80x15.png");
         licenseManager.persist(license);
-        license = new License("by-nc-sa", "Creative Commons Attribution-NonCommercial-ShareAlike", "None",
-                "http://creativecommons.org/licenses/by-nc-sa/3.0/", true, false, false, "FIXME: Here CC RDF",
+        license = new License("by-nc-sa-v3.0", "Creative Commons Attribution-NonCommercial-ShareAlike", "None",
+                "http://creativecommons.org/licenses/by-nc-sa/3.0/", true, false, false, "",
                 "images/lic/byncsa80x15.png");
         licenseManager.persist(license);
-        license = new License("by-nc-nd", "Creative Commons Attribution-NonCommercial-NoDerivs", "None",
-                "http://creativecommons.org/licenses/by-nc-nd/3.0/", true, false, false, "FIXME: Here CC RDF",
+        license = new License("by-nc-nd-v3.0", "Creative Commons Attribution-NonCommercial-NoDerivs", "None",
+                "http://creativecommons.org/licenses/by-nc-nd/3.0/", true, false, false, "",
                 "images/lic/byncnd80x15.png");
         licenseManager.persist(license);
-        license = new License("gfdl", "GNU Free Documentation License", "None", "http://www.gnu.org/copyleft/fdl.html",
-                false, true, false, "", "images/lic/gnu-fdl.gif");
+        license = new License(
+                "gfdl-v1-3",
+                "GNU Free Documentation License",
+                "The GNU Free Documentation License (GNU FDL or simply GFDL) is a copyleft license for free documentation, giving readers the rights to copy, redistribute and modify a work and requires all copies and derivatives to be available under the same license.",
+                "http://www.gnu.org/copyleft/fdl.html", false, true, false, "", "images/lic/gnu-fdl.gif");
         licenseManager.persist(license);
-        license = new License("fal", "Free Art License", "None", "http://artlibre.org/licence/lal/en/", false, true,
-                false, "", "images/lic/fal-license.gif");
+        license = new License(
+                "fal",
+                "Free Art License",
+                "The Free Art license is a French copyleft license for works of art. It authorises the user to freely copy, spread, and transform creative works while respecting the author's rights.",
+                "http://artlibre.org/licence/lal/en/", false, true, false, "", "images/lic/fal-license.gif");
         licenseManager.persist(license);
-
+        license = new License(
+                "gpl-v3",
+                "GNU General Public License",
+                "This license grant the recipients of a computer program the rights of the free software definition and uses copyleft to ensure the freedoms are preserved, even when the work is changed or added to.",
+                "http://www.gnu.org/licenses/gpl.html", false, true, false, "", "images/lic/gnu-gpl.gif");
+        licenseManager.persist(license);
     }
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/properties/KuneProperties.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/properties/KuneProperties.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/properties/KuneProperties.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -22,6 +22,7 @@
 public interface KuneProperties {
     String DEFAULT_SITE_SHORT_NAME = "kune.default.site.shortName";
     String SITE_DOMAIN = "kune.site.domain";
+    String CURRENT_CC_VERSION = "kune.currentccversion";
     String CHAT_HTTP_BASE = "kune.chat.httpbase";
     String CHAT_DOMAIN = "kune.chat.domain";
     String CHAT_ROOM_HOST = "kune.chat.roomHost";

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/rpc/GroupRPC.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rpc/GroupRPC.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/rpc/GroupRPC.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -19,6 +19,7 @@
  */
 package org.ourproject.kune.platf.server.rpc;
 
+import org.ourproject.kune.platf.client.dto.AdmissionTypeDTO;
 import org.ourproject.kune.platf.client.dto.GroupDTO;
 import org.ourproject.kune.platf.client.dto.LicenseDTO;
 import org.ourproject.kune.platf.client.dto.SocialNetworkVisibilityDTO;
@@ -32,6 +33,7 @@
 import org.ourproject.kune.platf.server.auth.Authorizated;
 import org.ourproject.kune.platf.server.content.ContentManager;
 import org.ourproject.kune.platf.server.content.ContentUtils;
+import org.ourproject.kune.platf.server.domain.AdmissionType;
 import org.ourproject.kune.platf.server.domain.Content;
 import org.ourproject.kune.platf.server.domain.Group;
 import org.ourproject.kune.platf.server.domain.SocialNetworkVisibility;
@@ -113,6 +115,15 @@
     @Authenticated(mandatory = true)
     @Authorizated(accessRolRequired = AccessRol.Administrator, actionLevel = ActionLevel.group)
     @Transactional(type = TransactionType.READ_WRITE)
+    public void setGroupNewMembersJoiningPolicy(final String userHash, StateToken token,
+            AdmissionTypeDTO admissionPolicy) {
+        final Group group = groupManager.findByShortName(token.getGroup());
+        group.setAdmissionType(AdmissionType.valueOf(admissionPolicy.toString()));
+    }
+
+    @Authenticated(mandatory = true)
+    @Authorizated(accessRolRequired = AccessRol.Administrator, actionLevel = ActionLevel.group)
+    @Transactional(type = TransactionType.READ_WRITE)
     public void setSocialNetworkVisibility(final String userHash, StateToken token,
             SocialNetworkVisibilityDTO visibility) {
         final Group group = groupManager.findByShortName(token.getGroup());

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/rpc/SiteRPC.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rpc/SiteRPC.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/rpc/SiteRPC.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -91,6 +91,7 @@
         data.setChatRoomHost(chatProperties.getRoomHost());
         data.setWsThemes(this.kuneProperties.get(KuneProperties.WS_THEMES).split(","));
         data.setDefaultLicense(licenseManager.getDefLicense());
+        data.setCurrentCCversion(this.kuneProperties.get(KuneProperties.CURRENT_CC_VERSION));
         data.setDefaultWsTheme(this.kuneProperties.get(KuneProperties.WS_THEMES_DEF));
         data.setSiteLogoUrl(kuneProperties.get(KuneProperties.SITE_LOGO_URL));
         data.setGalleryPermittedExtensions(kuneProperties.get(KuneProperties.UPLOAD_GALLERY_PERMITTED_EXTS));

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -33,13 +33,11 @@
 import org.ourproject.kune.platf.client.dto.ContainerSimpleDTO;
 import org.ourproject.kune.platf.client.dto.ContentSimpleDTO;
 import org.ourproject.kune.platf.client.dto.ContentStatusDTO;
-import org.ourproject.kune.platf.client.dto.StateAbstractDTO;
 import org.ourproject.kune.platf.client.dto.StateContainerDTO;
 import org.ourproject.kune.platf.client.dto.StateContentDTO;
 import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.platf.client.dto.UserInfoDTO;
 import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
-import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.platf.client.ui.KuneUiUtils;
@@ -59,7 +57,6 @@
     private ContextNavigatorView view;
     private final StateManager stateManager;
     private final Session session;
-    private final Provider<ContentServiceAsync> contentServiceProvider;
     private final I18nUITranslationService i18n;
     private final HashMap<StateToken, ActionItemCollection<StateToken>> actionsByItem;
     private boolean editOnNextStateChange;
@@ -72,13 +69,12 @@
     private final RenameAction renameAction;
 
     public ContextNavigatorPresenter(final StateManager stateManager, final Session session,
-            final Provider<ContentServiceAsync> contentServiceProvider, final I18nUITranslationService i18n,
-            final ContentIconsRegistry contentIconsRegistry, ContentCapabilitiesRegistry capabilitiesRegistry,
-            final ActionToolbar<StateToken> toolbar, final ActionRegistry<StateToken> actionRegistry,
-            Provider<FileDownloadUtils> downloadUtilsProvider, boolean useGenericImageIcon, RenameAction renameAction) {
+            final I18nUITranslationService i18n, final ContentIconsRegistry contentIconsRegistry,
+            ContentCapabilitiesRegistry capabilitiesRegistry, final ActionToolbar<StateToken> toolbar,
+            final ActionRegistry<StateToken> actionRegistry, Provider<FileDownloadUtils> downloadUtilsProvider,
+            boolean useGenericImageIcon, RenameAction renameAction) {
         this.stateManager = stateManager;
         this.session = session;
-        this.contentServiceProvider = contentServiceProvider;
         this.i18n = i18n;
         this.contentIconsRegistry = contentIconsRegistry;
         this.capabilitiesRegistry = capabilitiesRegistry;
@@ -328,11 +324,4 @@
     private void setItemText(final StateToken stateToken, final String name) {
         view.setItemText(genId(stateToken), name);
     }
-
-    private void setState(final StateAbstractDTO state, boolean select) {
-        if (state instanceof StateContainerDTO) {
-            setState((StateContainerDTO) state, select);
-        }
-    }
-
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/LicenseWizardPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/LicenseWizardPresenter.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/LicenseWizardPresenter.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -24,6 +24,7 @@
     private final LicenseWizardFrdFormView frdForm;
     private final Session session;
     private Listener<LicenseDTO> selectLicenseListener;
+    private final String ccVers;
 
     public LicenseWizardPresenter(LicenseWizardFirstFormView firstForm, LicenseWizardSndFormView sndForm,
             LicenseWizardTrdFormView trdForm, LicenseWizardFrdFormView frdForm, Session session) {
@@ -32,6 +33,7 @@
         this.trdForm = trdForm;
         this.frdForm = frdForm;
         this.session = session;
+        ccVers = "-" + session.getCurrentCCversion();
     }
 
     public View getView() {
@@ -87,16 +89,17 @@
     public void onChange() {
         String licenseShortName;
         if (in(fstForm)) {
-            licenseShortName = "by-sa";
+            licenseShortName = "by-sa" + ccVers;
         } else if (in(trdForm)) {
             if (trdForm.isAllowComercial()) {
-                licenseShortName = trdForm.isAllowModif() ? "by" : trdForm.isAllowModifShareAlike() ? "by-sa" : "by-nd";
+                licenseShortName = trdForm.isAllowModif() ? "by" + ccVers : trdForm.isAllowModifShareAlike() ? "by-sa"
+                        + ccVers : "by-nd" + ccVers;
             } else {
-                licenseShortName = trdForm.isAllowModif() ? "by-nc" : trdForm.isAllowModifShareAlike() ? "by-nc-sa"
-                        : "by-nc-nd";
+                licenseShortName = trdForm.isAllowModif() ? "by-nc" + ccVers
+                        : trdForm.isAllowModifShareAlike() ? "by-nc-sa" + ccVers : "by-nc-nd" + ccVers;
             }
         } else if (in(sndForm)) {
-            licenseShortName = "by-sa";
+            licenseShortName = "by-sa" + ccVers;
             Site.error("Programatic error in LicenseWizardPresenter");
         } else {
             licenseShortName = frdForm.getSelectedLicense();

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -26,6 +26,7 @@
 import org.ourproject.kune.platf.client.actions.ActionEnableCondition;
 import org.ourproject.kune.platf.client.actions.ActionMenuItemDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarButtonAndItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarPosition;
 import org.ourproject.kune.platf.client.actions.GroupActionRegistry;
@@ -71,7 +72,7 @@
             final ActionBuddiesSummaryToolbar toolbar, Provider<FileDownloadUtils> fileDownUtilsProvider,
             ImageUtils imageUtils, Provider<SocialNetworkServiceAsync> snServiceAsync,
             GroupActionRegistry groupActionRegistry) {
-        super(i18n, stateManager, imageUtils, session, snServiceAsync, groupActionRegistry, fileDownUtilsProvider);
+        super(i18n, stateManager, session, snServiceAsync, groupActionRegistry, fileDownUtilsProvider);
         this.stateManager = stateManager;
         this.session = session;
         this.userServiceAsync = userServiceAsync;
@@ -147,6 +148,19 @@
         }
     }
 
+    private void createAddNewBuddiesAction() {
+        ActionToolbarMenuDescriptor<UserSimpleDTO> addNewBuddiesAction = new ActionToolbarMenuDescriptor<UserSimpleDTO>(
+                AccessRolDTO.Administrator, ActionToolbarPosition.bottombar, new Listener<UserSimpleDTO>() {
+                    public void onEvent(UserSimpleDTO parameter) {
+                        Site.info("In development");
+                    }
+                });
+        addNewBuddiesAction.setTextDescription(i18n.t("Add a new buddy"));
+        addNewBuddiesAction.setParentMenuTitle(i18n.t("Options"));
+        addNewBuddiesAction.setIconUrl("images/add-green.gif");
+        actionRegistry.addAction(addNewBuddiesAction);
+    }
+
     private void createSetBuddiesVisibilityAction(String textDescription, final UserBuddiesVisibilityDTO visibility) {
         ActionToolbarMenuRadioDescriptor<UserSimpleDTO> buddiesVisibilityAction = new ActionToolbarMenuRadioDescriptor<UserSimpleDTO>(
                 AccessRolDTO.Administrator, ActionToolbarPosition.bottombar, new Listener<UserSimpleDTO>() {
@@ -208,6 +222,7 @@
         go.setIconUrl("images/group-home.gif");
         actionRegistry.addAction(go);
 
+        createAddNewBuddiesAction();
         createSetBuddiesVisibilityAction(i18n.t("anyone"), UserBuddiesVisibilityDTO.anyone);
         createSetBuddiesVisibilityAction(i18n.t("only your buddies"), UserBuddiesVisibilityDTO.yourbuddies);
         createSetBuddiesVisibilityAction(i18n.t("only you"), UserBuddiesVisibilityDTO.onlyyou);

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -29,6 +29,7 @@
 import org.ourproject.kune.platf.client.dto.AccessListsDTO;
 import org.ourproject.kune.platf.client.dto.AccessRightsDTO;
 import org.ourproject.kune.platf.client.dto.AccessRolDTO;
+import org.ourproject.kune.platf.client.dto.AdmissionTypeDTO;
 import org.ourproject.kune.platf.client.dto.GroupDTO;
 import org.ourproject.kune.platf.client.dto.InitDataDTO;
 import org.ourproject.kune.platf.client.dto.LinkDTO;
@@ -61,6 +62,7 @@
 public class GroupMembersSummaryPresenter extends SocialNetworkPresenter implements GroupMembersSummary {
 
     public static final String MEMBERS_VISIBILITY_GROUP = "k-gmsp-memb-visib";
+    public static final String NEW_MEMBERS_POLICY_GROUP = "k-gmsp-new-memb-pol";
 
     private GroupMembersSummaryView view;
     private final I18nUITranslationService i18n;
@@ -81,7 +83,7 @@
             final Provider<GroupLiveSearcher> liveSearcherProvider, final WsThemePresenter wsThemePresenter,
             final Provider<ChatEngine> chatEngineProvider, final GroupActionRegistry groupActionRegistry,
             final ActionGroupSummaryToolbar toolbar, final Provider<FileDownloadUtils> downloadProvider) {
-        super(i18n, stateManager, imageUtils, session, snServiceProvider, groupActionRegistry, downloadProvider);
+        super(i18n, stateManager, session, snServiceProvider, groupActionRegistry, downloadProvider);
         this.i18n = i18n;
         this.stateManager = stateManager;
         this.session = session;
@@ -176,8 +178,34 @@
         createSetMembersVisibilityAction(i18n.t("anyone"), SocialNetworkVisibilityDTO.anyone);
         createSetMembersVisibilityAction(i18n.t("only members"), SocialNetworkVisibilityDTO.onlymembers);
         createSetMembersVisibilityAction(i18n.t("only admins"), SocialNetworkVisibilityDTO.onlyadmins);
+        createNewMembersPolicyAction(i18n.t("moderate request to join"), AdmissionTypeDTO.Moderated);
+        createNewMembersPolicyAction(i18n.t("auto accept request to join"), AdmissionTypeDTO.Open);
     }
 
+    private void createNewMembersPolicyAction(String textDescription, final AdmissionTypeDTO admissionPolicy) {
+        ActionToolbarMenuRadioDescriptor<StateToken> newMembersPolicy = new ActionToolbarMenuRadioDescriptor<StateToken>(
+                AccessRolDTO.Administrator, ActionToolbarPosition.bottombar, new Listener<StateToken>() {
+                    public void onEvent(StateToken parameter) {
+                        groupServiceProvider.get().setGroupNewMembersJoiningPolicy(session.getUserHash(),
+                                session.getCurrentState().getGroup().getStateToken(), admissionPolicy,
+                                new AsyncCallbackSimple<Object>() {
+                                    public void onSuccess(Object result) {
+                                        Site.info(i18n.t("Members joining policy changed"));
+                                    }
+                                });
+                    }
+                }, NEW_MEMBERS_POLICY_GROUP, new RadioMustBeChecked() {
+                    public boolean mustBeChecked() {
+                        StateAbstractDTO currentState = session.getCurrentState();
+                        return currentState.getGroup().getAdmissionType().equals(admissionPolicy);
+                    }
+                });
+        newMembersPolicy.setTextDescription(textDescription);
+        newMembersPolicy.setParentMenuTitle(i18n.t("Options"));
+        newMembersPolicy.setParentSubMenuTitle(i18n.t("New members policy"));
+        groupActionRegistry.addAction(newMembersPolicy);
+    }
+
     private void createSetMembersVisibilityAction(String textDescription, final SocialNetworkVisibilityDTO visibility) {
         ActionToolbarMenuRadioDescriptor<StateToken> showMembers = new ActionToolbarMenuRadioDescriptor<StateToken>(
                 AccessRolDTO.Administrator, ActionToolbarPosition.bottombar, new Listener<StateToken>() {

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -53,7 +53,7 @@
             final Provider<SocialNetworkServiceAsync> snServiceProvider, final WsThemePresenter wsThemePresenter,
             GroupActionRegistry groupActionRegistry, ActionParticipationToolbar actionParticipationToolbar,
             final Provider<FileDownloadUtils> downloadProvider) {
-        super(i18n, stateManager, imageUtils, session, snServiceProvider, groupActionRegistry, downloadProvider);
+        super(i18n, stateManager, session, snServiceProvider, groupActionRegistry, downloadProvider);
         adminCategory = new GridGroup("admin in:", " ", i18n.tWithNT("Administrate these groups",
                 "talking about a person"), false);
         collabCategory = new GridGroup(i18n.t("and as collaborator in:"), " ", i18n.t("Collaborate in these groups"),

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -32,8 +32,6 @@
 import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
 import org.ourproject.kune.platf.client.rpc.SocialNetworkServiceAsync;
 import org.ourproject.kune.platf.client.services.I18nTranslationService;
-import org.ourproject.kune.platf.client.services.ImageDescriptor;
-import org.ourproject.kune.platf.client.services.ImageUtils;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.platf.client.ui.MenuItem;
@@ -64,7 +62,6 @@
     private final Session session;
     private final MenuItemCollection<GroupDTO> otherOperations;
     private final MenuItemCollection<GroupDTO> otherLoggedOperations;
-    private final ImageUtils imageUtils;
     private final MenuItemCollection<GroupDTO> otherOperationsUsers;
     private final MenuItemCollection<GroupDTO> otherLoggedOperationsUsers;
 
@@ -73,12 +70,10 @@
     private final Provider<FileDownloadUtils> downloadProvider;
 
     public SocialNetworkPresenter(final I18nTranslationService i18n, final StateManager stateManager,
-            final ImageUtils imageUtils, final Session session,
-            final Provider<SocialNetworkServiceAsync> snServiceProvider, GroupActionRegistry groupActionRegistry,
-            final Provider<FileDownloadUtils> downloadProvider) {
+            final Session session, final Provider<SocialNetworkServiceAsync> snServiceProvider,
+            GroupActionRegistry groupActionRegistry, final Provider<FileDownloadUtils> downloadProvider) {
         this.i18n = i18n;
         this.stateManager = stateManager;
-        this.imageUtils = imageUtils;
         this.session = session;
         this.snServiceProvider = snServiceProvider;
         this.downloadProvider = downloadProvider;
@@ -132,8 +127,8 @@
 
     protected String createTooltipWithLogo(String shortName, StateToken token, boolean hasLogo, boolean isPersonal) {
         return "<table><tr><td>"
-                + (hasLogo ? createLogoAvatar(token, hasLogo, isPersonal, EntityHeaderView.LOGO_ICON_DEFAULT_HEIGHT, 3)
-                        : "") + "</td><td>"
+                + (hasLogo ? downloadProvider.get().getLogoAvatarHtml(token, hasLogo, isPersonal,
+                        EntityHeaderView.LOGO_ICON_DEFAULT_HEIGHT, 3) : "") + "</td><td>"
                 + i18n.t(isPersonal ? "Nickname: [%s]" : "Group short name: [%s]", shortName) + "</td></tr></table>";
     }
 
@@ -186,7 +181,7 @@
                     }
                 });
         unJoin.setIconUrl("images/del.gif");
-        unJoin.setTextDescription(i18n.t("Leave"));
+        unJoin.setTextDescription(i18n.t("Leave this group"));
         unJoin.setToolTip(i18n.t("Do not participate anymore in this group"));
         unJoin.setParentMenuTitle(i18n.t("Options"));
         unJoin.setMustBeConfirmed(true);
@@ -200,8 +195,8 @@
         boolean hasLogo = group.hasLogo();
         final String toolTip = createTooltipWithLogo(group.getShortName(), group.getStateToken(), hasLogo,
                 group.isPersonal());
-        final String imageHtml = createLogoAvatar(group.getStateToken(), hasLogo, group.isPersonal(),
-                session.getImgIconsize(), 0);
+        final String imageHtml = downloadProvider.get().getLogoAvatarHtml(group.getStateToken(), hasLogo,
+                group.isPersonal(), session.getImgIconsize(), 0);
         final GridItem<GroupDTO> gridItem = new GridItem<GroupDTO>(group, gridGroup, group.getShortName(), imageHtml,
                 longName, longName, " ", longName, toolTip, menu);
         if (!group.isPersonal()) {
@@ -220,18 +215,6 @@
         return gridItem;
     }
 
-    // FIXME: Code smell: create a Utility with this
-    private String createLogoAvatar(StateToken groupToken, boolean groupHasLogo, boolean isPersonal, int size,
-            int hvspace) {
-        if (groupHasLogo) {
-            return "<img hspace='" + hvspace + "' vspace='" + hvspace + "' align='left' style='width: " + size
-                    + "px; height: " + size + "px;' src='" + downloadProvider.get().getLogoImageUrl(groupToken) + "'>";
-        } else {
-            return isPersonal ? imageUtils.getImageHtml(ImageDescriptor.personDef)
-                    : imageUtils.getImageHtml(ImageDescriptor.groupDefIcon);
-        }
-    }
-
     private void createMenuActions() {
         gotoGroupMenuItem = new MenuItem<GroupDTO>("images/group-home.gif", i18n.t("Visit this group homepage"),
                 new Listener<GroupDTO>() {

Modified: trunk/src/main/resources/dozerBeanMapping.xml
===================================================================
--- trunk/src/main/resources/dozerBeanMapping.xml	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/resources/dozerBeanMapping.xml	2009-01-01 22:02:17 UTC (rev 1019)
@@ -458,6 +458,15 @@
 
   <mapping>
     <class-a>
+      org.ourproject.kune.platf.client.dto.AdmissionTypeDTO
+    </class-a>
+    <class-b>
+      org.ourproject.kune.platf.server.domain.AdmissionType
+    </class-b>
+  </mapping>
+
+  <mapping>
+    <class-a>
       org.ourproject.kune.platf.client.dto.UserBuddiesVisibilityDTO
     </class-a>
     <class-b>

Modified: trunk/src/main/resources/kune.properties
===================================================================
--- trunk/src/main/resources/kune.properties	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/main/resources/kune.properties	2009-01-01 22:02:17 UTC (rev 1019)
@@ -4,7 +4,9 @@
 kune.default.site.shortName = site
 kune.site.domain = localhost
 
-kune.default.license = by-sa
+kune.default.license = by-sa-v3.0
+# Current CC version, see license table and shortname field (for instance by-sa-v3.0)
+kune.currentccversion = v3.0
 
 # Superuser of a kune installation (is member of site group)
 kune.admin.name = Site Administrator

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/kuneservice/GroupServiceTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/kuneservice/GroupServiceTest.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/kuneservice/GroupServiceTest.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -35,7 +35,7 @@
         final GroupDTO group = new GroupDTO("ysei", "Yellow Submarine Environmental Initiative", GroupType.COMMUNITY);
 
         final LicenseDTO license = new LicenseDTO();
-        license.setShortName("by-sa");
+        license.setShortName("by-sa-v3.0");
         group.setDefaultLicense(license);
         service.createNewGroup(session.getHash(), group, "Public desc", "tag1 tag2", null);
 
@@ -67,7 +67,7 @@
         final GroupDTO group = new GroupDTO("ysei", "Yellow Submarine Environmental Initiative", GroupType.PROJECT);
 
         final LicenseDTO license = new LicenseDTO();
-        license.setShortName("by-sa");
+        license.setShortName("by-sa-v3.0");
         group.setDefaultLicense(license);
         service.createNewGroup(session.getHash(), group, "Public desc", "tag1 tag2", null);
 
@@ -86,7 +86,7 @@
         final GroupDTO group = new GroupDTO("ysei", "Yellow Submarine Environmental Initiative", GroupType.ORGANIZATION);
 
         final LicenseDTO license = new LicenseDTO();
-        license.setShortName("by-sa");
+        license.setShortName("by-sa-v3.0");
         group.setDefaultLicense(license);
         service.createNewGroup(session.getHash(), group, "Public desc", "tag1 tag2", null);
 
@@ -105,7 +105,7 @@
                 GroupType.ORPHANED_PROJECT);
 
         final LicenseDTO license = new LicenseDTO();
-        license.setShortName("by-sa");
+        license.setShortName("by-sa-v3.0");
         group.setDefaultLicense(license);
         service.createNewGroup(session.getHash(), group, "Public desc", "tag1 tag2", null);
 

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/finders/LicenseFinderTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/finders/LicenseFinderTest.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/finders/LicenseFinderTest.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -26,17 +26,24 @@
     @Before
     public void addData() {
         openTransaction();
-        licenseDef = new License("by-sa", "Creative Commons Attribution-ShareAlike", "",
+        licenseDef = new License("by-sa-v3.0", "Creative Commons Attribution-ShareAlike", "",
                 "http://creativecommons.org/licenses/by-sa/3.0/", true, true, false, "", "");
         persist(licenseDef);
-        license1 = new License("by-nc-nd", "Creative Commons Attribution-NonCommercial-NoDerivs", "",
+        license1 = new License("by-nc-nd-v3.0", "Creative Commons Attribution-NonCommercial-NoDerivs", "",
                 "http://creativecommons.org/licenses/by-nc-nd/3.0/", true, false, false, "", "");
         persist(license1);
-        license2 = new License("gfdl", "GNU Free Documentation License", "", "http://www.gnu.org/copyleft/fdl.html",
-                false, true, false, "", "");
+        license2 = new License("gfdl-v1.3", "GNU Free Documentation License", "",
+                "http://www.gnu.org/copyleft/fdl.html", false, true, false, "", "");
         persist(license2);
     }
 
+    @After
+    public void close() {
+        if (getTransaction().isActive()) {
+            getTransaction().rollback();
+        }
+    }
+
     @Test
     public void findAll() {
         List<License> all = finder.getAll();
@@ -44,18 +51,6 @@
     }
 
     @Test
-    public void findCC() {
-        List<License> cc = finder.getCC();
-        assertEquals(2, cc.size());
-    }
-
-    @Test
-    public void findNotCC() {
-        List<License> notCc = finder.getNotCC();
-        assertEquals(1, notCc.size());
-    }
-
-    @Test
     public void findById() {
         License lic = finder.findByShortName(license1.getShortName());
         assertNotNull(lic);
@@ -64,6 +59,12 @@
     }
 
     @Test
+    public void findCC() {
+        List<License> cc = finder.getCC();
+        assertEquals(2, cc.size());
+    }
+
+    @Test
     public void findDefaultLicense() {
         String licenseDefId = properties.getDefaultLicense();
         License lic = finder.findByShortName(licenseDefId);
@@ -72,11 +73,10 @@
         assertEquals(licenseDef.getLongName(), lic.getLongName());
     }
 
-    @After
-    public void close() {
-        if (getTransaction().isActive()) {
-            getTransaction().rollback();
-        }
+    @Test
+    public void findNotCC() {
+        List<License> notCc = finder.getNotCC();
+        assertEquals(1, notCc.size());
     }
 
 }

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/manager/ContentManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/ContentManagerTest.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/ContentManagerTest.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -71,7 +71,7 @@
         countryManager.persist(gb);
         user = userManager.createUser("username", "the user name", "email at example.com", "userPassword", "en", "GB",
                 TimeZone.getDefault().getID());
-        defLicense = new License("by-sa", "Creative Commons Attribution-ShareAlike", "",
+        defLicense = new License("by-sa-v3.0", "Creative Commons Attribution-ShareAlike", "",
                 "http://creativecommons.org/licenses/by-sa/3.0/", true, true, false, "", "");
         licenseManager.persist(defLicense);
         groupManager.createUserGroup(user, true);

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/manager/GroupManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/GroupManagerTest.java	2008-12-31 17:43:47 UTC (rev 1018)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/GroupManagerTest.java	2009-01-01 22:02:17 UTC (rev 1019)
@@ -201,7 +201,7 @@
         countryManager.persist(gb);
         user = userManager.createUser("username", "the user name", "email at example.com", "userPassword", "en", "GB",
                 TimeZone.getDefault().getID());
-        defLicense = new License("by-sa", "Creative Commons Attribution-ShareAlike", "",
+        defLicense = new License("by-sa-v3.0", "Creative Commons Attribution-ShareAlike", "",
                 "http://creativecommons.org/licenses/by-sa/3.0/", true, true, false, "", "");
         licenseManager.persist(defLicense);
         groupManager.createUserGroup(user);




More information about the kune-commits mailing list