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
- 1587 discussions
Author: vjrj_
Date: 2011-03-25 00:10:11 +0100 (Fri, 25 Mar 2011)
New Revision: 1291
Added:
trunk/src/main/java/cc/kune/core/client/auth/WaveClientSimpleAuthenticator.java
trunk/src/main/java/cc/kune/core/client/registry/
trunk/src/main/java/cc/kune/core/client/registry/ContentIconsRegistry.java
trunk/src/main/java/cc/kune/core/client/tool/
trunk/src/main/java/cc/kune/core/client/tool/AbstractClientTool.java
trunk/src/main/java/cc/kune/core/client/tool/FoldableAbstractClientTool.java
trunk/src/main/java/cc/kune/core/client/tool/ToolResources.java
trunk/src/main/java/cc/kune/core/client/tool/ToolSelector.java
trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItem.java
trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItemPanel.java
trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItemPanel.ui.xml
trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItemPresenter.java
trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorPanel.java
trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorPanel.ui.xml
trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorPresenter.java
trunk/src/main/java/cc/kune/core/client/tool/tool-arrowdown-def.png
trunk/src/main/java/cc/kune/core/client/tool/tool-arrowleft-def.png
trunk/src/main/java/cc/kune/core/client/tool/tool-arrowright-def.png
trunk/src/main/java/cc/kune/core/client/tool/tool-arrowup-def.png
trunk/src/main/java/org/ourproject/kune/workspace/client/tool/OldAbstractClientTool.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tool/OldClientTool.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tool/OldFoldableAbstractClientTool.java
trunk/src/test/java/cc/kune/core/client/tool/
Removed:
trunk/src/main/java/cc/kune/wave/client/WaveClientSimpleAuthenticator.java
trunk/src/main/java/org/ourproject/kune/platf/client/registry/
trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ContentIconsRegistry.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tool/AbstractClientTool.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ClientTool.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tool/FoldableAbstractClientTool.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelector.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItem.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenter.java
trunk/src/test/java/org/ourproject/kune/workspace/client/tool/
Modified:
trunk/DEV-GUIDE
trunk/TODO
trunk/TODO_done
trunk/img/webtemplate/web_template-2011.svg
trunk/pom.xml
trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java
trunk/src/main/java/cc/kune/core/client/registry/AbstractContentRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/AclEditableRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/AuthorableRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/CanBeHomepageRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/ComentableRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/ContentCapabilitiesRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/DragableRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/DropableRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/EmailSubscribeAbleRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/LicensableRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/PublishModerableRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/RateableRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/RenamableRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/TageableRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/TranslatableRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/VersionableRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/XmppComentableRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/XmppNotifyCapableRegistry.java
trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java
trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPresenter.java
trunk/src/main/java/cc/kune/core/client/state/StateManager.java
trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
trunk/src/main/java/cc/kune/core/public/ws.css
trunk/src/main/java/cc/kune/wave/client/WebClient.java
trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java
trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java
trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java
trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java
trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java
trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientTool.java
trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java
trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java
trunk/src/main/java/org/ourproject/kune/workspace/client/RegistryModule.java
trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextPropEditorPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/rate/RateItPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/rate/RatePresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntitySubTitlePresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/upload/FileUploaderPresenter.java
trunk/src/test/java/cc/kune/core/client/tool/ToolSelectorPresenterTest.java
trunk/src/test/java/org/FaultyTestSuite.java
trunk/src/test/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistryTest.java
trunk/src/test/java/testsuites/OthersTestSuite.java
Log:
Tool widget and minor changes
Modified: trunk/DEV-GUIDE
===================================================================
--- trunk/DEV-GUIDE 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/DEV-GUIDE 2011-03-24 23:10:11 UTC (rev 1291)
@@ -100,7 +100,7 @@
===Install Kune===
-Install Kune (follow the trunk/INSTALL file instructions) and run Kune for the first time. This will initialize the database, or configure the XMPP server, for instance.
+Install Kune (follow the trunk/INSTALL file instructions) and run Kune for the first time. This will initialize the database, and configure the XMPP server, for instance.
===GWT's Hosted Mode===
@@ -108,6 +108,8 @@
mvn gwt:run
+FIXME: this part is outdated
+
You can create a custom launch also at "Run configuration" (Run > Open Run Dialog) in eclipse with Project: "org.ourproject.kune" with Main class: "com.google.gwt.dev.DevMode", with this program arguments (or similar): "-noserver -out gwt-out /ws/?locale=en&log_level=INFO -port 8080" and in the "Classpath User Entries":
* gwt-dev-[linux|mac|windows].jar (Add External Jar and choose it from your gwt installation directory)
* java - /kune/src/main
@@ -253,7 +255,6 @@
this generates four classes GroupOptions (the external interface), GroupOptionsPresenter (the Presenter with the business logic, the part you must test well), the GroupOptionsView (the interface to the panel, the UI code), the GroupOptionsPanel (the UI code, here all the gwt UI stuff). Also gives you in the standard output a sample code to use suco in a module to build these objects.
* IoC: as we described before we use guice and suco for IoC. Again, see HelloWorldModule class for a very simple sample of gwt module using suco.
-
==Code preferences==
We use some eclipse code preferences for Kune project:
@@ -364,3 +365,7 @@
===Twitter/identica===
Follow @kuneproject in twitter and @kune in identica.
+
+===Jenkins Continuous Integration Server===
+
+http://ci.comunes.org
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/TODO 2011-03-24 23:10:11 UTC (rev 1291)
@@ -12,7 +12,6 @@
nick == assigned to
* SHORT-TERM (URGENT)
-** TODO Use Jenkins in dev machine (reoconfigure hostname and put link in web)
** TODO WIAB History integration
*** Initial defpage #home
**** u: if logged: wave list (#inbox) else: signin
@@ -45,9 +44,9 @@
** TODO style injection:
http://www.hunlock.com/blogs/Howto_Dynamically_Insert_Javascript_And_CSS
https://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/f4c…
-** >> Delete host/room conf in ws.html
-** >> kune.properties from cmd line
-** HelloWord with samples of extensions: sitebar, sitebar options menu, siteuseroptions, sn, ...
+** TODO >> Delete host/room conf in ws.html
+** TODO >> kune.properties from cmd line
+** TODO HelloWord with samples of extensions: sitebar, sitebar options menu, siteuseroptions, sn, ...
** TODO Register of "reserved words" not permitted for groups/users names (in server and in client)
** TODO WIAB under proxies
https://groups.google.com/group/wave-protocol/browse_thread/thread/202dee4b…
@@ -55,7 +54,6 @@
** TODO Testing Presenters via juckito:
https://code.google.com/p/gwt-platform/wiki/UnitTesting
https://code.google.com/p/arcbees-hive/source/browse/test/com/arcbees/hive/…
-** src/org/waveprotocol/box/server/gxp/ (pages) >> ./gen/org/waveprotocol/box/server/gxp/WaveClientPage.java
** Use Emulate Stack Java like src/org/waveprotocol/box/webclient/WebClientDev.gwt.xml
** roo error
[FelixDispatchQueue] Expected string-based content in @RooGwtMirroredFrom on cc.kune.client.managed.request.ContainerTranslationProxyObject of class [org.springframework.roo.classpath.details.annotations.ClassAttributeValue] must be an instance of class org.springframework.roo.classpath.details.annotations.StringAttributeValue
Modified: trunk/TODO_done
===================================================================
--- trunk/TODO_done 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/TODO_done 2011-03-24 23:10:11 UTC (rev 1291)
@@ -47,9 +47,27 @@
:ARCHIVE_OLPATH: SHORT-TERM (URGENT)/<v> better RTE/Pending
:ARCHIVE_CATEGORY: TODO
:END:
+* WONTFIX Use Jenkins in dev machine (reoconfigure hostname and put link in web)
+ CLOSED: [2011-03-22 mar 17:28]
+ :PROPERTIES:
+ :ARCHIVE_TIME: 2011-03-22 mar 17:29
+ :ARCHIVE_FILE: ~/proyectos/dev/kune/trunk/TODO
+ :ARCHIVE_OLPATH: SHORT-TERM (URGENT)
+ :ARCHIVE_CATEGORY: TODO
+ :ARCHIVE_TODO: WONTFIX
+ :END:
+* src/org/waveprotocol/box/server/gxp/ (pages) >> ./gen/org/waveprotocol/box/server/gxp/WaveClientPage.java
+ :PROPERTIES:
+ :ARCHIVE_TIME: 2011-03-22 mar 17:29
+ :ARCHIVE_FILE: ~/proyectos/dev/kune/trunk/TODO
+ :ARCHIVE_OLPATH: SHORT-TERM (URGENT)
+ :ARCHIVE_CATEGORY: TODO
+ :END:
+
+
Modified: trunk/img/webtemplate/web_template-2011.svg
===================================================================
--- trunk/img/webtemplate/web_template-2011.svg 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/img/webtemplate/web_template-2011.svg 2011-03-24 23:10:11 UTC (rev 1291)
@@ -14,7 +14,7 @@
height="768"
id="svg3182"
version="1.1"
- inkscape:version="0.48.0 r9654"
+ inkscape:version="0.48.1 r9760"
sodipodi:docname="web_template-2011.svg"
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/web_template-2011.png"
inkscape:export-xdpi="90"
@@ -52,16 +52,16 @@
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
- inkscape:zoom="0.68229167"
+ inkscape:zoom="1"
inkscape:cx="512"
inkscape:cy="384"
inkscape:current-layer="layer1"
inkscape:document-units="px"
showgrid="false"
inkscape:window-width="1280"
- inkscape:window-height="748"
+ inkscape:window-height="975"
inkscape:window-x="0"
- inkscape:window-y="1024"
+ inkscape:window-y="21"
inkscape:window-maximized="1"
inkscape:snap-bbox="false"
inkscape:bbox-paths="true"
@@ -97,7 +97,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
+ <dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
@@ -1236,8 +1236,8 @@
style="font-size:13px" /></flowRegion><flowPara
id="flowPara22989"
style="font-size:13px;font-weight:bold">Some doc title</flowPara></flowRoot> <image
- y="315"
- x="984"
+ y="503"
+ x="1055"
id="image23149"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAALhJREFU OI3dkjEKhDAQRf8sIQiKlUfJXcxJ7LxKsLLJVeYSSWu0tghkqw3rusqChbC/GoZ5n/9hiJlxRY9L 9H8YiNeglEpCCJRlibqu8wER5XlZFqzrihgjmJk2CZiZYoyQUmIYBnjv4b2Hcw7OORhjUBTFBt5V YGaapglt22Icx7y31kJrjRDCBgYA+vYHSqnUNA26rkNVVej7HvM87+BDg3eTlNIhvKvwWSeEcAqf JvhV9z/S/QZPtQpeezcKESQAAAAASUVORK5CYII= "
height="16"
@@ -2638,25 +2638,26 @@
x="-48.066803"
y="340.33881" />
<rect
- style="opacity:0.84999999999999998;color:#000000;fill:#280b0b;fill-opacity:1;fill-rule:nonzero;stroke:#552200;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ style="opacity:0.85;color:#000000;fill:#280b0b;fill-opacity:1;fill-rule:nonzero;stroke:#552200;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect6139"
width="167.08397"
height="134.83969"
- x="879.38934"
- y="307.78625" />
+ x="950.38934"
+ y="495.78625" />
<rect
style="opacity:0.85;color:#000000;fill:#c87137;fill-opacity:1;fill-rule:nonzero;stroke:#cf5c43;stroke-width:0.1996699;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect6141"
width="164.7063"
height="32.31588"
- x="880.42413"
- y="328.24014"
- ry="4.4317684" />
+ x="951.42413"
+ y="516.24011"
+ ry="4.4317684"
+ rx="4.4317684" />
<text
xml:space="preserve"
style="font-size:16px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:125%;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Ubuntu;-inkscape-font-specification:Ubuntu Bold"
- x="903.85516"
- y="349.36758"
+ x="974.85516"
+ y="537.36755"
id="text24744-4"
sodipodi:linespacing="125%"
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/web_template-2011.png"
@@ -2664,33 +2665,34 @@
inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan24746-6"
- x="903.85516"
- y="349.36758">menu item</tspan></text>
+ x="974.85516"
+ y="537.36755">menu item</tspan></text>
<text
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/web_template-2011.png"
sodipodi:linespacing="125%"
id="text6164"
- y="381.36758"
- x="904.85516"
+ y="569.36755"
+ x="975.85516"
style="font-size:16px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:125%;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Ubuntu;-inkscape-font-specification:Ubuntu Bold"
xml:space="preserve"><tspan
- y="381.36758"
- x="904.85516"
+ y="569.36755"
+ x="975.85516"
id="tspan6166"
sodipodi:role="line">menu item</tspan></text>
<rect
ry="4.4317684"
- y="360.24014"
- x="880.42413"
+ y="548.24011"
+ x="951.42413"
height="32.31588"
width="164.7063"
id="rect3808"
- style="opacity:0.84999999999999998;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#cf5c43;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ style="opacity:0.85;color:#000000;fill:none;stroke:#cf5c43;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ rx="4.4317684" />
<image
- y="336.0275"
- x="885.00128"
+ y="524.02747"
+ x="956.00128"
id="image4011"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAApVJREFU OI1lkk9oVFcUh7/3ZpLJjJNkYv2XKDFxjAGLWFypC1Ehiihu2k1pVxUsgcCsgpvgQkTBrMS94CJB KrgQBLNwI6IgKoIOMdFYVCyYBjJmMjPOu/ec08Wz8RkPHO7dnI/f+e4NzIxkTU5O5lV1VET2icha EcE51+Wc210qlZZZVUESMDEx8ZOq3uzp6env6OggDENUlZmZGebn52ve+12lu2dGAZeZshJAOjGc F5EbxWKxP4oipqenqdVqiAhmxkC6cfXI1NhdYANw4v+5FYCIDHd3d293zjE7O/vGe39YRP4REX69 d3G4q74wDrwCNmWmbPk7gPd+Xy6XY25uDufciZGRkbcAzaPBceAScPXK0PjlfD5/e+H8eRsbGzu4 GrA+DEOq1Sre+78Tnj4Av1/Ye/ZWsLzc7OzspF6vP/pG4rv7f9jDuUE+fsoiIpz88TEpc5h4zMft nHDt2R5UlY1tixzf/JjB00+DOIEZv/x8iICQIJUl4BhoAOk2wEAc4qucG6qBOgBeX3/w1YGJBwy/ 8BfpzDqCIA/aAtkCmEL9E7L0iqjxAfV1sv0jWNRMALwHNZCISvkJYbiGws79vL8zjukGeg8MUXlZ Jmos0t7XhZlgLkoCHJhh4igM7iBsXQeBIk3h+UKWXiIKxX4+1zKYr4PpCiAEMOcwExDH4otnVMqP IPToZ6XZaIJFVGamqcy+i9dVxZxLJHAupkpEYaCPVO4HCCO2/fYn25yHpY90FntoXWqJE6itBkSg ivqISrlMKtcObXlIt4J6WKrQWPwXV6vS3tuBofHaSYCZkNlyiuzWFEFrJn7CsAVUIGrQ3qgiromp xL68TwCiJm9ujsYuvMe8+9J+5UQk/lgi8V0FgP8Au3qlSuYS8nsAAAAASUVORK5CYII= "
height="16"
@@ -2700,23 +2702,24 @@
height="16"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAApVJREFU OI1lkk9oVFcUh7/3ZpLJjJNkYv2XKDFxjAGLWFypC1Ehiihu2k1pVxUsgcCsgpvgQkTBrMS94CJB KrgQBLNwI6IgKoIOMdFYVCyYBjJmMjPOu/ec08Wz8RkPHO7dnI/f+e4NzIxkTU5O5lV1VET2icha EcE51+Wc210qlZZZVUESMDEx8ZOq3uzp6env6OggDENUlZmZGebn52ve+12lu2dGAZeZshJAOjGc F5EbxWKxP4oipqenqdVqiAhmxkC6cfXI1NhdYANw4v+5FYCIDHd3d293zjE7O/vGe39YRP4REX69 d3G4q74wDrwCNmWmbPk7gPd+Xy6XY25uDufciZGRkbcAzaPBceAScPXK0PjlfD5/e+H8eRsbGzu4 GrA+DEOq1Sre+78Tnj4Av1/Ye/ZWsLzc7OzspF6vP/pG4rv7f9jDuUE+fsoiIpz88TEpc5h4zMft nHDt2R5UlY1tixzf/JjB00+DOIEZv/x8iICQIJUl4BhoAOk2wEAc4qucG6qBOgBeX3/w1YGJBwy/ 8BfpzDqCIA/aAtkCmEL9E7L0iqjxAfV1sv0jWNRMALwHNZCISvkJYbiGws79vL8zjukGeg8MUXlZ Jmos0t7XhZlgLkoCHJhh4igM7iBsXQeBIk3h+UKWXiIKxX4+1zKYr4PpCiAEMOcwExDH4otnVMqP IPToZ6XZaIJFVGamqcy+i9dVxZxLJHAupkpEYaCPVO4HCCO2/fYn25yHpY90FntoXWqJE6itBkSg ivqISrlMKtcObXlIt4J6WKrQWPwXV6vS3tuBofHaSYCZkNlyiuzWFEFrJn7CsAVUIGrQ3qgiromp xL68TwCiJm9ujsYuvMe8+9J+5UQk/lgi8V0FgP8Au3qlSuYS8nsAAAAASUVORK5CYII= "
id="image4014"
- x="885.00128"
- y="368.0275" />
+ x="956.00128"
+ y="556.02747" />
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/group-def-icon.png"
ry="2.5"
- y="367.31128"
- x="1072.8741"
+ y="555.31128"
+ x="1143.8741"
height="13.999999"
width="14"
id="rect2884"
- style="fill:#ffe6d5;fill-opacity:1;fill-rule:nonzero;stroke:#d45500;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ style="fill:#ffe6d5;fill-opacity:1;fill-rule:nonzero;stroke:#d45500;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ rx="2.5" />
<path
inkscape:connector-curvature="0"
style="color:#000000;fill:#aad400;fill-opacity:1;fill-rule:evenodd;stroke:#5500d4;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 1083.8248,369.93911 -5.2833,4.75296 -1.7106,-1.96914 -2.0934,2.14668 c 1.5118,1.34043 2.6383,2.29564 3.8932,3.58472 2.1101,-1.97782 4.2716,-3.54473 6.5614,-5.03458 -0.3489,-1.48877 -0.8009,-2.51535 -1.3673,-3.48064 z"
+ d="m 1154.8248,557.93911 -5.2833,4.75296 -1.7106,-1.96914 -2.0934,2.14668 c 1.5118,1.34043 2.6383,2.29564 3.8932,3.58472 2.1101,-1.97782 4.2716,-3.54473 6.5614,-5.03458 -0.3489,-1.48877 -0.8009,-2.51535 -1.3673,-3.48064 z"
id="rect4453"
sodipodi:nodetypes="ccccccc"
inkscape:export-filename="/home/vjrj/proyectos/movecommons/images/icongen/cat-selected.png"
@@ -2727,8 +2730,8 @@
id="rect60658"
width="14"
height="13.999999"
- x="1072.8741"
- y="384.31128"
+ x="1143.8741"
+ y="572.31128"
ry="6.9999995"
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/group-def-icon.png"
inkscape:export-xdpi="90"
@@ -2737,7 +2740,7 @@
<path
inkscape:connector-curvature="0"
style="color:#000000;fill:#aad400;fill-opacity:1;fill-rule:evenodd;stroke:#5500d4;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 1066.7427,375.67338 -6.8467,6.15941 -2.2168,-2.55183 -2.7128,2.7819 c 1.9591,1.73709 3.419,2.97495 5.0452,4.64548 2.7345,-2.56308 5.5356,-4.59365 8.503,-6.52437 -0.4521,-1.92931 -1.0379,-3.25966 -1.7719,-4.51059 z"
+ d="m 1137.7427,563.67338 -6.8467,6.15941 -2.2168,-2.55183 -2.7128,2.7819 c 1.9591,1.73709 3.419,2.97495 5.0452,4.64548 2.7345,-2.56308 5.5356,-4.59365 8.503,-6.52437 -0.4521,-1.92931 -1.0379,-3.25966 -1.7719,-4.51059 z"
id="rect4453-1"
sodipodi:nodetypes="ccccccc"
inkscape:export-filename="/home/vjrj/proyectos/movecommons/images/icongen/cat-selected.png"
@@ -2749,8 +2752,8 @@
inkscape:export-xdpi="90"
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/group-def-icon.png"
ry="3.7067122"
- y="387.60455"
- x="1076.1675"
+ y="575.60455"
+ x="1147.1675"
height="7.4134245"
width="7.4134245"
id="rect60678"
@@ -2760,30 +2763,32 @@
id="rect60699"
width="14"
height="13.999999"
- x="1072.8741"
- y="347.31128"
+ x="1143.8741"
+ y="535.31128"
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" />
+ inkscape:export-ydpi="90"
+ rx="2.5" />
<rect
style="fill:#ffe6d5;fill-opacity:1;fill-rule:nonzero;stroke:#d45500;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect60716"
width="14"
height="13.999999"
- x="1072.8741"
- y="367.31128"
+ x="1143.8741"
+ y="555.31128"
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" />
+ inkscape:export-ydpi="90"
+ rx="2.5" />
<path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/vjrj/proyectos/movecommons/images/icongen/cat-selected.png"
sodipodi:nodetypes="ccccccc"
id="path60718"
- d="m 1083.8248,369.93911 -5.2833,4.75296 -1.7106,-1.96914 -2.0934,2.14668 c 1.5118,1.34043 2.6383,2.29564 3.8932,3.58472 2.1101,-1.97782 4.2716,-3.54473 6.5614,-5.03458 -0.3489,-1.48877 -0.8009,-2.51535 -1.3673,-3.48064 z"
+ d="m 1154.8248,557.93911 -5.2833,4.75296 -1.7106,-1.96914 -2.0934,2.14668 c 1.5118,1.34043 2.6383,2.29564 3.8932,3.58472 2.1101,-1.97782 4.2716,-3.54473 6.5614,-5.03458 -0.3489,-1.48877 -0.8009,-2.51535 -1.3673,-3.48064 z"
style="color:#000000;fill:#aad400;fill-opacity:1;fill-rule:evenodd;stroke:#5500d4;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
inkscape:connector-curvature="0" />
<rect
@@ -2792,8 +2797,8 @@
inkscape:export-xdpi="90"
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/group-def-icon.png"
ry="6.9999995"
- y="384.31128"
- x="1072.8741"
+ y="572.31128"
+ x="1143.8741"
height="13.999999"
width="14"
id="rect60720"
@@ -2803,8 +2808,8 @@
id="rect60722"
width="7.4134245"
height="7.4134245"
- x="1076.1675"
- y="387.60455"
+ x="1147.1675"
+ y="575.60455"
ry="3.7067122"
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/group-def-icon.png"
inkscape:export-xdpi="90"
@@ -2815,12 +2820,34 @@
inkscape:export-xdpi="90"
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/group-def-icon.png"
ry="2.5"
- y="347.31128"
- x="1072.8741"
+ y="535.31128"
+ x="1143.8741"
height="13.999999"
width="14"
id="rect60724"
- style="fill:#ffe6d5;fill-opacity:1;fill-rule:nonzero;stroke:#d45500;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ style="fill:#ffe6d5;fill-opacity:1;fill-rule:nonzero;stroke:#d45500;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ rx="2.5" />
+ <path
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/iconleft.png"
+ transform="matrix(0.13329382,-0.09990711,0.03845747,0.3462786,502.43998,-56.33893)"
+ inkscape:transform-center-y="-2.9508384"
+ inkscape:transform-center-x="0.48626974"
+ d="m 829.30412,222.91959 -58.22371,-58.2237 79.53506,-21.31136 z"
+ inkscape:randomized="0"
+ inkscape:rounded="0"
+ inkscape:flatsided="true"
+ sodipodi:arg2="2.3561945"
+ sodipodi:arg1="1.3089969"
+ sodipodi:r2="25.591238"
+ sodipodi:r1="47.539455"
+ sodipodi:cy="177"
+ sodipodi:cx="817"
+ sodipodi:sides="3"
+ id="path3823"
+ style="color:#000000;fill:#c87137;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="star" />
</g>
<g
inkscape:groupmode="layer"
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/pom.xml 2011-03-24 23:10:11 UTC (rev 1291)
@@ -56,11 +56,6 @@
</snapshots>
</repository>
<repository>
- <id>mvp4g.googlecode.releases</id>
- <name>Releases Repository for Mvp4g</name>
- <url>http://mvp4g.googlecode.com/svn/maven2/releases/</url>
- </repository>
- <repository>
<id>ext-gxt</id>
<name>ext-gxt at jahia</name>
<url>http://maven.jahia.org/maven2/</url>
Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -36,7 +36,6 @@
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.dto.UserDTO;
import cc.kune.core.shared.dto.UserInfoDTO;
-import cc.kune.wave.client.WaveClientSimpleAuthenticator;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
@@ -191,16 +190,17 @@
}
}
- public void setErrorMessage(String message, NotifyLevel level) {
- getView().setErrorMessage(message, level);
- }
-
@Override
protected void revealInParent() {
RevealRootContentEvent.fire(this, this);
}
@Override
+ public void setErrorMessage(final String message, final NotifyLevel level) {
+ getView().setErrorMessage(message, level);
+ }
+
+ @Override
public void showSignInDialog() {
registerProvider.get().hide();
if (session.isLogged()) {
Copied: trunk/src/main/java/cc/kune/core/client/auth/WaveClientSimpleAuthenticator.java (from rev 1279, trunk/src/main/java/cc/kune/wave/client/WaveClientSimpleAuthenticator.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/WaveClientSimpleAuthenticator.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/auth/WaveClientSimpleAuthenticator.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,80 @@
+package cc.kune.core.client.auth;
+
+import cc.kune.common.client.log.Log;
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.gspace.client.WsArmor;
+
+import com.google.gwt.http.client.Request;
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.RequestCallback;
+import com.google.gwt.http.client.RequestException;
+import com.google.gwt.http.client.Response;
+import com.google.gwt.http.client.URL;
+import com.google.gwt.user.client.Cookies;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.inject.Inject;
+
+public class WaveClientSimpleAuthenticator {
+
+ private final WsArmor wsArmor;
+
+ @Inject
+ public WaveClientSimpleAuthenticator(final WsArmor wsArmor) {
+ this.wsArmor = wsArmor;
+ }
+
+ public void doLogin(final String userWithoutDomain, final String passwd, final AsyncCallback<Void> callback) {
+ final RequestBuilder request = new RequestBuilder(RequestBuilder.POST, "/auth/signin");
+ final StringBuffer params = new StringBuffer();
+ params.append("address=");
+ params.append(URL.encodeQueryString(userWithoutDomain));
+ params.append("&password=");
+ params.append(URL.encodeQueryString(passwd));
+ params.append("&signIn=");
+ params.append(URL.encodeQueryString("Sign in"));
+ try {
+ request.setHeader("Content-Type", "application/x-www-form-urlencoded");
+ request.sendRequest(params.toString(), new RequestCallback() {
+ @Override
+ public void onError(final Request request, final Throwable exception) {
+ NotifyUser.error(exception.getStackTrace().toString(), true);
+ callback.onFailure(exception);
+ }
+
+ @Override
+ public void onResponseReceived(final Request request, final Response response) {
+ callback.onSuccess(null);
+ }
+ });
+ } catch (final RequestException e) {
+ Log.error(e.getStackTrace().toString());
+ }
+ }
+
+ public void doLogout(final AsyncCallback<Void> callback) {
+ // Original: <a href=\"/auth/signout?r=/\">"
+ final RequestBuilder request = new RequestBuilder(RequestBuilder.POST, "/auth/signout");
+ try {
+ request.setHeader("Content-Type", "application/x-www-form-urlencoded");
+ final StringBuffer params = new StringBuffer();
+ request.sendRequest(params.toString(), new RequestCallback() {
+ @Override
+ public void onError(final Request request, final Throwable exception) {
+ NotifyUser.error(exception.getStackTrace().toString(), true);
+ callback.onFailure(exception);
+ }
+
+ @Override
+ public void onResponseReceived(final Request request, final Response response) {
+ callback.onSuccess(null);
+ }
+ });
+ } catch (final RequestException e) {
+ Log.error(e.getStackTrace().toString());
+ }
+ }
+
+ public String getCookieTokenValue() {
+ return Cookies.getCookie("JSESSIONID");
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/auth/WaveClientSimpleAuthenticator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/src/main/java/cc/kune/core/client/registry (from rev 1279, trunk/src/main/java/org/ourproject/kune/platf/client/registry)
Modified: trunk/src/main/java/cc/kune/core/client/registry/AbstractContentRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/AbstractContentRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/AbstractContentRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
import java.util.ArrayList;
Modified: trunk/src/main/java/cc/kune/core/client/registry/AclEditableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/AclEditableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/AclEditableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class AclEditableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/AuthorableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/AuthorableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/AuthorableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class AuthorableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/CanBeHomepageRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/CanBeHomepageRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/CanBeHomepageRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class CanBeHomepageRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/ComentableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/ComentableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/ComentableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class ComentableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/ContentCapabilitiesRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/ContentCapabilitiesRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/ContentCapabilitiesRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,9 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
-import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry;
public class ContentCapabilitiesRegistry {
@@ -30,20 +29,21 @@
private final DragableRegistry dragable;
private final DropableRegistry dropable;
private final EmailSubscribeAbleRegistry emailSubscribeAble;
+ private final ContentIconsRegistry iconsRegistry;
private final LicensableRegistry licensable;
private final PublishModerableRegistry publishModerable;
private final RateableRegistry rateable;
+ private final RenamableRegistry renamable;
private final TageableRegistry tageable;
- private final RenamableRegistry renamable;
private final TranslatableRegistry translatable;
private final VersionableRegistry versionable;
private final XmppComentableRegistry xmppComentable;
private final XmppNotifyCapableRegistry xmppNotifyCapable;
- private final ContentIconsRegistry iconsRegistry;
- public ContentCapabilitiesRegistry(AuthorableRegistry authorableRegistry, AclEditableRegistry aclEditableRegistry,
- ContentIconsRegistry iconsRegistry, final CanBeHomepageRegistry canBeHomepage,
- final ComentableRegistry comentable, final DragableRegistry dragable, final DropableRegistry dropable,
+ public ContentCapabilitiesRegistry(final AuthorableRegistry authorableRegistry,
+ final AclEditableRegistry aclEditableRegistry, final ContentIconsRegistry iconsRegistry,
+ final CanBeHomepageRegistry canBeHomepage, final ComentableRegistry comentable,
+ final DragableRegistry dragable, final DropableRegistry dropable,
final EmailSubscribeAbleRegistry emailSubscribeAble, final LicensableRegistry licensable,
final PublishModerableRegistry publishModerable, final RateableRegistry rateable,
final TageableRegistry tageable, final RenamableRegistry renamable,
@@ -68,7 +68,7 @@
this.xmppNotifyCapable = xmppNotifyCapable;
}
- public boolean canBeHomepage(String typeId) {
+ public boolean canBeHomepage(final String typeId) {
return canBeHomepage.contains(typeId);
}
@@ -140,63 +140,63 @@
return xmppNotifyCapable;
}
- public boolean isAclEditable(String typeId) {
+ public boolean isAclEditable(final String typeId) {
return aclEditable.contains(typeId);
}
- public boolean isAuthorable(String typeId) {
+ public boolean isAuthorable(final String typeId) {
return authorable.contains(typeId);
}
- public boolean isComentable(String typeId) {
+ public boolean isComentable(final String typeId) {
return comentable.contains(typeId);
}
- public boolean isDragable(String typeId) {
+ public boolean isDragable(final String typeId) {
return dragable.contains(typeId);
}
- public boolean isDropable(String typeId) {
+ public boolean isDropable(final String typeId) {
return dropable.contains(typeId);
}
- public boolean isEmailSubscribeAble(String typeId) {
+ public boolean isEmailSubscribeAble(final String typeId) {
return emailSubscribeAble.contains(typeId);
}
- public boolean isLicensable(String typeId) {
+ public boolean isLicensable(final String typeId) {
return licensable.contains(typeId);
}
- public boolean isPublishModerable(String typeId) {
+ public boolean isPublishModerable(final String typeId) {
return publishModerable.contains(typeId);
}
- public boolean isRateable(String typeId) {
+ public boolean isRateable(final String typeId) {
return rateable.contains(typeId);
}
- public boolean isRenamable(String typeId) {
+ public boolean isRenamable(final String typeId) {
return renamable.contains(typeId);
}
- public boolean isTageable(String typeId) {
+ public boolean isTageable(final String typeId) {
return tageable.contains(typeId);
}
- public boolean isTranslatable(String typeId) {
+ public boolean isTranslatable(final String typeId) {
return translatable.contains(typeId);
}
- public boolean isVersionable(String typeId) {
+ public boolean isVersionable(final String typeId) {
return versionable.contains(typeId);
}
- public boolean isXmppComentable(String typeId) {
+ public boolean isXmppComentable(final String typeId) {
return xmppComentable.contains(typeId);
}
- public boolean isXmppNotifyCapable(String typeId) {
+ public boolean isXmppNotifyCapable(final String typeId) {
return xmppNotifyCapable.contains(typeId);
}
Copied: trunk/src/main/java/cc/kune/core/client/registry/ContentIconsRegistry.java (from rev 1279, trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ContentIconsRegistry.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/registry/ContentIconsRegistry.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/registry/ContentIconsRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,78 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * 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 cc.kune.core.client.registry;
+
+import java.util.HashMap;
+
+import cc.kune.core.shared.dto.BasicMimeTypeDTO;
+
+public class ContentIconsRegistry {
+ private final HashMap<String, String> contentTypesIcons;
+
+ public ContentIconsRegistry() {
+ contentTypesIcons = new HashMap<String, String>();
+ }
+
+ public String getContentTypeIcon(final String typeId) {
+ final String icon = contentTypesIcons.get(typeId);
+ return icon == null ? "" : icon;
+ }
+
+ /**
+ * If there is a specific icon for a type/subtype pair or a generic type
+ * icon in defect
+ *
+ * @param typeId
+ * the kune typeId (see *ClientTool)
+ * @param mimeType
+ * @return
+ */
+ public String getContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType) {
+ String icon = getContentTypeIcon(concatenate(typeId, mimeType));
+ if (icon.equals("")) {
+ if (mimeType == null) {
+ return getContentTypeIcon(typeId);
+ }
+ } else {
+ return icon;
+ }
+ final String subtype = mimeType.getSubtype();
+ if (subtype != null && subtype.length() > 0) {
+ icon = getContentTypeIcon(typeId, new BasicMimeTypeDTO(mimeType.getType()));
+ }
+ return icon.equals("") ? getContentTypeIcon(typeId) : icon;
+ }
+
+ public void registerContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType, final String iconUrl) {
+ registerContentTypeIcon(concatenate(typeId, mimeType), iconUrl);
+ }
+
+ public void registerContentTypeIcon(final String contentTypeId, final String iconUrl) {
+ contentTypesIcons.put(contentTypeId, iconUrl);
+ }
+
+ private String concatenate(final String typeId, final BasicMimeTypeDTO mimeType) {
+ if (mimeType != null) {
+ return typeId + "|" + mimeType;
+ } else {
+ return typeId;
+ }
+ }
+}
Modified: trunk/src/main/java/cc/kune/core/client/registry/DragableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/DragableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/DragableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class DragableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/DropableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/DropableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/DropableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class DropableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/EmailSubscribeAbleRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/EmailSubscribeAbleRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/EmailSubscribeAbleRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class EmailSubscribeAbleRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/LicensableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/LicensableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/LicensableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class LicensableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/PublishModerableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/PublishModerableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/PublishModerableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class PublishModerableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/RateableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/RateableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/RateableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class RateableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/RenamableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/RenamableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/RenamableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class RenamableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/TageableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/TageableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/TageableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class TageableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/TranslatableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/TranslatableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/TranslatableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class TranslatableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/VersionableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/VersionableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/VersionableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class VersionableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/XmppComentableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/XmppComentableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/XmppComentableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class XmppComentableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/XmppNotifyCapableRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/registry/XmppNotifyCapableRegistry.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/main/java/cc/kune/core/client/registry/XmppNotifyCapableRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.platf.client.registry;
+package cc.kune.core.client.registry;
public class XmppNotifyCapableRegistry extends AbstractContentRegistry {
}
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -25,6 +25,7 @@
import cc.kune.common.client.actions.BeforeActionCollection;
import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
import cc.kune.common.client.errors.UIException;
+import cc.kune.core.client.auth.WaveClientSimpleAuthenticator;
import cc.kune.core.client.cookies.CookiesManager;
import cc.kune.core.client.errors.ErrorHandler;
import cc.kune.core.client.errors.SessionExpiredEvent;
@@ -40,7 +41,6 @@
import cc.kune.core.client.state.UserSignOutEvent;
import cc.kune.core.client.state.UserSignOutEvent.UserSignOutHandler;
import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.wave.client.WaveClientSimpleAuthenticator;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.rpc.AsyncCallback;
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPresenter.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPresenter.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -85,27 +85,31 @@
@ProxyEvent
public void onUserSignOut(UserSignOutEvent event) {
- if (currentSpace == Space.groupSpace)
- onGroupSpaceSelect();
+ if (currentSpace == Space.userSpace)
+ nextUserSpace = false;
+ onHomeSpaceSelect();
}
@ProxyEvent
public void onSpaceSelect(SpaceSelectEvent event) {
- switch (event.getSpace()) {
- case homeSpace:
- onHomeSpaceSelect();
- break;
- case userSpace:
- onUserSpaceSelect();
- break;
- case groupSpace:
- onGroupSpaceSelect();
- break;
- case publicSpace:
- onPublicSpaceSelect();
- break;
- default:
- break;
+ Space space = event.getSpace();
+ if (space != currentSpace) {
+ switch (space) {
+ case homeSpace:
+ onHomeSpaceSelect();
+ break;
+ case userSpace:
+ onUserSpaceSelect();
+ break;
+ case groupSpace:
+ onGroupSpaceSelect();
+ break;
+ case publicSpace:
+ onPublicSpaceSelect();
+ break;
+ default:
+ break;
+ }
}
}
Modified: trunk/src/main/java/cc/kune/core/client/state/StateManager.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManager.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManager.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -57,11 +57,11 @@
@Deprecated
void onStateChanged(Listener<StateAbstractDTO> listener);
+ void onToolChanged(boolean fireNow, ToolChangedEvent.ToolChangedHandler handler);
+
@Deprecated
void onToolChanged(Listener2<String, String> listener);
- void onToolChanged(ToolChangedEvent.ToolChangedHandler handler);
-
void reload();
void removeBeforeStateChangeListener(BeforeActionListener listener);
Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -102,19 +102,17 @@
}
private void checkGroupAndToolChange(final StateAbstractDTO newState) {
+ final String newGroup = newState.getStateToken().getGroup();
final String previousGroup = getPreviousGroup();
- final String newGroup = newState.getStateToken().getGroup();
- final String previousTokenTool = previousToken == null ? "" : previousToken.getTool();
+ if (previousToken == null || !previousGroup.equals(newGroup)) {
+ GroupChangedEvent.fire(eventBus, previousGroup, newGroup);
+ }
+ final String previousToolName = getPreviousTool();
final String newTokenTool = newState.getStateToken().getTool();
- final String previousToolName = previousTokenTool == null ? "" : previousTokenTool;
final String newToolName = newTokenTool == null ? "" : newTokenTool;
-
if (previousToken == null || previousToolName == null || !previousToolName.equals(newToolName)) {
ToolChangedEvent.fire(eventBus, previousToolName, newToolName);
}
- if (previousToken == null || !previousGroup.equals(newGroup)) {
- GroupChangedEvent.fire(eventBus, previousGroup, newGroup);
- }
}
private void clearResumedToken() {
@@ -126,6 +124,11 @@
return previousGroup;
}
+ private String getPreviousTool() {
+ final String previousTool = previousToken == null ? "" : previousToken.getTool();
+ return previousTool;
+ }
+
@Override
public void gotoToken(final StateToken newToken) {
Log.debug("StateManager: history goto-token newItem (" + newToken + ")");
@@ -227,13 +230,17 @@
}
@Override
- public void onToolChanged(final Listener2<String, String> listener) {
- throw new NotImplementedException();
+ public void onToolChanged(final boolean fireNow, final ToolChangedHandler handler) {
+ eventBus.addHandler(ToolChangedEvent.getType(), handler);
+ final StateAbstractDTO currentState = session.getCurrentState();
+ if (fireNow && currentState != null) {
+ handler.onToolChanged(new ToolChangedEvent(getPreviousTool(), currentState.getStateToken().getTool()));
+ }
}
@Override
- public void onToolChanged(final ToolChangedHandler handler) {
- eventBus.addHandler(ToolChangedEvent.getType(), handler);
+ public void onToolChanged(final Listener2<String, String> listener) {
+ throw new NotImplementedException();
}
@Override
Added: trunk/src/main/java/cc/kune/core/client/tool/AbstractClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tool/AbstractClientTool.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tool/AbstractClientTool.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,31 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * 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 cc.kune.core.client.tool;
+
+public abstract class AbstractClientTool {
+
+ public AbstractClientTool(final String shortName, final String longName, final ToolSelector toolSelector) {
+ final ToolSelectorItemPresenter presenter = new ToolSelectorItemPresenter(shortName, longName, toolSelector);
+ final ToolSelectorItemPanel panel = new ToolSelectorItemPanel();
+ presenter.init(panel);
+ }
+
+ public abstract String getName();
+}
Added: trunk/src/main/java/cc/kune/core/client/tool/FoldableAbstractClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tool/FoldableAbstractClientTool.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tool/FoldableAbstractClientTool.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,122 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * 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 cc.kune.core.client.tool;
+
+
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.shared.dto.BasicMimeTypeDTO;
+
+public abstract class FoldableAbstractClientTool extends AbstractClientTool {
+ public static final String UPLOADEDFILE_SUFFIX = "uploaded";
+ public static final String WAVE_SUFFIX = "wave";
+
+ protected final ContentCapabilitiesRegistry contentCapabilitiesRegistry;
+
+ public FoldableAbstractClientTool(final String shortName, final String longName, final ToolSelector toolSelector,
+ final ContentCapabilitiesRegistry contentCapabilitiesRegistry) {
+ super(shortName, longName, toolSelector);
+ this.contentCapabilitiesRegistry = contentCapabilitiesRegistry;
+ }
+
+ protected void registerAclEditableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getAclEditable().register(typeIds);
+ }
+
+ protected void registerAuthorableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getAuthorable().register(typeIds);
+ }
+
+ protected void registerComentableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getComentable().register(typeIds);
+ }
+
+ public void registerContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType, final String iconUrl) {
+ contentCapabilitiesRegistry.getIconsRegistry().registerContentTypeIcon(typeId, mimeType, iconUrl);
+ }
+
+ public void registerContentTypeIcon(final String contentTypeId, final String iconUrl) {
+ contentCapabilitiesRegistry.getIconsRegistry().registerContentTypeIcon(contentTypeId, iconUrl);
+ }
+
+ protected void registerDragableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getDragable().register(typeIds);
+ }
+
+ protected void registerDropableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getDropable().register(typeIds);
+ }
+
+ protected void registerEmailSubscribeAbleTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getEmailSubscribeAble().register(typeIds);
+ }
+
+ protected void registerLicensableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getLicensable().register(typeIds);
+ }
+
+ protected void registerPublishModerableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getPublishModerable().register(typeIds);
+ }
+
+ protected void registerRateableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getRateable().register(typeIds);
+ }
+
+ protected void registerRenamableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getRenamable().register(typeIds);
+ }
+
+ protected void registerTageableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getTageable().register(typeIds);
+ }
+
+ protected void registerTranslatableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getTranslatable().register(typeIds);
+ }
+
+ protected void registerUploadTypesAndMimes(final String typeUploadedfile) {
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("image"), "images/nav/picture.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("video"), "images/nav/film.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("audio"), "images/nav/music.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "pdf"), "images/nav/page_pdf.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "zip"), "images/nav/page_zip.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "zip"), "images/nav/page_zip.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("text"), "images/nav/page_text.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "msword"),
+ "images/nav/page_word.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "excel"),
+ "images/nav/page_excel.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "mspowerpoint"),
+ "images/nav/page_pps.png");
+ registerContentTypeIcon(typeUploadedfile, "images/nav/page.png");
+ }
+
+ protected void registerVersionableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getVersionable().register(typeIds);
+ }
+
+ protected void registerXmppComentableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getXmppComentable().register(typeIds);
+ }
+
+ protected void registerXmppNotifyCapableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getXmppNotificyCapable().register(typeIds);
+ }
+}
Added: trunk/src/main/java/cc/kune/core/client/tool/ToolResources.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tool/ToolResources.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tool/ToolResources.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,20 @@
+package cc.kune.core.client.tool;
+
+import com.google.gwt.resources.client.ClientBundle;
+import com.google.gwt.resources.client.ImageResource;
+
+public interface ToolResources extends ClientBundle {
+
+ @Source("tool-arrowdown-def.png")
+ ImageResource arrowDownDef();
+
+ @Source("tool-arrowleft-def.png")
+ ImageResource arrowLeftDef();
+
+ @Source("tool-arrowright-def.png")
+ ImageResource arrowRightDef();
+
+ @Source("tool-arrowup-def.png")
+ ImageResource arrowUpDef();
+
+}
Copied: trunk/src/main/java/cc/kune/core/client/tool/ToolSelector.java (from rev 1279, trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelector.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tool/ToolSelector.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tool/ToolSelector.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,26 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * 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 cc.kune.core.client.tool;
+
+public interface ToolSelector {
+
+ void addTool(ToolSelectorItem item);
+
+}
Copied: trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItem.java (from rev 1279, trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItem.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItem.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * 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 cc.kune.core.client.tool;
+
+import cc.kune.core.client.tool.ToolSelectorItemPresenter.ToolSelectorItemView;
+
+public interface ToolSelectorItem {
+
+ String getShortName();
+
+ ToolSelectorItemView getView();
+
+ void setGroupShortName(String groupShortName);
+
+ void setSelected(boolean selected);
+
+ void setVisible(boolean visible);
+
+}
Added: trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItemPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItemPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItemPanel.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,101 @@
+package cc.kune.core.client.tool;
+
+import cc.kune.core.client.tool.ToolSelectorItemPresenter.ToolSelectorItemView;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.HasClickHandlers;
+import com.google.gwt.event.dom.client.MouseOutEvent;
+import com.google.gwt.event.dom.client.MouseOverEvent;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.FocusPanel;
+import com.google.gwt.user.client.ui.HasText;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.InlineLabel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class ToolSelectorItemPanel extends Composite implements ToolSelectorItemView {
+
+ interface ToolSelectorItemPanelUiBinder extends UiBinder<Widget, ToolSelectorItemPanel> {
+ }
+
+ private static ToolSelectorItemPanelUiBinder uiBinder = GWT.create(ToolSelectorItemPanelUiBinder.class);
+
+ @UiField
+ Image iconLeft;
+ @UiField
+ Image iconRight;
+ @UiField
+ InlineLabel label;
+ @UiField
+ FocusPanel self;
+
+ public ToolSelectorItemPanel() {
+ initWidget(uiBinder.createAndBindUi(this));
+ }
+
+ @Override
+ public Widget asWidget() {
+ return this;
+ }
+
+ private void focus() {
+ self.addStyleDependentName("focus");
+ self.removeStyleDependentName("nofocus");
+ }
+
+ @Override
+ public HasClickHandlers getFocus() {
+ return self;
+ }
+
+ @Override
+ public HasText getLabel() {
+ return label;
+ }
+
+ @UiHandler("self")
+ void onSelfMouseOut(final MouseOutEvent event) {
+ unfocus();
+ }
+
+ // public void setTheme(final WsTheme oldTheme, final WsTheme newTheme) {
+ // if (oldTheme != null) {
+ // final String oldName = oldTheme.getName();
+ // hl.removeStyleDependentName(oldName);
+ // }
+ // final String newName = newTheme.getName();
+ // hl.addStyleDependentName(newName);
+ // super.setCornerStyleName(hl.getStyleName());
+ // }
+
+ @UiHandler("self")
+ void onSelfMouseOver(final MouseOverEvent event) {
+ focus();
+ }
+
+ @Override
+ public void setSelected(final boolean selected) {
+ if (selected) {
+ self.addStyleDependentName("selected");
+ self.removeStyleDependentName("notselected");
+ iconRight.setVisible(true);
+ } else {
+ self.addStyleDependentName("notselected");
+ self.removeStyleDependentName("selected");
+ iconRight.setVisible(false);
+ }
+ }
+
+ @Override
+ public void setVisible(final boolean visible) {
+ self.setVisible(visible);
+ }
+
+ private void unfocus() {
+ self.addStyleDependentName("nofocus");
+ self.removeStyleDependentName("focus");
+ }
+}
Added: trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItemPanel.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItemPanel.ui.xml (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItemPanel.ui.xml 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,45 @@
+<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
+<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
+ xmlns:g="urn:import:com.google.gwt.user.client.ui">
+ <ui:style>
+ .label {
+ text-decoration: none;
+ font-size: 22px;
+ color: white;
+ text-shadow: 1px 1px 6px grey;
+ }
+
+ .link a:link {
+ text-decoration: none;
+ }
+
+ .self {
+ }
+
+ .flow {
+ min-height: 30px;
+ padding: 5px 10px;
+
+ }
+
+ .iconLeft {
+
+ }
+
+ .iconRight {
+ float: right;
+ position: relative;
+ right: -19px;
+ top: -6px;
+ }
+ </ui:style>
+ <ui:with field='res' type='cc.kune.core.client.tool.ToolResources' />
+ <g:FocusPanel ui:field="self" stylePrimaryName="k-tool-item">
+ <g:FlowPanel styleName="{style.flow}" ui:field="flow">
+ <g:Image ui:field="iconLeft" styleName="{style.iconLeft}" />
+ <g:Image ui:field="iconRight" styleName="{style.iconRight}"
+ resource='{res.arrowRightDef}' />
+ <g:InlineLabel ui:field="label" styleName="{style.label}" />
+ </g:FlowPanel>
+ </g:FocusPanel>
+</ui:UiBinder>
\ No newline at end of file
Copied: trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItemPresenter.java (from rev 1279, trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemPresenter.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItemPresenter.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorItemPresenter.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,104 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * 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 cc.kune.core.client.tool;
+
+import cc.kune.core.shared.domain.utils.StateToken;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.HasClickHandlers;
+import com.google.gwt.user.client.History;
+import com.google.gwt.user.client.ui.HasText;
+import com.google.gwt.user.client.ui.IsWidget;
+
+public class ToolSelectorItemPresenter implements ToolSelectorItem {
+ public interface ToolSelectorItemView extends IsWidget {
+
+ HasClickHandlers getFocus();
+
+ HasText getLabel();
+
+ // void setTheme(WsTheme oldTheme, WsTheme newTheme);
+
+ void setSelected(boolean selected);
+
+ void setVisible(boolean visible);
+ }
+
+ private final String longName;
+ // private final WsThemeManager wsThemePresenter;
+ private final String shortName;
+ private StateToken token;
+ private final ToolSelector toolSelector;
+ private ToolSelectorItemView view;
+
+ public ToolSelectorItemPresenter(final String shortName, final String longName, final ToolSelector toolSelector) {
+ this.shortName = shortName;
+ this.longName = longName;
+ this.toolSelector = toolSelector;
+ // this.wsThemePresenter = wsThemePresenter;
+ }
+
+ @Override
+ public String getShortName() {
+ return shortName;
+ }
+
+ public ToolSelectorItemView getView() {
+ return view;
+ }
+
+ public void init(final ToolSelectorItemView view) {
+ this.view = view;
+ toolSelector.addTool(this);
+ view.getFocus().addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ History.newItem(token.toString());
+ }
+ });
+ view.getLabel().setText(longName);
+ // wsThemePresenter.addOnThemeChanged(new Listener2<WsTheme, WsTheme>()
+ // {
+ // public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
+ // setTheme(oldTheme, newTheme);
+ // }
+ // });
+ }
+
+ @Override
+ public void setGroupShortName(final String groupShortName) {
+ token = new StateToken(groupShortName, getShortName(), null, null);
+ }
+
+ @Override
+ public void setSelected(final boolean selected) {
+ view.setSelected(selected);
+ }
+
+ // private void setTheme(final WsTheme oldTheme, final WsTheme newTheme) {
+ // view.setTheme(oldTheme, newTheme);
+ // }
+
+ @Override
+ public void setVisible(final boolean visible) {
+ view.setVisible(visible);
+ }
+}
Added: trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorPanel.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,37 @@
+package cc.kune.core.client.tool;
+
+import cc.kune.core.client.tool.ToolSelectorItemPresenter.ToolSelectorItemView;
+import cc.kune.core.client.tool.ToolSelectorPresenter.ToolSelectorView;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.gwtplatform.mvp.client.ViewImpl;
+
+public class ToolSelectorPanel extends ViewImpl implements ToolSelectorView {
+
+ interface ToolSelectorPanelUiBinder extends UiBinder<Widget, ToolSelectorPanel> {
+ }
+
+ private static ToolSelectorPanelUiBinder uiBinder = GWT.create(ToolSelectorPanelUiBinder.class);
+
+ @UiField
+ FlowPanel flow;
+
+ public ToolSelectorPanel() {
+ uiBinder.createAndBindUi(this);
+ }
+
+ @Override
+ public void addItem(final ToolSelectorItemView item) {
+ flow.add(item.asWidget());
+ }
+
+ @Override
+ public Widget asWidget() {
+ return flow;
+ }
+
+}
Added: trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorPanel.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorPanel.ui.xml (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorPanel.ui.xml 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,5 @@
+<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
+<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
+ xmlns:g="urn:import:com.google.gwt.user.client.ui">
+ <g:FlowPanel styleName="k-tool-panel" ui:field="flow" />
+</ui:UiBinder>
\ No newline at end of file
Copied: trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorPresenter.java (from rev 1279, trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenter.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorPresenter.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tool/ToolSelectorPresenter.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,124 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * 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 cc.kune.core.client.tool;
+
+import java.util.HashMap;
+import java.util.List;
+
+import cc.kune.common.client.errors.UIException;
+import cc.kune.common.client.log.Log;
+import cc.kune.core.client.state.GroupChangedEvent;
+import cc.kune.core.client.state.GroupChangedEvent.GroupChangedHandler;
+import cc.kune.core.client.state.StateChangedEvent;
+import cc.kune.core.client.state.StateChangedEvent.StateChangedHandler;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.state.ToolChangedEvent;
+import cc.kune.core.client.state.ToolChangedEvent.ToolChangedHandler;
+import cc.kune.core.client.tool.ToolSelectorItemPresenter.ToolSelectorItemView;
+
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.Presenter;
+import com.gwtplatform.mvp.client.View;
+import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
+import com.gwtplatform.mvp.client.proxy.Proxy;
+import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent;
+
+public class ToolSelectorPresenter extends
+ Presenter<ToolSelectorPresenter.ToolSelectorView, ToolSelectorPresenter.ToolSelectorProxy> implements
+ ToolSelector {
+
+ @ProxyCodeSplit
+ public interface ToolSelectorProxy extends Proxy<ToolSelectorPresenter> {
+ }
+
+ public interface ToolSelectorView extends View {
+ void addItem(ToolSelectorItemView item);
+ }
+
+ private final HashMap<String, ToolSelectorItem> tools;
+
+ @Inject
+ public ToolSelectorPresenter(final EventBus eventBus, final ToolSelectorView view, final ToolSelectorProxy proxy,
+ final StateManager stateManager) {
+ super(eventBus, view, proxy);
+ tools = new HashMap<String, ToolSelectorItem>();
+ stateManager.onStateChanged(true, new StateChangedHandler() {
+ @Override
+ public void onStateChanged(final StateChangedEvent event) {
+ for (final String tool : tools.keySet()) {
+ final List<String> enabledTools = event.getState().getEnabledTools();
+ if (enabledTools != null && enabledTools.contains(tool)) {
+ tools.get(tool).setVisible(true);
+ } else {
+ tools.get(tool).setVisible(false);
+ }
+ }
+ }
+ });
+ stateManager.onGroupChanged(true, new GroupChangedHandler() {
+ @Override
+ public void onGroupChanged(final GroupChangedEvent event) {
+ ToolSelectorPresenter.this.onGroupChanged(event.getNewGroup());
+ }
+ });
+ stateManager.onToolChanged(true, new ToolChangedHandler() {
+ @Override
+ public void onToolChanged(final ToolChangedEvent event) {
+ ToolSelectorPresenter.this.onToolChanged(event.getPreviousTool(), event.getNewTool());
+ }
+ });
+ }
+
+ @Override
+ public void addTool(final ToolSelectorItem item) {
+ final String name = item.getShortName();
+ if (name == null) {
+ throw new UIException("You cannot add a tool without a name");
+ }
+ if (tools.get(name) != null) {
+ throw new UIException("A tool with the same name already added");
+ }
+ tools.put(name, item);
+ item.setSelected(false);
+ getView().addItem(item.getView());
+ }
+
+ void onGroupChanged(final String newGroupName) {
+ for (final String name : tools.keySet()) {
+ tools.get(name).setGroupShortName(newGroupName);
+ }
+ }
+
+ void onToolChanged(final String oldTool, final String newTool) {
+ Log.debug("Registered tools: " + tools.keySet().toString());
+ if (!oldTool.equals("")) {
+ tools.get(oldTool).setSelected(false);
+ }
+ if (!newTool.equals("")) {
+ tools.get(newTool).setSelected(true);
+ }
+ }
+
+ @Override
+ protected void revealInParent() {
+ RevealRootContentEvent.fire(this, this);
+ }
+}
Added: trunk/src/main/java/cc/kune/core/client/tool/tool-arrowdown-def.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/tool/tool-arrowdown-def.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/core/client/tool/tool-arrowleft-def.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/tool/tool-arrowleft-def.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/core/client/tool/tool-arrowright-def.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/tool/tool-arrowright-def.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/core/client/tool/tool-arrowup-def.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/tool/tool-arrowup-def.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/cc/kune/core/public/ws.css 2011-03-24 23:10:11 UTC (rev 1291)
@@ -1062,4 +1062,28 @@
.k-tsp-cloud {
line-height: 1.5em;
text-align: center;
+}
+
+.k-tool-panel {
+ background-color: #DEAA87;
+}
+
+.k-tool-item {
+ display: block;
+ cursor: pointer;
+}
+
+.k-tool-item-focus {
+ background-color: #d38d5f;
+}
+
+.k-tool-item-nofocus {
+}
+
+.k-tool-item-selected {
+ background-color: #C87137;
+}
+
+.k-tool-item-notselected {
+ background-color: inherits;
}
\ No newline at end of file
Deleted: trunk/src/main/java/cc/kune/wave/client/WaveClientSimpleAuthenticator.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/WaveClientSimpleAuthenticator.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/cc/kune/wave/client/WaveClientSimpleAuthenticator.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -1,80 +0,0 @@
-package cc.kune.wave.client;
-
-import cc.kune.common.client.log.Log;
-import cc.kune.common.client.noti.NotifyUser;
-import cc.kune.gspace.client.WsArmor;
-
-import com.google.gwt.http.client.Request;
-import com.google.gwt.http.client.RequestBuilder;
-import com.google.gwt.http.client.RequestCallback;
-import com.google.gwt.http.client.RequestException;
-import com.google.gwt.http.client.Response;
-import com.google.gwt.http.client.URL;
-import com.google.gwt.user.client.Cookies;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.inject.Inject;
-
-public class WaveClientSimpleAuthenticator {
-
- private final WsArmor wsArmor;
-
- @Inject
- public WaveClientSimpleAuthenticator(final WsArmor wsArmor) {
- this.wsArmor = wsArmor;
- }
-
- public void doLogin(final String userWithoutDomain, final String passwd, final AsyncCallback<Void> callback) {
- final RequestBuilder request = new RequestBuilder(RequestBuilder.POST, "/auth/signin");
- final StringBuffer params = new StringBuffer();
- params.append("address=");
- params.append(URL.encodeQueryString(userWithoutDomain));
- params.append("&password=");
- params.append(URL.encodeQueryString(passwd));
- params.append("&signIn=");
- params.append(URL.encodeQueryString("Sign in"));
- try {
- request.setHeader("Content-Type", "application/x-www-form-urlencoded");
- request.sendRequest(params.toString(), new RequestCallback() {
- @Override
- public void onError(final Request request, final Throwable exception) {
- NotifyUser.error(exception.getStackTrace().toString(), true);
- callback.onFailure(exception);
- }
-
- @Override
- public void onResponseReceived(final Request request, final Response response) {
- callback.onSuccess(null);
- }
- });
- } catch (final RequestException e) {
- Log.error(e.getStackTrace().toString());
- }
- }
-
- public void doLogout(final AsyncCallback<Void> callback) {
- // Original: <a href=\"/auth/signout?r=/\">"
- final RequestBuilder request = new RequestBuilder(RequestBuilder.POST, "/auth/signout");
- try {
- request.setHeader("Content-Type", "application/x-www-form-urlencoded");
- final StringBuffer params = new StringBuffer();
- request.sendRequest(params.toString(), new RequestCallback() {
- @Override
- public void onError(final Request request, final Throwable exception) {
- NotifyUser.error(exception.getStackTrace().toString(), true);
- callback.onFailure(exception);
- }
-
- @Override
- public void onResponseReceived(final Request request, final Response response) {
- callback.onSuccess(null);
- }
- });
- } catch (final RequestException e) {
- Log.error(e.getStackTrace().toString());
- }
- }
-
- public String getCookieTokenValue() {
- return Cookies.getCookie("JSESSIONID");
- }
-}
Modified: trunk/src/main/java/cc/kune/wave/client/WebClient.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/WebClient.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/cc/kune/wave/client/WebClient.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -272,6 +272,7 @@
this.wave = wave;
wave.load(null);
String encodedToken = History.getToken();
+ NotifyUser.info("Open Wave: " + encodedToken + " waveRef: " + waveRef.getWaveId(), true);
if (encodedToken != null && !encodedToken.isEmpty()) {
WaveRef fromWaveRef = HistorySupport.waveRefFromHistoryToken(encodedToken);
if (waveRef == null) {
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -30,7 +30,6 @@
import org.ourproject.kune.blogs.client.ctx.BlogContext;
import org.ourproject.kune.blogs.client.ctx.BlogContextPresenter;
import org.ourproject.kune.platf.client.app.ToolGroup;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
@@ -44,17 +43,18 @@
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import org.ourproject.kune.workspace.client.themes.WsBackManager;
import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
import org.ourproject.kune.workspace.client.upload.FileUploader;
import cc.kune.common.client.utils.SchedulerManager;
import cc.kune.core.client.errors.ErrorHandler;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.tool.ToolSelector;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.calclab.suco.client.ioc.decorator.Singleton;
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -19,20 +19,20 @@
*/
package org.ourproject.kune.blogs.client;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.tool.FoldableAbstractClientTool;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
+import org.ourproject.kune.workspace.client.tool.OldFoldableAbstractClientTool;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.tool.ToolSelector;
-public class BlogClientTool extends FoldableAbstractClientTool {
+public class BlogClientTool extends OldFoldableAbstractClientTool {
public static final String NAME = "blogs";
public static final String TYPE_ROOT = NAME + "." + "root";
public static final String TYPE_BLOG = NAME + "." + "blog";
public static final String TYPE_POST = NAME + "." + "post";
- public static final String TYPE_UPLOADEDFILE = NAME + "." + FoldableAbstractClientTool.UPLOADEDFILE_SUFFIX;
+ public static final String TYPE_UPLOADEDFILE = NAME + "." + OldFoldableAbstractClientTool.UPLOADEDFILE_SUFFIX;
public BlogClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws,
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -19,15 +19,15 @@
*/
package org.ourproject.kune.chat.client;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.tool.FoldableAbstractClientTool;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
+import org.ourproject.kune.workspace.client.tool.OldFoldableAbstractClientTool;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.tool.ToolSelector;
import cc.kune.core.shared.i18n.I18nTranslationService;
-public class ChatClientTool extends FoldableAbstractClientTool {
+public class ChatClientTool extends OldFoldableAbstractClientTool {
public static final String NAME = "chats";
public static final String TYPE_ROOT = "chat.root";
public static final String TYPE_ROOM = "chat.room";
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -30,7 +30,6 @@
import org.ourproject.kune.docs.client.ctx.DocumentContext;
import org.ourproject.kune.docs.client.ctx.DocumentContextPresenter;
import org.ourproject.kune.platf.client.app.ToolGroup;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
@@ -44,17 +43,18 @@
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import org.ourproject.kune.workspace.client.themes.WsBackManager;
import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
import org.ourproject.kune.workspace.client.upload.FileUploader;
import cc.kune.common.client.utils.SchedulerManager;
import cc.kune.core.client.errors.ErrorHandler;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.tool.ToolSelector;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.calclab.suco.client.ioc.decorator.Singleton;
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -19,21 +19,21 @@
*/
package org.ourproject.kune.docs.client;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.tool.FoldableAbstractClientTool;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
+import org.ourproject.kune.workspace.client.tool.OldFoldableAbstractClientTool;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.tool.ToolSelector;
-public class DocumentClientTool extends FoldableAbstractClientTool {
+public class DocumentClientTool extends OldFoldableAbstractClientTool {
public static final String NAME = "docs";
public static final String TYPE_ROOT = NAME + "." + "root";
public static final String TYPE_FOLDER = NAME + "." + "folder";
public static final String TYPE_DOCUMENT = NAME + "." + "doc";
- public static final String TYPE_UPLOADEDFILE = NAME + "." + FoldableAbstractClientTool.UPLOADEDFILE_SUFFIX;
- public static final String TYPE_WAVE = NAME + "." + FoldableAbstractClientTool.WAVE_SUFFIX;
+ public static final String TYPE_UPLOADEDFILE = NAME + "." + OldFoldableAbstractClientTool.UPLOADEDFILE_SUFFIX;
+ public static final String TYPE_WAVE = NAME + "." + OldFoldableAbstractClientTool.WAVE_SUFFIX;
public DocumentClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws,
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -30,7 +30,6 @@
import org.ourproject.kune.gallery.client.ctx.GalleryContext;
import org.ourproject.kune.gallery.client.ctx.GalleryContextPresenter;
import org.ourproject.kune.platf.client.app.ToolGroup;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
@@ -44,17 +43,18 @@
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import org.ourproject.kune.workspace.client.themes.WsBackManager;
import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
import org.ourproject.kune.workspace.client.upload.FileUploader;
import cc.kune.common.client.utils.SchedulerManager;
import cc.kune.core.client.errors.ErrorHandler;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.tool.ToolSelector;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.calclab.suco.client.ioc.decorator.Singleton;
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientTool.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientTool.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -19,19 +19,19 @@
*/
package org.ourproject.kune.gallery.client;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.tool.FoldableAbstractClientTool;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
+import org.ourproject.kune.workspace.client.tool.OldFoldableAbstractClientTool;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.tool.ToolSelector;
-public class GalleryClientTool extends FoldableAbstractClientTool {
+public class GalleryClientTool extends OldFoldableAbstractClientTool {
public static final String NAME = "gallery";
public static final String TYPE_ROOT = NAME + "." + "root";
public static final String TYPE_ALBUM = NAME + "." + "album";
- public static final String TYPE_UPLOADEDFILE = NAME + "." + FoldableAbstractClientTool.UPLOADEDFILE_SUFFIX;
+ public static final String TYPE_UPLOADEDFILE = NAME + "." + OldFoldableAbstractClientTool.UPLOADEDFILE_SUFFIX;
public GalleryClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws,
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -20,7 +20,6 @@
package org.ourproject.kune.wiki.client;
import org.ourproject.kune.platf.client.app.ToolGroup;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.wiki.client.cnt.WikiFolderContent;
@@ -44,17 +43,18 @@
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import org.ourproject.kune.workspace.client.themes.WsBackManager;
import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
import org.ourproject.kune.workspace.client.upload.FileUploader;
import cc.kune.common.client.utils.SchedulerManager;
import cc.kune.core.client.errors.ErrorHandler;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.tool.ToolSelector;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.calclab.suco.client.ioc.decorator.Singleton;
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -19,20 +19,20 @@
*/
package org.ourproject.kune.wiki.client;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.tool.FoldableAbstractClientTool;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
+import org.ourproject.kune.workspace.client.tool.OldFoldableAbstractClientTool;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.tool.ToolSelector;
-public class WikiClientTool extends FoldableAbstractClientTool {
+public class WikiClientTool extends OldFoldableAbstractClientTool {
public static final String NAME = "wiki";
public static final String TYPE_ROOT = NAME + "." + "root";
public static final String TYPE_FOLDER = NAME + "." + "folder";
public static final String TYPE_WIKIPAGE = NAME + "." + "wikipage";
- public static final String TYPE_UPLOADEDFILE = NAME + "." + FoldableAbstractClientTool.UPLOADEDFILE_SUFFIX;
+ public static final String TYPE_UPLOADEDFILE = NAME + "." + OldFoldableAbstractClientTool.UPLOADEDFILE_SUFFIX;
public WikiClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws,
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/RegistryModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/RegistryModule.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/RegistryModule.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -19,30 +19,31 @@
*/
package org.ourproject.kune.workspace.client;
-import org.ourproject.kune.platf.client.registry.AclEditableRegistry;
-import org.ourproject.kune.platf.client.registry.AuthorableRegistry;
-import org.ourproject.kune.platf.client.registry.CanBeHomepageRegistry;
-import org.ourproject.kune.platf.client.registry.ComentableRegistry;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
-import org.ourproject.kune.platf.client.registry.DragableRegistry;
-import org.ourproject.kune.platf.client.registry.DropableRegistry;
-import org.ourproject.kune.platf.client.registry.EmailSubscribeAbleRegistry;
-import org.ourproject.kune.platf.client.registry.LicensableRegistry;
-import org.ourproject.kune.platf.client.registry.PublishModerableRegistry;
-import org.ourproject.kune.platf.client.registry.RateableRegistry;
-import org.ourproject.kune.platf.client.registry.RenamableRegistry;
-import org.ourproject.kune.platf.client.registry.TageableRegistry;
-import org.ourproject.kune.platf.client.registry.TranslatableRegistry;
-import org.ourproject.kune.platf.client.registry.VersionableRegistry;
-import org.ourproject.kune.platf.client.registry.XmppComentableRegistry;
-import org.ourproject.kune.platf.client.registry.XmppNotifyCapableRegistry;
import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
-import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry;
import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
import org.ourproject.kune.workspace.client.oldsn.GroupActionRegistry;
import org.ourproject.kune.workspace.client.oldsn.UserActionRegistry;
+import cc.kune.core.client.registry.AclEditableRegistry;
+import cc.kune.core.client.registry.AuthorableRegistry;
+import cc.kune.core.client.registry.CanBeHomepageRegistry;
+import cc.kune.core.client.registry.ComentableRegistry;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.registry.ContentIconsRegistry;
+import cc.kune.core.client.registry.DragableRegistry;
+import cc.kune.core.client.registry.DropableRegistry;
+import cc.kune.core.client.registry.EmailSubscribeAbleRegistry;
+import cc.kune.core.client.registry.LicensableRegistry;
+import cc.kune.core.client.registry.PublishModerableRegistry;
+import cc.kune.core.client.registry.RateableRegistry;
+import cc.kune.core.client.registry.RenamableRegistry;
+import cc.kune.core.client.registry.TageableRegistry;
+import cc.kune.core.client.registry.TranslatableRegistry;
+import cc.kune.core.client.registry.VersionableRegistry;
+import cc.kune.core.client.registry.XmppComentableRegistry;
+import cc.kune.core.client.registry.XmppNotifyCapableRegistry;
+
import com.calclab.suco.client.ioc.decorator.Singleton;
import com.calclab.suco.client.ioc.module.Factory;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -27,9 +27,6 @@
import org.ourproject.kune.platf.client.app.ApplicationComponentGroup;
import org.ourproject.kune.platf.client.app.GroupOptionsCollection;
import org.ourproject.kune.platf.client.app.UserOptionsCollection;
-import org.ourproject.kune.platf.client.registry.AuthorableRegistry;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
-import org.ourproject.kune.platf.client.registry.RenamableRegistry;
import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
import org.ourproject.kune.platf.client.services.Images;
import org.ourproject.kune.platf.client.shortcuts.GlobalShortcutRegister;
@@ -48,7 +45,6 @@
import org.ourproject.kune.platf.client.ui.rte.inserttable.InsertTableDialog;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbarPresenter;
-import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry;
import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
import org.ourproject.kune.workspace.client.ctxnav.ContextNavigatorPanel;
import org.ourproject.kune.workspace.client.ctxnav.ContextNavigatorPresenter;
@@ -181,8 +177,6 @@
import org.ourproject.kune.workspace.client.title.EntityTitlePanel;
import org.ourproject.kune.workspace.client.title.EntityTitlePresenter;
import org.ourproject.kune.workspace.client.title.RenameAction;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
-import org.ourproject.kune.workspace.client.tool.ToolSelectorPresenter;
import org.ourproject.kune.workspace.client.upload.FileUploader;
import org.ourproject.kune.workspace.client.upload.FileUploaderDialog;
import org.ourproject.kune.workspace.client.upload.FileUploaderPresenter;
@@ -195,6 +189,10 @@
import cc.kune.core.client.errors.ErrorHandler;
import cc.kune.core.client.groups.newgroup.NewGroup;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.registry.AuthorableRegistry;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.registry.ContentIconsRegistry;
+import cc.kune.core.client.registry.RenamableRegistry;
import cc.kune.core.client.resources.icons.IconResources;
import cc.kune.core.client.rpcservices.ContentService;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
@@ -590,17 +588,20 @@
// }
// });
-// register(ApplicationComponentGroup.class, new Factory<TagsSummary>(TagsSummary.class) {
-// @Override
-// public TagsSummary create() {
-// final TagsSummaryPresenter presenter = new TagsSummaryPresenter(i(Session.class),
-// p(SiteSearcher.class), i(StateManager.class));
-// final TagsSummaryPanel panel = new TagsSummaryPanel(presenter, i(I18nUITranslationService.class),
-// i(WorkspaceSkeleton.class));
-// presenter.init(panel);
-// return presenter;
-// }
-// });
+ // register(ApplicationComponentGroup.class, new
+ // Factory<TagsSummary>(TagsSummary.class) {
+ // @Override
+ // public TagsSummary create() {
+ // final TagsSummaryPresenter presenter = new
+ // TagsSummaryPresenter(i(Session.class),
+ // p(SiteSearcher.class), i(StateManager.class));
+ // final TagsSummaryPanel panel = new TagsSummaryPanel(presenter,
+ // i(I18nUITranslationService.class),
+ // i(WorkspaceSkeleton.class));
+ // presenter.init(panel);
+ // return presenter;
+ // }
+ // });
register(ApplicationComponentGroup.class, new Factory<NoHomePage>(NoHomePage.class) {
@Override
@@ -927,14 +928,16 @@
}
});
- register(Singleton.class, new Factory<ToolSelector>(ToolSelector.class) {
- @Override
- public ToolSelector create() {
- final ToolSelectorPresenter presenter = new ToolSelectorPresenter(i(StateManager.class),
- i(WsThemeManager.class));
- return presenter;
- }
- });
+ // register(Singleton.class, new
+ // Factory<ToolSelector>(ToolSelector.class) {
+ // @Override
+ // public ToolSelector create() {
+ // final ToolSelectorPresenter presenter = new
+ // ToolSelectorPresenter(i(StateManager.class),
+ // i(WsThemeManager.class));
+ // return presenter;
+ // }
+ // });
register(Singleton.class, new Factory<LanguageSelector>(LanguageSelector.class) {
@Override
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ContentIconsRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ContentIconsRegistry.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ContentIconsRegistry.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -1,78 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * 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.workspace.client.cnt;
-
-import java.util.HashMap;
-
-import cc.kune.core.shared.dto.BasicMimeTypeDTO;
-
-public class ContentIconsRegistry {
- private final HashMap<String, String> contentTypesIcons;
-
- public ContentIconsRegistry() {
- contentTypesIcons = new HashMap<String, String>();
- }
-
- public String getContentTypeIcon(final String typeId) {
- final String icon = contentTypesIcons.get(typeId);
- return icon == null ? "" : icon;
- }
-
- /**
- * If there is a specific icon for a type/subtype pair or a generic type
- * icon in defect
- *
- * @param typeId
- * the kune typeId (see *ClientTool)
- * @param mimeType
- * @return
- */
- public String getContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType) {
- String icon = getContentTypeIcon(concatenate(typeId, mimeType));
- if (icon.equals("")) {
- if (mimeType == null) {
- return getContentTypeIcon(typeId);
- }
- } else {
- return icon;
- }
- final String subtype = mimeType.getSubtype();
- if (subtype != null && subtype.length() > 0) {
- icon = getContentTypeIcon(typeId, new BasicMimeTypeDTO(mimeType.getType()));
- }
- return icon.equals("") ? getContentTypeIcon(typeId) : icon;
- }
-
- public void registerContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType, final String iconUrl) {
- registerContentTypeIcon(concatenate(typeId, mimeType), iconUrl);
- }
-
- public void registerContentTypeIcon(final String contentTypeId, final String iconUrl) {
- contentTypesIcons.put(contentTypeId, iconUrl);
- }
-
- private String concatenate(final String typeId, final BasicMimeTypeDTO mimeType) {
- if (mimeType != null) {
- return typeId + "|" + mimeType;
- } else {
- return typeId;
- }
- }
-}
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 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -26,14 +26,14 @@
import org.ourproject.kune.platf.client.actions.ActionItemCollection;
import org.ourproject.kune.platf.client.actions.ActionRegistry;
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.ui.KuneUiUtils;
import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
-import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry;
import org.ourproject.kune.workspace.client.cxt.ActionContextBottomToolbar;
import org.ourproject.kune.workspace.client.title.RenameAction;
import org.ourproject.kune.workspace.client.upload.FileUploader;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.registry.ContentIconsRegistry;
import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.services.ImageSize;
import cc.kune.core.client.state.Session;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextPropEditorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextPropEditorPresenter.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextPropEditorPresenter.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -22,10 +22,10 @@
import java.util.Date;
import java.util.List;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
import org.ourproject.kune.workspace.client.title.EntitySubTitle;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.state.Session;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/rate/RateItPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/rate/RateItPresenter.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/rate/RateItPresenter.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -19,9 +19,9 @@
*/
package org.ourproject.kune.workspace.client.rate;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.state.Session;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/rate/RatePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/rate/RatePresenter.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/rate/RatePresenter.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -19,8 +19,8 @@
\*/
package org.ourproject.kune.workspace.client.rate;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.domain.RateResult;
import cc.kune.core.shared.dto.StateAbstractDTO;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntitySubTitlePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntitySubTitlePresenter.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntitySubTitlePresenter.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -22,9 +22,9 @@
import java.util.Date;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.registry.AuthorableRegistry;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.registry.AuthorableRegistry;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.dto.StateAbstractDTO;
import cc.kune.core.shared.dto.StateContainerDTO;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePresenter.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePresenter.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -20,9 +20,9 @@
package org.ourproject.kune.workspace.client.title;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.registry.RenamableRegistry;
-import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry;
+import cc.kune.core.client.registry.ContentIconsRegistry;
+import cc.kune.core.client.registry.RenamableRegistry;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.domain.utils.StateToken;
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/AbstractClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/AbstractClientTool.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/AbstractClientTool.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -1,35 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * 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.workspace.client.tool;
-
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-
-public abstract class AbstractClientTool implements ClientTool {
-
- public AbstractClientTool(final String shortName, final String longName, final ToolSelector toolSelector,
- final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws) {
- final ToolSelectorItemPresenter presenter = new ToolSelectorItemPresenter(shortName, longName, toolSelector,
- wsThemePresenter);
- final ToolSelectorItemPanel panel = new ToolSelectorItemPanel(presenter, ws);
- presenter.init(panel);
- }
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ClientTool.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ClientTool.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -1,26 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * 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.workspace.client.tool;
-
-public interface ClientTool {
-
- String getName();
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/FoldableAbstractClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/FoldableAbstractClientTool.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/FoldableAbstractClientTool.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -1,125 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * 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.workspace.client.tool;
-
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-
-import cc.kune.core.shared.dto.BasicMimeTypeDTO;
-
-public abstract class FoldableAbstractClientTool extends AbstractClientTool {
- public static final String UPLOADEDFILE_SUFFIX = "uploaded";
- public static final String WAVE_SUFFIX = "wave";
-
- protected final ContentCapabilitiesRegistry contentCapabilitiesRegistry;
-
- public FoldableAbstractClientTool(final String shortName, final String longName, final ToolSelector toolSelector,
- final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws,
- final ContentCapabilitiesRegistry contentCapabilitiesRegistry) {
- super(shortName, longName, toolSelector, wsThemePresenter, ws);
- this.contentCapabilitiesRegistry = contentCapabilitiesRegistry;
- }
-
- public void registerContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType, final String iconUrl) {
- contentCapabilitiesRegistry.getIconsRegistry().registerContentTypeIcon(typeId, mimeType, iconUrl);
- }
-
- public void registerContentTypeIcon(final String contentTypeId, final String iconUrl) {
- contentCapabilitiesRegistry.getIconsRegistry().registerContentTypeIcon(contentTypeId, iconUrl);
- }
-
- protected void registerAclEditableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getAclEditable().register(typeIds);
- }
-
- protected void registerAuthorableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getAuthorable().register(typeIds);
- }
-
- protected void registerComentableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getComentable().register(typeIds);
- }
-
- protected void registerDragableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getDragable().register(typeIds);
- }
-
- protected void registerDropableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getDropable().register(typeIds);
- }
-
- protected void registerEmailSubscribeAbleTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getEmailSubscribeAble().register(typeIds);
- }
-
- protected void registerLicensableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getLicensable().register(typeIds);
- }
-
- protected void registerPublishModerableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getPublishModerable().register(typeIds);
- }
-
- protected void registerRateableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getRateable().register(typeIds);
- }
-
- protected void registerRenamableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getRenamable().register(typeIds);
- }
-
- protected void registerTageableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getTageable().register(typeIds);
- }
-
- protected void registerTranslatableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getTranslatable().register(typeIds);
- }
-
- protected void registerUploadTypesAndMimes(final String typeUploadedfile) {
- registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("image"), "images/nav/picture.png");
- registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("video"), "images/nav/film.png");
- registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("audio"), "images/nav/music.png");
- registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "pdf"), "images/nav/page_pdf.png");
- registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "zip"), "images/nav/page_zip.png");
- registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "zip"), "images/nav/page_zip.png");
- registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("text"), "images/nav/page_text.png");
- registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "msword"),
- "images/nav/page_word.png");
- registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "excel"),
- "images/nav/page_excel.png");
- registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "mspowerpoint"),
- "images/nav/page_pps.png");
- registerContentTypeIcon(typeUploadedfile, "images/nav/page.png");
- }
-
- protected void registerVersionableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getVersionable().register(typeIds);
- }
-
- protected void registerXmppComentableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getXmppComentable().register(typeIds);
- }
-
- protected void registerXmppNotifyCapableTypes(final String... typeIds) {
- contentCapabilitiesRegistry.getXmppNotificyCapable().register(typeIds);
- }
-}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/OldAbstractClientTool.java (from rev 1279, trunk/src/main/java/org/ourproject/kune/workspace/client/tool/AbstractClientTool.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/OldAbstractClientTool.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/OldAbstractClientTool.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,39 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * 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.workspace.client.tool;
+
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
+
+import cc.kune.core.client.tool.ToolSelector;
+import cc.kune.core.client.tool.ToolSelectorItemPanel;
+import cc.kune.core.client.tool.ToolSelectorItemPresenter;
+
+public abstract class OldAbstractClientTool implements OldClientTool {
+
+ public OldAbstractClientTool(final String shortName, final String longName, final ToolSelector toolSelector,
+ final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws) {
+ final ToolSelectorItemPresenter presenter = new ToolSelectorItemPresenter(shortName, longName, toolSelector);
+ // wsThemePresenter);
+ final ToolSelectorItemPanel panel = new ToolSelectorItemPanel();
+ presenter.init(panel);
+ }
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/OldClientTool.java (from rev 1279, trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ClientTool.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/OldClientTool.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/OldClientTool.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,26 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * 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.workspace.client.tool;
+
+public interface OldClientTool {
+
+ String getName();
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/OldFoldableAbstractClientTool.java (from rev 1279, trunk/src/main/java/org/ourproject/kune/workspace/client/tool/FoldableAbstractClientTool.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/OldFoldableAbstractClientTool.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/OldFoldableAbstractClientTool.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -0,0 +1,126 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * 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.workspace.client.tool;
+
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
+
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.tool.ToolSelector;
+import cc.kune.core.shared.dto.BasicMimeTypeDTO;
+
+public abstract class OldFoldableAbstractClientTool extends OldAbstractClientTool {
+ public static final String UPLOADEDFILE_SUFFIX = "uploaded";
+ public static final String WAVE_SUFFIX = "wave";
+
+ protected final ContentCapabilitiesRegistry contentCapabilitiesRegistry;
+
+ public OldFoldableAbstractClientTool(final String shortName, final String longName, final ToolSelector toolSelector,
+ final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws,
+ final ContentCapabilitiesRegistry contentCapabilitiesRegistry) {
+ super(shortName, longName, toolSelector, wsThemePresenter, ws);
+ this.contentCapabilitiesRegistry = contentCapabilitiesRegistry;
+ }
+
+ public void registerContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType, final String iconUrl) {
+ contentCapabilitiesRegistry.getIconsRegistry().registerContentTypeIcon(typeId, mimeType, iconUrl);
+ }
+
+ public void registerContentTypeIcon(final String contentTypeId, final String iconUrl) {
+ contentCapabilitiesRegistry.getIconsRegistry().registerContentTypeIcon(contentTypeId, iconUrl);
+ }
+
+ protected void registerAclEditableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getAclEditable().register(typeIds);
+ }
+
+ protected void registerAuthorableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getAuthorable().register(typeIds);
+ }
+
+ protected void registerComentableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getComentable().register(typeIds);
+ }
+
+ protected void registerDragableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getDragable().register(typeIds);
+ }
+
+ protected void registerDropableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getDropable().register(typeIds);
+ }
+
+ protected void registerEmailSubscribeAbleTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getEmailSubscribeAble().register(typeIds);
+ }
+
+ protected void registerLicensableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getLicensable().register(typeIds);
+ }
+
+ protected void registerPublishModerableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getPublishModerable().register(typeIds);
+ }
+
+ protected void registerRateableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getRateable().register(typeIds);
+ }
+
+ protected void registerRenamableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getRenamable().register(typeIds);
+ }
+
+ protected void registerTageableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getTageable().register(typeIds);
+ }
+
+ protected void registerTranslatableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getTranslatable().register(typeIds);
+ }
+
+ protected void registerUploadTypesAndMimes(final String typeUploadedfile) {
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("image"), "images/nav/picture.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("video"), "images/nav/film.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("audio"), "images/nav/music.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "pdf"), "images/nav/page_pdf.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "zip"), "images/nav/page_zip.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "zip"), "images/nav/page_zip.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("text"), "images/nav/page_text.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "msword"),
+ "images/nav/page_word.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "excel"),
+ "images/nav/page_excel.png");
+ registerContentTypeIcon(typeUploadedfile, new BasicMimeTypeDTO("application", "mspowerpoint"),
+ "images/nav/page_pps.png");
+ registerContentTypeIcon(typeUploadedfile, "images/nav/page.png");
+ }
+
+ protected void registerVersionableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getVersionable().register(typeIds);
+ }
+
+ protected void registerXmppComentableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getXmppComentable().register(typeIds);
+ }
+
+ protected void registerXmppNotifyCapableTypes(final String... typeIds) {
+ contentCapabilitiesRegistry.getXmppNotificyCapable().register(typeIds);
+ }
+}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelector.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelector.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelector.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -1,26 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * 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.workspace.client.tool;
-
-public interface ToolSelector {
-
- void addTool(ToolSelectorItem item);
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItem.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItem.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItem.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -1,32 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * 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.workspace.client.tool;
-
-public interface ToolSelectorItem {
-
- String getShortName();
-
- void setGroupShortName(String groupShortName);
-
- void setSelected(boolean selected);
-
- void setVisible(boolean visible);
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemPanel.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemPanel.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -1,69 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * 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.workspace.client.tool;
-
-import org.ourproject.kune.platf.client.ui.RoundedPanel;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
-
-import com.google.gwt.user.client.Event;
-import com.google.gwt.user.client.ui.Hyperlink;
-
-public class ToolSelectorItemPanel extends RoundedPanel implements ToolSelectorItemView {
- private final Hyperlink hl;
-
- public ToolSelectorItemPanel(final ToolSelectorItemPresenter presenter, final WorkspaceSkeleton ws) {
- super(RoundedPanel.RIGHT, 2);
- hl = new Hyperlink();
- super.setWidget(hl);
- ws.addInTools(this);
- super.sinkEvents(Event.ONCLICK);
- super.addStyleName("k-toolselectoritem");
- }
-
- @Override
- public void onBrowserEvent(final Event event) {
- super.onBrowserEvent(event);
- }
-
- public void setLink(final String text, final String targetHistoryToken) {
- hl.setText(text);
- hl.setTargetHistoryToken(targetHistoryToken);
- }
-
- public void setSelected(final boolean selected) {
- if (selected) {
- hl.setStylePrimaryName("k-toolselectoritem-sel");
- } else {
- hl.setStylePrimaryName("k-toolselectoritem-notsel");
- }
- super.setCornerStyleName(hl.getStyleName());
- }
-
- public void setTheme(final WsTheme oldTheme, final WsTheme newTheme) {
- if (oldTheme != null) {
- final String oldName = oldTheme.getName();
- hl.removeStyleDependentName(oldName);
- }
- final String newName = newTheme.getName();
- hl.addStyleDependentName(newName);
- super.setCornerStyleName(hl.getStyleName());
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemPresenter.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemPresenter.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -1,80 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * 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.workspace.client.tool;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-
-import cc.kune.core.shared.domain.utils.StateToken;
-
-import com.calclab.suco.client.events.Listener2;
-
-public class ToolSelectorItemPresenter implements ToolSelectorItem {
-
- private ToolSelectorItemView view;
- private final ToolSelector toolSelector;
- private final WsThemeManager wsThemePresenter;
- private final String shortName;
- private final String longName;
-
- public ToolSelectorItemPresenter(final String shortName, final String longName, final ToolSelector toolSelector,
- final WsThemeManager wsThemePresenter) {
- this.shortName = shortName;
- this.longName = longName;
- this.toolSelector = toolSelector;
- this.wsThemePresenter = wsThemePresenter;
- }
-
- public String getShortName() {
- return shortName;
- }
-
- public View getView() {
- return view;
- }
-
- public void init(final ToolSelectorItemView view) {
- this.view = view;
- toolSelector.addTool(this);
- wsThemePresenter.addOnThemeChanged(new Listener2<WsTheme, WsTheme>() {
- public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
- setTheme(oldTheme, newTheme);
- }
- });
- }
-
- public void setGroupShortName(final String groupShortName) {
- final StateToken token = new StateToken(groupShortName, getShortName(), null, null);
- view.setLink(longName, token.toString());
- }
-
- public void setSelected(final boolean selected) {
- view.setSelected(selected);
- }
-
- public void setVisible(boolean visible) {
- view.setVisible(visible);
- }
-
- private void setTheme(final WsTheme oldTheme, final WsTheme newTheme) {
- view.setTheme(oldTheme, newTheme);
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemView.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemView.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -1,34 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * 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.workspace.client.tool;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
-
-public interface ToolSelectorItemView extends View {
-
- void setLink(String text, String targetHistoryToken);
-
- void setSelected(boolean selected);
-
- void setTheme(WsTheme oldTheme, WsTheme newTheme);
-
- void setVisible(boolean visible);
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenter.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenter.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -1,96 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * 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.workspace.client.tool;
-
-import java.util.HashMap;
-import java.util.List;
-
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-
-import cc.kune.common.client.errors.UIException;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.dto.StateAbstractDTO;
-
-import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.events.Listener2;
-
-public class ToolSelectorPresenter implements ToolSelector {
-
- private final HashMap<String, ToolSelectorItem> tools;
-
- public ToolSelectorPresenter(final StateManager stateManager, final WsThemeManager wsThemePresenter) {
- tools = new HashMap<String, ToolSelectorItem>();
- stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
- @Override
- public void onEvent(final StateAbstractDTO state) {
- for (String tool : tools.keySet()) {
- List<String> enabledTools = state.getEnabledTools();
- if (enabledTools != null && enabledTools.contains(tool)) {
- tools.get(tool).setVisible(true);
- } else {
- tools.get(tool).setVisible(false);
- }
- }
- }
- });
- stateManager.onGroupChanged(new Listener2<String, String>() {
- @Override
- public void onEvent(final String oldGroup, final String newGroup) {
- onGroupChanged(newGroup);
- }
- });
- stateManager.onToolChanged(new Listener2<String, String>() {
- @Override
- public void onEvent(final String oldTool, final String newTool) {
- onToolChanged(oldTool, newTool);
- }
- });
- }
-
- @Override
- public void addTool(final ToolSelectorItem item) {
- final String name = item.getShortName();
- if (name == null) {
- throw new UIException("You cannot add a tool without a name");
- }
- if (tools.get(name) != null) {
- throw new UIException("A tool with the same name already added");
- }
- tools.put(name, item);
- item.setSelected(false);
- }
-
- void onGroupChanged(final String newGroupName) {
- for (final String name : tools.keySet()) {
- tools.get(name).setGroupShortName(newGroupName);
- }
- }
-
- void onToolChanged(final String oldTool, final String newTool) {
- Log.debug("Registered tools: " + tools.keySet().toString());
- if (!oldTool.equals("")) {
- tools.get(oldTool).setSelected(false);
- }
- if (!newTool.equals("")) {
- tools.get(newTool).setSelected(true);
- }
- }
-}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/upload/FileUploaderPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/upload/FileUploaderPresenter.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/upload/FileUploaderPresenter.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -19,7 +19,7 @@
\*/
package org.ourproject.kune.workspace.client.upload;
-import org.ourproject.kune.workspace.client.tool.FoldableAbstractClientTool;
+import org.ourproject.kune.workspace.client.tool.OldFoldableAbstractClientTool;
import cc.kune.core.client.state.Session;
import cc.kune.core.shared.domain.utils.StateToken;
@@ -48,7 +48,7 @@
final StateToken currentFolderStateToken = session.getCurrentStateToken().copy().clearDocument();
if (sameContainer()) {
view.setUploadParams(session.getUserHash(), currentFolderStateToken.toString(),
- currentFolderStateToken.getTool() + "." + FoldableAbstractClientTool.UPLOADEDFILE_SUFFIX);
+ currentFolderStateToken.getTool() + "." + OldFoldableAbstractClientTool.UPLOADEDFILE_SUFFIX);
return true;
}
if (view.hasUploadingFiles()) {
@@ -56,7 +56,7 @@
} else {
currentUploadStateToken = currentFolderStateToken;
view.setUploadParams(session.getUserHash(), currentFolderStateToken.toString(),
- currentFolderStateToken.getTool() + "." + FoldableAbstractClientTool.UPLOADEDFILE_SUFFIX);
+ currentFolderStateToken.getTool() + "." + OldFoldableAbstractClientTool.UPLOADEDFILE_SUFFIX);
return true;
}
}
Copied: trunk/src/test/java/cc/kune/core/client/tool (from rev 1279, trunk/src/test/java/org/ourproject/kune/workspace/client/tool)
Modified: trunk/src/test/java/cc/kune/core/client/tool/ToolSelectorPresenterTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenterTest.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/test/java/cc/kune/core/client/tool/ToolSelectorPresenterTest.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -17,20 +17,22 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.tool;
+package cc.kune.core.client.tool;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
+import cc.kune.core.client.state.EventBusTester;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.tool.ToolSelectorPresenter.ToolSelectorProxy;
+import cc.kune.core.client.tool.ToolSelectorPresenter.ToolSelectorView;
public class ToolSelectorPresenterTest {
+ private static final String GROUP1_NAME = "group1";
private static final String TOOL1_NAME = "tool1";
private static final String TOOL2_NAME = "tool2";
- private static final String GROUP1_NAME = "group1";
private ToolSelectorPresenter toolSelector;
private ToolSelectorItem toolSelectorItem1;
private ToolSelectorItem toolSelectorItem2;
@@ -68,8 +70,10 @@
@Before
public void begin() {
final StateManager stateManager = Mockito.mock(StateManager.class);
- final WsThemeManager themePresenter = Mockito.mock(WsThemeManager.class);
- toolSelector = new ToolSelectorPresenter(stateManager, themePresenter);
+ // final WsThemeManager themePresenter =
+ // Mockito.mock(WsThemeManager.class);
+ toolSelector = new ToolSelectorPresenter(new EventBusTester(), Mockito.mock(ToolSelectorView.class),
+ Mockito.mock(ToolSelectorProxy.class), stateManager);
toolSelectorItem1 = Mockito.mock(ToolSelectorItem.class);
toolSelectorItem2 = Mockito.mock(ToolSelectorItem.class);
}
Modified: trunk/src/test/java/org/FaultyTestSuite.java
===================================================================
--- trunk/src/test/java/org/FaultyTestSuite.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/test/java/org/FaultyTestSuite.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -22,15 +22,13 @@
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.ourproject.kune.platf.server.finders.RateFinderTest;
-import org.ourproject.kune.platf.server.manager.GroupManagerTest;
/**
* A Test Suite to test (only) some tests that fails
*
*/
@RunWith(Suite.class)
-@SuiteClasses({ RateFinderTest.class, GroupManagerTest.class })
+@SuiteClasses({})
public class FaultyTestSuite {
}
Modified: trunk/src/test/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistryTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistryTest.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/test/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistryTest.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -23,8 +23,8 @@
import org.junit.Before;
import org.junit.Test;
-import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry;
+import cc.kune.core.client.registry.ContentIconsRegistry;
import cc.kune.core.shared.dto.BasicMimeTypeDTO;
public class ContentIconsRegistryTest {
Modified: trunk/src/test/java/testsuites/OthersTestSuite.java
===================================================================
--- trunk/src/test/java/testsuites/OthersTestSuite.java 2011-03-22 13:35:57 UTC (rev 1290)
+++ trunk/src/test/java/testsuites/OthersTestSuite.java 2011-03-24 23:10:11 UTC (rev 1291)
@@ -35,9 +35,9 @@
import org.ourproject.kune.workspace.client.licensewizard.LicenseWizardPresenterTest;
import org.ourproject.kune.workspace.client.socialnet.SNRolActionTest;
import org.ourproject.kune.workspace.client.socialnet.RolComparatorTest;
-import org.ourproject.kune.workspace.client.tool.ToolSelectorPresenterTest;
import cc.kune.core.client.tags.TagsSummaryPresenterTest;
+import cc.kune.core.client.tool.ToolSelectorPresenterTest;
/**
* Rescan with :
1
0
r1290 - trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl
by Vicente J. Ruiz Jurado 22 Mar '11
by Vicente J. Ruiz Jurado 22 Mar '11
22 Mar '11
Author: vjrj_
Date: 2011-03-22 14:35:57 +0100 (Tue, 22 Mar 2011)
New Revision: 1290
Modified:
trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java
Log:
Somte test fixed
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java 2011-03-22 12:36:43 UTC (rev 1289)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java 2011-03-22 13:35:57 UTC (rev 1290)
@@ -20,6 +20,7 @@
package org.ourproject.kune.platf.server.manager.impl;
import java.util.Collection;
+import java.util.HashSet;
import java.util.List;
import java.util.TimeZone;
@@ -33,6 +34,7 @@
import org.jivesoftware.smack.RosterEntry;
import org.jivesoftware.smack.packet.RosterPacket.ItemType;
import org.ourproject.kune.chat.server.managers.ChatConnection;
+import org.ourproject.kune.chat.server.managers.ChatException;
import org.ourproject.kune.chat.server.managers.XmppManager;
import org.ourproject.kune.platf.server.manager.I18nCountryManager;
import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
@@ -178,9 +180,18 @@
final UserBuddiesData buddiesData = new UserBuddiesData();
final User user = finder.getByShortName(shortName);
- final ChatConnection connection = xmppManager.login(user.getShortName() + domain, user.getPassword(), "kserver");
- final Collection<RosterEntry> roster = xmppManager.getRoster(connection);
- xmppManager.disconnect(connection);
+ Collection<RosterEntry> roster;
+ try {
+ final ChatConnection connection = xmppManager.login(user.getShortName() + domain, user.getPassword(),
+ "kserver");
+ roster = xmppManager.getRoster(connection);
+ xmppManager.disconnect(connection);
+ } catch (final ChatException e) {
+ // Seems that it not possible to get the buddy list, then we follow
+ // with a empty buddy list
+ log.error("Cannot retrieve the buddie list", e);
+ roster = new HashSet<RosterEntry>();
+ }
for (final RosterEntry entry : roster) {
if (entry.getType().equals(ItemType.both)) {
// only show buddies with subscription 'both'
1
0
22 Mar '11
Author: vjrj_
Date: 2011-03-22 13:36:43 +0100 (Tue, 22 Mar 2011)
New Revision: 1289
Modified:
trunk/INSTALL
trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
trunk/src/main/java/cc/kune/domain/finders/ContentFinder.java
trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManagerDefault.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java
trunk/src/test/java/org/FaultyTestSuite.java
trunk/src/test/java/org/ourproject/kune/platf/server/finders/RateFinderTest.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
trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java
Log:
Some test fixed
Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL 2011-03-22 10:21:25 UTC (rev 1288)
+++ trunk/INSTALL 2011-03-22 12:36:43 UTC (rev 1289)
@@ -79,10 +79,11 @@
===Wave in a Box===
-Follow "Configure Your XMPP Server" from:
+Follow "Federation configuration" from:
https://sites.google.com/a/waveprotocol.org/wave-protocol/code/installation
and:
https://sites.google.com/a/waveprotocol.org/wave-protocol/federation/openfi…
+if you want to use Kune in production and federate with other Wave capable servers.
===Install jmagick===
@@ -125,6 +126,26 @@
mvn package
an executable target/kune-VERSION.one-jar.jar is generated in target directory.
+===Apache proxy===
+
+You can configure your Apache with this kind of virtual host
+<VirtualHost *:80>
+ ServerName youkune.example.com
+
+ ProxyRequests Off
+ <Proxy *>
+ Order deny,allow
+ Allow from all
+ </Proxy>
+
+ ProxyPass / http://localhost:8080/
+ ProxyPassReverse / http://localhost:8080/
+ <Location />
+ Order allow,deny
+ Allow from all
+ </Location>
+</VirtualHost>
+
==Appendix A: Configuration of Openfire xmpp server==
Install openfire in your system: http://www.igniterealtime.org/downloads/index.jsp
Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-03-22 10:21:25 UTC (rev 1288)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-03-22 12:36:43 UTC (rev 1289)
@@ -173,6 +173,7 @@
// Is a Wave token?
if (historyToken == null || HistorySupport.waveRefFromHistoryToken(historyToken) == null) {
// Non wave token
+ SpaceSelectEvent.fire(eventBus, Space.groupSpace);
onHistoryChanged(new StateToken(historyToken));
} else {
SpaceSelectEvent.fire(eventBus, Space.userSpace);
@@ -188,6 +189,7 @@
// Starting with some token like "signin": load defContent
// also
onHistoryChanged("");
+ SpaceSelectEvent.fire(eventBus, Space.groupSpace);
}
tokenListener.onHistoryToken();
}
Modified: trunk/src/main/java/cc/kune/domain/finders/ContentFinder.java
===================================================================
--- trunk/src/main/java/cc/kune/domain/finders/ContentFinder.java 2011-03-22 10:21:25 UTC (rev 1288)
+++ trunk/src/main/java/cc/kune/domain/finders/ContentFinder.java 2011-03-22 12:36:43 UTC (rev 1289)
@@ -41,7 +41,7 @@
@FirstResult final int offset, @MaxResults final int limit);
@Finder(query = "SELECT count(id) FROM Content WHERE lastRevision.title LIKE :title AND (mimeType.mimetype=:mimetype OR mimeType.mimetype=:mimetype2) AND container.owner.shortName=:group AND deletedOn=null")
- public int find2MimeCount(@Named(GROUP) final String groupShortName, @Named(TITLE) final String title,
+ public Long find2MimeCount(@Named(GROUP) final String groupShortName, @Named(TITLE) final String title,
@Named(MIMETYPE) final String mimetype, @Named("mimetype2") final String mimetype2);
@Finder(query = "SELECT count(*) from Container ctx, Content ctn where ctn.container.id = ctx.id and ctx = :container and ctn.lastRevision.title LIKE :title")
@@ -52,6 +52,6 @@
@Named(MIMETYPE) final String mimetype, @FirstResult final int offset, @MaxResults final int limit);
@Finder(query = "SELECT count(id) FROM Content WHERE lastRevision.title LIKE :title AND mimeType.mimetype=:mimetype AND container.owner.shortName=:group AND deletedOn=null")
- public int findMimeCount(@Named(GROUP) final String groupShortName, @Named(TITLE) final String title,
+ public Long findMimeCount(@Named(GROUP) final String groupShortName, @Named(TITLE) final String title,
@Named(MIMETYPE) final String mimetype);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManagerDefault.java 2011-03-22 10:21:25 UTC (rev 1288)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManagerDefault.java 2011-03-22 12:36:43 UTC (rev 1289)
@@ -218,8 +218,8 @@
final String groupShortName, final String mimetype) {
final List<Content> list = contentFinder.findMime(groupShortName, "%" + search + "%", mimetype, firstResult,
maxResults);
- final int count = contentFinder.findMimeCount(groupShortName, "%" + search + "%", mimetype);
- return new SearchResult<Content>(count, list);
+ final Long count = contentFinder.findMimeCount(groupShortName, "%" + search + "%", mimetype);
+ return new SearchResult<Content>(count.intValue(), list);
}
@Override
@@ -227,8 +227,8 @@
final String groupShortName, final String mimetype, final String mimetype2) {
final List<Content> list = contentFinder.find2Mime(groupShortName, "%" + search + "%", mimetype, mimetype2,
firstResult, maxResults);
- final int count = contentFinder.find2MimeCount(groupShortName, "%" + search + "%", mimetype, mimetype2);
- return new SearchResult<Content>(count, list);
+ final Long count = contentFinder.find2MimeCount(groupShortName, "%" + search + "%", mimetype, mimetype2);
+ return new SearchResult<Content>(count.intValue(), list);
}
@Override
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java 2011-03-22 10:21:25 UTC (rev 1288)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java 2011-03-22 12:36:43 UTC (rev 1289)
@@ -38,7 +38,10 @@
import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
import org.ourproject.kune.platf.server.manager.UserManager;
import org.ourproject.kune.platf.server.properties.ChatProperties;
+import org.waveprotocol.box.server.CoreSettings;
import org.waveprotocol.box.server.authentication.PasswordDigest;
+import org.waveprotocol.box.server.persistence.AccountStore;
+import org.waveprotocol.wave.model.wave.ParticipantId;
import cc.kune.core.client.errors.GroupNameInUseException;
import cc.kune.core.client.errors.I18nNotFoundException;
@@ -54,14 +57,17 @@
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
+import com.google.inject.name.Named;
@Singleton
public class UserManagerDefault extends DefaultManager<User, Long> implements UserManager {
private final I18nCountryManager countryManager;
+ private final String domain;
private final UserFinder finder;
private final I18nTranslationService i18n;
private final I18nLanguageManager languageManager;
private final ChatProperties properties;
+ private final AccountStore waveAccountStore;
// private final PropertiesManager propManager;
private final CustomUserRegistrationServlet waveUserRegister;
private final XmppManager xmppManager;
@@ -70,7 +76,8 @@
public UserManagerDefault(final Provider<EntityManager> provider, final UserFinder finder,
final I18nLanguageManager languageManager, final I18nCountryManager countryManager,
final XmppManager xmppManager, final ChatProperties properties, final I18nTranslationService i18n,
- final CustomUserRegistrationServlet waveUserRegister) {
+ final CustomUserRegistrationServlet waveUserRegister, final AccountStore waveAccountStore,
+ @Named(CoreSettings.WAVE_SERVER_DOMAIN) final String domain) {
super(provider, User.class);
this.finder = finder;
this.languageManager = languageManager;
@@ -79,6 +86,8 @@
this.properties = properties;
this.i18n = i18n;
this.waveUserRegister = waveUserRegister;
+ this.waveAccountStore = waveAccountStore;
+ this.domain = domain;
}
@Override
@@ -98,21 +107,37 @@
try {
createWaveAccount(shortName, passwdDigest);
- } catch (UserRegistrationException e) {
- if (finder.getByShortName(shortName) != null)
- throw new GroupNameInUseException();
- else
+ } catch (final UserRegistrationException e) {
+ try {
+ if (finder.getByShortName(shortName) != null) {
+ throw new GroupNameInUseException();
+ } else {
+ // Other kind of exception
+ throw e;
+ }
+ } catch (final NoResultException e2) {
+ // Other kind of exception
throw e;
+ }
}
// if (userPropGroup == null) {
// userPropGroup = propGroupManager.find(User.PROPS_ID);
// }
// final Properties userProp = new Properties(userPropGroup);
// propManager.persist(userProp);
- final User user = new User(shortName, longName, email, passwd, passwdDigest.getDigest(),
- passwdDigest.getSalt(), language, country, tz);
- return user;
-
+ try {
+ final User user = new User(shortName, longName, email, passwd, passwdDigest.getDigest(),
+ passwdDigest.getSalt(), language, country, tz);
+ return user;
+ } catch (final RuntimeException e) {
+ try {
+ // Try to remove wave account
+ waveAccountStore.removeAccount(ParticipantId.of(shortName + ParticipantId.DOMAIN_PREFIX + domain));
+ } catch (final Exception e2) {
+ throw e;
+ }
+ throw e;
+ }
}
@Override
Modified: trunk/src/test/java/org/FaultyTestSuite.java
===================================================================
--- trunk/src/test/java/org/FaultyTestSuite.java 2011-03-22 10:21:25 UTC (rev 1288)
+++ trunk/src/test/java/org/FaultyTestSuite.java 2011-03-22 12:36:43 UTC (rev 1289)
@@ -22,20 +22,15 @@
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.ourproject.kune.platf.integration.content.ContentServiceGetTest;
-import org.ourproject.kune.platf.integration.content.ContentServiceIntegrationTest;
import org.ourproject.kune.platf.server.finders.RateFinderTest;
-import org.ourproject.kune.platf.server.manager.ContentManagerTest;
-import org.ourproject.kune.platf.server.manager.UserManagerTest;
-import org.ourproject.kune.platf.server.manager.impl.SocialNetworkManagerMoreTest;
+import org.ourproject.kune.platf.server.manager.GroupManagerTest;
/**
* A Test Suite to test (only) some tests that fails
*
*/
@RunWith(Suite.class)
-@SuiteClasses({ RateFinderTest.class, UserManagerTest.class, SocialNetworkManagerMoreTest.class,
- ContentManagerTest.class, ContentServiceIntegrationTest.class, ContentServiceGetTest.class })
+@SuiteClasses({ RateFinderTest.class, GroupManagerTest.class })
public class FaultyTestSuite {
}
Modified: trunk/src/test/java/org/ourproject/kune/platf/server/finders/RateFinderTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/finders/RateFinderTest.java 2011-03-22 10:21:25 UTC (rev 1288)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/finders/RateFinderTest.java 2011-03-22 12:36:43 UTC (rev 1289)
@@ -75,6 +75,8 @@
user1.setCountry(gb);
user2.setCountry(gb);
+ entityManager.persist(user1.getUserGroup());
+ entityManager.persist(user2.getUserGroup());
entityManager.persist(user1);
entityManager.persist(user2);
@@ -85,6 +87,7 @@
entityManager.persist(new Rate(user1, cd, 1.3));
entityManager.persist(new Rate(user2, cd, 3.3));
+
// same user and content other rate
final Rate rateFinded = rateFinder.find(user2, cd);
rateFinded.setValue(4.3);
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 2011-03-22 10:21:25 UTC (rev 1288)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/ContentManagerTest.java 2011-03-22 12:36:43 UTC (rev 1289)
@@ -21,6 +21,7 @@
import static org.junit.Assert.assertEquals;
+import org.junit.Ignore;
import org.junit.Test;
import org.ourproject.kune.docs.server.DocumentServerTool;
import org.ourproject.kune.platf.server.PersistencePreLoadedDataTest;
@@ -50,6 +51,7 @@
assertEquals(mimetype, newCnt.getMimeType().toString());
}
+ @Ignore
@Test
public void testBasicBodySearch() {
createContent();
@@ -96,11 +98,12 @@
assertEquals(1, search.getSize());
}
+ @Ignore
@Test
public void testtMimeSearch() {
createContentWithMimeAndCheck(MIMETYPE + "/png");
contentManager.reIndex();
- SearchResult<Content> search = contentManager.searchMime(BODY, 0, 10, "asb", MIMETYPE);
+ final SearchResult<Content> search = contentManager.searchMime(BODY, 0, 10, "asb", MIMETYPE);
assertEquals(1, search.getSize());
}
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 2011-03-22 10:21:25 UTC (rev 1288)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/GroupManagerTest.java 2011-03-22 12:36:43 UTC (rev 1289)
@@ -33,6 +33,7 @@
import cc.kune.core.client.errors.EmailAddressInUseException;
import cc.kune.core.client.errors.GroupNameInUseException;
import cc.kune.core.client.errors.I18nNotFoundException;
+import cc.kune.core.client.errors.UserRegistrationException;
import cc.kune.core.shared.dto.GroupType;
import cc.kune.domain.AccessLists;
import cc.kune.domain.Group;
@@ -167,7 +168,7 @@
rollbackTransaction();
}
- @Test(expected = InvalidStateException.class)
+ @Test(expected = UserRegistrationException.class)
public void createUserWithIncorrectShortName() throws Exception {
final User user2 = userManager.createUser("u s", "the user name 2", "email2(a)example.com", "userPassword", "en",
"GB", TimeZone.getDefault().getID());
Modified: trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java 2011-03-22 10:21:25 UTC (rev 1288)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java 2011-03-22 12:36:43 UTC (rev 1289)
@@ -33,8 +33,8 @@
import org.ourproject.kune.platf.server.PersistencePreLoadedDataTest;
import org.ourproject.kune.platf.server.manager.impl.SearchResult;
+import cc.kune.core.client.errors.GroupNameInUseException;
import cc.kune.core.client.errors.I18nNotFoundException;
-import cc.kune.core.client.errors.UserRegistrationException;
import cc.kune.core.shared.domain.UserSNetVisibility;
import cc.kune.domain.Group;
import cc.kune.domain.User;
@@ -99,7 +99,7 @@
* This was not working:
* http://opensource.atlassian.com/projects/hibernate/browse/EJB-382
*/
- @Test(expected = UserRegistrationException.class)
+ @Test(expected = GroupNameInUseException.class)
public void testUserExist() throws I18nNotFoundException {
final User user1 = userManager.createUser("test", "test 1 name", "test1(a)example.com", "some password", "en",
"GB", "GMT");
1
0
r1288 - in trunk: . src/main/java/org/ourproject/kune/platf/server/manager src/test/java/cc/kune/domain/finders src/test/java/org/ourproject/kune/platf/server/manager
by Vicente J. Ruiz Jurado 22 Mar '11
by Vicente J. Ruiz Jurado 22 Mar '11
22 Mar '11
Author: vjrj_
Date: 2011-03-22 11:21:25 +0100 (Tue, 22 Mar 2011)
New Revision: 1288
Modified:
trunk/INSTALL
trunk/TODO
trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManager.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java
trunk/src/test/java/cc/kune/domain/finders/TagUserContentFinderTest.java
trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagUserContentTest.java
Log:
Some test fixed, more doc
Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL 2011-03-21 10:10:34 UTC (rev 1287)
+++ trunk/INSTALL 2011-03-22 10:21:25 UTC (rev 1288)
@@ -95,7 +95,7 @@
Not verified: in Windows you need to do something similar (copy the jmagick .dll of the same version in the Windows directory)
-===Run the server for the first time ===
+===Run the server for the first time===
Run the server for the first time and initialize the db:
@@ -153,19 +153,22 @@
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)
+Configure the 'Group chat service' (in Group Chat > Group Chat Settings 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
+Change in 'Server > Server Manager > System Properties':
+ provider.auth.className to org.jivesoftware.openfire.auth.JDBCAuthProvider instead of
+ org.jivesoftware.openfire.auth.DefaultAuthProvider
+ provider.user.className to org.jivesoftware.openfire.user.JDBCUserProvider instead of
+ org.jivesoftware.openfire.user.DefaultUserProvider
-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)
+In Server > Server Settings > HTTP Binding, enable "HTTP Bind Settings" and set the port to 5280. Check that port is not used by other service in your machine (we use 5280 as default, but if you want to use other change it your web.xml accordly)
-Edit the openfire.xml
-* In debian (with a .deb installation) you can to edit the configuration in /etc/openfire...
+Edit the openfire.xml in a terminal:
+* In debian (with a .deb installation) you can to edit the configuration in /etc/openfire directory.
* 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:
+Add these 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>
...
@@ -194,23 +197,25 @@
<nameField>name</nameField>
<emailField>email</emailField>
</jdbcUserProvider>
+ <admin>
+ <authorizedUsernames>admin</authorizedUsernames>
+ </admin>
...
</jive>
</pre>
-You'll most likely want to change which usernames are authorized to login to the admin console.
+Instead of:
+ <jdbcAuthProvider/>
+ <jdbcUserProvider/>
+ <admin/>
-<pre>
-<jive>
-...
-<admin>
- <authorizedUsernames>admin</authorizedUsernames>
-</admin>
-...
-</jive>
-</pre>
+For more details:
+http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integration-guide.html
-Restart openfire.
+Also you'll most likely want to change which usernames are authorized to login to the admin console adding then to <authorizedUsernames>.
-For more details:
-http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integration-guide.html
+Restart openfire: /etc/init.d/openfire restart
+after that the previous values will be incorpored to Server > Server Manager > System Properties
+
+After the section 'Run the server for the first time' you'll be able to use the password of the admin user of the kune instalation (specified in kune.properties), or other admin new users you want to register using kune and configure in the authorizedUsernames attribute.
+
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2011-03-21 10:10:34 UTC (rev 1287)
+++ trunk/TODO 2011-03-22 10:21:25 UTC (rev 1288)
@@ -4,14 +4,29 @@
#+SEQ_TODO: TODO danigb samer vjrj FEEDBACK VERIFY | FIXED CANCELED WONTFIX
* Intro
+ In this file we normally write things TODO but also some notes, brainstorming, ideas, debug outputs, etc. Is fast a complement of our issues system: http://kune.ourproject.org/issues/
+ We use org-mode in emacs to easy manage this file
+
** Symbols
<nick> or <n> == reported by / commented by
nick == assigned to
-** Notes
- Use org-mode in emacs to easy manage this file
* SHORT-TERM (URGENT)
+** TODO Use Jenkins in dev machine (reoconfigure hostname and put link in web)
** TODO WIAB History integration
+*** Initial defpage #home
+**** u: if logged: wave list (#inbox) else: signin
+**** g: def project
+**** p: idem
+*** #example.com/w+abcd
+**** u: if logged: this wave else: signin and return to this
+**** g: equivalent group page? no, only with a button-action
+**** p: idem
+*** #site.doc.1
+**** u: if logged: wave list else signin (or also a button-action to go to open in the user-list)
+**** g: group content
+**** p: idem
+*** Some javadoc:
HistorySupport.java
WaverefEncoder.java
/**
@@ -24,7 +39,7 @@
* @param path The path containing the domain and wave ID.
* @return The corresponding WaveRef object, or null if the path was invalid.
* @throws InvalidWaveRefException If the path contains less than 2 tokens or 3 tokens.
- */
+ */
** TODO Server side extensions configuration menu
A way to specify the default extensions in a client of a wave server.
** TODO style injection:
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManager.java 2011-03-21 10:10:34 UTC (rev 1287)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManager.java 2011-03-22 10:21:25 UTC (rev 1288)
@@ -19,19 +19,14 @@
*/
package org.ourproject.kune.platf.server.manager;
-import java.util.List;
-
import cc.kune.core.shared.domain.TagCloudResult;
import cc.kune.domain.Content;
import cc.kune.domain.Group;
-import cc.kune.domain.Tag;
import cc.kune.domain.TagUserContent;
import cc.kune.domain.User;
public interface TagUserContentManager extends Manager<TagUserContent, Long> {
- List<Tag> find(User user, Content content);
-
TagCloudResult getTagCloudResultByGroup(Group group);
String getTagsAsString(User user, Content content);
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java 2011-03-21 10:10:34 UTC (rev 1287)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java 2011-03-22 10:21:25 UTC (rev 1288)
@@ -56,8 +56,7 @@
this.finder = finder;
}
- @Override
- public List<Tag> find(final User user, final Content content) {
+ List<Tag> find(final User user, final Content content) {
return finder.findTags(user, content);
}
@@ -77,22 +76,22 @@
public TagCloudResult getTagCloudResultByGroup(final Group group) {
try {
return new TagCloudResult(getSummaryByGroup(group), getMaxCount(group), getMinCount(group));
- } catch (NoResultException e) {
+ } catch (final NoResultException e) {
return new TagCloudResult();
}
}
@Override
public String getTagsAsString(final User user, final Content content) {
- String tagConcatenated = "";
+ final StringBuffer tagConcatenated = new StringBuffer();
if (user.getId() != null) {
// FIXME: User must be persisted (this fails on tests)
final List<Tag> tags = find(user, content);
for (final Tag tag : tags) {
- tagConcatenated += " " + tag.getName();
+ tagConcatenated.append(" ").append(tag.getName());
}
}
- return tagConcatenated.replaceFirst(" ", "");
+ return tagConcatenated.toString().replaceFirst(" ", "");
}
@Override
Modified: trunk/src/test/java/cc/kune/domain/finders/TagUserContentFinderTest.java
===================================================================
--- trunk/src/test/java/cc/kune/domain/finders/TagUserContentFinderTest.java 2011-03-21 10:10:34 UTC (rev 1287)
+++ trunk/src/test/java/cc/kune/domain/finders/TagUserContentFinderTest.java 2011-03-22 10:21:25 UTC (rev 1288)
@@ -19,6 +19,8 @@
*/
package cc.kune.domain.finders;
+import javax.persistence.NoResultException;
+
import org.junit.Test;
import org.ourproject.kune.platf.server.PersistencePreLoadedDataTest;
@@ -29,8 +31,9 @@
@Inject
TagUserContentFinder tag;
- @Test
- public void test() {
+ @Test(expected = NoResultException.class)
+ public void testNoTags() {
tag.getTagsGroups(groupManager.getSiteDefaultGroup());
}
+
}
Modified: trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagUserContentTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagUserContentTest.java 2011-03-21 10:10:34 UTC (rev 1287)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagUserContentTest.java 2011-03-22 10:21:25 UTC (rev 1288)
@@ -39,7 +39,7 @@
@Inject
TagUserContentFinder finder;
@Inject
- TagUserContentManager manager;
+ TagUserContentManagerDefault manager;
private Tag tag;
@Inject
1
0
Author: vjrj_
Date: 2011-03-21 11:10:34 +0100 (Mon, 21 Mar 2011)
New Revision: 1287
Modified:
trunk/pom.xml
Log:
pom report fixes
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-03-19 01:20:01 UTC (rev 1286)
+++ trunk/pom.xml 2011-03-21 10:10:34 UTC (rev 1287)
@@ -18,6 +18,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<slf4j.version>1.6.1</slf4j.version>
<openjpa.version>2.0.1</openjpa.version>
+ <skipTests>true</skipTests>
</properties>
<repositories>
<repository>
@@ -783,7 +784,7 @@
<forkMode>pertest</forkMode>
<!-- Skip the normal tests, we'll run them in the integration-test
phase -->
- <skipTests>true</skipTests>
+ <skipTests>${skipTests}</skipTests>
</configuration>
<executions>
<execution>
@@ -1129,6 +1130,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
+ <version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -1144,14 +1146,17 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jdepend-maven-plugin</artifactId>
+ <version>2.0-beta-2</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
+ <version>2.3.2</version>
</plugin>
</plugins>
</reporting>
1
0
Author: vjrj_
Date: 2011-03-19 02:20:01 +0100 (Sat, 19 Mar 2011)
New Revision: 1286
Modified:
trunk/pom.xml
Log:
pom.xml updated
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-03-19 00:45:29 UTC (rev 1285)
+++ trunk/pom.xml 2011-03-19 01:20:01 UTC (rev 1286)
@@ -775,7 +775,7 @@
<!-- =roo + custom -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.5</version>
+ <version>2.8</version>
<configuration>
<excludes>
<exclude>**/*_Roo_*</exclude>
@@ -783,7 +783,7 @@
<forkMode>pertest</forkMode>
<!-- Skip the normal tests, we'll run them in the integration-test
phase -->
- <skip>true</skip>
+ <skipTests>true</skipTests>
</configuration>
<executions>
<execution>
@@ -984,7 +984,7 @@
</manifest>
<manifestEntries>
<mode>development</mode>
- <url>${pom.url}</url>
+ <url>${project.url}</url>
</manifestEntries>
</archive>
</configuration>
1
0
Author: vjrj_
Date: 2011-03-19 01:45:29 +0100 (Sat, 19 Mar 2011)
New Revision: 1285
Modified:
trunk/pom.xml
Log:
pom.xml updated
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-03-18 22:56:27 UTC (rev 1284)
+++ trunk/pom.xml 2011-03-19 00:45:29 UTC (rev 1285)
@@ -65,11 +65,6 @@
<url>http://maven.jahia.org/maven2/</url>
</repository>
<repository>
- <id>ext-gxt</id>
- <name>ext-gxt at jahia</name>
- <url>http://maven.jahia.org/maven2/</url>
- </repository>
- <repository>
<id>cobogw</id>
<name>Cobogw repository at googlecode</name>
<url>http://cobogw.googlecode.com/svn/maven2</url>
@@ -297,11 +292,6 @@
</dependency>
<!-- utilities -->
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- <dependency>
<groupId>net.sf.dozer</groupId>
<artifactId>dozer</artifactId>
<version>4.0</version>
@@ -910,7 +900,7 @@
<compileReport>true</compileReport>
<logLevel>INFO</logLevel>
<style>OBF</style>
- <noServer>true</noServer>
+ <noServer>true</noServer>
<gwtVersion>${gwt.version}</gwtVersion>
<runTarget>/ws/ws.html?log_level=DEBUG</runTarget>
<hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
1
0
r1284 - in trunk: . src/main/java/org/ourproject/kune/platf/server/manager/impl src/test/java/org/ourproject/kune/platf/integration src/test/java/org/ourproject/kune/platf/server
by Vicente J. Ruiz Jurado 18 Mar '11
by Vicente J. Ruiz Jurado 18 Mar '11
18 Mar '11
Author: vjrj_
Date: 2011-03-18 23:56:27 +0100 (Fri, 18 Mar 2011)
New Revision: 1284
Modified:
trunk/DEV-GUIDE
trunk/TODO
trunk/pom.xml
trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java
trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java
trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java
Log:
Some tests fixed, more doc
Modified: trunk/DEV-GUIDE
===================================================================
--- trunk/DEV-GUIDE 2011-03-18 09:12:42 UTC (rev 1283)
+++ trunk/DEV-GUIDE 2011-03-18 22:56:27 UTC (rev 1284)
@@ -4,23 +4,9 @@
'''Note:''' Please edit trunk/DEV-GUIDE instead of this wiki page.
-==Get in touch==
-
-===Mailing lists===
-
-We use mainly two lists:
-* [https://lists.ourproject.org/cgi-bin/mailman/listinfo/kune-devel kune-devel] for all development related topics
-* [https://lists.ourproject.org/cgi-bin/mailman/listinfo/kune-commits kune-commits] where the svn sends the commit logs and summaries
-
-It's recommended to be subscribed to both if you want to participate in the development.
-
-===Twitter/identica===
-
-Follow @kuneproject in twitter and @kune in identica.
-
==Development Environment==
-===Initial steps for get a Dev environment===
+===Initial steps===
Install some basic tools (if don't have it). In debian and derivatives:
@@ -30,11 +16,11 @@
sudo apt-get install openjdk-6-jdk
-Note: we use subversion for our code, maven for ints dependencies, and Wave in a box (WIAB) uses mercurial. Also you will need a modern browser like firefox or chromium, and some extensions to live happier:
+Note: we use subversion for our code, maven for its dependencies, and Wave In a Box (WIAB) uses mercurial. Also you will need a modern browser like firefox or chromium, and some extensions to live happier:
http://ourproject.org/moin/Contributors#Recommended_Firefox_Extensions
-the previous page has also other more general information (texts and references) the interest for contributors.
+the previous page has also other more general information (texts and references) of interest for contributors.
===Get the code: How to checkout the Kune code===
@@ -61,6 +47,8 @@
Ensure Eclipse is configured to use Java 1.6.
+Of course, you can use other IDEs (and please help us to improve this doc in this case).
+
===Optional maven-eclipse integration ===
Check:
@@ -89,19 +77,20 @@
* Google Plugin for Eclipse https://code.google.com/intl/en/eclipse/docs/getting_started.html
* Subversive or Subclipse
-====Some recomended & suggested plugins for Eclipse====
+====Some other recomended & suggested plugins for Eclipse====
Also from the Marketplace:
+* The GWT Designer GUI Builder plugin (a great helper to work with GWT UiBinder)
* The PMD Eclipse plugin
* The FindBugs plugin
-* The GWT Designer GUI Builder plugin
-* The Mylyn Trac Connector (to integrate our trac issues system from http://kune.ourproject.org/issues/)
+* The Mylyn Trac Connector (to integrate our trac issues system: http://kune.ourproject.org/issues/)
Also maybe it's interesting some other plugins like:
+
* Quick Junit
* JUnitHelper
-* AnyEditTools (for remove tabs and so on)
+* AnyEditTools (to remove tabs and so on)
* MercurialEclipse (if you wanna play with the WIAB code)
====Other eclipse info====
@@ -115,11 +104,11 @@
===GWT's Hosted Mode===
-FIXME (this is outdated) For start the hosted mode, you can both execute from command line:
+To start the hosted mode, you can both execute the launch 'kune client -no-server' from your Eclipse or run from command line:
- mvn gwt-maven:gwt
+ mvn gwt:run
-Also, you can generate a hosted mode launch configuration in eclipse. 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 /ws/?locale=en&log_level=INFO -port 8080" and in the "Classpath User Entries":
+You can create a custom launch also at "Run configuration" (Run > Open Run Dialog) in eclipse with Project: "org.ourproject.kune" with Main class: "com.google.gwt.dev.DevMode", with this program arguments (or similar): "-noserver -out gwt-out /ws/?locale=en&log_level=INFO -port 8080" and in the "Classpath User Entries":
* gwt-dev-[linux|mac|windows].jar (Add External Jar and choose it from your gwt installation directory)
* java - /kune/src/main
* kune (default classpath)
@@ -361,3 +350,17 @@
*
*/
</pre>
+
+==Get in touch==
+
+===Mailing lists===
+
+We use mainly two lists:
+* [https://lists.ourproject.org/cgi-bin/mailman/listinfo/kune-devel kune-devel] for all development related topics
+* [https://lists.ourproject.org/cgi-bin/mailman/listinfo/kune-commits kune-commits] where the svn sends the commit logs and summaries
+
+It's recommended to be subscribed to both if you want to participate in the development.
+
+===Twitter/identica===
+
+Follow @kuneproject in twitter and @kune in identica.
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2011-03-18 09:12:42 UTC (rev 1283)
+++ trunk/TODO 2011-03-18 22:56:27 UTC (rev 1284)
@@ -283,6 +283,7 @@
** vjrj <v> IconHyperlink.java and IconLabel.java to gwt1.5
* MID-TERM
+** Enable two Waves per doc: 1 for the doc (no comments enabled), other for comments. Similar to docs.google.com comments approach.
** TODO start/stop init scripts
https://groups.google.com/group/wave-protocol/browse_thread/thread/d9cdcea0…
./platforms/ubuntu/server-wrapper.sh
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-03-18 09:12:42 UTC (rev 1283)
+++ trunk/pom.xml 2011-03-18 22:56:27 UTC (rev 1284)
@@ -910,6 +910,7 @@
<compileReport>true</compileReport>
<logLevel>INFO</logLevel>
<style>OBF</style>
+ <noServer>true</noServer>
<gwtVersion>${gwt.version}</gwtVersion>
<runTarget>/ws/ws.html?log_level=DEBUG</runTarget>
<hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java 2011-03-18 09:12:42 UTC (rev 1283)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java 2011-03-18 22:56:27 UTC (rev 1284)
@@ -40,6 +40,7 @@
import org.ourproject.kune.platf.server.properties.ChatProperties;
import org.waveprotocol.box.server.authentication.PasswordDigest;
+import cc.kune.core.client.errors.GroupNameInUseException;
import cc.kune.core.client.errors.I18nNotFoundException;
import cc.kune.core.client.errors.UserRegistrationException;
import cc.kune.core.shared.i18n.I18nTranslationService;
@@ -95,7 +96,14 @@
}
final PasswordDigest passwdDigest = new PasswordDigest(passwd.toCharArray());
- createWaveAccount(shortName, passwdDigest);
+ try {
+ createWaveAccount(shortName, passwdDigest);
+ } catch (UserRegistrationException e) {
+ if (finder.getByShortName(shortName) != null)
+ throw new GroupNameInUseException();
+ else
+ throw e;
+ }
// if (userPropGroup == null) {
// userPropGroup = propGroupManager.find(User.PROPS_ID);
// }
Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java 2011-03-18 09:12:42 UTC (rev 1283)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java 2011-03-18 22:56:27 UTC (rev 1284)
@@ -31,7 +31,9 @@
import org.ourproject.kune.platf.server.properties.PropertiesFileName;
import org.ourproject.kune.wiki.server.WikiServerModule;
import org.waveprotocol.box.server.CoreSettings;
+import org.waveprotocol.box.server.ServerModule;
import org.waveprotocol.box.server.persistence.PersistenceModule;
+import org.waveprotocol.wave.federation.noop.NoOpFederationModule;
import cc.kune.wave.server.CustomSettingsBinder;
@@ -51,11 +53,11 @@
injector = Guice.createInjector(CustomSettingsBinder.bindSettings(TestConstants.WAVE_TEST_PROPFILE,
CoreSettings.class));
final PersistenceModule wavePersistModule = injector.getInstance(PersistenceModule.class);
-
+ final NoOpFederationModule federationModule = injector.getInstance(NoOpFederationModule.class);
final Injector childInjector = injector.createChildInjector(wavePersistModule,
FinderRegistry.init(new JpaPersistModule(TestConstants.PERSISTENCE_UNIT)),
- new PlatformServerModule(), new DocumentServerModule(), new ChatServerModule(),
- new WikiServerModule(), new AbstractModule() {
+ new PlatformServerModule(), new DocumentServerModule(), new ChatServerModule(), new ServerModule(
+ false), federationModule, new WikiServerModule(), new AbstractModule() {
@Override
protected void configure() {
bindScope(SessionScoped.class, Scopes.SINGLETON);
Modified: trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java 2011-03-18 09:12:42 UTC (rev 1283)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java 2011-03-18 22:56:27 UTC (rev 1284)
@@ -26,10 +26,12 @@
import org.ourproject.kune.platf.server.init.FinderRegistry;
import org.ourproject.kune.platf.server.properties.PropertiesFileName;
import org.waveprotocol.box.server.CoreSettings;
+import org.waveprotocol.box.server.ServerModule;
import org.waveprotocol.box.server.authentication.AccountStoreHolder;
import org.waveprotocol.box.server.persistence.AccountStore;
import org.waveprotocol.box.server.persistence.PersistenceException;
import org.waveprotocol.box.server.persistence.PersistenceModule;
+import org.waveprotocol.wave.federation.noop.NoOpFederationModule;
import cc.kune.wave.server.CustomSettingsBinder;
@@ -50,8 +52,9 @@
final Injector injector = Guice.createInjector(CustomSettingsBinder.bindSettings(
TestConstants.WAVE_TEST_PROPFILE, CoreSettings.class));
final PersistenceModule wavePersistModule = injector.getInstance(PersistenceModule.class);
- final Injector childInjector = injector.createChildInjector(wavePersistModule,
- FinderRegistry.init(new JpaPersistModule(persistenceUnit)), module, new Module() {
+ final NoOpFederationModule federationModule = injector.getInstance(NoOpFederationModule.class);
+ final Injector childInjector = injector.createChildInjector(wavePersistModule, new ServerModule(false),
+ federationModule, FinderRegistry.init(new JpaPersistModule(persistenceUnit)), module, new Module() {
@Override
public void configure(final Binder binder) {
binder.bindScope(SessionScoped.class, Scopes.SINGLETON);
1
0
18 Mar '11
Author: vjrj_
Date: 2011-03-18 10:12:42 +0100 (Fri, 18 Mar 2011)
New Revision: 1283
Modified:
trunk/DEV-GUIDE
trunk/INSTALL
trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java
Log:
Doc updated
Modified: trunk/DEV-GUIDE
===================================================================
--- trunk/DEV-GUIDE 2011-03-17 18:24:32 UTC (rev 1282)
+++ trunk/DEV-GUIDE 2011-03-18 09:12:42 UTC (rev 1283)
@@ -1,34 +1,140 @@
=Kune developer's guide=
-''This is the trunk/DEV-GUIDE file (must have the same content as the [http://kune.ourproject.org/wiki/index.php?title=Kune_developer's_guide wiki page])''
+''This is the trunk/DEV-GUIDE file (must have the same content that this [http://kune.ourproject.org/wiki/index.php?title=Kune_developer's_guide wiki page])''.
-==How to checkout the code of kune==
+'''Note:''' Please edit trunk/DEV-GUIDE instead of this wiki page.
-Our code is in the svn of ourproject.
- http://ourproject.org/scm/?group_id=407
+==Get in touch==
-===Anonymous Subversion Access===
+===Mailing lists===
+We use mainly two lists:
+* [https://lists.ourproject.org/cgi-bin/mailman/listinfo/kune-devel kune-devel] for all development related topics
+* [https://lists.ourproject.org/cgi-bin/mailman/listinfo/kune-commits kune-commits] where the svn sends the commit logs and summaries
+
+It's recommended to be subscribed to both if you want to participate in the development.
+
+===Twitter/identica===
+
+Follow @kuneproject in twitter and @kune in identica.
+
+==Development Environment==
+
+===Initial steps for get a Dev environment===
+
+Install some basic tools (if don't have it). In debian and derivatives:
+
+ sudo apt-get install subversion maven2 mercurial
+
+and Java 6:
+
+ sudo apt-get install openjdk-6-jdk
+
+Note: we use subversion for our code, maven for ints dependencies, and Wave in a box (WIAB) uses mercurial. Also you will need a modern browser like firefox or chromium, and some extensions to live happier:
+
+http://ourproject.org/moin/Contributors#Recommended_Firefox_Extensions
+
+the previous page has also other more general information (texts and references) the interest for contributors.
+
+===Get the code: How to checkout the Kune code===
+
+Our code is in the svn of ourproject:
+http://ourproject.org/scm/?group_id=407
+
+====Anonymous Subversion Access====
+
This project's SVN repository can be checked out through anonymous access with the following command(s).
svn checkout svn://scm.ourproject.org/svnroot/kune/trunk
-===Developer Subversion Access via SSH===
+====Developer Subversion Access via SSH====
Only project developers can access the SVN tree via this method. SSH must be installed on your client machine. Substitute colaborator with the proper values. Enter your ourproject web password when prompted.
svn checkout svn+ssh://[email protected]/svnroot/kune/trunk
-== Mailing lists==
+The Eclipse IDE has several plugins for SVN (subversive, and subclipse) and it's hightly recomended to use it, because the get rid of file/package renaming and other refactorization.
-We use mainly two lists:
-* [https://lists.ourproject.org/cgi-bin/mailman/listinfo/kune-devel kune-devel] for all development related topics
-* [https://lists.ourproject.org/cgi-bin/mailman/listinfo/kune-commits kune-commits] where the svn sends the commit logs and summaries
+===Next step: install Eclipse===
-It's recommended to be subscribed to both if you want to participate in the development.
+http://www.eclipse.org/downloads/
-==Some relevant docs for kune development==
+Ensure Eclipse is configured to use Java 1.6.
+===Optional maven-eclipse integration ===
+
+Check:
+http://google-web-toolkit.googlecode.com/svn/trunk/samples/expenses/README-MAVEN.txt
+
+===Eclipse configuration===
+
+Running (in the trunk directory):
+
+ 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: Window > Preferences > Java > Build Path > Classpath Variables > New) to the location of your local maven repo (in our case /home/youruser/.m2/repository).
+
+===UTF 8===
+
+The charset used in Kune is UTF8. In Eclipse, check the text-file enconding in Package Explorer > Preferences > Resource > Text file encoding.
+
+Please don't send patchs in other charsets.
+
+====Some mandatory plugins for Eclipse====
+
+From the Eclipse Marketplace (Help > Eclipse Marketplace) install:
+
+* Google Plugin for Eclipse https://code.google.com/intl/en/eclipse/docs/getting_started.html
+* Subversive or Subclipse
+
+====Some recomended & suggested plugins for Eclipse====
+
+Also from the Marketplace:
+
+* The PMD Eclipse plugin
+* The FindBugs plugin
+* The GWT Designer GUI Builder plugin
+* The Mylyn Trac Connector (to integrate our trac issues system from http://kune.ourproject.org/issues/)
+
+Also maybe it's interesting some other plugins like:
+* Quick Junit
+* JUnitHelper
+* AnyEditTools (for remove tabs and so on)
+* MercurialEclipse (if you wanna play with the WIAB code)
+
+====Other eclipse info====
+
+Useful info about GWT and Eclipse (interesting if you have problems with number of files open or with the memory use):
+http://code.google.com/p/gwt-examples/wiki/gwtEclipseFaqs
+
+===Install Kune===
+
+Install Kune (follow the trunk/INSTALL file instructions) and run Kune for the first time. This will initialize the database, or configure the XMPP server, for instance.
+
+===GWT's Hosted Mode===
+
+FIXME (this is outdated) For start the hosted mode, you can both execute from command line:
+
+ mvn gwt-maven:gwt
+
+Also, you can generate a hosted mode launch configuration in eclipse. 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 /ws/?locale=en&log_level=INFO -port 8080" and in the "Classpath User Entries":
+* gwt-dev-[linux|mac|windows].jar (Add External Jar and choose 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:
+ -Xmx1024M
+
+before run hosted mode compile once with:
+ mvn compile && mvn gwt:compile
+and deploy with:
+ script/deploy_gwt.sh
+and then we run jetty (with "script/server.sh" also you can run server in debug mode, see TROUBLESHOOT). This is quite useful to put breakpoints in the server code.
+
+==Some relevant docs for Kune development==
+
See this files in trunk directory:
* trunk/img/kune-arch.png # architecture diagram
@@ -41,12 +147,12 @@
* trunk/img/kune-hibernate-diagram-oct-08.png
but is more easy to look in the Java classes of package cc.kune.domain
-* [http://kune.ourproject.org/2009/01/status-jan09/ Video/presentation of kune]
+* [http://kune.ourproject.org/2009/01/status-jan09/ Video/presentation of Kune]
* trunk/img/kune-diagram-part1-0.1.png # old diagrams but a good summary
* trunk/img/kune-diagram-part2-0.1.png
* trunk/img/kune-diagram-part3-0.1.png
-==Languages and frameworks used in kune development==
+==Languages and frameworks used in Kune development==
===Java===
@@ -100,7 +206,7 @@
----
-====Suco====
+====GIN====
[https://code.google.com/p/google-gin/ Gin] is the IoC library that we use for GWT. For more documentation see [https://code.google.com/p/google-gin/wiki/GinTutorial the Gin tutorial]. See also our Guice section above.
@@ -158,65 +264,10 @@
this generates four classes GroupOptions (the external interface), GroupOptionsPresenter (the Presenter with the business logic, the part you must test well), the GroupOptionsView (the interface to the panel, the UI code), the GroupOptionsPanel (the UI code, here all the gwt UI stuff). Also gives you in the standard output a sample code to use suco in a module to build these objects.
* IoC: as we described before we use guice and suco for IoC. Again, see HelloWorldModule class for a very simple sample of gwt module using suco.
-==Development Environment==
-===Prerequisite: Install maven and Eclipse ===
-
-Install maven2. In debian system and derivatives "apt-get install maven2"
-
-http://www.eclipse.org/downloads/
-
-Ensure Eclipse is configured to use Java 1.6.
-
-===Optional maven-eclipse integration ===
-
-Check:
-http://google-web-toolkit.googlecode.com/svn/trunk/samples/expenses/README-MAVEN.txt
-
-===Prerequisite: Install kune===
-
-Install kune (see trunk/INSTALL file) and run kune for the first time.
-
-===Eclipse configuration===
-
-Running (in the trunk directory):
-
- 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/youruser/.m2/repository).
-
-Is recommended that you use the PMD plugin:
-http://pmd.sourceforge.net/
-http://pmd.sourceforge.net/eclipse/
-
-Useful info about gwt and Eclipse:
-http://code.google.com/p/gwt-examples/wiki/gwtEclipseFaqs
-
-===GWT's Hosted Mode===
-
-FIXME (this is outdated) For start the hosted mode, you can both execute from command line:
-
- mvn gwt-maven:gwt
-
-Also, you can generate a hosted mode launch configuration in eclipse. 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 /ws/?locale=en&log_level=INFO -port 8080" and in the "Classpath User Entries":
-* gwt-dev-[linux|mac|windows].jar (Add External Jar and choose 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:
- -Xmx1024M
-
-before run hosted mode compile once with:
- mvn compile && mvn gwt:compile
-and deploy with:
- script/deploy_gwt.sh
-and then we run jetty (with "script/server.sh" also you can run server in debug mode, see TROUBLESHOOT). This is quite useful to put breakpoints in the server code.
-
==Code preferences==
-We use some eclipse code preferences for kune project:
+We use some eclipse code preferences for Kune project:
dev-utils/kune.cleanup.eclipse.preferences.xml
dev-utils/kune.formatter.eclipse.preferences.xml
please use it if you want to contribute.
@@ -244,7 +295,7 @@
==Use of mylyn in eclipse==
-We recommend to use mylyn to track the kune issues. Use the trac mylyn connector for http://kune.ourproject.org/issues/.
+We recommend to use mylyn to track the Kune issues. Use the trac mylyn connector for http://kune.ourproject.org/issues/.
==Code samples==
@@ -271,7 +322,7 @@
Attach the following notices to each source of the program at the begining:
<pre>
- (c) 2007-2011 The kune development team (see CREDITS for details)
+ (c) 2007-2011 The Kune development team (see CREDITS for details)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@@ -287,13 +338,13 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
</pre>
-In Java, something like this (you can put your name instead of "kune team" if you create new files):
+In Java, something like this (you can put your name instead of "Kune team" if you create new files):
<pre>
/*
*
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
+ * Copyright (C) 2007-2011 The Kune development team (see CREDITS for details)
+ * This file is part of Kune.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL 2011-03-17 18:24:32 UTC (rev 1282)
+++ trunk/INSTALL 2011-03-18 09:12:42 UTC (rev 1283)
@@ -1,25 +1,13 @@
=INSTALL=
-==Production instructions==
+==Development environment instructions==
-With
- mvn package
-an executable target/kune-VERSION.one-jar.jar is generated in target directory.
-
-==Development instructions==
-
===Prerrequisites===
-- Install java-jdk (>=6), maven2, mysql (> 5.0) and for example eclipse
-- Install gwt >= 2.1.1 (recommended via Eclipse GWT plugin https://code.google.com/intl/en/eclipse/docs/getting_started.html)
+* Install java-jdk (>=6), maven2, mysql (> 5.0) and eclipse (well, this depends on what IDE do you use for development). In debian and derivatives:
-=== Wave in a Box ===
+ sudo apt-get install subversion maven2 mercurial openjdk-6-jdk mysql-server
-Follow "Configure Your XMPP Server" from:
-https://sites.google.com/a/waveprotocol.org/wave-protocol/code/installation
-and:
-https://sites.google.com/a/waveprotocol.org/wave-protocol/federation/openfire-installation
-
===MYSQL configuration===
====Before db creation====
@@ -30,8 +18,10 @@
default-character-set=utf8
default-collation=utf8_bin
-After this modification you have to restart the mysql database.
+After this modification you have to restart the mysql database. In debian systems:
+/etc/init.d/mysql restart
+
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_bin DEFAULT COLLATE utf8_bin;
@@ -53,22 +43,16 @@
GRANT ALL PRIVILEGES ON kune_openfire.* TO kune@localhost IDENTIFIED BY 'PUT_HERE_A_DB_PASSWD';
FLUSH PRIVILEGES;
+Of course, change PUT_HERE_A_DB_PASSWD with something different.
+
===Source code===
-- Compile with maven:
+See the DEVGUIDE for instructions of how to download the Kune code.
+
+Compile with maven:
# (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
-
-====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
-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/
@@ -91,8 +75,15 @@
===Run openfire jabber server===
-Install and run a openfire jabber server (see Appendix A for proper configuration of openfire) or ejabberd.
+Install and run a openfire jabber server (see Appendix A for proper configuration of openfire).
+===Wave in a Box===
+
+Follow "Configure Your XMPP Server" from:
+https://sites.google.com/a/waveprotocol.org/wave-protocol/code/installation
+and:
+https://sites.google.com/a/waveprotocol.org/wave-protocol/federation/openfire-installation
+
===Install jmagick===
Install jmagick-jni. In debian: apt-get install libjmagick6-jni (version 6.2.6-0) also you need or:
@@ -128,14 +119,22 @@
Open your browser and connect to http://yourIP:8080/kune
-===Appendix A: Configuration of Openfire xmpp server===
+==Production environment instructions==
-Install openfire in your system.
+With
+ mvn package
+an executable target/kune-VERSION.one-jar.jar is generated in target directory.
+==Appendix A: Configuration of Openfire xmpp server==
+
+Install openfire in your system: http://www.igniterealtime.org/downloads/index.jsp
+
+In debian and derivatives, to install the .deb its highly recomended.
+
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
+See emite (our xmpp software) Server Compatibility: https://code.google.com/p/emite/wiki/ServerAndClientsCompatibility
Connect to openfire administration: http://localhost:9090/
Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java 2011-03-17 18:24:32 UTC (rev 1282)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java 2011-03-18 09:12:42 UTC (rev 1283)
@@ -39,7 +39,7 @@
super.addStyleName("kune-Margin-Large-trbl");
loginNickOrEmailField = new TextField<String>();
- loginNickOrEmailField.setFieldLabel(i18n.t("Nickname or email"));
+ loginNickOrEmailField.setFieldLabel(i18n.t("Nickname"));
loginNickOrEmailField.setName(NICKOREMAIL_FIELD);
loginNickOrEmailField.setWidth(DEF_SMALL_FIELD_WIDTH);
loginNickOrEmailField.setAllowBlank(false);
1
0
r1282 - in trunk/src/main/java: cc/kune/core/client/tags cc/kune/core/shared/domain org/ourproject/kune/platf/server/manager
by Vicente J. Ruiz Jurado 17 Mar '11
by Vicente J. Ruiz Jurado 17 Mar '11
17 Mar '11
Author: vjrj_
Date: 2011-03-17 19:24:32 +0100 (Thu, 17 Mar 2011)
New Revision: 1282
Modified:
trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPanel.java
trunk/src/main/java/cc/kune/core/shared/domain/TagCloudResult.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java
Log:
tags widget
Modified: trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPanel.java 2011-03-17 18:03:05 UTC (rev 1281)
+++ trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPanel.java 2011-03-17 18:24:32 UTC (rev 1282)
@@ -34,11 +34,12 @@
private final FlowPanel flowPanel;
private final I18nTranslationService i18n;
+ private FlowPanel mainPanel;
@Inject
public TagsSummaryPanel(final I18nTranslationService i18n, final WsArmor ws) {
this.i18n = i18n;
- FlowPanel mainPanel = new FlowPanel();
+ mainPanel = new FlowPanel();
flowPanel = new FlowPanel();
flowPanel.setWidth("100%");
Label header = new Label(i18n.t("Tags"));
@@ -74,11 +75,11 @@
@Override
public void setVisible(boolean visible) {
- flowPanel.setVisible(visible);
+ mainPanel.setVisible(visible);
}
@Override
public Widget asWidget() {
- return flowPanel;
+ return mainPanel;
}
}
Modified: trunk/src/main/java/cc/kune/core/shared/domain/TagCloudResult.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/domain/TagCloudResult.java 2011-03-17 18:03:05 UTC (rev 1281)
+++ trunk/src/main/java/cc/kune/core/shared/domain/TagCloudResult.java 2011-03-17 18:24:32 UTC (rev 1282)
@@ -19,6 +19,7 @@
*/
package cc.kune.core.shared.domain;
+import java.util.ArrayList;
import java.util.List;
import com.google.gwt.user.client.rpc.IsSerializable;
@@ -29,6 +30,7 @@
private int minValue;
public TagCloudResult() {
+ this(new ArrayList<TagCount>(), 0, 0);
}
public TagCloudResult(final List<TagCount> tagCountList, final int maxValue, final int minValue) {
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java 2011-03-17 18:03:05 UTC (rev 1281)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java 2011-03-17 18:24:32 UTC (rev 1282)
@@ -75,7 +75,11 @@
@Override
public TagCloudResult getTagCloudResultByGroup(final Group group) {
- return new TagCloudResult(getSummaryByGroup(group), getMaxCount(group), getMinCount(group));
+ try {
+ return new TagCloudResult(getSummaryByGroup(group), getMaxCount(group), getMinCount(group));
+ } catch (NoResultException e) {
+ return new TagCloudResult();
+ }
}
@Override
1
0