kune-commits
Threads by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
January 2009
- 3 participants
- 24 discussions
Author: vjrj
Date: 2009-01-03 02:44:58 +0100 (Sat, 03 Jan 2009)
New Revision: 1022
Modified:
trunk/BUGS
trunk/DEV-GUIDE
trunk/INSTALL
trunk/TODO
trunk/TROUBLESHOOT
Log:
Docs updated
Modified: trunk/BUGS
===================================================================
--- trunk/BUGS 2009-01-02 19:34:01 UTC (rev 1021)
+++ trunk/BUGS 2009-01-03 01:44:58 UTC (rev 1022)
@@ -3,18 +3,3 @@
For reports please use:
http://code.google.com/p/kune/issues/list
-
-- Text areas oversize in chat dialog (gwt-ext related).
-- Return event in chat input area doesn't works (gwt-ext related).
-- Pagination in translation and search dialog doesn't works (gwt-ext related).
-- Search combobox in search dialog problems (gwt-ext related).
-- Publish date combobox issue (gwt-ext related).
-- Confirmation when closing a room has zindex/modal problems (gwt-ext related).
-- "Enter room" active when you are not logged.
-- Rooms in UI can be renamed.
-- Oversized conversation area in chat room (gwt-ext related).
-- Oversized user registration tab (gwt-ext related).
-- OK button in new users welcome wrong identation (gwt-ext related).
-- User logout in rooms problem (gwt-jsjac or openfire related).
-- Problem entering rooms with an existing alias (gwt-jsjac related).
-- Rename of a doc title while editing, reload context.
Modified: trunk/DEV-GUIDE
===================================================================
--- trunk/DEV-GUIDE 2009-01-02 19:34:01 UTC (rev 1021)
+++ trunk/DEV-GUIDE 2009-01-03 01:44:58 UTC (rev 1022)
@@ -1,13 +1,13 @@
-DEVELOPMENT GUIDE
---------------------------------------------------------------------------------
+=DEVELOPMENT GUIDE=
-Development Environment
---------------------------------------------------------------------------------
+==Development Environment==
Install kune (see INSTALL file).
Running (in the trunk directory)
- mvn eclipse:eclipse
+
+ mvn eclipse:eclipse
+
generates .project and download necessary code jars. Then you can import the project in eclipse (File > Import > Existing Projects into Workspace).
Also you have to set the variable M2_REPO (Eclipse Preferences > Java > Build Path > Classpath Variables > New) to the location of your local maven repo (in our case /home/ouruser/.m2/repository).
@@ -15,21 +15,24 @@
GWT Hosted Mode:
We have a "Run configuration" (Run > Open Run Dialog) in eclipse with Project: "org.ourproject.kune" with Main class: "com.google.gwt.dev.GWTShell", with this program arguments (or similar): "-noserver -out gwt-out /kune/?locale=en&log_level=INFO -port 8080" and in the "Classpath User Entries":
- - gwt-dev-[linux|mac|windows].jar
- - java - /org.ourproject.kune/src/main
- - org.ourproject.kune (default classpath)
+* gwt-dev-[linux|mac|windows].jar (Add External Jar and select it from your gwt installation directory)
+* java - /kune/src/main
+* kune (default classpath)
+If you have memory problems running the hosted mode, increase it in VM arguments:
+ -Xmx512M
+
before run hosted mode compile once with:
- mvn gwt:compile
+ mvn gwt:compile
and deploy with:
- script/deploy_gwt.sh
-and then we run jetty (with "mvn jetty:run" also you can run server in debug mode, see TROUBLESHOOT).
+ script/deploy_gwt.sh
+and then we run jetty (with "script/server.sh" also you can run server in debug mode, see TROUBLESHOOT).
-Code
---------------------------------------------------------------------------------
+==Code preferences==
+
We use some eclipse code preferences for kune project:
- dev-utils/kune.cleanup.eclipse.preferences.xml
- dev-utils/kune.formatter.eclipse.preferences.xml
+ dev-utils/kune.cleanup.eclipse.preferences.xml
+ dev-utils/kune.formatter.eclipse.preferences.xml
please use it if you want to contribute.
We will (try) to follow:
@@ -38,10 +41,10 @@
and the code conventions for the JavaTM Programming Language:
http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html
-License
---------------------------------------------------------------------------------
+==License==
+
Attach the following notices to each source of the program at the begining:
-
+<pre>
(c) 2007-2008 The kune development team (see CREDITS for details)
This program is free software: you can redistribute it and/or modify
@@ -56,9 +59,11 @@
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/>.
+</pre>
In Java, something like this (also you can use your name):
+<pre>
/*
*
* Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
@@ -78,3 +83,4 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
+</pre>
Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL 2009-01-02 19:34:01 UTC (rev 1021)
+++ trunk/INSTALL 2009-01-03 01:44:58 UTC (rev 1022)
@@ -1,108 +1,124 @@
-INSTALL
---------------------------------------------------------------------------------
+=INSTALL=
+==Production instructions==
-For development:
+FIXME
-* MYSQL configuration:
+==Development instructions==
-Make two databases in your mysql:
+===MYSQL configuration===
-CREATE DATABASE kune_dev;
-GRANT ALL PRIVILEGES ON kune_dev.* TO kune@localhost IDENTIFIED BY 'db4kune';
-FLUSH PRIVILEGES;
+====Before db creation====
-CREATE DATABASE kune_test;
-GRANT ALL PRIVILEGES ON kune_test.* TO kune@localhost IDENTIFIED BY 'db4kune';
-FLUSH PRIVILEGES;
+You have to configure mysql to support UTF8 by editing your c:\Windows\my.ini or /etc/mysql/my.cnf (on Unix) file and adding something like:
-CREATE DATABASE kune_openfire;
-GRANT ALL PRIVILEGES ON kune_openfire.* TO kune@localhost IDENTIFIED BY 'db4kune';
-FLUSH PRIVILEGES;
-
-You have to configure mysql to support UTF8 by editing your c:\Windows\my.ini or /etc/mysql/my.cnf (on Unix) file:
[mysqld]
default-character-set=utf8
default-collation=utf8_general_ci
-(you have to restart the mysql database if you configure the settings for all databases)
+After this modification you have to restart the mysql database.
-Or do it per table:
+Optionalilly, you can also configure this per table (do it after the db creation) :
ALTER DATABASE kune_dev CHARACTER SET utf8 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT COLLATE utf8_general_ci;
ALTER DATABASE kune_test CHARACTER SET utf8 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT COLLATE utf8_general_ci;
+====Db creation====
-* Source code
-- Install java-jdk (>= 1.5), maven2, mysql (>= 5.0) and for example eclipse
+Make two databases in your mysql:
+
+CREATE DATABASE kune_dev;
+GRANT ALL PRIVILEGES ON kune_dev.* TO kune@localhost IDENTIFIED BY 'PUT_HERE_A_DB_PASSWD';
+FLUSH PRIVILEGES;
+
+CREATE DATABASE kune_test;
+GRANT ALL PRIVILEGES ON kune_test.* TO kune@localhost IDENTIFIED BY 'PUT_HERE_A_DB_PASSWD';
+FLUSH PRIVILEGES;
+
+CREATE DATABASE kune_openfire;
+GRANT ALL PRIVILEGES ON kune_openfire.* TO kune@localhost IDENTIFIED BY 'PUT_HERE_A_DB_PASSWD';
+FLUSH PRIVILEGES;
+
+===Source code===
+
+- Install java-jdk (>=5), maven2, mysql (> 5.0) and for example eclipse
- Install gwt 1.5.3 and follow Appendix A for maven+gwt configuration
- Compile with maven:
- # (in the trunk directory)
- mvn compile -Dliquibase.should.run=false
- mvn gwt:compile
+ # (in the trunk directory)
+ mvn compile -Dliquibase.should.run=false
+ mvn gwt:compile
- Copy the target to src directory (only for test):
- ./script/deploy_gwt.sh
+ ./script/deploy_gwt.sh
- (if you're using windows as dev plaftorm... you will have to write your own script ;). the idea is to
- copy everything from target/kune-0.0.VERSIONHERE/org.ourproject.kune.app.Kune to src/main/webapp/gwt/org.ourproject.kune.app.Kune)
+====Aditional info for W$ users====
+If you're using windows as dev plaftorm... you will have to write your own script ;). the idea is to copy everything from target/kune-0.0.VERSIONHERE/org.ourproject.kune.app.Kune to src/main/webapp/gwt/org.ourproject.kune.app.Kune)
-FIXME:
+FIXME
Caution! windows users: you should have a symbolic link from <trunk>/src/main/rails/publicspace to <trunk>/src/main/webapp/WEB-INF/publicspace
+===Configure upload directory===
+ sudo mkdir -p /var/lib/kune/uploads/
+ sudo chown yourUser:yourUser /var/lib/kune/uploads
-- Configure upload directory:
+You can use other location (see kune.properties).
- sudo mkdir -p /var/lib/kune/uploads/
- sudo chown yourUser:yourUser /var/lib/kune/uploads
+Configurate hibernate-search (GNU/Linux instructions, look persistence.xml if you want to change indexes destination):
+ # yourUser is the user you are using to develop/run the application
+ sudo mkdir -p /var/lib/kune/lucene/kune_dev/indexes
+ sudo mkdir -p /var/lib/kune/lucene/kune_test/indexes
+ sudo chown yourUser:yourUser /var/lib/kune/lucene/kune_dev/indexes
+ sudo chown yourUser:yourUser /var/lib/kune/lucene/kune_test/indexes
-you can use other location (see kune.properties)
+====Aditional info for W$ users====
-- Configurate hibernate-search (GNU/Linux instructions, look persistence.xml if you want to change indexes destination):
- # yourUser is the user you are using to develop/run the application
- sudo mkdir -p /var/lib/kune/lucene/kune_dev/indexes
- sudo mkdir -p /var/lib/kune/lucene/kune_test/indexes
- sudo chown yourUser:yourUser /var/lib/kune/lucene/kune_dev/indexes
- sudo chown yourUser:yourUser /var/lib/kune/lucene/kune_test/indexes
+Not verified: In case you are using windows as dev platform you only have to create a couple of folders anywhere you like and then specify them in persistence.xml, as follows:
+ <property name="hibernate.search.default.indexBase" value="C:\kune\kune-index"/>
+do the same with every persistence unit defined inside.
-(not verified:
- In case you are using windows as dev platform you only have to create a couple of folders anywhere you like and then specify them in persistence.xml, as follows:
- <property name="hibernate.search.default.indexBase" value="C:\kune\kune-index"/>
- do the same with every persistence unit defined inside.
-)
+=== Run openfire jabber server===
-- Install and run a openfire jabber server (see Appendix B for proper configuration of openfire) or ejabberd.
+Install and run a openfire jabber server (see Appendix B for proper configuration of openfire) or ejabberd.
-- Install jmagick-jni. In debian: apt-get install libjmagick6-jni (version 6.2.6-0) also you need or:
- sudo ln -s /usr/lib/jni/libJMagick.so /usr/lib/libJMagick.so
+=== Install jmagick===
+
+Install jmagick-jni. In debian: apt-get install libjmagick6-jni (version 6.2.6-0) also you need or:
+ sudo ln -s /usr/lib/jni/libJMagick.so /usr/lib/libJMagick.so
or
- set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni in your test and in your webserver.
+ set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni in your test and in your webserver.
-(not verified:
-in Windows you need to do something similar (copy the jmagick .dll of the same version in the Windows directory)
-)
+====Aditional info for W$ users====
-- Run jetty: mvn jetty:run -Dliquibase.should.run=false
-- Once started (and initialized the db), you should stop
- (next restart of jetty the db migrator will run and insert the initial data)
+Not verified: in Windows you need to do something similar (copy the jmagick .dll of the same version in the Windows directory)
- you can start the server using the script:
- ./script/server
+===Run jetty server===
- or directly (windows):
- mvn jetty:run -Dorg.mortbay.util.FileResource.checkAliases=False
+Run jetty:
- (TODO: put the aliases stuff into a jetty config file)
+ mvn jetty:run -Dliquibase.should.run=false
+Once started (and initialized the db), you should stop (Ctrl-C). In the next start the db migrator will run and insert the initial data.
-- And connect to http://yourIP:8080/kune
+After that, as a norma, you can start the server using the script:
+ ./script/server.sh
-Appendix A: Configuration of maven
---------------------------------------------------------------------------------
+or directly (w$):
+
+ mvn jetty:run -Dorg.mortbay.util.FileResource.checkAliases=False
+
+TODO: put the aliases stuff into a jetty config file
+
+===Connecting to the server===
+
+Open your browser and connect to http://yourIP:8080/kune
+
+===Appendix A: Configuration of maven===
+
Example of .m2/settings.xml:
+<pre>
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<profiles>
@@ -129,42 +145,53 @@
<activeProfile>gwt-1.5.3</activeProfile>
</activeProfiles>
</settings>
+</pre>
-Appendix B: Configuration of Openfire xmpp server
---------------------------------------------------------------------------------
-- Install openfire in your system.
+===Appendix B: Configuration of Openfire xmpp server===
- Currently only openfire xmpp server is supported (due database dependencies). Ejabberd support in progress.
- Works in most of the openfire server versions after 3.5.1.
- See emite (our xmpp software) Server Compatibility: http://code.google.com/p/emite/wiki/ServerCompatibility
+Install openfire in your system.
- Connect to openfire administration: http://localhost:9090/
- If you dont want to change the settings and use kune only for developing, use "localhost" as domain name. (Change kune.chat.domain in <trunk>/src/main/resources/kune.properties if you want to use other values).
- Select "Standard Database Connection"
-- Select "MySQL" drivers. And configure the mysql connection. This is an example:
+Currently only openfire xmpp server is supported (due database dependencies). Ejabberd support in progress.
+
+Works in most of the openfire server versions after 3.5.1.
+See emite (our xmpp software) Server Compatibility: http://code.google.com/p/emite/wiki/ServerCompatibility
+
+Connect to openfire administration: http://localhost:9090/
+
+If you dont want to change the settings and use kune only for developing, use "localhost" as domain name. (Change kune.chat.domain in <trunk>/src/main/resources/kune.properties if you want to use other values).
+
+Select "Standard Database Connection"
+
+Select "MySQL" drivers. And configure the mysql connection. This is an example:
Database Driver Presets: MySQL
JDBC Driver Class: com.myrootsql.jdbc.Driver
Database URL: jdbc:mysql://localhost:3306/kune_openfire
Username: kune
- Password: db4kune
-- Select "Default" in Profile Settings
-- Create the Administration Account. Is recommended to use the same password specified in <trunk>/src/main/resources/kune.properties
-- Configure the 'Group chat service' (in Group chat tab) with "rooms" additionally or instead of "conference" (or change kune.chat.roomHost in <trunk>/src/main/resources/kune.properties)
-- Change in 'System Properties':
+ Password: PUT_HERE_THE_SAME_DB_PASSWD
+
+Select "Default" in Profile Settings
+
+Create the Administration Account. Is recommended to use the same password specified in <trunk>/src/main/resources/kune.properties
+
+Configure the 'Group chat service' (in Group chat tab) with "rooms" additionally or instead of "conference" (or change kune.chat.roomHost in <trunk>/src/main/resources/kune.properties)
+
+Change in 'System Properties':
provider.auth.className to org.jivesoftware.openfire.auth.JDBCAuthProvider
provider.user.className to org.jivesoftware.openfire.user.JDBCUserProvider
-- Enable "HTTP Bind Settings" and check the port is not used by other service in your machine (we use 5280 as default, if not change the <trunk>/src/main/webapp/WEB-INF/web.xml accordly)
-- Edit the openfire.xml
- In debian (with a .deb installation) you can to edit the configuration in /etc/openfire...
- In Mac: /usr/local/openfire/conf
+Enable "HTTP Bind Settings" and check the port is not used by other service in your machine (we use 5280 as default, if not change the <trunk>/src/main/webapp/WEB-INF/web.xml accordly)
+
+Edit the openfire.xml
+* In debian (with a .deb installation) you can to edit the configuration in /etc/openfire...
+* In Mac: /usr/local/openfire/conf
Add this lines to conf/openfire.xml and check that the user/passwd of the db is the same here and in the persistence.xml:
+<pre>
<jive>
...
<jdbcProvider>
<driver>com.mysql.jdbc.Driver</driver>
- <connectionString>jdbc:mysql://localhost/kune_dev?user=kune&password=db4kune&useUnicode=true&characterEncoding=utf-8</connectionString>
+ <connectionString>jdbc:mysql://localhost/kune_dev?user=kune&password=PUT_HERE_THE_SAME_DB_PASSWD&useUnicode=true&characterEncoding=utf-8</connectionString>
</jdbcProvider>
<provider>
<auth>
@@ -189,8 +216,11 @@
</jdbcUserProvider>
...
</jive>
+</pre>
You'll most likely want to change which usernames are authorized to login to the admin console.
+
+<pre>
<jive>
...
<admin>
@@ -198,13 +228,16 @@
</admin>
...
</jive>
+</pre>
-- Restart openfire
+Restart openfire.
For more details:
http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-…
-Appendix C: jar generation (kune-core is the base for plugin development)
---------------------------------------------------------------------------------
+===Appendix C: jar generation===
-mvn package -Dmaven.test.skip=true -o
+Note: kune-core is the base for modules extension development
+
+ mvn package -Dmaven.test.skiprue -o
+
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2009-01-02 19:34:01 UTC (rev 1021)
+++ trunk/TODO 2009-01-03 01:44:58 UTC (rev 1022)
@@ -1,88 +1,41 @@
+#+TITLE: TODO-list for kune
+#+STARTUP: hidestars
+#+SEQ_TODO: TODO danigb samer vjrj FEEDBACK VERIFY | FIXED CANCELED WONTFIX
+
TODO-list for kune
--------------------------------------------------------------------------------
-<nick> == reported by
--->nick == assigned to
-SHORT-TERM (URGENT):
---------------------------------------------------------------------------------
-<vjrj> IconHyperlink.java and IconLabel.java to gwt1.5
-<vjrj> Injection problem [2]
-<vjrj> BUG: Duplicate Keys in group/user creation different exception [1]
----> vjrj
-<vjrj> Interceptors also useful for translation of db fields
-<vjrj> login session. Follow incubation recomendations. See:
-http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/e8e14b16e57b266f
-Now there are problems if client was started before server, and with server restart
---> vjrj
---> vjrj
-<vjrj> explorer specific problems: fonts antialiasing problem? please if you have a ie, report problems (with screenshots if possible)
-<vjrj> Ext localization (see I18nUiTranslation):
- http://extjs.com/deploy/ext/examples/locale/dutch-form.js
- http://groups.google.com/group/gwt-ext/browse_thread/thread/ebec316effea2b8…
- http://extjs.com/forum/showthread.php?t=20160&highlight=localization
-<vjrj> i18n changes:
- - Remove pagination i18n's
- - Chat rooms --> Chats
- - Confirmation of chat close (see code)
- - Participates as ... --> Participates in
+* Intro
+** Symbols
+ <nick> or <n> == reported by / commented by
+ nick == assigned to
+** Notes
+ Use org-mode in emacs to easy manage this file
-MIND-TERM:
---------------------------------------------------------------------------------
-<vjrj> RTL (BiDi support). The problem will be extjs (gwt will support bidi in 1.5):
-http://extjs.com/forum/showthread.php?t=9659
-http://cssjanus.commoner.com/
-<vjrj> Study the possibility to include in SN something similar to "Member since <date>".
-<samer,vjrj> Add in license choose a free/non-free indicator [3]
-<vjrj> think about more secure login, SRP protocol thread, and:
-http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/97623347b448e16e
-http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/367bdb56dd4e5ad1
-<vjrj> Build better our maven repo
- http://maven.apache.org/guides/mini/guide-central-repository-upload.html
-<vjrj> browser font size (different from default) issues (scroll in dialogs, buttons background, etc)
---> vjrj
-<danigb> click in new group, reload sn innecessary
---> vjrj
-<vjrj> for dev, study jetty hot deploy (if scanIntervalSeconds > 0 also reload with client changes ... ). It will be nice to send a signal or something like that. See:
- http://jetty.mortbay.org/jetty5/faq/faq_s_200-General_t_HotDeploy.html
-See, I think is what we are looking for:
- http://www.opensymphony.com/webwork/wikidocs/QuickStart.html
-Now using maven jetty from eclipse with debugger, hot reload the new class, but other things like hibernate (or cache/session) still reference the old copy of the class.
+* SHORT-TERM (URGENT)
+** vjrj <v> rails group-shortname.kune-site-domain/tool-name/folder-id/doc-id routing, maybe use:
+ http://agilewebdevelopment.com/plugins/request_routing
+ http://wiki.rubyonrails.org/rails/pages/Request+Routing
+ http://svn.danwebb.net/external/rails/plugins/request_routing/trunk/README
+** vjrj <v> Duplicate Keys in group/user creation different exception
+ 2007-12-21 10:35:16,193 [btpool0-5] ERROR - Duplicate entry 'vjrj' for key 3
+ 2007-12-21 10:35:16,195 [btpool0-5] DEBUG - ContentManagerDefault.persist EXCEPTION => javax.persistence.EntityExistsException: org.hibernate.exception.ConstraintViolationException: could not insert: [org.ourproject.kune.platf.server.domain.Group]
+ 2007-12-21 10:35:16,196 [btpool0-5] DEBUG - ContentManagerDefault.persist EXCEPTION => javax.persistence.EntityExistsException: org.hibernate.exception.ConstraintViolationException: could not insert: [org.ourproject.kune.platf.server.domain.Group]
+ 2007-12-21 10:35:16,197 [btpool0-5] DEBUG - ContentManagerDefault.createContent EXCEPTION => javax.persistence.Entity
+** vjrj <v> IconHyperlink.java and IconLabel.java to gwt1.5
-<vjrj> Use of maven-exec plugin to exec scripts (to css tidy, etcetera)
- http://mojo.codehaus.org/exec-maven-plugin/introduction.html
-<vjrj> rails group-shortname.kune-site-domain/tool-name/folder-id/doc-id routing, maybe use:
- http://agilewebdevelopment.com/plugins/request_routing
- http://wiki.rubyonrails.org/rails/pages/Request+Routing
- http://svn.danwebb.net/external/rails/plugins/request_routing/trunk/README
-<vjrj> Strip html better in RTE, I18nTranslator, Chat
- http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/b4a2…
-<vjrj> RTE right to left writing
-<vjrj> Restarting server don't affect client session
-<vjrj> See css utilities in http://code.google.com/p/cobogw/
-<vjrj> RTE css style: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/f64c…
-
-LONG-TERM:
---------------------------------------------------------------------------------
-
-IDEAS:
---------------------------------------------------------------------------------
-<danigb> Try to find a way dozer maps directly without use getters/setters (less js code and better performance)
-
-DO-NOT-IMPLEMENT (stuff that was rejected):
---------------------------------------------------------------------------------
-
-BACKTRACES/DEBUG/VALGRIND/EXCEPTIONS:
---------------------------------------------------------------------------------
-
-[1] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-2007-12-21 10:35:16,193 [btpool0-5] ERROR - Duplicate entry 'vjrj' for key 3
-2007-12-21 10:35:16,195 [btpool0-5] DEBUG - ContentManagerDefault.persist EXCEPTION => javax.persistence.EntityExistsException: org.hibernate.exception.ConstraintViolationException: could not insert: [org.ourproject.kune.platf.server.domain.Group]
-2007-12-21 10:35:16,196 [btpool0-5] DEBUG - ContentManagerDefault.persist EXCEPTION => javax.persistence.EntityExistsException: org.hibernate.exception.ConstraintViolationException: could not insert: [org.ourproject.kune.platf.server.domain.Group]
-2007-12-21 10:35:16,197 [btpool0-5] DEBUG - ContentManagerDefault.createContent EXCEPTION => javax.persistence.Entity
-
-[2] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
+* MIND-TERM
+** vjrj <v> Login: Follow incubation recomendations. See:
+ http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/e8e1…
+** TODO <v> extjs i18n
+ http://extjs.com/deploy/ext/examples/locale/dutch-form.js
+ http://groups.google.com/group/gwt-ext/browse_thread/thread/ebec316effea2b8…
+ http://extjs.com/forum/showthread.php?t=20160&highlight=localization
+** TODO <v> Restarting server don't affect client session
+ Now there are problems if client was started before server, when server restart (session persist)
+** TODO <v> Interceptors also useful for translation of db fields
+** vjrj <d> click in new group, reload sn innecessary
+** TODO <v> Injection problem
2008-01-03 23:17:57.575::WARN: failed rack
java.lang.RuntimeException: java.lang.RuntimeException: Please apply com.google.inject.servlet.GuiceFilter to any request which uses servlet scopes.
at org.ourproject.kune.platf.server.KunePersistenceService.start(KunePersistenceService.java:41)
@@ -324,41 +277,26 @@
at org.ourproject.kune.platf.server.KunePersistenceService.start(KunePersistenceService.java:39)
... 58 more
2008-01-03 23:17:57.697::INFO: Started [email protected]:8080
+** TODO <v> RTL (BiDi support). The problem will be extjs (gwt support bidi in 1.5):
+ http://extjs.com/forum/showthread.php?t=9659
+ http://cssjanus.commoner.com/
+** TODO <v> Study the possibility to include in SN something similar to "Member since <date>".
+** TODO <v> think about more secure login, SRP protocol thread, and:
+http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/97623347b448e16e
+http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/367bdb56dd4e5ad1
+** TODO <v> Build better our maven repo
+ http://maven.apache.org/guides/mini/guide-central-repository-upload.html
+** TODO <v> for dev, study jetty hot deploy (manual mode in >=7.0.0).
+** TODO <v> Use of maven-exec plugin to exec scripts (to css tidy, etcetera)
+ http://mojo.codehaus.org/exec-maven-plugin/introduction.html
+** TODO <v> Strip html better in RTE, I18nTranslator, Chat
+ http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/b4a2…
+** TODO <v> See css utilities in http://code.google.com/p/cobogw/
+** FIXED <s,v> Add in license choose a free/non-free indicator [3]
+** FIXED <v> browser font size (different from default) issues (scroll in dialogs, buttons background, etc)
+ CLOSED: [2009-01-03 sáb 01:37]
-[3] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+* LONG-TERM
+* IDEAS
+** <d> Try to find a way dozer maps directly without use getters/setters (less js code and better performance)
-(sorry only in Spanish)ç
-Samer comment:
-> * No libre, no copyleft: explicación de lo que es libre, qué es
-> copyleft, básico. Citar proyectos libres conocidos.
-> * Libre, no copyleft: explicación de qué es copyleft, sin que deje
-> de ser libre. ¿Enlace a GNU?
-> * No libre, copyleft: explicación de las puñeteras no-comerciales
-> jejeje. Creo que en estos casos lo de citar que la famosa
-> wikipedia no acepta contenido asà es un argumento de peso.
-> * Libre y Copyleft... si no es GPL o compatible con GPL (o GFDL)
-> deberÃa explicarse las ventajas de tener una licencia compatible
-> al menos con la GPLv3 y tal, ¿no créeis? ¿O pasando y con que
-> tengan una libre rara ya vale? Es que la no normalización conlleva
-> mucho caos a la hora de compartir cosas de distintos proyectos...
-> de hecho a los flipados de la licencia de ayer a lo mejor habrÃa
-> que comentarles esto. ¿Opiniones?
-
-Propuesta:
-------
-Selecciona una licencia para compartir los contenidos de este grupo con el resto de gente:
-
-[X] Usar la licencia <href>copyleft recomendada
-[ ] Quiero elegir otra licencia (uso avanzado)
-
-Notas:
-* <href>¿Porqué necesito una licencia?
-* <href>¿Qué significa copyleft?
-* Nosotros recomendamos licencias copyleft, sobre todo para trabajos prácticos.
-
-------
-
-esta última sacarÃa el widget actual con alguna nota adicional, como
-<href>Porque no usar una licencia no comercial.
-
-[?] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Modified: trunk/TROUBLESHOOT
===================================================================
--- trunk/TROUBLESHOOT 2009-01-02 19:34:01 UTC (rev 1021)
+++ trunk/TROUBLESHOOT 2009-01-03 01:44:58 UTC (rev 1022)
@@ -1,5 +1,19 @@
+=TROUBLESHOOTING=
+
+==Server debug==
+
Server: debug with jetty in eclipse:
http://docs.codehaus.org/display/JETTY/Debugging+with+the+Maven+Jetty+Plugi…
+==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==
+
+To increase client logging add ?log_level=DEBUG# to the url and use firebug firefox extension to see the output.
+
+==Emite troubleshooting==
+
+See:
+http://code.google.com/p/emite/wiki/Troubleshooting
\ No newline at end of file
1
0
Author: vjrj
Date: 2009-01-02 20:34:01 +0100 (Fri, 02 Jan 2009)
New Revision: 1021
Added:
trunk/doc/kune-ene-09.odp
Modified:
trunk/TODO
trunk/doc/kune-dic-08.odp
trunk/doc/kune-dic-08.pdf
trunk/pom.xml
trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateToken.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/IconLabelEditable.java
trunk/src/main/java/org/ourproject/kune/platf/server/domain/AccessLists.java
trunk/src/main/java/org/ourproject/kune/platf/server/domain/Content.java
trunk/src/main/java/org/ourproject/kune/platf/server/domain/GroupList.java
trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitleView.java
trunk/src/main/rails/publicspace/config/routes.rb
trunk/src/test/java/org/ourproject/kune/platf/client/actions/ActionRegistryTest.java
trunk/src/test/java/org/ourproject/kune/platf/client/state/StateManagerTest.java
trunk/src/test/java/org/ourproject/kune/platf/client/tool/ToolSelectorPresenterTest.java
trunk/src/test/java/org/ourproject/kune/platf/client/ui/dialogs/upload/FileUploaderPresenterTest.java
trunk/src/test/java/org/ourproject/kune/platf/server/access/FinderTest.java
trunk/src/test/java/org/ourproject/kune/platf/server/auth/AuthenticatedMethodInterceptorTest.java
trunk/src/test/java/org/ourproject/kune/platf/server/auth/AuthorizatedMethodInterceptorTest.java
trunk/src/test/java/org/ourproject/kune/platf/server/manager/ContentManagerTest.java
trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerTest.java
trunk/src/test/java/org/ourproject/kune/workspace/client/editor/TextEditorPresenterTest.java
trunk/src/test/java/org/ourproject/kune/workspace/client/licensewizard/LicenseWizardPresenterTest.java
trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java
Log:
route.rb now works with /public/a.b.c.d, new Mockito version, presentation updated, other enhancements.
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/TODO 2009-01-02 19:34:01 UTC (rev 1021)
@@ -52,6 +52,8 @@
http://mojo.codehaus.org/exec-maven-plugin/introduction.html
<vjrj> rails group-shortname.kune-site-domain/tool-name/folder-id/doc-id routing, maybe use:
http://agilewebdevelopment.com/plugins/request_routing
+ http://wiki.rubyonrails.org/rails/pages/Request+Routing
+ http://svn.danwebb.net/external/rails/plugins/request_routing/trunk/README
<vjrj> Strip html better in RTE, I18nTranslator, Chat
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/b4a2…
<vjrj> RTE right to left writing
Modified: trunk/doc/kune-dic-08.odp
===================================================================
(Binary files differ)
Modified: trunk/doc/kune-dic-08.pdf
===================================================================
(Binary files differ)
Added: trunk/doc/kune-ene-09.odp
===================================================================
(Binary files differ)
Property changes on: trunk/doc/kune-ene-09.odp
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/pom.xml 2009-01-02 19:34:01 UTC (rev 1021)
@@ -239,14 +239,19 @@
<!-- jetty dependencies -->
<dependency>
<groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- <version>6.1.5</version>
- <scope>provided</scope>
+ <artifactId>jetty-util</artifactId>
+ <version>6.1.5</version>
+ <!-- <version>7.0.0.pre5</version> -->
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
+ <artifactId>maven-jetty-plugin</artifactId>
<version>6.1.5</version>
+ <!--
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>7.0.0.pre5</version>
+ -->
<scope>provided</scope>
</dependency>
@@ -259,6 +264,11 @@
<!-- testing dependencies -->
<dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.6</version>
+ </dependency>
+ <dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.0.20070617</version>
@@ -371,11 +381,11 @@
<configuration>
<source>1.5</source>
<target>1.5</target>
- <!-- Uncomment and run mvn with -X -e if we have same compile problems
+ <!-- Uncomment and run mvn with -X -e if we have same compile problems
<compilerArgument>-verbose</compilerArgument>
- <fork>true</fork>
- <verbose>true</verbose>
- -->
+ <fork>true</fork>
+ <verbose>true</verbose>
+ -->
</configuration>
</plugin>
<plugin>
@@ -437,8 +447,13 @@
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.5</version>
+ <!--
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>7.0.0.pre5</version>
+ -->
<configuration>
<contextPath>/</contextPath>
+ <reload>manual</reload>
<scanIntervalSeconds>0</scanIntervalSeconds>
</configuration>
</plugin>
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateToken.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateToken.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateToken.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -23,6 +23,17 @@
import com.google.gwt.user.client.rpc.IsSerializable;
+/**
+ * <pre>
+ * http://en.wikipedia.org/wiki/Fragment_identifier
+ * http://www.w3.org/DesignIssues/Fragment.html
+ * </pre>
+ *
+ * <pre>
+ * When an agent (such as a Web browser) requests a resource from a Web server, the agent sends the URI to the server, but does not send the fragment.
+ * </pre>
+ *
+ */
public class StateToken implements IsSerializable {
public static final String SEPARATOR = ".";
private static final String[] EMPTY = new String[0];
@@ -131,14 +142,14 @@
public String getPublicUrl() {
String publicUrl = "http://";
- String separator = "/";
+ String separator = ".";
// FIXME: Maybe get from InitData the site.domain
String port = WindowUtils.getLocation().getPort();
publicUrl += WindowUtils.getLocation().getHostName() + (port == null ? "" : ":" + port) + "/public";
if (group != null) {
- publicUrl += separator + group;
+ publicUrl += "/" + group;
}
if (tool != null) {
publicUrl += separator + tool;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/IconLabelEditable.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/IconLabelEditable.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/IconLabelEditable.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -36,7 +36,6 @@
private boolean useDoubleClick;
private ClickListener listener;
private String currentText;
- private String oldText;
private MouseListenerAdapter mouseOverListener;
private final AbstractLabel label;
private String doubleClickToRenameLabel;
@@ -81,11 +80,6 @@
onEdit.add(slot);
}
- public void restoreOldText() {
- label.setText(oldText);
- this.currentText = this.oldText;
- }
-
public void setClickToRenameLabel(final String clickToRenameLabel) {
this.clickToRenameLabel = clickToRenameLabel;
}
@@ -114,7 +108,6 @@
}
public void setText(final String text) {
- this.oldText = this.currentText;
this.currentText = text;
label.setText(text);
}
@@ -122,6 +115,7 @@
private void afterEdit() {
String text = editor.getText();
onEdit.fire(currentText, text);
+ setText(text);
editor.setVisible(false);
editor.setReadOnly(true);
label.setVisible(true);
@@ -136,7 +130,6 @@
hp.add((Widget) label);
initWidget(hp);
this.currentText = text;
- this.oldText = text;
this.useDoubleClick = useDoubleClick;
this.listener = new ClickListener() {
public void onClick(final Widget sender) {
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/AccessLists.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/AccessLists.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/AccessLists.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -31,13 +31,16 @@
@Entity
@Table(name = "access_lists")
public class AccessLists {
+
@OneToOne(cascade = CascadeType.ALL)
protected GroupList admins;
@OneToOne(cascade = CascadeType.ALL)
protected GroupList editors;
+
@OneToOne(cascade = CascadeType.ALL)
protected GroupList viewers;
+
@Id
@GeneratedValue
private Long id;
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/Content.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/Content.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/Content.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -43,6 +43,7 @@
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
+import javax.persistence.OrderBy;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.Version;
@@ -73,6 +74,7 @@
@Version
private int version;
+ @OrderBy("name DESC")
@IndexedEmbedded
@ManyToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST })
private List<Tag> tags;
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/GroupList.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/GroupList.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/GroupList.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -32,12 +32,14 @@
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToMany;
+import javax.persistence.OrderBy;
import javax.persistence.Table;
@Entity
@Table(name = "group_list")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class GroupList {
+ @OrderBy("shortName ASC")
@ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
List<Group> list;
@@ -114,6 +116,7 @@
this.mode = mode;
}
+ @Override
public String toString() {
return "GroupList[(" + mode + "): " + list + "]";
}
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-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -178,5 +178,4 @@
"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/workspace/client/ctxnav/ContextNavigatorPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -78,6 +78,14 @@
TreeNode node = treePanel.getNodeById(nodeId);
if (node == null) {
// Log.info("Adding tree node " + nodeId);
+
+ // FIXME: maybe to solve the length issues with items, we can store
+ // a truncated title also and use something similar to:
+ // String nodeText = Format.ellipsis(item.getText(),
+ // ws.getEntityWorkspace().getContextTopBar().getPanel().getOffsetWidth()
+ // / 8);
+ // the problem is that editor uses this value, then we have to
+ // restore the real value before edit
final TreeNode child = new TreeNode(item.getText());
child.setId(nodeId);
final String icon = item.getIconUrl();
@@ -258,6 +266,7 @@
public boolean doBeforeStartEdit(final Editor source, final ExtElement boundEl, final Object value) {
return isEditable;
}
+
});
// test !?
treeEditor.setAutosize(false);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -73,7 +73,7 @@
userMenu.addItem(userHomePage);
final Item userPreferences = new Item(i18n.t("Your preferences"));
userPreferences.setId(USER_PREFERENCES_MENU_ITEM);
- userPreferences.setIcon("images/kune-preferences.gif");
+ userPreferences.setIcon("images/emblem-system.png");
userPreferences.addListener(new BaseItemListenerAdapter() {
@Override
public void onClick(final BaseItem item, final EventObject e) {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePanel.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePanel.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -52,10 +52,6 @@
icon.setVisible(false);
}
- public void restoreOldTitle() {
- titleLabel.restoreOldText();
- }
-
public void setContentIcon(final String iconUrl) {
icon.setUrl(iconUrl);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitleView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitleView.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitleView.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -23,8 +23,6 @@
public interface EntityTitleView extends View {
- void restoreOldTitle();
-
void setContentIcon(String iconUrl);
void setContentIconVisible(boolean visible);
Modified: trunk/src/main/rails/publicspace/config/routes.rb
===================================================================
--- trunk/src/main/rails/publicspace/config/routes.rb 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/main/rails/publicspace/config/routes.rb 2009-01-02 19:34:01 UTC (rev 1021)
@@ -1,6 +1,8 @@
ActionController::Routing::Routes.draw do |map|
map.root :controller => 'kunedbg'
map.connect 'public/:group/:tool/:folder/:content', :controller => 'contents', :action => 'show'
+ map.connect 'public/:group.:tool.:folder.:content', :controller => 'contents', :action => 'show',
+ :requirements => {:group => /[a-z0-9_\\-]+/, :tool => /[a-z0-9_\\-]+/, :folder => /\d+/, :content => /\d+/ }
map.connect '/public/debug/:action/:id', :controller => 'kunedbg'
#map.connect '/public/:controller/:action/:id.:format'
end
Modified: trunk/src/test/java/org/ourproject/kune/platf/client/actions/ActionRegistryTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/client/actions/ActionRegistryTest.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/test/java/org/ourproject/kune/platf/client/actions/ActionRegistryTest.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -23,7 +23,7 @@
@Test
public void actionsEmptyButNeverNull() {
- Mockito.stub(session.isLogged()).toReturn(true);
+ Mockito.when(session.isLogged()).thenReturn(true);
checkActionLists(0, new AccessRightsDTO(true, true, true), true);
checkActionLists(0, new AccessRightsDTO(true, true, true), false);
checkActionLists(0, new AccessRightsDTO(false, true, true), true);
@@ -56,7 +56,7 @@
@Test
public void mustBeAuthFalse() {
- Mockito.stub(session.isLogged()).toReturn(false);
+ Mockito.when(session.isLogged()).thenReturn(false);
addDefActions();
checkActionLists(0, new AccessRightsDTO(false, true, true), true);
checkActionLists(1, new AccessRightsDTO(false, true, true), false);
@@ -64,7 +64,7 @@
@Test
public void testAddWhenAdmin() {
- Mockito.stub(session.isLogged()).toReturn(true);
+ Mockito.when(session.isLogged()).thenReturn(true);
addDefActions();
checkActionLists(2, new AccessRightsDTO(true, true, true), true);
checkActionLists(3, new AccessRightsDTO(true, true, true), false);
@@ -72,7 +72,7 @@
@Test
public void testAddWhenEditor() {
- Mockito.stub(session.isLogged()).toReturn(true);
+ Mockito.when(session.isLogged()).thenReturn(true);
addDefActions();
checkActionLists(1, new AccessRightsDTO(false, true, true), true);
checkActionLists(2, new AccessRightsDTO(false, true, true), false);
@@ -80,7 +80,7 @@
@Test
public void testAddWhenViewer() {
- Mockito.stub(session.isLogged()).toReturn(true);
+ Mockito.when(session.isLogged()).thenReturn(true);
addDefActions();
checkActionLists(0, new AccessRightsDTO(false, false, true), true);
checkActionLists(1, new AccessRightsDTO(false, false, true), false);
Modified: trunk/src/test/java/org/ourproject/kune/platf/client/state/StateManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/client/state/StateManagerTest.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/test/java/org/ourproject/kune/platf/client/state/StateManagerTest.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -39,7 +39,7 @@
session = Mockito.mock(Session.class);
history = Mockito.mock(HistoryWrapper.class);
stateManager = new StateManagerDefault(contentProvider, session, history);
- Mockito.stub(session.getUserHash()).toReturn(HASH);
+ Mockito.when(session.getUserHash()).thenReturn(HASH);
state = Mockito.mock(StateAbstractDTO.class);
stateChangeListener = new MockListener<StateAbstractDTO>();
groupChangeListener = new MockListener2<String, String>();
@@ -116,7 +116,7 @@
public void normalStartLoggedUser() {
// When a user enter reload state, also if the application is starting
// (and the user was logged)
- Mockito.stub(history.getToken()).toReturn("");
+ Mockito.when(history.getToken()).thenReturn("");
stateManager.reload();
Mockito.verify(contentProvider, Mockito.times(1)).getContent(Mockito.anyString(),
(StateToken) Mockito.anyObject(), (AsyncCallback<StateAbstractDTO>) Mockito.anyObject());
@@ -189,7 +189,7 @@
private void changeState(String... tokens) {
for (String token : tokens) {
- Mockito.stub(state.getStateToken()).toReturn(new StateToken(token));
+ Mockito.when(state.getStateToken()).thenReturn(new StateToken(token));
stateManager.setState(state);
}
}
@@ -198,8 +198,8 @@
stateManager.addBeforeStateChangeListener(beforeChangeListener1);
stateManager.addBeforeStateChangeListener(beforeChangeListener2);
String newToken = "something";
- Mockito.stub(beforeChangeListener1.beforeAction()).toReturn(value);
- Mockito.stub(beforeChangeListener2.beforeAction()).toReturn(value2);
+ Mockito.when(beforeChangeListener1.beforeAction()).thenReturn(value);
+ Mockito.when(beforeChangeListener2.beforeAction()).thenReturn(value2);
return newToken;
}
Modified: trunk/src/test/java/org/ourproject/kune/platf/client/tool/ToolSelectorPresenterTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/client/tool/ToolSelectorPresenterTest.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/test/java/org/ourproject/kune/platf/client/tool/ToolSelectorPresenterTest.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -40,7 +40,7 @@
public void addTwoToolsWithSameNameMustGiveException() {
setToolNames();
final ToolSelectorItem toolSelectorItemCopy = Mockito.mock(ToolSelectorItem.class);
- Mockito.stub(toolSelectorItemCopy.getShortName()).toReturn(TOOL1_NAME);
+ Mockito.when(toolSelectorItemCopy.getShortName()).thenReturn(TOOL1_NAME);
toolSelector.addTool(toolSelectorItem1);
toolSelector.addTool(toolSelectorItemCopy);
}
@@ -96,8 +96,8 @@
}
public void setToolNames() {
- Mockito.stub(toolSelectorItem1.getShortName()).toReturn(TOOL1_NAME);
- Mockito.stub(toolSelectorItem2.getShortName()).toReturn(TOOL2_NAME);
+ Mockito.when(toolSelectorItem1.getShortName()).thenReturn(TOOL1_NAME);
+ Mockito.when(toolSelectorItem2.getShortName()).thenReturn(TOOL2_NAME);
}
}
Modified: trunk/src/test/java/org/ourproject/kune/platf/client/ui/dialogs/upload/FileUploaderPresenterTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/client/ui/dialogs/upload/FileUploaderPresenterTest.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/test/java/org/ourproject/kune/platf/client/ui/dialogs/upload/FileUploaderPresenterTest.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -25,12 +25,12 @@
view = Mockito.mock(FileUploaderView.class);
presenter = new FileUploaderPresenter(session);
presenter.init(view);
- Mockito.stub(session.getUserHash()).toReturn(SOMEUSER_HASH);
+ Mockito.when(session.getUserHash()).thenReturn(SOMEUSER_HASH);
}
@Test
public void testFirstAddFromDocInSameContainer() {
- Mockito.stub(session.getCurrentStateToken()).toReturn(new StateToken("group.docs.1.1"));
+ Mockito.when(session.getCurrentStateToken()).thenReturn(new StateToken("group.docs.1.1"));
assertTrue(presenter.checkFolderChange());
Mockito.verify(view, Mockito.times(1)).setUploadParams(SOMEUSER_HASH, "group.docs.1",
DocumentClientTool.TYPE_UPLOADEDFILE);
@@ -38,7 +38,7 @@
@Test
public void testFirstAddInSameContainer() {
- Mockito.stub(session.getCurrentStateToken()).toReturn(new StateToken("group.docs.1"));
+ Mockito.when(session.getCurrentStateToken()).thenReturn(new StateToken("group.docs.1"));
assertTrue(presenter.checkFolderChange());
Mockito.verify(view, Mockito.times(1)).setUploadParams(SOMEUSER_HASH, "group.docs.1",
DocumentClientTool.TYPE_UPLOADEDFILE);
@@ -46,10 +46,10 @@
@Test
public void testSomeAddsInDiffContainersButNotUploading() {
- Mockito.stub(session.getCurrentStateToken()).toReturn(new StateToken("group.docs.1"));
+ Mockito.when(session.getCurrentStateToken()).thenReturn(new StateToken("group.docs.1"));
assertTrue(presenter.checkFolderChange());
- Mockito.stub(view.hasUploadingFiles()).toReturn(false);
- Mockito.stub(session.getCurrentStateToken()).toReturn(new StateToken("group.docs.2"));
+ Mockito.when(view.hasUploadingFiles()).thenReturn(false);
+ Mockito.when(session.getCurrentStateToken()).thenReturn(new StateToken("group.docs.2"));
assertTrue(presenter.checkFolderChange());
Mockito.verify(view, Mockito.times(1)).setUploadParams(SOMEUSER_HASH, "group.docs.1",
DocumentClientTool.TYPE_UPLOADEDFILE);
@@ -59,10 +59,10 @@
@Test
public void testSomeAddsInDiffContainersButUploading() {
- Mockito.stub(session.getCurrentStateToken()).toReturn(new StateToken("group.docs.1"));
+ Mockito.when(session.getCurrentStateToken()).thenReturn(new StateToken("group.docs.1"));
assertTrue(presenter.checkFolderChange());
- Mockito.stub(view.hasUploadingFiles()).toReturn(true);
- Mockito.stub(session.getCurrentStateToken()).toReturn(new StateToken("group.docs.2"));
+ Mockito.when(view.hasUploadingFiles()).thenReturn(true);
+ Mockito.when(session.getCurrentStateToken()).thenReturn(new StateToken("group.docs.2"));
assertFalse(presenter.checkFolderChange());
Mockito.verify(view, Mockito.times(1)).setUploadParams(SOMEUSER_HASH, "group.docs.1",
DocumentClientTool.TYPE_UPLOADEDFILE);
@@ -72,9 +72,9 @@
@Test
public void testSomeAddsInSameContainer() {
- Mockito.stub(session.getCurrentStateToken()).toReturn(new StateToken("group.docs.1"));
+ Mockito.when(session.getCurrentStateToken()).thenReturn(new StateToken("group.docs.1"));
assertTrue(presenter.checkFolderChange());
- Mockito.stub(session.getCurrentStateToken()).toReturn(new StateToken("group.docs.1"));
+ Mockito.when(session.getCurrentStateToken()).thenReturn(new StateToken("group.docs.1"));
assertTrue(presenter.checkFolderChange());
Mockito.verify(view, Mockito.times(2)).setUploadParams(SOMEUSER_HASH, "group.docs.1",
DocumentClientTool.TYPE_UPLOADEDFILE);
Modified: trunk/src/test/java/org/ourproject/kune/platf/server/access/FinderTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/access/FinderTest.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/access/FinderTest.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -33,7 +33,7 @@
final Content descriptor = new Content();
final Container container = TestDomainHelper.createFolderWithIdAndToolName(5, "toolName2");
descriptor.setContainer(container);
- Mockito.stub(contentManager.find(1L)).toReturn(descriptor);
+ Mockito.when(contentManager.find(1L)).thenReturn(descriptor);
finder.getContent(new StateToken("groupShortName", "toolName", "5", "1"), null);
}
@@ -43,7 +43,7 @@
final Content descriptor = new Content();
final Container container = TestDomainHelper.createFolderWithIdAndGroupAndTool(5, "groupOther", "toolName");
descriptor.setContainer(container);
- Mockito.stub(contentManager.find(1L)).toReturn(descriptor);
+ Mockito.when(contentManager.find(1L)).thenReturn(descriptor);
finder.getContent(new StateToken("groupShortName", "toolName", "5", "1"), null);
}
@@ -53,7 +53,7 @@
final Content descriptor = new Content();
final Container container = TestDomainHelper.createFolderWithId(1);
descriptor.setContainer(container);
- Mockito.stub(contentManager.find(1L)).toReturn(descriptor);
+ Mockito.when(contentManager.find(1L)).thenReturn(descriptor);
finder.getContent(new StateToken("groupShortName", "toolName", "5", "1"), null);
}
@@ -74,7 +74,7 @@
final Group group = new Group();
final Content descriptor = new Content();
group.setDefaultContent(descriptor);
- Mockito.stub(groupManager.findByShortName("groupShortName")).toReturn(group);
+ Mockito.when(groupManager.findByShortName("groupShortName")).thenReturn(group);
final Content content = finder.getContent(new StateToken("groupShortName", null, null, null), null);
assertSame(descriptor, content);
@@ -87,7 +87,7 @@
descriptor.setId(1L);
descriptor.setContainer(container);
- Mockito.stub(contentManager.find(2L)).toReturn(descriptor);
+ Mockito.when(contentManager.find(2L)).thenReturn(descriptor);
final Content content = finder.getContent(new StateToken("groupShortName", "toolName", "1", "2"), null);
assertSame(descriptor, content);
@@ -130,7 +130,7 @@
@Test
public void testDocMissing() throws Exception {
final Container container = new Container();
- Mockito.stub(containerManager.find(1L)).toReturn(container);
+ Mockito.when(containerManager.find(1L)).thenReturn(container);
final Content content = finder.getContent(new StateToken("groupShortName", "toolName", "1", null), null);
assertNotNull(content);
@@ -142,7 +142,7 @@
final Group group = new Group();
final ToolConfiguration config = group.setToolConfig("toolName", new ToolConfiguration());
final Container container = config.setRoot(new Container());
- Mockito.stub(groupManager.findByShortName("groupShortName")).toReturn(group);
+ Mockito.when(groupManager.findByShortName("groupShortName")).thenReturn(group);
final StateToken token = new StateToken("groupShortName", "toolName", null, null);
final Content content = finder.getContent(token, null);
@@ -154,7 +154,7 @@
final Content descriptor = new Content();
final Container container = TestDomainHelper.createFolderWithIdAndToolName(5, "toolName");
descriptor.setContainer(container);
- Mockito.stub(contentManager.find(1L)).toReturn(descriptor);
+ Mockito.when(contentManager.find(1L)).thenReturn(descriptor);
finder.getContent(new StateToken("groupShortName", "toolName", "5", "1a"), null);
}
Modified: trunk/src/test/java/org/ourproject/kune/platf/server/auth/AuthenticatedMethodInterceptorTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/auth/AuthenticatedMethodInterceptorTest.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/auth/AuthenticatedMethodInterceptorTest.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -23,59 +23,59 @@
new IntegrationTestHelper(auth, this);
invocation = Mockito.mock(MethodInvocation.class);
final AccessibleObject accessibleObject = Mockito.mock(AccessibleObject.class);
- Mockito.stub(invocation.getMethod()).toReturn(this.getClass().getMethods()[0]);
- Mockito.stub(invocation.getStaticPart()).toReturn(accessibleObject);
+ Mockito.when(invocation.getMethod()).thenReturn(this.getClass().getMethods()[0]);
+ Mockito.when(invocation.getStaticPart()).thenReturn(accessibleObject);
authAnnotation = Mockito.mock(Authenticated.class);
- Mockito.stub(accessibleObject.getAnnotation(Authenticated.class)).toReturn(authAnnotation);
+ Mockito.when(accessibleObject.getAnnotation(Authenticated.class)).thenReturn(authAnnotation);
}
@Test(expected = UserMustBeLoggedException.class)
public void hashNullAndMandatoryMustDoNothing() throws Throwable {
- Mockito.stub(authAnnotation.mandatory()).toReturn(true);
+ Mockito.when(authAnnotation.mandatory()).thenReturn(true);
final Object[] arguments = { null };
- Mockito.stub(invocation.getArguments()).toReturn(arguments);
+ Mockito.when(invocation.getArguments()).thenReturn(arguments);
auth.invoke(invocation);
}
@Test
public void hashNullAndNotMandatoryMustDoNothing() throws Throwable {
- Mockito.stub(authAnnotation.mandatory()).toReturn(false);
+ Mockito.when(authAnnotation.mandatory()).thenReturn(false);
final Object[] arguments = { null };
- Mockito.stub(invocation.getArguments()).toReturn(arguments);
+ Mockito.when(invocation.getArguments()).thenReturn(arguments);
auth.invoke(invocation);
}
@Test
public void hashNullAsStringAndNotMandatoryMustDoNothing() throws Throwable {
- Mockito.stub(authAnnotation.mandatory()).toReturn(false);
+ Mockito.when(authAnnotation.mandatory()).thenReturn(false);
final Object[] arguments = { "null" };
- Mockito.stub(invocation.getArguments()).toReturn(arguments);
+ Mockito.when(invocation.getArguments()).thenReturn(arguments);
auth.invoke(invocation);
}
@Test(expected = SessionExpiredException.class)
public void otherHashAndMandatoryAndLoggedMustSessionExp() throws Throwable {
doLogin();
- Mockito.stub(authAnnotation.mandatory()).toReturn(true);
+ Mockito.when(authAnnotation.mandatory()).thenReturn(true);
final Object[] arguments = { "other-hash" };
- Mockito.stub(invocation.getArguments()).toReturn(arguments);
+ Mockito.when(invocation.getArguments()).thenReturn(arguments);
auth.invoke(invocation);
}
@Test
public void sameHashAndMandatoryAndLoggedMustSessionExp() throws Throwable {
doLogin();
- Mockito.stub(authAnnotation.mandatory()).toReturn(true);
+ Mockito.when(authAnnotation.mandatory()).thenReturn(true);
final Object[] arguments = { getHash() };
- Mockito.stub(invocation.getArguments()).toReturn(arguments);
+ Mockito.when(invocation.getArguments()).thenReturn(arguments);
auth.invoke(invocation);
}
@Test(expected = SessionExpiredException.class)
public void someHashAndMandatoryAndNotLoggedMustSessionExp() throws Throwable {
- Mockito.stub(authAnnotation.mandatory()).toReturn(true);
+ Mockito.when(authAnnotation.mandatory()).thenReturn(true);
final Object[] arguments = { "some-hash" };
- Mockito.stub(invocation.getArguments()).toReturn(arguments);
+ Mockito.when(invocation.getArguments()).thenReturn(arguments);
auth.invoke(invocation);
}
}
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-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/auth/AuthorizatedMethodInterceptorTest.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -25,37 +25,37 @@
new IntegrationTestHelper(auth, this);
invocation = Mockito.mock(MethodInvocation.class);
final AccessibleObject accessibleObject = Mockito.mock(AccessibleObject.class);
- Mockito.stub(invocation.getMethod()).toReturn(this.getClass().getMethods()[0]);
- Mockito.stub(invocation.getStaticPart()).toReturn(accessibleObject);
+ Mockito.when(invocation.getMethod()).thenReturn(this.getClass().getMethods()[0]);
+ Mockito.when(invocation.getStaticPart()).thenReturn(accessibleObject);
authAnnotation = Mockito.mock(Authorizated.class);
- Mockito.stub(accessibleObject.getAnnotation(Authorizated.class)).toReturn(authAnnotation);
+ Mockito.when(accessibleObject.getAnnotation(Authorizated.class)).thenReturn(authAnnotation);
}
@Test(expected = ContentNotFoundException.class)
public void tesHashNullContainer() throws Throwable {
- // Mockito.stub(authAnnotation.accessRolRequired()).toReturn(AccessRol.Administrator);
- Mockito.stub(authAnnotation.actionLevel()).toReturn(ActionLevel.content);
+ // Mockito.when(authAnnotation.accessRolRequired()).thenReturn(AccessRol.Administrator);
+ Mockito.when(authAnnotation.actionLevel()).thenReturn(ActionLevel.content);
final Object[] arguments = { getHash(), new StateToken("group.docs") };
- Mockito.stub(invocation.getArguments()).toReturn(arguments);
+ Mockito.when(invocation.getArguments()).thenReturn(arguments);
auth.invoke(invocation);
}
@Test(expected = ContentNotFoundException.class)
public void testHashNullContent() throws Throwable {
- Mockito.stub(authAnnotation.actionLevel()).toReturn(ActionLevel.content);
+ Mockito.when(authAnnotation.actionLevel()).thenReturn(ActionLevel.content);
final Object[] arguments = { getHash(), new StateToken("group.docs.1") };
- Mockito.stub(invocation.getArguments()).toReturn(arguments);
+ Mockito.when(invocation.getArguments()).thenReturn(arguments);
auth.invoke(invocation);
}
@Test(expected = AccessViolationException.class)
public void wrongGroupNameThrowsExcep() throws Throwable {
doLogin();
- Mockito.stub(authAnnotation.accessRolRequired()).toReturn(AccessRol.Administrator);
- Mockito.stub(authAnnotation.actionLevel()).toReturn(ActionLevel.content);
+ Mockito.when(authAnnotation.accessRolRequired()).thenReturn(AccessRol.Administrator);
+ Mockito.when(authAnnotation.actionLevel()).thenReturn(ActionLevel.content);
final Object[] arguments = { getHash(), new StateToken("groupWRONG.docs.1.1") };
- Mockito.stub(invocation.getArguments()).toReturn(arguments);
+ Mockito.when(invocation.getArguments()).thenReturn(arguments);
auth.invoke(invocation);
}
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 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/ContentManagerTest.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -96,7 +96,7 @@
@Test
public void testUTF8Persist() {
final Container container = Mockito.mock(Container.class);
- Mockito.stub(container.getTypeId()).toReturn(DocumentServerTool.TYPE_FOLDER);
+ Mockito.when(container.getTypeId()).thenReturn(DocumentServerTool.TYPE_FOLDER);
final Content cnt = contentManager.createContent("汉è¯/漢語", "汉è¯/漢語", user, container,
DocumentServerTool.TYPE_DOCUMENT);
final Content newCnt = contentManager.find(cnt.getId());
@@ -105,7 +105,7 @@
private void createContentWithMime(final String mimetype) {
final Container container = Mockito.mock(Container.class);
- Mockito.stub(container.getTypeId()).toReturn(DocumentServerTool.TYPE_FOLDER);
+ Mockito.when(container.getTypeId()).thenReturn(DocumentServerTool.TYPE_FOLDER);
final Content cnt = contentManager.createContent("title", "body", user, container,
DocumentServerTool.TYPE_UPLOADEDFILE);
cnt.setMimeType(new BasicMimeType(mimetype));
Modified: trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerTest.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerTest.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -47,15 +47,15 @@
resp = Mockito.mock(HttpServletResponse.class);
ServletOutputStream oStream = Mockito.mock(ServletOutputStream.class);
- Mockito.stub(resp.getOutputStream()).toReturn(oStream);
+ Mockito.when(resp.getOutputStream()).thenReturn(oStream);
uploadLocation = kuneProperties.get(KuneProperties.UPLOAD_LOCATION);
fileUtils = Mockito.mock(FileUtils.class);
- Mockito.stub(fileUtils.exist(Mockito.anyString())).toReturn(true);
+ Mockito.when(fileUtils.exist(Mockito.anyString())).thenReturn(true);
stateToken = new StateToken("test.test.1.1");
filename = "somefile";
- Mockito.stub(content.getTitle()).toReturn(SOMETITLE);
+ Mockito.when(content.getTitle()).thenReturn(SOMETITLE);
}
@Test
@@ -66,7 +66,7 @@
@Test
public void testJpgThumbDownload() throws IOException {
String extension = ".jpg";
- contentStub(new BasicMimeType("image", "jpg"), filename, extension);
+ contentwhen(new BasicMimeType("image", "jpg"), filename, extension);
String subExt = ImageSize.thumb.toString();
String absFile = fileDownloadManager.buildResponse(content, stateToken, "false", subExt, resp, fileUtils);
assertEquals(uploadLocation + FileUtils.toDir(stateToken) + filename + "." + subExt + extension, absFile);
@@ -80,7 +80,7 @@
@Test
public void testPdfDownload1() throws IOException {
String extension = ".pdf";
- contentStub(new BasicMimeType("application", "pdf"), filename, extension);
+ contentwhen(new BasicMimeType("application", "pdf"), filename, extension);
String absFile = fileDownloadManager.buildResponse(content, stateToken, "true", ImageSize.ico.toString(), resp,
fileUtils);
assertEquals(uploadLocation + FileUtils.toDir(stateToken) + filename + extension, absFile);
@@ -94,7 +94,7 @@
@Test
public void testPdfDownload2() throws IOException {
String pngExtension = ".png";
- contentStub(new BasicMimeType("application", "pdf"), filename, ".pdf");
+ contentwhen(new BasicMimeType("application", "pdf"), filename, ".pdf");
String subExt = ImageSize.ico.toString();
String absFile = fileDownloadManager.buildResponse(content, stateToken, "false", subExt, resp, fileUtils);
assertEquals(uploadLocation + FileUtils.toDir(stateToken) + filename + "." + subExt + pngExtension, absFile);
@@ -108,7 +108,7 @@
@Test
public void testPdfDownload3() throws IOException {
String pngExtension = ".png";
- contentStub(new BasicMimeType("application", "pdf"), filename, ".pdf");
+ contentwhen(new BasicMimeType("application", "pdf"), filename, ".pdf");
String subExt = ImageSize.sized.toString();
String absFile = fileDownloadManager.buildResponse(content, stateToken, "false", subExt, resp, fileUtils);
assertEquals(uploadLocation + FileUtils.toDir(stateToken) + filename + "." + subExt + pngExtension, absFile);
@@ -122,7 +122,7 @@
@Test
public void testPdfDownload4() throws IOException {
String pngExtension = ".png";
- contentStub(new BasicMimeType("application", "pdf"), filename, ".pdf");
+ contentwhen(new BasicMimeType("application", "pdf"), filename, ".pdf");
String subExt = ImageSize.thumb.toString();
String absFile = fileDownloadManager.buildResponse(content, stateToken, "false", subExt, resp, fileUtils);
assertEquals(uploadLocation + FileUtils.toDir(stateToken) + filename + "." + subExt + pngExtension, absFile);
@@ -136,7 +136,7 @@
@Test
public void testPdfDownloadNullMime() throws IOException {
String extension = ".pdf";
- contentStub(null, filename, extension);
+ contentwhen(null, filename, extension);
String absFile = fileDownloadManager.buildResponse(content, stateToken, "true", ImageSize.ico.toString(), resp,
fileUtils);
assertEquals(uploadLocation + FileUtils.toDir(stateToken) + filename + extension, absFile);
@@ -150,7 +150,7 @@
@Test
public void testPngDownload1() throws IOException {
String extension = ".png";
- contentStub(new BasicMimeType("image", "png"), filename, extension);
+ contentwhen(new BasicMimeType("image", "png"), filename, extension);
String absFile = fileDownloadManager.buildResponse(content, stateToken, "true", null, resp, fileUtils);
assertEquals(uploadLocation + FileUtils.toDir(stateToken) + filename + extension, absFile);
Mockito.verify(resp).setContentType(FileDownloadManager.APPLICATION_X_DOWNLOAD);
@@ -163,7 +163,7 @@
@Test
public void testPngDownload2() throws IOException {
String extension = ".png";
- contentStub(new BasicMimeType("image", "png"), filename, extension);
+ contentwhen(new BasicMimeType("image", "png"), filename, extension);
String subExt = ImageSize.thumb.toString();
String absFile = fileDownloadManager.buildResponse(content, stateToken, "false", subExt, resp, fileUtils);
assertEquals(uploadLocation + FileUtils.toDir(stateToken) + filename + "." + subExt + extension, absFile);
@@ -174,8 +174,8 @@
+ FileDownloadManager.RESP_HEADER_END);
}
- private void contentStub(BasicMimeType mimeType, String filename, String extension) {
- Mockito.stub(content.getMimeType()).toReturn(mimeType);
- Mockito.stub(content.getFilename()).toReturn(filename + extension);
+ private void contentwhen(BasicMimeType mimeType, String filename, String extension) {
+ Mockito.when(content.getMimeType()).thenReturn(mimeType);
+ Mockito.when(content.getFilename()).thenReturn(filename + extension);
}
}
Modified: trunk/src/test/java/org/ourproject/kune/workspace/client/editor/TextEditorPresenterTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/workspace/client/editor/TextEditorPresenterTest.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/test/java/org/ourproject/kune/workspace/client/editor/TextEditorPresenterTest.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -80,7 +80,7 @@
public void initialEditWithEditionAndSave() {
presenter.editContent("Text to edit", saveListener, cancelListener);
String textModified = "Text modified";
- Mockito.stub(view.getHTML()).toReturn(textModified);
+ Mockito.when(view.getHTML()).thenReturn(textModified);
presenter.onEdit();
presenter.onSave();
assertTrue(saveListener.isCalledWithEquals(textModified));
@@ -99,7 +99,7 @@
public void testSavePendingAndCancel() {
presenter.editContent("Text to edit", saveListener, cancelListener);
String textModified = "Text modified";
- Mockito.stub(view.getHTML()).toReturn(textModified);
+ Mockito.when(view.getHTML()).thenReturn(textModified);
presenter.onEdit();
presenter.onCancel();
presenter.onCancelConfirmed();
@@ -111,7 +111,7 @@
public void testSavePendingAndSaveFails() {
presenter.editContent("Text to edit", saveListener, cancelListener);
String textModified = "Text modified";
- Mockito.stub(view.getHTML()).toReturn(textModified);
+ Mockito.when(view.getHTML()).thenReturn(textModified);
presenter.onEdit();
presenter.onSave();
presenter.onSaveFailed();
Modified: trunk/src/test/java/org/ourproject/kune/workspace/client/licensewizard/LicenseWizardPresenterTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/workspace/client/licensewizard/LicenseWizardPresenterTest.java 2009-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/test/java/org/ourproject/kune/workspace/client/licensewizard/LicenseWizardPresenterTest.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -34,11 +34,11 @@
public void onAnotherSelected() {
licenseWizard.onAnotherLicenseSelecterd();
Mockito.verify(view).setEnabled(false, true, true, false);
- Mockito.stub(view.isCurrentPage(firstForm)).toReturn(true);
+ Mockito.when(view.isCurrentPage(firstForm)).thenReturn(true);
licenseWizard.onNext();
Mockito.verify(view).show(sndForm);
Mockito.verify(view).setEnabled(true, true, true, false);
- Mockito.stub(view.isCurrentPage(sndForm)).toReturn(true);
+ Mockito.when(view.isCurrentPage(sndForm)).thenReturn(true);
licenseWizard.onBack();
Mockito.verify(view).show(firstForm);
Mockito.verify(view).setEnabled(false, true, true, true);
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-01-02 00:58:53 UTC (rev 1020)
+++ trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java 2009-01-02 19:34:01 UTC (rev 1021)
@@ -28,7 +28,7 @@
final WsThemePresenter theme = Mockito.mock(WsThemePresenter.class);
final SiteSearcher searcher = Mockito.mock(SiteSearcher.class);
final Provider searcherProvider = Mockito.mock(Provider.class);
- Mockito.stub(searcherProvider.get()).toReturn(searcher);
+ Mockito.when(searcherProvider.get()).thenReturn(searcher);
view = Mockito.mock(TagsSummaryView.class);
tagsSummaryPresenter = new TagsSummaryPresenter(session, searcherProvider, stateManager, theme);
tagsSummaryPresenter.init(view);
1
0
Author: vjrj
Date: 2009-01-02 01:58:53 +0100 (Fri, 02 Jan 2009)
New Revision: 1020
Removed:
trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogGxt.java
Modified:
trunk/pom.xml
trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigator.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntitySummary.java
Log:
minor bug fixes
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-01-01 22:02:17 UTC (rev 1019)
+++ trunk/pom.xml 2009-01-02 00:58:53 UTC (rev 1020)
@@ -368,10 +368,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.0</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
+ <!-- Uncomment and run mvn with -X -e if we have same compile problems
+ <compilerArgument>-verbose</compilerArgument>
+ <fork>true</fork>
+ <verbose>true</verbose>
+ -->
</configuration>
</plugin>
<plugin>
@@ -380,7 +384,7 @@
<version>2.0-beta26</version>
<configuration>
<logLevel>INFO</logLevel>
- <style>PRETTY</style>
+ <style>OBF</style>
<!-- <style>OBF PRETTY</style> -->
<runTarget>
org.ourproject.kune.app.Kune/Kune.html
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogGxt.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogGxt.java 2009-01-01 22:02:17 UTC (rev 1019)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/BasicDialogGxt.java 2009-01-02 00:58:53 UTC (rev 1020)
@@ -1,66 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.client.ui.dialogs;
-
-// import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
-// import com.extjs.gxt.ui.client.Style.Scroll;
-// import com.extjs.gxt.ui.client.widget.Window;
-//
-// public class BasicDialogGxt extends Window {
-//
-// public BasicDialogGxt(final String caption, final boolean modal) {
-// this(caption, modal, Scroll.AUTO);
-// }
-//
-// public BasicDialogGxt(final String caption, final boolean modal, final Scroll
-// scroll) {
-// setAutoWidth(true);
-// // Param values
-// setTitle(caption);
-// setModal(modal);
-// setScrollMode(scroll);
-// // Def values
-// setShadow(true);
-// setPlain(true);
-// setClosable(true);
-// setCollapsible(true);
-// setResizable(true);
-// setButtonAlign(HorizontalAlignment.RIGHT);
-// }
-//
-// public BasicDialogGxt(final String caption, final boolean modal, final Scroll
-// scroll, final int width,
-// final int height) {
-// this(caption, modal, scroll, width, height, width, height);
-// }
-//
-// public BasicDialogGxt(final String caption, final boolean modal, final Scroll
-// scroll, final int width,
-// final int height, final int minWidth, final int minHeight) {
-// this(caption, modal, scroll);
-// setAutoWidth(false);
-// // Param values
-// setWidth(width);
-// setHeight(height);
-// setMinWidth(minWidth);
-// setMinHeight(minHeight);
-// }
-//
-// }
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java 2009-01-01 22:02:17 UTC (rev 1019)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java 2009-01-02 00:58:53 UTC (rev 1020)
@@ -248,6 +248,7 @@
contextPropEditorProvider.get().detach();
contextNavigator.attach();
if (session.getCurrentStateToken().equals(stateToken)) {
+ contextNavigator.refreshState();
foldableContent.refreshState();
}
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigator.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigator.java 2009-01-01 22:02:17 UTC (rev 1019)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigator.java 2009-01-02 00:58:53 UTC (rev 1020)
@@ -38,6 +38,8 @@
boolean isSelected(StateToken stateToken);
+ void refreshState();
+
void selectItem(StateToken stateToken);
void setEditOnNextStateChange(boolean edit);
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 2009-01-01 22:02:17 UTC (rev 1019)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java 2009-01-02 00:58:53 UTC (rev 1020)
@@ -33,6 +33,7 @@
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;
@@ -102,7 +103,6 @@
// FIXME At the moment detach (removeFromParent) destroy the gwt-ext
// TreePanel and the widget must be recreated (cannot be attached again
// like in gwt)
- // setState(session.getCurrentState(), true);
toolbar.attach();
}
@@ -147,6 +147,13 @@
return editOnNextStateChange;
}
+ public void refreshState() {
+ StateAbstractDTO currentState = session.getCurrentState();
+ if (currentState instanceof StateContainerDTO) {
+ setState((StateContainerDTO) currentState, true);
+ }
+ }
+
public void selectItem(final StateToken stateToken) {
view.selectItem(genId(stateToken));
toolbar.disableMenusAndClearButtons();
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java 2009-01-01 22:02:17 UTC (rev 1019)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java 2009-01-02 00:58:53 UTC (rev 1020)
@@ -35,11 +35,13 @@
import com.gwtext.client.core.ExtElement;
public class EntityLicensePanel implements EntityLicenseView {
+ public static final String LICENSE_LABEL = "k-elp-lic-lab";
private final Image licenseImage;
private final Label licenseLabel;
private final I18nTranslationService i18n;
private final SimpleToolbar licenseBar;
private final WorkspaceSkeleton ws;
+ private final ExtElement labelElement;
public EntityLicensePanel(final EntityLicensePresenter presenter, final I18nTranslationService i18n,
final WorkspaceSkeleton ws) {
@@ -80,16 +82,15 @@
licenseLabel.setStyleName("k-elp-limg");
licenseImage.setStyleName("k-elp-limg");
ws.getEntityWorkspace().getBottomTitle().add(licenseBar);
+ labelElement = Ext.get(licenseLabel.getElement());
}
public void attach() {
licenseBar.setVisible(true);
- // Ext.get(licenseBar.getElement()).setOpacity(1, false);
}
public void detach() {
licenseBar.setVisible(false);
- // Ext.get(licenseBar.getElement()).setOpacity(0, false);
}
public void openWindow(final String url) {
@@ -105,8 +106,7 @@
}
private void fade(final boolean in) {
- ExtElement element = Ext.get(licenseLabel.getElement());
- element.setOpacity(in ? 1 : 0, true);
+ labelElement.setOpacity(in ? 1 : 0, true);
ws.getEntityWorkspace().refreshBottomTitle();
}
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntitySummary.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntitySummary.java 2009-01-01 22:02:17 UTC (rev 1019)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntitySummary.java 2009-01-02 00:58:53 UTC (rev 1020)
@@ -93,13 +93,11 @@
panel.addListener(new ContainerListenerAdapter() {
@Override
public void onHide(Component component) {
- super.onHide(component);
openFirstIfActiveNotVisible();
}
@Override
public void onShow(Component component) {
- super.onShow(component);
openFirstIfActiveNotVisible();
}
1
0
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(a)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(a)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(a)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);
1
0