[kune-commits] r881 - in trunk: .
src/main/java/org/ourproject/kune/app
src/main/java/org/ourproject/kune/app/client
src/main/java/org/ourproject/kune/app/server
src/main/java/org/ourproject/kune/chat
src/main/java/org/ourproject/kune/chat/client
src/main/java/org/ourproject/kune/chat/client/cnt
src/main/java/org/ourproject/kune/chat/client/ctx
src/main/java/org/ourproject/kune/chat/client/ctx/rooms
src/main/java/org/ourproject/kune/docs/client
src/main/java/org/ourproject/kune/docs/client/actions
src/main/java/org/ourproject/kune/docs/client/cnt
src/main/java/org/ourproject/kune/docs/client/ctx
src/main/java/org/ourproject/kune/docs/client/ctx/admin
src/main/java/org/ourproject/kune/platf/client/actions
src/main/java/org/ourproject/kune/platf/client/actions/toolbar
src/main/java/org/ourproject/kune/platf/client/app
src/main/java/org/ourproject/kune/platf/client/dto
src/main/java/org/ourproject/kune/platf/client/services
src/main/java/org/ourproject/kune/platf/client/state
src/main/java/org/ourproject/kune/platf/client/tool
src/main/java/org/ourproject/kune/platf/client/ui
src/main/java/org/ourproject/kune/platf/client/ui/dialogs
src/main/java/org/ourproject/kune/platf/client/ui/gridmenu
src/main/java/org/ourproject/kune/platf/client/ui/rate
src/main/java/org/ourproject/kune/platf/server
src/main/java/org/ourproject/kune/platf/server/domain
src/main/java/org/ourproject/kune/platf/server/manager
src/main/java/org/ourproject/kune/platf/server/manager/impl
src/main/java/org/ourproject/kune/workspace/client/ctxnav
src/main/java/org/ourproject/kune/workspace/client/entitylogo
src/main/java/org/ourproject/kune/workspace/client/i18n
src/main/java/org/ourproject/kune/workspace/client/licensefoot
src/main/java/org/ourproject/kune/workspace/client/newgroup
src/main/java/org/ourproject/kune/workspace/client/search
src/main/java/org/ourproject/kune/workspace/client/signin
src/main/java/org/ourproject/kune/workspace/client/site
src/main/java/org/ourproject/kune/workspace/client/sitebar/sitelogo
src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions
src/main/java/org/ourproject/kune/workspace/client/sitebar/siteprogress
src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic
src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesearch
src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign
src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu
src/main/java/org/ourproject/kune/workspace/client/skel
src/main/java/org/ourproject/kune/workspace/client/socialnet
src/main/java/org/ourproject/kune/workspace/client/summary
src/main/java/org/ourproject/kune/workspace/client/tags
src/main/java/org/ourproject/kune/workspace/client/themes
src/main/java/org/ourproject/kune/workspace/client/title
src/test/java/org/ourproject/kune/platf/client/actions
src/test/java/org/ourproject/kune/platf/client/state
src/test/java/org/ourproject/kune/platf/integration/site
src/test/java/org/ourproject/kune/platf/server/manager/impl
src/test/java/org/ourproject/kune/workspace/client/tags
vjrj
vjrj at ourproject.org
Wed Sep 24 03:47:49 CEST 2008
Author: vjrj
Date: 2008-09-24 03:47:16 +0200 (Wed, 24 Sep 2008)
New Revision: 881
Added:
trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationComponentGroup.java
trunk/src/main/java/org/ourproject/kune/platf/client/app/ToolGroup.java
trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneCoreModule.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUploadManager.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUtils.java
trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/FileManagerTest.java
trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/FileUtilsTest.java
Removed:
trunk/src/main/java/org/ourproject/kune/platf/client/services/Kune.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUploadManagerDefault.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUploadManagerRevisited.java
Modified:
trunk/pom.xml
trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml
trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java
trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java
trunk/src/main/java/org/ourproject/kune/chat/Kune-Chat.gwt.xml
trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java
trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java
trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java
trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatContentPresenter.java
trunk/src/main/java/org/ourproject/kune/chat/client/ctx/ChatContextPresenter.java
trunk/src/main/java/org/ourproject/kune/chat/client/ctx/rooms/RoomsAdminPresenter.java
trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.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/docs/client/actions/ContentEditAction.java
trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentEditInProgressAction.java
trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentPublishAction.java
trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentRejectAction.java
trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentSetStatusAction.java
trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentSubmitForPublishAction.java
trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentTranslationAction.java
trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentTrashAction.java
trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocumentContent.java
trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocumentContentPresenter.java
trunk/src/main/java/org/ourproject/kune/docs/client/ctx/DocumentContextPresenter.java
trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/AdminContextPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionButtonDescriptor.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionManager.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionMenuDescriptor.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbar.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/app/Application.java
trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java
trunk/src/main/java/org/ourproject/kune/platf/client/dto/ChatUserParamsDTO.java
trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserDTO.java
trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneErrorHandler.java
trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java
trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java
trunk/src/main/java/org/ourproject/kune/platf/client/state/StateManager.java
trunk/src/main/java/org/ourproject/kune/platf/client/state/StateManagerDefault.java
trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorItemPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/MenuItem.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/FileUploader.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/FileUploaderDialog.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridButton.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridDropConfiguration.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridMenuPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RateItPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RatePresenter.java
trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java
trunk/src/main/java/org/ourproject/kune/platf/server/domain/ChatUserParams.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/FileManager.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileManagerDefault.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nUITranslationService.java
trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcher.java
trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/Site.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitelogo/SiteLogoPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteprogress/SiteProgressPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesearch/SiteSearchPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesearch/SiteSearchPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignInLinkPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignInLinkPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntitySummary.java
trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntityWorkspace.java
trunk/src/main/java/org/ourproject/kune/workspace/client/skel/WorkspaceSkeleton.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePresenter.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/test/java/org/ourproject/kune/platf/client/actions/ActionRegistryTest.java
trunk/src/test/java/org/ourproject/kune/platf/client/state/StateManagerTest.java
trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java
trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java
Log:
(hosted mode not working, waiting emiteui bugfix)
Incomplete - task 63: Use ensureDebugId for automated testing
Complete - task 49: New server FileManager (to help with files)
Incomplete - task 51: File upload server manager
Incomplete - task 24: new suco 0.5.0 and emite 0.4.1
http://code.google.com/p/kune/issues/detail?id=24
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/pom.xml 2008-09-24 01:47:16 UTC (rev 881)
@@ -1,522 +1,603 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.ourproject</groupId>
- <artifactId>kune</artifactId>
- <packaging>jar</packaging>
- <version>0.0.4</version>
- <description>kune free/open/libre collaboration platform</description>
- <name>kune</name>
- <url>http://kune.ourproject.org</url>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.ourproject</groupId>
+ <artifactId>kune</artifactId>
+ <packaging>jar</packaging>
+ <version>0.0.4</version>
+ <description>
+ kune free/open/libre collaboration platform
+ </description>
+ <name>kune</name>
+ <url>http://kune.ourproject.org</url>
- <dependencies>
- <!-- guice -->
- <dependency>
- <groupId>com.google.code.guice</groupId>
- <artifactId>guice</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.guice</groupId>
- <artifactId>guice-servlet</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>aopalliance</groupId>
- <artifactId>aopalliance</artifactId>
- <version>1.0</version>
- </dependency>
+ <dependencies>
+ <!-- guice -->
+ <dependency>
+ <groupId>com.google.code.guice</groupId>
+ <artifactId>guice</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.guice</groupId>
+ <artifactId>guice-servlet</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>aopalliance</groupId>
+ <artifactId>aopalliance</artifactId>
+ <version>1.0</version>
+ </dependency>
- <!-- gwt -->
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-user</artifactId>
- <version>1.5.2</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-servlet</artifactId>
- <version>1.5.2</version>
- </dependency>
- <!--
- <dependency>
- <groupId>com.extjs</groupId>
- <artifactId>gxt</artifactId>
- <version>1.0-beta2</version>
- </dependency>
- -->
- <dependency>
- <groupId>com.gwtext</groupId>
- <artifactId>gwtext</artifactId>
- <version>2.0.5</version>
- </dependency>
- <dependency>
- <groupId>com.gwtextux</groupId>
- <artifactId>gwtextux</artifactId>
- <version>0.3.0b</version>
- </dependency>
- <dependency>
- <groupId>com.allen_sauer.gwt.log.gwt-log</groupId>
- <artifactId>gwt-log</artifactId>
- <version>2.5.2</version>
- </dependency>
- <dependency>
- <groupId>com.allen_sauer.gwt.voices.gwt-voices</groupId>
- <artifactId>gwt-voices</artifactId>
- <version>1.5.5</version>
- </dependency>
+ <!-- gwt -->
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <version>1.5.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-servlet</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <!--
+ <dependency>
+ <groupId>com.extjs</groupId>
+ <artifactId>gxt</artifactId>
+ <version>1.0-beta2</version>
+ </dependency>
+ -->
+ <dependency>
+ <groupId>com.gwtext</groupId>
+ <artifactId>gwtext</artifactId>
+ <version>2.0.5</version>
+ </dependency>
+ <dependency>
+ <groupId>com.gwtextux</groupId>
+ <artifactId>gwtextux</artifactId>
+ <version>0.3.0b</version>
+ </dependency>
+ <dependency>
+ <groupId>com.allen_sauer.gwt.log.gwt-log</groupId>
+ <artifactId>gwt-log</artifactId>
+ <version>2.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>com.allen_sauer.gwt.voices.gwt-voices</groupId>
+ <artifactId>gwt-voices</artifactId>
+ <version>1.5.5</version>
+ </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>
- </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>
+ </dependency>
+ <dependency>
+ <groupId>com.calclab</groupId>
+ <artifactId>suco</artifactId>
+ <version>0.5.02</version>
+ </dependency>
- <!-- xmpp -->
- <dependency>
- <groupId>org.jivesoftware.smack</groupId>
- <artifactId>smack</artifactId>
- <version>3.0.4</version>
- </dependency>
- <dependency>
- <groupId>org.jivesoftware.smackx</groupId>
- <artifactId>smackx</artifactId>
- <version>3.0.4</version>
- </dependency>
- <dependency>
- <groupId>org.jivesoftware.smackx.debugger</groupId>
- <artifactId>smackx-debugger</artifactId>
- <version>3.0.4</version>
- </dependency>
+ <!-- xmpp -->
+ <dependency>
+ <groupId>com.calclab.emite</groupId>
+ <artifactId>emite</artifactId>
+ <version>0.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jivesoftware.smack</groupId>
+ <artifactId>smack</artifactId>
+ <version>3.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jivesoftware.smackx</groupId>
+ <artifactId>smackx</artifactId>
+ <version>3.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jivesoftware.smackx.debugger</groupId>
+ <artifactId>smackx-debugger</artifactId>
+ <version>3.0.4</version>
+ </dependency>
- <!-- mysql -->
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.0.5</version>
- </dependency>
+ <!-- mysql -->
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.0.5</version>
+ </dependency>
- <!-- hibernate JPA -->
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-search</artifactId>
- <version>3.0.0.GA</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- <version>3.2.5.ga</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-annotations</artifactId>
- <version>3.3.0.ga</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
- <version>3.3.1.ga</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-tools</artifactId>
- <version>3.2.0.beta9a</version>
- </dependency>
- <dependency>
- <groupId>c3p0</groupId>
- <artifactId>c3p0</artifactId>
- <version>0.9.1.2</version>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.0</version>
- </dependency>
- <dependency>
- <groupId>com.wideplay</groupId>
- <artifactId>warp-persist</artifactId>
- <version>0.6</version>
- </dependency>
+ <!-- hibernate JPA -->
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-search</artifactId>
+ <version>3.0.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>3.2.5.ga</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.3.0.ga</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.3.1.ga</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tools</artifactId>
+ <version>3.2.0.beta9a</version>
+ </dependency>
+ <dependency>
+ <groupId>c3p0</groupId>
+ <artifactId>c3p0</artifactId>
+ <version>0.9.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.wideplay</groupId>
+ <artifactId>warp-persist</artifactId>
+ <version>0.6</version>
+ </dependency>
- <!-- REST: xml and json (stax) -->
- <dependency>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- <version>1.2.2</version>
- </dependency>
- <dependency>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- <version>1.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jettison</groupId>
- <artifactId>jettison</artifactId>
- <version>1.0-RC2</version>
- </dependency>
- <dependency>
- <groupId>net.sf.json-lib</groupId>
- <artifactId>json-lib</artifactId>
- <version>2.1</version>
- <classifier>jdk15</classifier>
- </dependency>
+ <!-- REST: xml and json (stax) -->
+ <dependency>
+ <groupId>com.thoughtworks.xstream</groupId>
+ <artifactId>xstream</artifactId>
+ <version>1.2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jettison</groupId>
+ <artifactId>jettison</artifactId>
+ <version>1.0-RC2</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.json-lib</groupId>
+ <artifactId>json-lib</artifactId>
+ <version>2.1</version>
+ <classifier>jdk15</classifier>
+ </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2</version>
- </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2</version>
+ </dependency>
- <!-- File upload -->
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <version>1.7.0</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.2</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>1.1.1</version>
- </dependency>
+ <!-- File upload -->
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.1.1</version>
+ </dependency>
- <dependency>
- <groupId>org.cafesip.gwtcomp</groupId>
- <artifactId>gwtcomp</artifactId>
- <version>0.0.3b</version>
- </dependency>
- <dependency>
- <groupId>org.cafesip.gwtcomp</groupId>
- <artifactId>gwtcomp-servlet</artifactId>
- <version>0.0.3b</version>
- </dependency>
+ <dependency>
+ <groupId>org.cafesip.gwtcomp</groupId>
+ <artifactId>gwtcomp</artifactId>
+ <version>0.0.3b</version>
+ </dependency>
+ <dependency>
+ <groupId>org.cafesip.gwtcomp</groupId>
+ <artifactId>gwtcomp-servlet</artifactId>
+ <version>0.0.3b</version>
+ </dependency>
- <!-- db upgrades -->
+ <!-- db upgrades -->
- <dependency>
- <groupId>org.liquibase</groupId>
- <artifactId>liquibase-core</artifactId>
- <version>1.4.1</version>
- </dependency>
+ <dependency>
+ <groupId>org.liquibase</groupId>
+ <artifactId>liquibase-core</artifactId>
+ <version>1.4.1</version>
+ </dependency>
- <!-- jetty dependencies -->
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- <version>6.1.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- <version>6.1.5</version>
- <scope>provided</scope>
- </dependency>
+ <!-- jetty dependencies -->
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <version>6.1.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.5</version>
+ <scope>provided</scope>
+ </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- <scope>provided</scope>
- </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
- <!-- testing dependencies -->
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <version>1.0.20070617</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.4</version>
- <!--
- <scope>test</scope>
- -->
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>2.2</version>
- <scope>test</scope>
- </dependency>
- <!--
- <dependency>
- <groupId>com.google</groupId>
- <artifactId>gwt-dev</artifactId>
- <version>1.4.61</version>
- <scope>test</scope>
- </dependency>
- -->
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>1.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.calclab.emite</groupId>
- <artifactId>emite</artifactId>
- <version>0.3.3</version>
- </dependency>
- <dependency>
- <groupId>com.calclab</groupId>
- <artifactId>suco</artifactId>
- <version>0.4.0</version>
- </dependency>
- </dependencies>
- <!-- http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/index.html -->
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Maven Repository</name>
- <url>http://repository.jboss.org/maven2</url>
- <layout>default</layout>
- </repository>
- <repository>
- <id>dyndns-repo</id>
- <url>http://maven.dyndns.org/2</url>
- </repository>
- <repository>
- <id>gwt-maven</id>
- <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url>
- </repository>
- <repository>
- <id>kune-maven</id>
- <url>http://kune.ourproject.org/mavenrepo/</url>
- </repository>
- <repository>
- <id>gwtext</id>
- <url>http://www.gwt-ext.com/maven2/</url>
- </repository>
- </repositories>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.3</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>com.totsp.gwt</groupId>
- <artifactId>maven-googlewebtoolkit2-plugin</artifactId>
- <version>2.0-beta23</version>
- <configuration>
- <logLevel>INFO</logLevel>
- <style>PRETTY</style>
- <runTarget>org.ourproject.kune.app.Kune/Kune.html</runTarget>
- <compileTargets>
- <compileTarget>org.ourproject.kune.app.Kune</compileTarget>
- </compileTargets>
- <generatorRootClasses>
- <value>org.ourproject.kune.MyBean</value>
- </generatorRootClasses>
- <generatorDestinationPackage>
- org.ourproject.kune.app.Kune
- </generatorDestinationPackage>
- <generateGettersAndSetters>true</generateGettersAndSetters>
- <generatePropertyChangeSupport>
- true
- </generatePropertyChangeSupport>
- </configuration>
- <executions>
- <execution>
- <goals>
- <!-- <goal>mergewebxml</goal> -->
- <!-- <goal>compile</goal> -->
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.0</version>
- <configuration>
- <webXml>target/web.xml</webXml>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <downloadSources>true</downloadSources>
- <downloadJavadocs>true</downloadJavadocs>
- <wtpversion>1.5</wtpversion>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-plugin</artifactId>
- <version>6.1.5</version>
- <configuration>
- <contextPath>/</contextPath>
- <scanIntervalSeconds>0</scanIntervalSeconds>
- </configuration>
- </plugin>
+ <!-- testing dependencies -->
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <version>1.0.20070617</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <!--
+ <scope>test</scope>
+ -->
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>2.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openqa.selenium.client-drivers</groupId>
+ <artifactId>selenium-java-client-driver</artifactId>
+ <version>1.0-beta-1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
- <plugin>
- <groupId>org.liquibase</groupId>
- <artifactId>liquibase-plugin</artifactId>
- <version>1.4.1.0</version>
- <executions>
- <execution>
- <phase>process-resources</phase>
- <configuration>
- <changeLogFile>
- src/main/resources/db/liquibase_changelog.xml
- </changeLogFile>
- <driver>com.mysql.jdbc.Driver</driver>
- <url>jdbc:mysql://localhost/kune_dev</url>
- <username>kune</username>
- <password>db4kune</password>
- <verbose>true</verbose>
- </configuration>
- <!--
- <configuration>
- <verbose>true</verbose>
- <propertiesFile>
- src/main/resources/db/liquibase.properties
- </propertiesFile>
- </configuration>
- -->
- <goals>
- <goal>migrate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- <executions>
- <execution>
- <id>core</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <classifier>core</classifier>
- <includes>
- <include>**/Kune-Platform.gwt.xml**</include>
- <include>**/I18nTranslationService**</include>
- <include>**/BasicDialog.**</include>
- <include>**/HorizontalLine.**</include>
- <include>**/AbstractLabel.**</include>
- <include>**/IconLabel.**</include>
- <include>**/EditableIconLabel.**</include>
- <include>**/EditableClickListener.**</include>
- <include>**/KuneStringUtils.**</include>
- <include>**/IconHyperlink*.**</include>
- <include>**/LabelWrapper*.**</include>
- <include>**/KuneUiUtils.**</include>
- <include>**/View.**</include>
- <!-- <include>**/platf/**</include>
- <include>**/platf/client/extend/**</include>
- <include>**/platf/client/*java</include>
- <include>**/platf/client/app/**</include>
- <include>**/platf/client/dispatch/**</include>
- -->
- </includes>
- </configuration>
- </execution>
- <execution>
- <id>helloworldplugin</id>
- <phase>package</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- <configuration>
- <classifier>helloworldplugin</classifier>
- <includes>
- <include>**/HelloWorld*</include>
- </includes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- <resource>
- <directory>src/main/java</directory>
- </resource>
- </resources>
- </build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <linkXref>true</linkXref>
- <sourceEncoding>utf-8</sourceEncoding>
- <minimumTokens>100</minimumTokens>
- <targetJdk>1.5</targetJdk>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <property>
- <name>net.sourceforge.cobertura.datafile</name>
- <value>
- ${project.build.directory}/cobertura/cobertura.ser
- </value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jdepend-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
+ <!-- http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/index.html -->
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Maven Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ <layout>default</layout>
+ </repository>
+ <repository>
+ <id>dyndns-repo</id>
+ <url>http://maven.dyndns.org/2</url>
+ </repository>
+ <repository>
+ <id>gwt-maven</id>
+ <url>
+ http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/
+ </url>
+ </repository>
+ <repository>
+ <id>kune-maven</id>
+ <url>http://kune.ourproject.org/mavenrepo/</url>
+ </repository>
+ <repository>
+ <id>gwtext</id>
+ <url>http://www.gwt-ext.com/maven2/</url>
+ </repository>
+ <repository>
+ <id>openqa.org</id>
+ <name>Openqa Release Repository</name>
+ <url>http://archiva.openqa.org/repository/releases</url>
+ <layout>default</layout>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>openqa.org</id>
+ <name>Openqa Snapshot Repository</name>
+ <url>http://archiva.openqa.org/repository/snapshots</url>
+ <layout>default</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>daily</updatePolicy>
+ <checksumPolicy>ignore</checksumPolicy>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>com.totsp.gwt</groupId>
+ <artifactId>maven-googlewebtoolkit2-plugin</artifactId>
+ <version>2.0-beta23</version>
+ <configuration>
+ <logLevel>INFO</logLevel>
+ <style>PRETTY</style>
+ <runTarget>
+ org.ourproject.kune.app.Kune/Kune.html
+ </runTarget>
+ <compileTargets>
+ <compileTarget>
+ org.ourproject.kune.app.Kune
+ </compileTarget>
+ </compileTargets>
+ <generatorRootClasses>
+ <value>org.ourproject.kune.MyBean</value>
+ </generatorRootClasses>
+ <generatorDestinationPackage>
+ org.ourproject.kune.app.Kune
+ </generatorDestinationPackage>
+ <generateGettersAndSetters>
+ true
+ </generateGettersAndSetters>
+ <generatePropertyChangeSupport>
+ true
+ </generatePropertyChangeSupport>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <!-- <goal>mergewebxml</goal> -->
+ <!-- <goal>compile</goal> -->
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.0</version>
+ <configuration>
+ <webXml>target/web.xml</webXml>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ <downloadJavadocs>true</downloadJavadocs>
+ <wtpversion>1.5</wtpversion>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.5</version>
+ <configuration>
+ <contextPath>/</contextPath>
+ <scanIntervalSeconds>0</scanIntervalSeconds>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.liquibase</groupId>
+ <artifactId>liquibase-plugin</artifactId>
+ <version>1.4.1.0</version>
+ <executions>
+ <execution>
+ <phase>process-resources</phase>
+ <configuration>
+ <changeLogFile>
+ src/main/resources/db/liquibase_changelog.xml
+ </changeLogFile>
+ <driver>com.mysql.jdbc.Driver</driver>
+ <url>jdbc:mysql://localhost/kune_dev</url>
+ <username>kune</username>
+ <password>db4kune</password>
+ <verbose>true</verbose>
+ </configuration>
+ <!--
+ <configuration>
+ <verbose>true</verbose>
+ <propertiesFile>
+ src/main/resources/db/liquibase.properties
+ </propertiesFile>
+ </configuration>
+ -->
+ <goals>
+ <goal>migrate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ <executions>
+ <execution>
+ <id>core</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <classifier>core</classifier>
+ <includes>
+ <include>
+ **/Kune-Platform.gwt.xml**
+ </include>
+ <include>
+ **/I18nTranslationService**
+ </include>
+ <include>**/BasicDialog.**</include>
+ <include>**/HorizontalLine.**</include>
+ <include>**/AbstractLabel.**</include>
+ <include>**/IconLabel.**</include>
+ <include>
+ **/EditableIconLabel.**
+ </include>
+ <include>
+ **/EditableClickListener.**
+ </include>
+ <include>**/KuneStringUtils.**</include>
+ <include>**/IconHyperlink*.**</include>
+ <include>**/LabelWrapper*.**</include>
+ <include>**/KuneUiUtils.**</include>
+ <include>**/View.**</include>
+ <!-- <include>**/platf/**</include>
+ <include>**/platf/client/extend/**</include>
+ <include>**/platf/client/*java</include>
+ <include>**/platf/client/app/**</include>
+ <include>**/platf/client/dispatch/**</include>
+ -->
+ </includes>
+ </configuration>
+ </execution>
+ <execution>
+ <id>helloworldplugin</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <classifier>helloworldplugin</classifier>
+ <includes>
+ <include>**/HelloWorld*</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start-server</goal>
+ </goals>
+ <configuration>
+ <background>true</background>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- Skip the normal tests, we'll run them in the integration-test phase -->
+ <skip>true</skip>
+ </configuration>
+
+ <executions>
+ <execution>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <directory>src/main/java</directory>
+ </resource>
+ </resources>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <linkXref>true</linkXref>
+ <sourceEncoding>utf-8</sourceEncoding>
+ <minimumTokens>100</minimumTokens>
+ <targetJdk>1.5</targetJdk>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>
+ net.sourceforge.cobertura.datafile
+ </name>
+ <value>
+ ${project.build.directory}/cobertura/cobertura.ser
+ </value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jdepend-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
</project>
Modified: trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml 2008-09-24 01:47:16 UTC (rev 881)
@@ -2,6 +2,9 @@
<inherits name='com.google.gwt.i18n.I18N' />
<inherits name='com.google.gwt.user.User' />
+ <!-- for automated testing (see UIObject.ensureDebugId()) -->
+ <inherits name="com.google.gwt.user.Debug"/>
+
<!-- http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/4d38cff6b1c217c6/8fae54c512bac373?lnk=gst&q=will+not+be+serialized+because+it+is+final+#8fae54c512bac373 -->
<set-property name="gwt.suppressNonStaticFinalFieldWarnings" value="true" />
Modified: trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -19,9 +19,14 @@
*/
package org.ourproject.kune.app.client;
-import org.ourproject.kune.platf.client.services.Kune;
+import org.ourproject.kune.chat.client.ChatClientModule;
+import org.ourproject.kune.docs.client.DocumentClientModule;
+import org.ourproject.kune.platf.client.services.KuneCoreModule;
+import org.ourproject.kune.platf.client.services.KuneModule;
import com.allen_sauer.gwt.log.client.Log;
+import com.calclab.emiteuimodule.client.EmiteUIModule;
+import com.calclab.suco.client.Suco;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DeferredCommand;
@@ -45,6 +50,8 @@
}
public void onModuleLoadCont() {
- Kune.create();
+ Suco.install(new KuneCoreModule(), new EmiteUIModule(), new DocumentClientModule(), new ChatClientModule(),
+ new KuneModule());
+ // Suco.get(Application.class).start();
}
}
Modified: trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -28,7 +28,7 @@
import org.ourproject.kune.platf.client.rpc.SocialNetworkService;
import org.ourproject.kune.platf.server.LoggerMethodInterceptor;
import org.ourproject.kune.platf.server.PlatformServerModule;
-import org.ourproject.kune.platf.server.manager.impl.FileUploadManagerRevisited;
+import org.ourproject.kune.platf.server.manager.impl.FileUploadManager;
import org.ourproject.kune.platf.server.properties.PropertiesFileName;
import org.ourproject.kune.platf.server.rest.ContentJSONService;
import org.ourproject.kune.platf.server.rest.GroupJSONService;
@@ -96,7 +96,7 @@
UserService.class, SocialNetworkService.class, I18nService.class);
builder.installRESTServices("^/kune/json/", TestJSONService.class, GroupJSONService.class,
UserJSONService.class, I18nTranslationJSONService.class, ContentJSONService.class);
- builder.installServlet("^/kune/servlets/", FileUploadManagerRevisited.class);
+ builder.installServlet("^/kune/servlets/", FileUploadManager.class);
builder.at("^/kune/(.*)$").install(new ForwardFilter("^/kune/(.*)$", "/gwt/org.ourproject.kune.app.Kune/{0}"));
}
Modified: trunk/src/main/java/org/ourproject/kune/chat/Kune-Chat.gwt.xml
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/Kune-Chat.gwt.xml 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/chat/Kune-Chat.gwt.xml 2008-09-24 01:47:16 UTC (rev 881)
@@ -1,6 +1,5 @@
<module>
<inherits name='org.ourproject.kune.platf.Kune-Platform' />
<inherits name='org.ourproject.kune.workspace.Kune-Workspace' />
- <inherits name="com.calclab.emite.Emite" />
<inherits name="com.calclab.emiteuimodule.EmiteUIModule" />
</module>
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -15,6 +15,7 @@
import org.ourproject.kune.chat.client.ctx.rooms.RoomsAdmin;
import org.ourproject.kune.chat.client.ctx.rooms.RoomsAdminPresenter;
import org.ourproject.kune.platf.client.app.Application;
+import org.ourproject.kune.platf.client.app.ToolGroup;
import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.platf.client.state.StateManager;
@@ -27,9 +28,9 @@
import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
import com.calclab.emiteuimodule.client.EmiteUIDialog;
-import com.calclab.suco.client.module.AbstractModule;
-import com.calclab.suco.client.provider.Factory;
-import com.calclab.suco.client.scope.SingletonScope;
+import com.calclab.suco.client.ioc.decorator.Singleton;
+import com.calclab.suco.client.ioc.module.AbstractModule;
+import com.calclab.suco.client.ioc.module.Factory;
public class ChatClientModule extends AbstractModule {
@@ -39,13 +40,13 @@
@Override
public void onLoad() {
- register(SingletonScope.class, new Factory<ChatInfo>(ChatInfo.class) {
+ register(Singleton.class, new Factory<ChatInfo>(ChatInfo.class) {
public ChatInfo create() {
return new ChatInfoPanel();
}
});
- register(SingletonScope.class, new Factory<ChatContent>(ChatContent.class) {
+ register(Singleton.class, new Factory<ChatContent>(ChatContent.class) {
public ChatContent create() {
final WorkspaceDeckPanel panel = new WorkspaceDeckPanel();
final ChatContentPresenter presenter = new ChatContentPresenter($(EmiteUIDialog.class), panel,
@@ -54,7 +55,7 @@
}
});
- register(SingletonScope.class, new Factory<ChatContext>(ChatContext.class) {
+ register(Singleton.class, new Factory<ChatContext>(ChatContext.class) {
public ChatContext create() {
final WorkspaceDeckPanel panel = new WorkspaceDeckPanel();
final ChatContextPresenter presenter = new ChatContextPresenter(panel, $$(RoomsAdmin.class));
@@ -62,7 +63,7 @@
}
});
- register(SingletonScope.class, new Factory<ChatRoomControl>(ChatRoomControl.class) {
+ register(Singleton.class, new Factory<ChatRoomControl>(ChatRoomControl.class) {
public ChatRoomControl create() {
final ChatRoomControlPresenter presenter = new ChatRoomControlPresenter();
final ChatRoomControlPanel panel = new ChatRoomControlPanel($(I18nUITranslationService.class),
@@ -72,14 +73,14 @@
}
});
- register(SingletonScope.class, new Factory<ChatRoom>(ChatRoom.class) {
+ register(Singleton.class, new Factory<ChatRoom>(ChatRoom.class) {
public ChatRoom create() {
final ChatRoomPanel panel = new ChatRoomPanel($(WorkspaceSkeleton.class));
final ChatRoomPresenter presenter = new ChatRoomPresenter(panel);
return presenter;
}
});
- register(SingletonScope.class, new Factory<RoomsAdmin>(RoomsAdmin.class) {
+ register(Singleton.class, new Factory<RoomsAdmin>(RoomsAdmin.class) {
public RoomsAdmin create() {
final RoomsAdminPresenter presenter = new RoomsAdminPresenter($(ContextNavigator.class),
$(I18nUITranslationService.class), $$(StateManager.class), $(Session.class),
@@ -88,7 +89,7 @@
}
});
- register(SingletonScope.class, new Factory<ChatClientTool>(ChatClientTool.class) {
+ register(ToolGroup.class, new Factory<ChatClientTool>(ChatClientTool.class) {
public ChatClientTool create() {
return new ChatClientTool($(Session.class), $(Application.class), $(I18nUITranslationService.class),
$(EmiteUIDialog.class), $(WorkspaceSkeleton.class), $$(GroupMembersSummary.class),
@@ -96,7 +97,5 @@
}
});
- $(ChatClientTool.class);
-
}
}
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -38,11 +38,11 @@
import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.emite.client.xmpp.stanzas.XmppURI;
+import com.calclab.emite.core.client.xmpp.stanzas.XmppURI;
import com.calclab.emiteuimodule.client.EmiteUIDialog;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener0;
public class ChatClientTool extends AbstractClientTool implements ChatProvider {
public static final String NAME = "chats";
@@ -61,7 +61,7 @@
super(NAME, i18n.t("chat rooms"), toolSelector, wsThemePresenter, ws);
this.chatContentProvider = chatContentProvider;
this.chatContextProvider = chatContextProvider;
- session.onInitDataReceived(new Slot<InitDataDTO>() {
+ session.onInitDataReceived(new Listener<InitDataDTO>() {
public void onEvent(final InitDataDTO initData) {
checkChatDomain(initData.getChatDomain());
final ChatOptions chatOptions = new ChatOptions(initData.getChatHttpBase(), initData.getChatDomain(),
@@ -69,7 +69,7 @@
chat = new ChatEngineXmpp(emiteUIDialog, chatOptions, i18n, ws);
groupMembersSummaryProvider.get().addUserOperation(
new MenuItem<GroupDTO>("images/new-chat.gif", i18n.t("Start a chat with this member"),
- new Slot<GroupDTO>() {
+ new Listener<GroupDTO>() {
public void onEvent(final GroupDTO group) {
emiteUIDialog.show();
if (emiteUIDialog.isLoggedIn()) {
@@ -92,17 +92,17 @@
}
}
});
- application.onApplicationStop(new Slot0() {
+ application.onApplicationStop(new Listener0() {
public void onEvent() {
chat.logout();
}
});
- session.onUserSignOut(new Slot0() {
+ session.onUserSignOut(new Listener0() {
public void onEvent() {
chat.logout();
}
});
- session.onUserSignIn(new Slot<UserInfoDTO>() {
+ session.onUserSignIn(new Listener<UserInfoDTO>() {
public void onEvent(final UserInfoDTO user) {
chat.login(user.getChatName(), user.getChatPassword());
}
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -24,13 +24,13 @@
import org.ourproject.kune.platf.client.services.I18nTranslationService;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import com.calclab.emite.client.im.roster.RosterManager.SubscriptionMode;
-import com.calclab.emite.client.xmpp.stanzas.XmppURI;
+import com.calclab.emite.core.client.xmpp.stanzas.XmppURI;
+import com.calclab.emiteuimodule.client.SubscriptionMode;
import com.calclab.emiteuimodule.client.EmiteUIDialog;
import com.calclab.emiteuimodule.client.UserChatOptions;
import com.calclab.emiteuimodule.client.params.AvatarProvider;
import com.calclab.emiteuimodule.client.status.OwnPresence.OwnStatus;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
import com.google.gwt.user.client.Window;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.widgets.Button;
@@ -101,24 +101,24 @@
}
});
ws.getSiteTraybar().addButton(traybarButton);
- emiteDialog.onChatAttended(new Slot<String>() {
+ emiteDialog.onChatAttended(new Listener<String>() {
public void onEvent(final String parameter) {
traybarButton.setIcon("images/e-icon.gif");
}
});
- emiteDialog.onChatUnattendedWithActivity(new Slot<String>() {
+ emiteDialog.onChatUnattendedWithActivity(new Listener<String>() {
public void onEvent(final String parameter) {
traybarButton.setIcon("images/e-icon-a.gif");
}
});
}
emiteDialog.hide();
- emiteDialog.onChatAttended(new Slot<String>() {
+ emiteDialog.onChatAttended(new Listener<String>() {
public void onEvent(final String parameter) {
Window.setTitle(initialWindowTitle);
}
});
- emiteDialog.onChatUnattendedWithActivity(new Slot<String>() {
+ emiteDialog.onChatUnattendedWithActivity(new Listener<String>() {
public void onEvent(final String chatTitle) {
Window.setTitle("(* " + chatTitle + ") " + initialWindowTitle);
}
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatContentPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatContentPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatContentPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -28,9 +28,9 @@
import org.ourproject.kune.workspace.client.component.WorkspaceDeckView;
import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.emite.client.xmpp.stanzas.XmppURI;
+import com.calclab.emite.core.client.xmpp.stanzas.XmppURI;
import com.calclab.emiteuimodule.client.EmiteUIDialog;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class ChatContentPresenter implements ChatContent {
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ctx/ChatContextPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ctx/ChatContextPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ctx/ChatContextPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -25,7 +25,7 @@
import org.ourproject.kune.platf.client.dto.StateDTO;
import org.ourproject.kune.workspace.client.component.WorkspaceDeckView;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class ChatContextPresenter implements ChatContext {
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ctx/rooms/RoomsAdminPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ctx/rooms/RoomsAdminPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ctx/rooms/RoomsAdminPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -30,7 +30,7 @@
import org.ourproject.kune.platf.client.state.StateManager;
import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class RoomsAdminPresenter implements RoomsAdmin {
private final ContextNavigator contextNavigator;
@@ -46,7 +46,7 @@
// contextNavigator.registerType(ChatClientTool.TYPE_ROOM,
// images.chatGreen());
// contextNavigator.canCreate(i18n.t("New chat room"), i18n.t("Add a
- // chat room"), new Slot<String>() {
+ // chat room"), new Listener<String>() {
// public void onEvent(final String name) {
// Site.showProgressProcessing();
// final String groupShortName =
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -29,8 +29,8 @@
import org.ourproject.kune.workspace.client.site.Site;
import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
public class DocumentClientActions {
@@ -66,7 +66,7 @@
.t("New wiki"), i18n.t("Folder"), i18n.t("New"), i18n.t("wiki"));
final ActionMenuDescriptor<StateToken> addDoc = new ActionMenuDescriptor<StateToken>(AccessRolDTO.Editor,
- ActionPosition.topbarAndItemMenu, new Slot<StateToken>() {
+ ActionPosition.topbarAndItemMenu, new Listener<StateToken>() {
public void onEvent(final StateToken token) {
Site.showProgressProcessing();
contentServiceProvider.get().addContent(session.getUserHash(),
@@ -85,7 +85,7 @@
addDoc.setIconUrl("images/nav/page_add.png");
final ActionMenuDescriptor<StateToken> delContainer = new ActionMenuDescriptor<StateToken>(
- AccessRolDTO.Administrator, ActionPosition.topbarAndItemMenu, new Slot<StateToken>() {
+ AccessRolDTO.Administrator, ActionPosition.topbarAndItemMenu, new Listener<StateToken>() {
public void onEvent(final StateToken token) {
Site.info("Sorry, in development");
}
@@ -97,7 +97,7 @@
delContainer.setConfirmationText(i18n.t("You will delete it and also all its contents. Are you sure?"));
final ActionMenuDescriptor<StateToken> delContent = new ActionMenuDescriptor<StateToken>(
- AccessRolDTO.Administrator, ActionPosition.topbarAndItemMenu, new Slot<StateToken>() {
+ AccessRolDTO.Administrator, ActionPosition.topbarAndItemMenu, new Listener<StateToken>() {
public void onEvent(final StateToken token) {
contentServiceProvider.get().delContent(session.getUserHash(), token,
new AsyncCallbackSimple<String>() {
@@ -115,7 +115,7 @@
delContent.setConfirmationText(i18n.t("Are you sure?"));
final ActionDescriptor<StateToken> go = new ActionDescriptor<StateToken>(AccessRolDTO.Viewer,
- ActionPosition.itemMenu, new Slot<StateToken>() {
+ ActionPosition.itemMenu, new Listener<StateToken>() {
public void onEvent(final StateToken token) {
stateManager.gotoToken(token);
}
@@ -129,7 +129,7 @@
});
final ActionDescriptor<StateToken> rename = new ActionDescriptor<StateToken>(AccessRolDTO.Editor,
- ActionPosition.itemMenu, new Slot<StateToken>() {
+ ActionPosition.itemMenu, new Listener<StateToken>() {
public void onEvent(final StateToken stateToken) {
contextNavigator.editItem(stateToken);
}
@@ -137,7 +137,7 @@
rename.setTextDescription(i18n.t("Rename"));
final ActionButtonDescriptor<StateToken> goGroupHome = new ActionButtonDescriptor<StateToken>(
- AccessRolDTO.Viewer, ActionPosition.topbar, new Slot<StateToken>() {
+ AccessRolDTO.Viewer, ActionPosition.topbar, new Listener<StateToken>() {
public void onEvent(final StateToken token) {
stateManager.gotoToken(token.getGroup());
}
@@ -152,7 +152,7 @@
});
final ActionMenuDescriptor<StateToken> setAsDefGroupContent = new ActionMenuDescriptor<StateToken>(
- AccessRolDTO.Administrator, ActionPosition.itemMenu, new Slot<StateToken>() {
+ AccessRolDTO.Administrator, ActionPosition.itemMenu, new Listener<StateToken>() {
public void onEvent(final StateToken token) {
Site.showProgressProcessing();
contentServiceProvider.get().setAsDefaultContent(session.getUserHash(), token,
@@ -176,7 +176,7 @@
});
final ActionButtonDescriptor<StateToken> refresh = new ActionButtonDescriptor<StateToken>(AccessRolDTO.Viewer,
- ActionPosition.topbar, new Slot<StateToken>() {
+ ActionPosition.topbar, new Listener<StateToken>() {
public void onEvent(final StateToken stateToken) {
stateManager.reload();
contextNavigator.selectItem(stateToken);
@@ -189,7 +189,7 @@
final ActionDescriptor<StateToken> uploadFile = createUploadAction(i18n.t("Upload file"),
"images/nav/upload.png", i18n.t("Upload some files (images, PDFs, ...)"), null);
- session.onInitDataReceived(new Slot<InitDataDTO>() {
+ session.onInitDataReceived(new Listener<InitDataDTO>() {
public void onEvent(final InitDataDTO parameter) {
final ActionDescriptor<StateToken> uploadMedia = createUploadAction(i18n.t("Upload media"),
"images/nav/upload.png", i18n.t("Upload some media (images, videos)"), session
@@ -241,7 +241,7 @@
final String defaultName) {
final ActionMenuDescriptor<StateToken> addFolder;
addFolder = new ActionMenuDescriptor<StateToken>(AccessRolDTO.Editor, ActionPosition.topbarAndItemMenu,
- new Slot<StateToken>() {
+ new Listener<StateToken>() {
public void onEvent(final StateToken stateToken) {
Site.showProgressProcessing();
contentServiceProvider.get().addFolder(session.getUserHash(), stateToken, defaultName,
@@ -264,7 +264,7 @@
final String toolTip, final String permitedExtensions) {
final ActionButtonDescriptor<StateToken> uploadFile;
uploadFile = new ActionButtonDescriptor<StateToken>(AccessRolDTO.Editor, ActionPosition.bootombarAndItemMenu,
- new Slot<StateToken>() {
+ new Listener<StateToken>() {
public void onEvent(final StateToken token) {
if (permitedExtensions != null) {
Log.info("Permited extensions (in dev): " + permitedExtensions);
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -33,6 +33,7 @@
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter;
+import org.ourproject.kune.platf.client.app.ToolGroup;
import org.ourproject.kune.platf.client.rpc.ContentServiceAsync;
import org.ourproject.kune.platf.client.services.KuneErrorHandler;
import org.ourproject.kune.platf.client.state.Session;
@@ -49,9 +50,9 @@
import org.ourproject.kune.workspace.client.title.EntitySubTitle;
import org.ourproject.kune.workspace.client.title.EntityTitle;
-import com.calclab.suco.client.module.AbstractModule;
-import com.calclab.suco.client.provider.Factory;
-import com.calclab.suco.client.scope.SingletonScope;
+import com.calclab.suco.client.ioc.decorator.Singleton;
+import com.calclab.suco.client.ioc.module.AbstractModule;
+import com.calclab.suco.client.ioc.module.Factory;
public class DocumentClientModule extends AbstractModule {
@@ -60,51 +61,55 @@
@Override
public void onLoad() {
- final I18nUITranslationService i18n = $(I18nUITranslationService.class);
- final WorkspaceSkeleton ws = $(WorkspaceSkeleton.class);
- register(SingletonScope.class, new Factory<DocumentClientTool>(DocumentClientTool.class) {
+ register(ToolGroup.class, new Factory<DocumentClientTool>(DocumentClientTool.class) {
public DocumentClientTool create() {
$(DocumentClientActions.class);
- return new DocumentClientTool(i18n, $(ToolSelector.class), $(WsThemePresenter.class),
- $(WorkspaceSkeleton.class), $$(DocumentContext.class), $$(ContentServiceAsync.class),
- $(ContentActionRegistry.class), $(DragDropContentRegistry.class), $(ContentIconsRegistry.class));
+ return new DocumentClientTool($(I18nUITranslationService.class), $(ToolSelector.class),
+ $(WsThemePresenter.class), $(WorkspaceSkeleton.class), $$(DocumentContext.class),
+ $$(ContentServiceAsync.class), $(ContentActionRegistry.class),
+ $(DragDropContentRegistry.class), $(ContentIconsRegistry.class));
}
});
- register(SingletonScope.class, new Factory<ContentPublishAction>(ContentPublishAction.class) {
+ register(Singleton.class, new Factory<ContentPublishAction>(ContentPublishAction.class) {
public ContentPublishAction create() {
- return new ContentPublishAction($(Session.class), $$(ContentServiceAsync.class), i18n);
+ return new ContentPublishAction($(Session.class), $$(ContentServiceAsync.class),
+ $(I18nUITranslationService.class));
}
}, new Factory<ContentRejectAction>(ContentRejectAction.class) {
public ContentRejectAction create() {
- return new ContentRejectAction($(Session.class), $$(ContentServiceAsync.class), i18n);
+ return new ContentRejectAction($(Session.class), $$(ContentServiceAsync.class),
+ $(I18nUITranslationService.class));
}
}, new Factory<ContentEditInProgressAction>(ContentEditInProgressAction.class) {
public ContentEditInProgressAction create() {
- return new ContentEditInProgressAction($(Session.class), $$(ContentServiceAsync.class), i18n);
+ return new ContentEditInProgressAction($(Session.class), $$(ContentServiceAsync.class),
+ $(I18nUITranslationService.class));
}
}, new Factory<ContentSubmitForPublishAction>(ContentSubmitForPublishAction.class) {
public ContentSubmitForPublishAction create() {
- return new ContentSubmitForPublishAction($(Session.class), $$(ContentServiceAsync.class), i18n);
+ return new ContentSubmitForPublishAction($(Session.class), $$(ContentServiceAsync.class),
+ $(I18nUITranslationService.class));
}
}, new Factory<ContentTrashAction>(ContentTrashAction.class) {
public ContentTrashAction create() {
- return new ContentTrashAction($(Session.class), $$(ContentServiceAsync.class), i18n);
+ return new ContentTrashAction($(Session.class), $$(ContentServiceAsync.class),
+ $(I18nUITranslationService.class));
}
});
- register(SingletonScope.class, new Factory<ContentEditAction>(ContentEditAction.class) {
+ register(Singleton.class, new Factory<ContentEditAction>(ContentEditAction.class) {
public ContentEditAction create() {
- return new ContentEditAction(i18n);
+ return new ContentEditAction($(I18nUITranslationService.class));
}
}, new Factory<ContentTranslationAction>(ContentTranslationAction.class) {
public ContentTranslationAction create() {
- return new ContentTranslationAction(i18n);
+ return new ContentTranslationAction($(I18nUITranslationService.class));
}
});
- register(SingletonScope.class, new Factory<DocumentClientActions>(DocumentClientActions.class) {
+ register(Singleton.class, new Factory<DocumentClientActions>(DocumentClientActions.class) {
public DocumentClientActions create() {
return new DocumentClientActions($(I18nUITranslationService.class), $(ContextNavigator.class),
$(Session.class), $(StateManager.class), $$(ContentServiceAsync.class), $$(FileUploader.class),
@@ -112,10 +117,11 @@
}
});
- register(SingletonScope.class, new Factory<DocumentContent>(DocumentContent.class) {
+ register(ToolGroup.class, new Factory<DocumentContent>(DocumentContent.class) {
public DocumentContent create() {
final ActionToolbarPanel contentNavigatorToolbar = new ActionToolbarPanel(
- ActionToolbarPanel.Position.content, $(Session.class), $$(ActionManager.class), ws);
+ ActionToolbarPanel.Position.content, $(Session.class), $$(ActionManager.class),
+ $(WorkspaceSkeleton.class));
final ActionToolbar toolbar = new ActionToolbarPresenter($(Session.class), contentNavigatorToolbar,
$(ContentActionRegistry.class));
@@ -124,10 +130,8 @@
$(RateIt.class), $$(DocumentReader.class), $$(TextEditor.class), $$(FolderViewer.class),
$$(ContentServiceAsync.class), toolbar, $(ContentActionRegistry.class));
final DocumentContentPanel panel = new DocumentContentPanel($(WorkspaceSkeleton.class));
- $(ContentActionRegistry.class).addAction(DocumentClientTool.TYPE_DOCUMENT, $(ContentEditAction.class));
+
$(ContentActionRegistry.class).addAction(DocumentClientTool.TYPE_DOCUMENT,
- $(ContentTranslationAction.class));
- $(ContentActionRegistry.class).addAction(DocumentClientTool.TYPE_DOCUMENT,
$(ContentPublishAction.class));
$(ContentActionRegistry.class)
.addAction(DocumentClientTool.TYPE_DOCUMENT, $(ContentRejectAction.class));
@@ -136,23 +140,27 @@
$(ContentActionRegistry.class).addAction(DocumentClientTool.TYPE_DOCUMENT,
$(ContentEditInProgressAction.class));
$(ContentActionRegistry.class).addAction(DocumentClientTool.TYPE_DOCUMENT, $(ContentTrashAction.class));
+
+ $(ContentActionRegistry.class).addAction(DocumentClientTool.TYPE_DOCUMENT, $(ContentEditAction.class));
+ $(ContentActionRegistry.class).addAction(DocumentClientTool.TYPE_DOCUMENT,
+ $(ContentTranslationAction.class));
presenter.init(panel);
return presenter;
}
});
- register(SingletonScope.class, new Factory<AdminContext>(AdminContext.class) {
+ register(Singleton.class, new Factory<AdminContext>(AdminContext.class) {
public AdminContext create() {
final AdminContextPresenter presenter = new AdminContextPresenter($(Session.class),
$(StateManager.class), $$(TagsSummary.class), $$(ContentServiceAsync.class),
$(EntityTitle.class), $(EntitySubTitle.class));
- final AdminContextView view = new AdminContextPanel(presenter, i18n);
+ final AdminContextView view = new AdminContextPanel(presenter, $(I18nUITranslationService.class));
presenter.init(view);
return presenter;
}
});
- register(SingletonScope.class, new Factory<DocumentContext>(DocumentContext.class) {
+ register(Singleton.class, new Factory<DocumentContext>(DocumentContext.class) {
public DocumentContext create() {
final DocumentContextPresenter presenter = new DocumentContextPresenter($(StateManager.class),
$$(ContextNavigator.class), $$(AdminContext.class));
@@ -162,24 +170,20 @@
}
});
- register(SingletonScope.class, new Factory<DocumentReader>(DocumentReader.class) {
+ register(Singleton.class, new Factory<DocumentReader>(DocumentReader.class) {
public DocumentReader create() {
- final DocumentReaderView view = new DocumentReaderPanel(ws);
+ final DocumentReaderView view = new DocumentReaderPanel($(WorkspaceSkeleton.class));
final DocumentReaderPresenter presenter = new DocumentReaderPresenter(view);
return presenter;
}
});
- register(SingletonScope.class, new Factory<FolderViewer>(FolderViewer.class) {
+ register(Singleton.class, new Factory<FolderViewer>(FolderViewer.class) {
public FolderViewer create() {
final FolderViewerView view = new FolderViewerPanel();
final FolderViewerPresenter presenter = new FolderViewerPresenter(view);
return presenter;
}
});
-
- $(DocumentClientTool.class);
- $(DocumentContent.class);
- $(DocumentContext.class);
}
}
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -31,7 +31,7 @@
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class DocumentClientTool extends AbstractClientTool {
public static final String TYPE_ROOT = "docs.root";
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentEditAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentEditAction.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentEditAction.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -6,12 +6,12 @@
import org.ourproject.kune.platf.client.dto.StateToken;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public class ContentEditAction extends ActionButtonDescriptor<StateToken> {
public ContentEditAction(final I18nUITranslationService i18n) {
- super(AccessRolDTO.Editor, ActionPosition.topbar, new Slot<StateToken>() {
+ super(AccessRolDTO.Editor, ActionPosition.topbar, new Listener<StateToken>() {
public void onEvent(final StateToken stateToken) {
}
});
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentEditInProgressAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentEditInProgressAction.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentEditInProgressAction.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -9,7 +9,7 @@
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class ContentEditInProgressAction extends ContentSetStatusAction {
public ContentEditInProgressAction(final Session session, final Provider<ContentServiceAsync> provider,
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentPublishAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentPublishAction.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentPublishAction.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -9,7 +9,7 @@
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class ContentPublishAction extends ContentSetStatusAction {
public ContentPublishAction(final Session session, final Provider<ContentServiceAsync> provider,
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentRejectAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentRejectAction.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentRejectAction.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -9,7 +9,7 @@
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class ContentRejectAction extends ContentSetStatusAction {
public ContentRejectAction(final Session session, final Provider<ContentServiceAsync> provider,
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentSetStatusAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentSetStatusAction.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentSetStatusAction.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -10,15 +10,15 @@
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
public abstract class ContentSetStatusAction extends ActionMenuDescriptor<StateToken> {
public ContentSetStatusAction(final Session session, final Provider<ContentServiceAsync> contentServiceProvider,
final I18nUITranslationService i18n, final AccessRolDTO rol, final String textDescription,
final ContentStatusDTO status) {
- super(rol, ActionPosition.topbarAndItemMenu, new Slot<StateToken>() {
+ super(rol, ActionPosition.topbarAndItemMenu, new Listener<StateToken>() {
public void onEvent(final StateToken stateToken) {
final AsyncCallbackSimple<Object> callback = new AsyncCallbackSimple<Object>() {
public void onSuccess(final Object result) {
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentSubmitForPublishAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentSubmitForPublishAction.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentSubmitForPublishAction.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -9,7 +9,7 @@
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class ContentSubmitForPublishAction extends ContentSetStatusAction {
public ContentSubmitForPublishAction(final Session session, final Provider<ContentServiceAsync> provider,
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentTranslationAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentTranslationAction.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentTranslationAction.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -7,12 +7,12 @@
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
import org.ourproject.kune.workspace.client.site.Site;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public class ContentTranslationAction extends ActionButtonDescriptor<StateToken> {
public ContentTranslationAction(final I18nUITranslationService i18n) {
- super(AccessRolDTO.Editor, ActionPosition.topbar, new Slot<StateToken>() {
+ super(AccessRolDTO.Editor, ActionPosition.topbar, new Listener<StateToken>() {
public void onEvent(final StateToken stateToken) {
Site.important(i18n.t("Sorry, this functionality is currently in development"));
}
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentTrashAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentTrashAction.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/actions/ContentTrashAction.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -9,7 +9,7 @@
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class ContentTrashAction extends ContentSetStatusAction {
public ContentTrashAction(final Session session, final Provider<ContentServiceAsync> provider,
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocumentContent.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocumentContent.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocumentContent.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -20,17 +20,17 @@
package org.ourproject.kune.docs.client.cnt;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.listener.Listener0;
public interface DocumentContent {
- void onEditCancelled(Slot0 slot);
+ void onEditCancelled(Listener0 listener);
void onDeleteClicked();
void onEditClicked();
- void onEditing(Slot0 slot);
+ void onEditing(Listener0 listener);
void onSaved();
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocumentContentPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocumentContentPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocumentContentPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -40,11 +40,11 @@
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
import org.ourproject.kune.workspace.client.site.Site;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Signal0;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot0;
-import com.calclab.suco.client.signal.Slot2;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Event0;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener0;
+import com.calclab.suco.client.listener.Listener2;
import com.google.gwt.user.client.rpc.AsyncCallback;
public class DocumentContentPresenter implements DocumentContent, TextEditorListener {
@@ -56,8 +56,8 @@
private final Provider<DocumentReader> docReaderProvider;
private final Provider<TextEditor> textEditorProvider;
private final Provider<FolderViewer> folderViewerProvider;
- private final Signal0 onEditing;
- private final Signal0 onEditCancelled;
+ private final Event0 onEditing;
+ private final Event0 onEditCancelled;
private final Provider<ContentServiceAsync> contentServiceProvider;
private final I18nUITranslationService i18n;
private final KuneErrorHandler errorHandler;
@@ -81,16 +81,16 @@
this.contentServiceProvider = contentServiceProvider;
this.toolbar = toolbar;
this.actionRegistry = actionRegistry;
- this.onEditing = new Signal0("onEditing");
- this.onEditCancelled = new Signal0("onEditCancelled");
- stateManager.onStateChanged(new Slot<StateDTO>() {
+ this.onEditing = new Event0("onEditing");
+ this.onEditCancelled = new Event0("onEditCancelled");
+ stateManager.onStateChanged(new Listener<StateDTO>() {
public void onEvent(final StateDTO state) {
if (state.getToolName().equals(DocumentClientTool.NAME)) {
setState(state);
}
}
});
- stateManager.onToolChanged(new Slot2<String, String>() {
+ stateManager.onToolChanged(new Listener2<String, String>() {
public void onEvent(final String oldTool, final String newTool) {
if (oldTool != null && oldTool.equals(DocumentClientTool.NAME)) {
// Detach
@@ -122,8 +122,8 @@
textEditorProvider.get().setToolbarVisible(false);
}
- public void onEditCancelled(final Slot0 slot) {
- onEditCancelled.add(slot);
+ public void onEditCancelled(final Listener0 listener) {
+ onEditCancelled.add(listener);
}
public void onEditClicked() {
@@ -146,8 +146,8 @@
});
}
- public void onEditing(final Slot0 slot) {
- onEditing.add(slot);
+ public void onEditing(final Listener0 listener) {
+ onEditing.add(listener);
}
public void onSave(final String text) {
@@ -196,7 +196,7 @@
set = actionRegistry.selectCurrentActions(content.getContainerRights(), typeId);
}
toolbar.disableMenusAndClearButtons();
- toolbar.setActions(set.getToolbarActions(), true);
+ toolbar.showActions(set.getToolbarActions(), true);
showContent();
}
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/ctx/DocumentContextPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/ctx/DocumentContextPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/ctx/DocumentContextPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -26,8 +26,8 @@
import org.ourproject.kune.platf.client.state.StateManager;
import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
public class DocumentContextPresenter implements DocumentContext {
private DocumentContextView view;
@@ -38,7 +38,7 @@
final Provider<ContextNavigator> contextNavigatorProvider, final Provider<AdminContext> adminContextProvider) {
this.contextNavigatorProvider = contextNavigatorProvider;
this.adminContextProvider = adminContextProvider;
- stateManager.onStateChanged(new Slot<StateDTO>() {
+ stateManager.onStateChanged(new Listener<StateDTO>() {
public void onEvent(final StateDTO state) {
if (DocumentClientTool.NAME.equals(state.getToolName())) {
setState(state);
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/AdminContextPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/AdminContextPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/ctx/admin/AdminContextPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -38,7 +38,7 @@
import org.ourproject.kune.workspace.client.title.EntitySubTitle;
import org.ourproject.kune.workspace.client.title.EntityTitle;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class AdminContextPresenter implements AdminContext {
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionButtonDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionButtonDescriptor.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionButtonDescriptor.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -2,7 +2,7 @@
import org.ourproject.kune.platf.client.dto.AccessRolDTO;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public class ActionButtonDescriptor<T> extends ActionDescriptor<T> {
@@ -10,7 +10,7 @@
private ActionButtonSeparator rightSeparator;
public ActionButtonDescriptor(final AccessRolDTO accessRolDTO, final ActionPosition actionPosition,
- final Slot<T> onPerformCall) {
+ final Listener<T> onPerformCall) {
super(accessRolDTO, actionPosition, onPerformCall);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -3,7 +3,7 @@
import org.ourproject.kune.platf.client.dto.AccessRolDTO;
import org.ourproject.kune.platf.client.services.ImageDescriptor;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public class ActionDescriptor<T> {
@@ -16,8 +16,8 @@
private String confirmationTitle;
private String confirmationText;
- private final Slot<T> onPerformCall;
- private final Slot<T> onNotConfirmed;
+ private final Listener<T> onPerformCall;
+ private final Listener<T> onNotConfirmed;
private AccessRolDTO accessRol;
@@ -26,7 +26,7 @@
private ActionEnableCondition<T> enableCondition;
public ActionDescriptor(final AccessRolDTO accessRolDTO, final ActionPosition actionPosition,
- final Slot<T> onPerformCall) {
+ final Listener<T> onPerformCall) {
accessRol = accessRolDTO;
this.actionPosition = actionPosition;
this.onPerformCall = onPerformCall;
@@ -35,7 +35,7 @@
}
public ActionDescriptor(final AccessRolDTO accessRolDTO, final ActionPosition actionPosition,
- final Slot<T> onPerformCall, final ActionEnableCondition<T> enableCondition) {
+ final Listener<T> onPerformCall, final ActionEnableCondition<T> enableCondition) {
this(accessRolDTO, actionPosition, onPerformCall);
this.enableCondition = enableCondition;
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionManager.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionManager.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -2,7 +2,7 @@
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.listener.Listener0;
public class ActionManager {
@@ -14,11 +14,11 @@
public void doAction(final ActionDescriptor<?> action, final Object parameter) {
if (action.isMustBeConfirmed()) {
- ws.askConfirmation(action.getConfirmationTitle(), action.getConfirmationText(), new Slot0() {
+ ws.askConfirmation(action.getConfirmationTitle(), action.getConfirmationText(), new Listener0() {
public void onEvent() {
action.fireOnPerformCall(parameter);
}
- }, new Slot0() {
+ }, new Listener0() {
public void onEvent() {
action.fireOnNotConfirmed(parameter);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionMenuDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionMenuDescriptor.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionMenuDescriptor.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -3,7 +3,7 @@
import org.ourproject.kune.platf.client.dto.AccessRolDTO;
import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public class ActionMenuDescriptor<T> extends ActionDescriptor<T> {
@@ -12,7 +12,7 @@
private String parentSubMenuTitle;
public ActionMenuDescriptor(final AccessRolDTO accessRolDTO, final ActionPosition actionPosition,
- final Slot<T> onPerformCall) {
+ final Listener<T> onPerformCall) {
super(accessRolDTO, actionPosition, onPerformCall);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbar.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbar.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -9,6 +9,6 @@
void disableMenusAndClearButtons();
- void setActions(ActionCollection<StateToken> actionCollection, boolean isItemSelected);
+ void showActions(ActionCollection<StateToken> actionCollection, boolean isItemSelected);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -13,7 +13,7 @@
import org.ourproject.kune.workspace.client.skel.Toolbar;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
import com.google.gwt.user.client.ui.Widget;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.widgets.Button;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -11,14 +11,14 @@
import com.allen_sauer.gwt.log.client.Log;
public class ActionToolbarPresenter implements ActionToolbar {
- private final ActionToolbarPanel toolbar;
+ private final ActionToolbarView toolbar;
private final Session session;
private final ActionRegistry<StateToken> actionRegistry;
- public ActionToolbarPresenter(final Session session, final ActionToolbarPanel actionToolbarPanel,
+ public ActionToolbarPresenter(final Session session, final ActionToolbarView toolbar,
final ActionRegistry<StateToken> actionRegistry) {
this.session = session;
- toolbar = actionToolbarPanel;
+ this.toolbar = toolbar;
this.actionRegistry = actionRegistry;
}
@@ -31,7 +31,7 @@
toolbar.disableAllMenuItems();
}
- public void setActions(final ActionCollection<StateToken> actions, final boolean isItemSelected) {
+ public void showActions(final ActionCollection<StateToken> actions, final boolean isItemSelected) {
for (final ActionDescriptor<StateToken> action : actions) {
if (action instanceof ActionMenuDescriptor) {
toolbar.addMenuAction((ActionMenuDescriptor<StateToken>) action, isItemSelected
@@ -48,5 +48,4 @@
}
}
}
-
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/app/Application.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/app/Application.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/app/Application.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -20,13 +20,13 @@
package org.ourproject.kune.platf.client.app;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.listener.Listener0;
public interface Application {
- void onApplicationStart(Slot0 slot);
+ void onApplicationStart(Listener0 listener);
- void onApplicationStop(Slot0 slot);
+ void onApplicationStop(Listener0 listener);
void start();
Added: trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationComponentGroup.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationComponentGroup.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationComponentGroup.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -0,0 +1,7 @@
+package org.ourproject.kune.platf.client.app;
+
+import com.calclab.suco.client.ioc.decorator.GroupedSingleton;
+
+public class ApplicationComponentGroup extends GroupedSingleton {
+
+}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/app/ApplicationDefault.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -28,8 +28,8 @@
import org.ourproject.kune.workspace.client.site.Site;
import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.suco.client.signal.Signal0;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.listener.Event0;
+import com.calclab.suco.client.listener.Listener0;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DeferredCommand;
import com.google.gwt.user.client.Timer;
@@ -40,13 +40,13 @@
public class ApplicationDefault implements Application {
private final Session session;
- private final Signal0 onApplicationStart;
- private final Signal0 onApplicationStop;
+ private final Event0 onApplicationStart;
+ private final Event0 onApplicationStop;
public ApplicationDefault(final Session session) {
this.session = session;
- this.onApplicationStart = new Signal0("onApplicationStart");
- this.onApplicationStop = new Signal0("onApplicationStop");
+ this.onApplicationStart = new Event0("onApplicationStart");
+ this.onApplicationStop = new Event0("onApplicationStop");
Window.addWindowCloseListener(new WindowCloseListener() {
public void onWindowClosed() {
stop();
@@ -58,12 +58,12 @@
});
}
- public void onApplicationStart(final Slot0 slot) {
- onApplicationStart.add(slot);
+ public void onApplicationStart(final Listener0 listener) {
+ onApplicationStart.add(listener);
}
- public void onApplicationStop(final Slot0 slot) {
- onApplicationStop.add(slot);
+ public void onApplicationStop(final Listener0 listener) {
+ onApplicationStop.add(listener);
}
public void start() {
Added: trunk/src/main/java/org/ourproject/kune/platf/client/app/ToolGroup.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/app/ToolGroup.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/app/ToolGroup.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -0,0 +1,6 @@
+package org.ourproject.kune.platf.client.app;
+
+import com.calclab.suco.client.ioc.decorator.GroupedSingleton;
+
+public class ToolGroup extends GroupedSingleton {
+}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/dto/ChatUserParamsDTO.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/ChatUserParamsDTO.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/ChatUserParamsDTO.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -1,7 +1,6 @@
package org.ourproject.kune.platf.client.dto;
-import com.calclab.emite.client.im.roster.RosterManager;
-import com.calclab.emite.client.im.roster.RosterManager.SubscriptionMode;
+import com.calclab.emiteuimodule.client.SubscriptionMode;
import com.google.gwt.user.client.rpc.IsSerializable;
public class ChatUserParamsDTO implements IsSerializable {
@@ -34,7 +33,7 @@
return chatColor;
}
- public RosterManager.SubscriptionMode getSubscriptionMode() {
+ public SubscriptionMode getSubscriptionMode() {
return subscriptionMode;
}
@@ -54,7 +53,7 @@
this.publishRoster = publishRoster;
}
- public void setSubscriptionMode(final RosterManager.SubscriptionMode subscriptionMode) {
+ public void setSubscriptionMode(final SubscriptionMode subscriptionMode) {
this.subscriptionMode = subscriptionMode;
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserDTO.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserDTO.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserDTO.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -19,7 +19,7 @@
*/
package org.ourproject.kune.platf.client.dto;
-import com.calclab.emite.client.im.roster.RosterManager.SubscriptionMode;
+import com.calclab.emiteuimodule.client.SubscriptionMode;
import com.google.gwt.user.client.rpc.IsSerializable;
public class UserDTO implements IsSerializable {
@@ -37,120 +37,120 @@
private String chatColor;
public UserDTO() {
- this(null, null, null, null, null, null, null, null, true, null, null);
+ this(null, null, null, null, null, null, null, null, true, null, null);
}
public UserDTO(final String name, final String shortName, final String password, final String email,
- final I18nLanguageDTO language, final I18nCountryDTO country, final TimeZoneDTO timezone,
- final String avatar, final boolean publishRoster, final SubscriptionMode subscriptionMode,
- final String chatColor) {
- this.name = name;
- this.shortName = shortName;
- this.password = password;
- this.email = email;
- this.language = language;
- this.country = country;
- this.timezone = timezone;
- this.avatar = avatar;
- this.publishRoster = publishRoster;
- this.subscriptionMode = subscriptionMode;
- this.chatColor = chatColor;
+ final I18nLanguageDTO language, final I18nCountryDTO country, final TimeZoneDTO timezone,
+ final String avatar, final boolean publishRoster, final SubscriptionMode subscriptionMode,
+ final String chatColor) {
+ this.name = name;
+ this.shortName = shortName;
+ this.password = password;
+ this.email = email;
+ this.language = language;
+ this.country = country;
+ this.timezone = timezone;
+ this.avatar = avatar;
+ this.publishRoster = publishRoster;
+ this.subscriptionMode = subscriptionMode;
+ this.chatColor = chatColor;
}
public String getAvatar() {
- return avatar;
+ return avatar;
}
public String getChatColor() {
- return chatColor;
+ return chatColor;
}
public I18nCountryDTO getCountry() {
- return country;
+ return country;
}
public String getEmail() {
- return email;
+ return email;
}
public Long getId() {
- return id;
+ return id;
}
public I18nLanguageDTO getLanguage() {
- return language;
+ return language;
}
public String getName() {
- return name;
+ return name;
}
public String getPassword() {
- return password;
+ return password;
}
public String getShortName() {
- return shortName;
+ return shortName;
}
public SubscriptionMode getSubscriptionMode() {
- return subscriptionMode;
+ return subscriptionMode;
}
public TimeZoneDTO getTimezone() {
- return timezone;
+ return timezone;
}
public boolean isPublishRoster() {
- return publishRoster;
+ return publishRoster;
}
public void setAvatar(final String avatar) {
- this.avatar = avatar;
+ this.avatar = avatar;
}
public void setChatColor(final String chatColor) {
- this.chatColor = chatColor;
+ this.chatColor = chatColor;
}
public void setCountry(final I18nCountryDTO country) {
- this.country = country;
+ this.country = country;
}
public void setEmail(final String email) {
- this.email = email;
+ this.email = email;
}
public void setId(final Long id) {
- this.id = id;
+ this.id = id;
}
public void setLanguage(final I18nLanguageDTO language) {
- this.language = language;
+ this.language = language;
}
public void setName(final String name) {
- this.name = name;
+ this.name = name;
}
public void setPassword(final String password) {
- this.password = password;
+ this.password = password;
}
public void setPublishRoster(final boolean publishRoster) {
- this.publishRoster = publishRoster;
+ this.publishRoster = publishRoster;
}
public void setShortName(final String shortName) {
- this.shortName = shortName;
+ this.shortName = shortName;
}
public void setSubscriptionMode(final SubscriptionMode subscriptionMode) {
- this.subscriptionMode = subscriptionMode;
+ this.subscriptionMode = subscriptionMode;
}
public void setTimezone(final TimeZoneDTO timezone) {
- this.timezone = timezone;
+ this.timezone = timezone;
}
}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/services/Kune.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/Kune.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/Kune.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -1,41 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2008 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package org.ourproject.kune.platf.client.services;
-
-import com.calclab.suco.client.Suco;
-import com.calclab.suco.client.container.Container;
-import com.calclab.suco.client.container.DelegatedContainer;
-import com.calclab.suco.client.module.Module;
-import com.calclab.suco.client.module.ModuleManager.ProviderRegisterStrategy;
-
-public class Kune extends DelegatedContainer {
-
- public static Kune create(final Module... modules) {
- final Container container = Suco.create(modules);
- Suco.install(container, ProviderRegisterStrategy.registerOnlyIfNotRegistered, new KuneModule());
- return container.getInstance(Kune.class);
- }
-
- protected Kune(final Container container) {
- super(container);
- }
-
-}
Added: trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneCoreModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneCoreModule.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneCoreModule.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -0,0 +1,15 @@
+package org.ourproject.kune.platf.client.services;
+
+import org.ourproject.kune.platf.client.app.ApplicationComponentGroup;
+import org.ourproject.kune.platf.client.app.ToolGroup;
+
+import com.calclab.suco.client.ioc.module.AbstractModule;
+
+public class KuneCoreModule extends AbstractModule {
+
+ @Override
+ public void onLoad() {
+ registerDecorator(ApplicationComponentGroup.class, new ApplicationComponentGroup());
+ registerDecorator(ToolGroup.class, new ToolGroup());
+ }
+}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneErrorHandler.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneErrorHandler.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneErrorHandler.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -34,9 +34,9 @@
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Signal0;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Event0;
+import com.calclab.suco.client.listener.Listener0;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException;
@@ -44,7 +44,7 @@
private final Session session;
private final I18nTranslationService i18n;
private final Provider<WorkspaceSkeleton> wsProvider;
- private final Signal0 onSessionExpired;
+ private final Event0 onSessionExpired;
private final Provider<StateManager> stateManagerProvider;
public KuneErrorHandler(final Session session, final I18nTranslationService i18n,
@@ -53,7 +53,7 @@
this.i18n = i18n;
this.wsProvider = wsProvider;
this.stateManagerProvider = stateManagerProvider;
- this.onSessionExpired = new Signal0("onSessionExpired");
+ this.onSessionExpired = new Event0("onSessionExpired");
}
public void doSessionExpired() {
@@ -66,8 +66,8 @@
return wsProvider.get();
}
- public void onSessionExpired(final Slot0 slot) {
- onSessionExpired.add(slot);
+ public void onSessionExpired(final Listener0 listener) {
+ onSessionExpired.add(listener);
}
public void process(final Throwable caught) {
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -1,7 +1,5 @@
package org.ourproject.kune.platf.client.services;
-import org.ourproject.kune.chat.client.ChatClientModule;
-import org.ourproject.kune.docs.client.DocumentClientModule;
import org.ourproject.kune.platf.client.actions.ActionManager;
import org.ourproject.kune.platf.client.actions.ContentActionRegistry;
import org.ourproject.kune.platf.client.actions.ContentIconsRegistry;
@@ -11,9 +9,11 @@
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter;
import org.ourproject.kune.platf.client.app.Application;
+import org.ourproject.kune.platf.client.app.ApplicationComponentGroup;
import org.ourproject.kune.platf.client.app.ApplicationDefault;
import org.ourproject.kune.platf.client.app.HistoryWrapper;
import org.ourproject.kune.platf.client.app.HistoryWrapperDefault;
+import org.ourproject.kune.platf.client.app.ToolGroup;
import org.ourproject.kune.platf.client.dto.StateToken;
import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
import org.ourproject.kune.platf.client.rpc.ContentService;
@@ -140,14 +140,11 @@
import org.ourproject.kune.workspace.client.title.EntityTitlePanel;
import org.ourproject.kune.workspace.client.title.EntityTitlePresenter;
-import com.calclab.emiteuimodule.client.EmiteUIModule;
-import com.calclab.suco.client.container.Container;
-import com.calclab.suco.client.module.AbstractModule;
-import com.calclab.suco.client.module.ModuleManager.ProviderRegisterStrategy;
-import com.calclab.suco.client.provider.Factory;
-import com.calclab.suco.client.scope.SingletonScope;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.ioc.decorator.Singleton;
+import com.calclab.suco.client.ioc.module.AbstractModule;
+import com.calclab.suco.client.ioc.module.Factory;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener0;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.History;
@@ -157,13 +154,8 @@
@Override
public void onLoad() {
- register(SingletonScope.class, new Factory<Kune>(Kune.class) {
- public Kune create() {
- return new Kune($(Container.class));
- }
- });
- register(SingletonScope.class, new Factory<Session>(Session.class) {
+ register(Singleton.class, new Factory<Session>(Session.class) {
public Session create() {
return new SessionDefault(Cookies.getCookie(Site.USERHASH), $$(UserServiceAsync.class));
}
@@ -202,10 +194,10 @@
}
});
- register(SingletonScope.class, new Factory<I18nUITranslationService>(I18nUITranslationService.class) {
+ register(Singleton.class, new Factory<I18nUITranslationService>(I18nUITranslationService.class) {
public I18nUITranslationService create() {
final I18nUITranslationService i18n = new I18nUITranslationService();
- i18n.init($(I18nServiceAsync.class), $(Session.class), new Slot0() {
+ i18n.init($(I18nServiceAsync.class), $(Session.class), new Listener0() {
public void onEvent() {
onI18nReady();
}
@@ -220,21 +212,17 @@
private void onI18nReady() {
final I18nUITranslationService i18n = $(I18nUITranslationService.class);
- register(SingletonScope.class, new Factory<I18nTranslationService>(I18nTranslationService.class) {
+ if (container.hasProvider(I18nTranslationService.class)) {
+ container.removeProvider(I18nTranslationService.class);
+ }
+
+ register(Singleton.class, new Factory<I18nTranslationService>(I18nTranslationService.class) {
public I18nTranslationService create() {
return i18n;
}
});
- register(SingletonScope.class, new Factory<QuickTipsHelper>(QuickTipsHelper.class) {
- public QuickTipsHelper create() {
- return new QuickTipsHelper();
- }
- });
-
- $(QuickTipsHelper.class);
-
- register(SingletonScope.class, new Factory<HistoryWrapper>(HistoryWrapper.class) {
+ register(Singleton.class, new Factory<HistoryWrapper>(HistoryWrapper.class) {
public HistoryWrapper create() {
return new HistoryWrapperDefault();
}
@@ -251,13 +239,13 @@
}
});
- register(SingletonScope.class, new Factory<KuneErrorHandler>(KuneErrorHandler.class) {
+ register(Singleton.class, new Factory<KuneErrorHandler>(KuneErrorHandler.class) {
public KuneErrorHandler create() {
return new KuneErrorHandler($(Session.class), i18n, $$(WorkspaceSkeleton.class), $$(StateManager.class));
}
});
- register(SingletonScope.class, new Factory<Images>(Images.class) {
+ register(Singleton.class, new Factory<Images>(Images.class) {
public Images create() {
return Images.App.getInstance();
}
@@ -267,34 +255,32 @@
}
});
- register(SingletonScope.class, new Factory<WorkspaceSkeleton>(WorkspaceSkeleton.class) {
+ register(Singleton.class, new Factory<WorkspaceSkeleton>(WorkspaceSkeleton.class) {
public WorkspaceSkeleton create() {
return new WorkspaceSkeleton();
}
});
- final KuneErrorHandler errorHandler = $(KuneErrorHandler.class);
- AsyncCallbackSimple.init(errorHandler);
+ AsyncCallbackSimple.init($(KuneErrorHandler.class));
final WorkspaceSkeleton ws = $(WorkspaceSkeleton.class);
- final Images images = $(Images.class);
-
- register(SingletonScope.class, new Factory<Application>(Application.class) {
+ register(Singleton.class, new Factory<Application>(Application.class) {
public Application create() {
return new ApplicationDefault($(Session.class));
}
+
+ @Override
+ public void onAfterCreated(final Application instance) {
+ }
});
- register(SingletonScope.class, new Factory<SitePublicSpaceLink>(SitePublicSpaceLink.class) {
- public SitePublicSpaceLink create() {
- final SitePublicSpaceLinkPresenter presenter = new SitePublicSpaceLinkPresenter($(StateManager.class));
- final SitePublicSpaceLinkPanel panel = new SitePublicSpaceLinkPanel(presenter, ws, i18n, images);
- presenter.init(panel);
- return presenter;
+ register(ApplicationComponentGroup.class, new Factory<QuickTipsHelper>(QuickTipsHelper.class) {
+ public QuickTipsHelper create() {
+ return new QuickTipsHelper();
}
});
- register(SingletonScope.class, new Factory<SiteProgress>(SiteProgress.class) {
+ register(ApplicationComponentGroup.class, new Factory<SiteProgress>(SiteProgress.class) {
public SiteProgress create() {
final SiteProgressPresenter presenter = new SiteProgressPresenter();
final SiteProgressPanel panel = new SiteProgressPanel(presenter, $$(SitePublicSpaceLink.class));
@@ -303,13 +289,23 @@
}
});
- register(SingletonScope.class, new Factory<Site>(Site.class) {
+ register(ApplicationComponentGroup.class, new Factory<Site>(Site.class) {
public Site create() {
return new Site(i18n, $(SiteProgress.class), $$(SiteMessage.class));
}
});
- register(SingletonScope.class, new Factory<SiteMessage>(SiteMessage.class) {
+ register(ApplicationComponentGroup.class, new Factory<SitePublicSpaceLink>(SitePublicSpaceLink.class) {
+ public SitePublicSpaceLink create() {
+ final SitePublicSpaceLinkPresenter presenter = new SitePublicSpaceLinkPresenter($(StateManager.class));
+ final SitePublicSpaceLinkPanel panel = new SitePublicSpaceLinkPanel(presenter, ws, i18n,
+ $(Images.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(ApplicationComponentGroup.class, new Factory<SiteMessage>(SiteMessage.class) {
public SiteMessage create() {
final SiteMessagePresenter siteMessagePresenter = new SiteMessagePresenter();
final SiteMessageView siteMessageView = new SiteMessagePanel(siteMessagePresenter, true, i18n);
@@ -318,29 +314,26 @@
}
});
- $(SiteProgress.class);
- $(Site.class);
-
- register(SingletonScope.class, new Factory<SiteSignInLink>(SiteSignInLink.class) {
- public SiteSignInLink create() {
- final SiteSignInLinkPresenter presenter = new SiteSignInLinkPresenter($(Session.class));
- final SiteSignInLinkPanel panel = new SiteSignInLinkPanel(presenter, i18n, ws);
+ register(ApplicationComponentGroup.class, new Factory<SiteUserMenu>(SiteUserMenu.class) {
+ public SiteUserMenu create() {
+ final SiteUserMenuPresenter presenter = new SiteUserMenuPresenter($(Session.class),
+ $(StateManager.class));
+ final SiteUserMenuPanel panel = new SiteUserMenuPanel(presenter, ws, i18n);
presenter.init(panel);
return presenter;
}
});
- register(SingletonScope.class, new Factory<SiteUserMenu>(SiteUserMenu.class) {
- public SiteUserMenu create() {
- final SiteUserMenuPresenter presenter = new SiteUserMenuPresenter($(Session.class),
- $(StateManager.class));
- final SiteUserMenuPanel panel = new SiteUserMenuPanel(presenter, ws, i18n);
+ register(ApplicationComponentGroup.class, new Factory<SiteSignInLink>(SiteSignInLink.class) {
+ public SiteSignInLink create() {
+ final SiteSignInLinkPresenter presenter = new SiteSignInLinkPresenter($(Session.class));
+ final SiteSignInLinkPanel panel = new SiteSignInLinkPanel(presenter, i18n, ws);
presenter.init(panel);
return presenter;
}
});
- register(SingletonScope.class, new Factory<SiteSignOutLink>(SiteSignOutLink.class) {
+ register(ApplicationComponentGroup.class, new Factory<SiteSignOutLink>(SiteSignOutLink.class) {
public SiteSignOutLink create() {
final SiteSignOutLinkPresenter presenter = new SiteSignOutLinkPresenter($(Session.class),
$$(UserServiceAsync.class), $$(KuneErrorHandler.class));
@@ -350,7 +343,7 @@
}
});
- register(SingletonScope.class, new Factory<SiteNewGroupLink>(SiteNewGroupLink.class) {
+ register(ApplicationComponentGroup.class, new Factory<SiteNewGroupLink>(SiteNewGroupLink.class) {
public SiteNewGroupLink create() {
final SiteNewGroupLinkPresenter presenter = new SiteNewGroupLinkPresenter();
final SiteNewGroupLinkPanel panel = new SiteNewGroupLinkPanel(presenter, ws, i18n);
@@ -359,7 +352,7 @@
}
});
- register(SingletonScope.class, new Factory<SiteOptions>(SiteOptions.class) {
+ register(ApplicationComponentGroup.class, new Factory<SiteOptions>(SiteOptions.class) {
public SiteOptions create() {
final SiteOptionsPresenter presenter = new SiteOptionsPresenter();
final SiteOptionsPanel panel = new SiteOptionsPanel(presenter, ws, i18n, $$(I18nTranslator.class));
@@ -368,7 +361,7 @@
}
});
- register(SingletonScope.class, new Factory<SiteLogo>(SiteLogo.class) {
+ register(ApplicationComponentGroup.class, new Factory<SiteLogo>(SiteLogo.class) {
public SiteLogo create() {
final SiteLogoPresenter presenter = new SiteLogoPresenter($(Session.class));
final SiteLogoPanel panel = new SiteLogoPanel(presenter, ws);
@@ -377,26 +370,7 @@
}
});
- register(SingletonScope.class, new Factory<SiteSearcher>(SiteSearcher.class) {
- public SiteSearcher create() {
- final SiteSearcherPresenter presenter = new SiteSearcherPresenter($$(StateManager.class));
- final SiteSearcherView view = new SiteSearcherPanel(presenter, i18n, ws);
- presenter.init(view);
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<I18nTranslator>(I18nTranslator.class) {
- public I18nTranslator create() {
- final I18nTranslatorPresenter presenter = new I18nTranslatorPresenter($(Session.class),
- $(I18nServiceAsync.class), i18n);
- final I18nTranslatorView view = new I18nTranslatorPanel(presenter, i18n, $(LanguageSelector.class), ws);
- presenter.init(view);
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<SiteSearch>(SiteSearch.class) {
+ register(ApplicationComponentGroup.class, new Factory<SiteSearch>(SiteSearch.class) {
public SiteSearch create() {
final SiteSearchPresenter presenter = new SiteSearchPresenter($$(SiteSearcher.class));
final SiteSearchPanel panel = new SiteSearchPanel(presenter, ws, i18n);
@@ -405,36 +379,7 @@
}
});
- register(SingletonScope.class, new Factory<SignIn>(SignIn.class) {
- public SignIn create() {
- final SignInPresenter presenter = new SignInPresenter($(Session.class), $(StateManager.class), i18n,
- $(UserServiceAsync.class));
- final SignInPanel view = new SignInPanel(presenter, i18n, ws);
- presenter.init(view);
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<LicenseChoose>(LicenseChoose.class) {
- public LicenseChoose create() {
- final LicenseChoosePresenter presenter = new LicenseChoosePresenter($(Session.class));
- final LicenseChoosePanel view = new LicenseChoosePanel(presenter, i18n);
- presenter.init(view);
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<NewGroup>(NewGroup.class) {
- public NewGroup create() {
- final NewGroupPresenter presenter = new NewGroupPresenter(i18n, $(Session.class),
- $(StateManager.class), $$(GroupServiceAsync.class));
- final NewGroupPanel view = new NewGroupPanel(presenter, i18n, $$(LicenseChoose.class));
- presenter.init(view);
- return presenter;
- }
- });
-
- register(SingletonScope.class, new Factory<EntityLogo>(EntityLogo.class) {
+ register(ApplicationComponentGroup.class, new Factory<EntityLogo>(EntityLogo.class) {
public EntityLogo create() {
final EntityLogoPresenter presenter = new EntityLogoPresenter($(StateManager.class),
$(WsThemePresenter.class));
@@ -444,7 +389,7 @@
}
});
- register(SingletonScope.class, new Factory<WsThemePresenter>(WsThemePresenter.class) {
+ register(ApplicationComponentGroup.class, new Factory<WsThemePresenter>(WsThemePresenter.class) {
public WsThemePresenter create() {
final WsThemePresenter presenter = new WsThemePresenter($(Session.class), $$(GroupServiceAsync.class),
$(StateManager.class));
@@ -454,7 +399,7 @@
}
});
- register(SingletonScope.class, new Factory<EntityTitle>(EntityTitle.class) {
+ register(ApplicationComponentGroup.class, new Factory<EntityTitle>(EntityTitle.class) {
public EntityTitle create() {
final EntityTitlePresenter presenter = new EntityTitlePresenter(i18n, $(KuneErrorHandler.class),
$(StateManager.class), $(Session.class), $$(ContentServiceAsync.class),
@@ -465,7 +410,7 @@
}
});
- register(SingletonScope.class, new Factory<EntitySubTitle>(EntitySubTitle.class) {
+ register(ApplicationComponentGroup.class, new Factory<EntitySubTitle>(EntitySubTitle.class) {
public EntitySubTitle create() {
final EntitySubTitlePresenter presenter = new EntitySubTitlePresenter(i18n, $(StateManager.class));
final EntitySubTitlePanel panel = new EntitySubTitlePanel(presenter, i18n, ws);
@@ -474,7 +419,7 @@
}
});
- register(SingletonScope.class, new Factory<EntityLicensePresenter>(EntityLicensePresenter.class) {
+ register(ApplicationComponentGroup.class, new Factory<EntityLicensePresenter>(EntityLicensePresenter.class) {
public EntityLicensePresenter create() {
final EntityLicensePresenter presenter = new EntityLicensePresenter($(StateManager.class));
final EntityLicensePanel panel = new EntityLicensePanel(presenter, i18n, ws);
@@ -483,7 +428,7 @@
}
});
- register(SingletonScope.class, new Factory<RatePresenter>(RatePresenter.class) {
+ register(ApplicationComponentGroup.class, new Factory<RatePresenter>(RatePresenter.class) {
public RatePresenter create() {
final RatePresenter presenter = new RatePresenter($(StateManager.class));
final RatePanel panel = new RatePanel(null, null, i18n, ws);
@@ -492,7 +437,7 @@
}
});
- register(SingletonScope.class, new Factory<RateIt>(RateIt.class) {
+ register(ApplicationComponentGroup.class, new Factory<RateIt>(RateIt.class) {
public RateIt create() {
final RateItPresenter presenter = new RateItPresenter(i18n, $(Session.class),
$$(ContentServiceAsync.class), $(StateManager.class));
@@ -502,7 +447,7 @@
}
});
- register(SingletonScope.class, new Factory<GroupMembersSummary>(GroupMembersSummary.class) {
+ register(ApplicationComponentGroup.class, new Factory<GroupMembersSummary>(GroupMembersSummary.class) {
public GroupMembersSummary create() {
final GroupMembersSummaryPresenter presenter = new GroupMembersSummaryPresenter(i18n,
$(StateManager.class), $(ImageUtils.class), $(Session.class),
@@ -513,7 +458,7 @@
}
});
- register(SingletonScope.class, new Factory<GroupSummary>(GroupSummary.class) {
+ register(ApplicationComponentGroup.class, new Factory<GroupSummary>(GroupSummary.class) {
public GroupSummary create() {
final GroupSummaryPresenter presenter = new GroupSummaryPresenter($(StateManager.class),
$(WsThemePresenter.class));
@@ -523,7 +468,7 @@
}
});
- register(SingletonScope.class, new Factory<ParticipationSummary>(ParticipationSummary.class) {
+ register(ApplicationComponentGroup.class, new Factory<ParticipationSummary>(ParticipationSummary.class) {
public ParticipationSummary create() {
final ParticipationSummaryPresenter presenter = new ParticipationSummaryPresenter(i18n,
$(StateManager.class), $(ImageUtils.class), $(Session.class),
@@ -534,7 +479,7 @@
}
});
- register(SingletonScope.class, new Factory<TagsSummary>(TagsSummary.class) {
+ register(ApplicationComponentGroup.class, new Factory<TagsSummary>(TagsSummary.class) {
public TagsSummary create() {
final TagsSummaryPresenter presenter = new TagsSummaryPresenter($(Session.class),
$$(SiteSearcher.class), $(StateManager.class), $(WsThemePresenter.class));
@@ -544,7 +489,55 @@
}
});
- register(SingletonScope.class, new Factory<UserLiveSearcher>(UserLiveSearcher.class) {
+ register(Singleton.class, new Factory<SiteSearcher>(SiteSearcher.class) {
+ public SiteSearcher create() {
+ final SiteSearcherPresenter presenter = new SiteSearcherPresenter($$(StateManager.class));
+ final SiteSearcherView view = new SiteSearcherPanel(presenter, i18n, ws);
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<I18nTranslator>(I18nTranslator.class) {
+ public I18nTranslator create() {
+ final I18nTranslatorPresenter presenter = new I18nTranslatorPresenter($(Session.class),
+ $(I18nServiceAsync.class), i18n);
+ final I18nTranslatorView view = new I18nTranslatorPanel(presenter, i18n, $(LanguageSelector.class), ws);
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<SignIn>(SignIn.class) {
+ public SignIn create() {
+ final SignInPresenter presenter = new SignInPresenter($(Session.class), $(StateManager.class), i18n,
+ $(UserServiceAsync.class));
+ final SignInPanel view = new SignInPanel(presenter, i18n, ws);
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<LicenseChoose>(LicenseChoose.class) {
+ public LicenseChoose create() {
+ final LicenseChoosePresenter presenter = new LicenseChoosePresenter($(Session.class));
+ final LicenseChoosePanel view = new LicenseChoosePanel(presenter, i18n);
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<NewGroup>(NewGroup.class) {
+ public NewGroup create() {
+ final NewGroupPresenter presenter = new NewGroupPresenter(i18n, $(Session.class),
+ $(StateManager.class), $$(GroupServiceAsync.class));
+ final NewGroupPanel view = new NewGroupPanel(presenter, i18n, $$(LicenseChoose.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<UserLiveSearcher>(UserLiveSearcher.class) {
public UserLiveSearcher create() {
final UserLiveSearcherPresenter presenter = new UserLiveSearcherPresenter();
final EntityLiveSearcherView view = new UserLiveSearcherPanel(presenter, i18n);
@@ -553,7 +546,7 @@
}
});
- register(SingletonScope.class, new Factory<GroupLiveSearcher>(GroupLiveSearcher.class) {
+ register(Singleton.class, new Factory<GroupLiveSearcher>(GroupLiveSearcher.class) {
public GroupLiveSearcher create() {
final GroupLiveSearcherPresenter presenter = new GroupLiveSearcherPresenter();
final EntityLiveSearcherView view = new GroupLiveSearchPanel(presenter, i18n);
@@ -562,7 +555,7 @@
}
});
- register(SingletonScope.class, new Factory<ToolSelector>(ToolSelector.class) {
+ register(Singleton.class, new Factory<ToolSelector>(ToolSelector.class) {
public ToolSelector create() {
final ToolSelectorPresenter presenter = new ToolSelectorPresenter($(StateManager.class),
$(WsThemePresenter.class));
@@ -570,7 +563,7 @@
}
});
- register(SingletonScope.class, new Factory<TextEditor>(TextEditor.class) {
+ register(Singleton.class, new Factory<TextEditor>(TextEditor.class) {
public TextEditor create() {
final TextEditorPresenter presenter = new TextEditorPresenter(null, true);
final TextEditorPanel panel = new TextEditorPanel(presenter, i18n, ws);
@@ -579,7 +572,7 @@
}
});
- register(SingletonScope.class, new Factory<LanguageSelector>(LanguageSelector.class) {
+ register(Singleton.class, new Factory<LanguageSelector>(LanguageSelector.class) {
public LanguageSelector create() {
final LanguageSelectorPresenter presenter = new LanguageSelectorPresenter($(Session.class));
final LanguageSelectorView view = new LanguageSelectorPanel(presenter, i18n);
@@ -588,42 +581,42 @@
}
});
- register(SingletonScope.class, new Factory<ActionManager>(ActionManager.class) {
+ register(Singleton.class, new Factory<ActionManager>(ActionManager.class) {
public ActionManager create() {
return new ActionManager(ws);
}
});
- register(SingletonScope.class, new Factory<ContextActionRegistry>(ContextActionRegistry.class) {
+ register(Singleton.class, new Factory<ContextActionRegistry>(ContextActionRegistry.class) {
public ContextActionRegistry create() {
return new ContextActionRegistry();
}
});
- register(SingletonScope.class, new Factory<ContentActionRegistry>(ContentActionRegistry.class) {
+ register(Singleton.class, new Factory<ContentActionRegistry>(ContentActionRegistry.class) {
public ContentActionRegistry create() {
return new ContentActionRegistry();
}
});
- register(SingletonScope.class, new Factory<DragDropContentRegistry>(DragDropContentRegistry.class) {
+ register(Singleton.class, new Factory<DragDropContentRegistry>(DragDropContentRegistry.class) {
public DragDropContentRegistry create() {
return new DragDropContentRegistry();
}
});
- register(SingletonScope.class, new Factory<ContentIconsRegistry>(ContentIconsRegistry.class) {
+ register(Singleton.class, new Factory<ContentIconsRegistry>(ContentIconsRegistry.class) {
public ContentIconsRegistry create() {
return new ContentIconsRegistry();
}
});
- register(SingletonScope.class, new Factory<ContextNavigator>(ContextNavigator.class) {
+ register(Singleton.class, new Factory<ContextNavigator>(ContextNavigator.class) {
public ContextNavigator create() {
- final ActionToolbarPanel contextNavigatorToolbar = new ActionToolbarPanel(ActionToolbarPanel.Position.context,
- $(Session.class), $$(ActionManager.class), ws);
- final ActionToolbar toolbar = new ActionToolbarPresenter($(Session.class),
- contextNavigatorToolbar, $(ContextActionRegistry.class));
+ final ActionToolbarPanel contextNavigatorToolbar = new ActionToolbarPanel(
+ ActionToolbarPanel.Position.context, $(Session.class), $$(ActionManager.class), ws);
+ final ActionToolbar toolbar = new ActionToolbarPresenter($(Session.class), contextNavigatorToolbar,
+ $(ContextActionRegistry.class));
final ContextNavigatorPresenter presenter = new ContextNavigatorPresenter($(StateManager.class),
$(Session.class), $$(ContentServiceAsync.class), i18n, $(EntityTitle.class),
@@ -636,58 +629,59 @@
}
});
- register(SingletonScope.class, new Factory<FileUploader>(FileUploader.class) {
+ register(Singleton.class, new Factory<FileUploader>(FileUploader.class) {
public FileUploader create() {
final FileUploaderDialog panel = new FileUploaderDialog(i18n, ws, $(Session.class));
return panel;
}
});
- install(ProviderRegisterStrategy.registerOnlyIfNotRegistered, new EmiteUIModule(), new DocumentClientModule(),
- new ChatClientModule());
-
- $(SitePublicSpaceLink.class);
- $(SiteMessage.class);
- $(SiteUserMenu.class);
- $(SiteSignInLink.class);
- $(SiteSignOutLink.class);
- $(SiteNewGroupLink.class);
- $(SiteOptions.class);
- $(SiteSearch.class);
- $(SiteLogo.class);
-
- $(GroupMembersSummary.class);
- $(ParticipationSummary.class);
- $(TagsSummary.class);
- $(GroupSummary.class);
-
- $(EntityLogo.class);
- $(EntityTitle.class);
- $(EntitySubTitle.class);
- $(WsThemePresenter.class);
- $(EntityLicensePresenter.class);
- $(RateIt.class);
- $(RatePresenter.class);
-
// Register of tokens like "signin", "newgroup", "translate" etcetera
- $(StateManager.class).addSiteToken(SiteToken.signin.toString(), new Slot<StateToken>() {
+ $(StateManager.class).addSiteToken(SiteToken.signin.toString(), new Listener<StateToken>() {
public void onEvent(final StateToken previousStateToken) {
$(SignIn.class).doSignIn(previousStateToken);
}
});
- $(StateManager.class).addSiteToken(SiteToken.newgroup.toString(), new Slot<StateToken>() {
+ $(StateManager.class).addSiteToken(SiteToken.newgroup.toString(), new Listener<StateToken>() {
public void onEvent(final StateToken previousStateToken) {
$(NewGroup.class).doNewGroup(previousStateToken);
}
});
- $(StateManager.class).addSiteToken(SiteToken.translate.toString(), new Slot<StateToken>() {
+ $(StateManager.class).addSiteToken(SiteToken.translate.toString(), new Listener<StateToken>() {
public void onEvent(final StateToken previousStateToken) {
$(I18nTranslator.class).doShowTranslator();
}
});
+ // $(SiteProgress.class);
+ // $(Site.class);
+ // $(SitePublicSpaceLink.class);
+ // $(SiteMessage.class);
+ // $(SiteUserMenu.class);
+ // $(SiteSignInLink.class);
+ // $(SiteSignOutLink.class);
+ // $(SiteNewGroupLink.class);
+ // $(SiteOptions.class);
+ // $(SiteSearch.class);
+ // $(SiteLogo.class);
+ //
+ // $(GroupMembersSummary.class);
+ // $(ParticipationSummary.class);
+ // $(TagsSummary.class);
+ // $(GroupSummary.class);
+ //
+ // $(EntityLogo.class);
+ // $(EntityTitle.class);
+ // $(EntitySubTitle.class);
+ // $(WsThemePresenter.class);
+ // $(EntityLicensePresenter.class);
+ // $(RateIt.class);
+ // $(RatePresenter.class);
+
+ $(ApplicationComponentGroup.class).createAll();
+ $(ToolGroup.class).createAll();
$(Application.class).start();
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -31,8 +31,8 @@
import org.ourproject.kune.platf.client.dto.UserInfoDTO;
import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener0;
public interface Session {
@@ -77,11 +77,11 @@
String getUserHash();
- void onInitDataReceived(Slot<InitDataDTO> slot);
+ void onInitDataReceived(Listener<InitDataDTO> listener);
- void onUserSignIn(Slot<UserInfoDTO> slot);
+ void onUserSignIn(Listener<UserInfoDTO> listener);
- void onUserSignOut(Slot0 slot);
+ void onUserSignOut(Listener0 listener);
void setCurrentUserInfo(UserInfoDTO currentUserInfo);
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -35,11 +35,11 @@
import org.ourproject.kune.workspace.client.site.rpc.UserServiceAsync;
import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Signal;
-import com.calclab.suco.client.signal.Signal0;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Event;
+import com.calclab.suco.client.listener.Event0;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener0;
public class SessionDefault implements Session {
private String userHash;
@@ -50,18 +50,18 @@
private Object[][] timezonesArray;
private StateDTO currentState;
private I18nLanguageDTO currentLanguage;
- private final Signal<InitDataDTO> onInitDataReceived;
- private final Signal<UserInfoDTO> onUserSignIn;
- private final Signal0 onUserSignOut;
+ private final Event<InitDataDTO> onInitDataReceived;
+ private final Event<UserInfoDTO> onUserSignIn;
+ private final Event0 onUserSignOut;
private final Provider<UserServiceAsync> userServiceProvider;
public SessionDefault(final String userHash, final Provider<UserServiceAsync> userServiceProvider) {
this.userHash = userHash == null || userHash.equals("null") ? null : userHash;
this.userServiceProvider = userServiceProvider;
languagesArray = null;
- this.onInitDataReceived = new Signal<InitDataDTO>("initDataReceived");
- this.onUserSignIn = new Signal<UserInfoDTO>("onUserSignIn");
- this.onUserSignOut = new Signal0("onUserSignOut");
+ this.onInitDataReceived = new Event<InitDataDTO>("initDataReceived");
+ this.onUserSignIn = new Event<UserInfoDTO>("onUserSignIn");
+ this.onUserSignOut = new Event0("onUserSignOut");
}
public void check(final AsyncCallbackSimple<?> callback) {
@@ -130,16 +130,16 @@
return userHash != null;
}
- public void onInitDataReceived(final Slot<InitDataDTO> slot) {
- onInitDataReceived.add(slot);
+ public void onInitDataReceived(final Listener<InitDataDTO> listener) {
+ onInitDataReceived.add(listener);
}
- public void onUserSignIn(final Slot<UserInfoDTO> slot) {
- onUserSignIn.add(slot);
+ public void onUserSignIn(final Listener<UserInfoDTO> listener) {
+ onUserSignIn.add(listener);
}
- public void onUserSignOut(final Slot0 slot) {
- onUserSignOut.add(slot);
+ public void onUserSignOut(final Listener0 listener) {
+ onUserSignOut.add(listener);
}
public void setCurrent(final StateDTO currentState) {
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/state/StateManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/state/StateManager.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/state/StateManager.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -24,13 +24,13 @@
import org.ourproject.kune.platf.client.dto.StateDTO;
import org.ourproject.kune.platf.client.dto.StateToken;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot2;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener2;
import com.google.gwt.user.client.HistoryListener;
public interface StateManager extends HistoryListener {
- void addSiteToken(String token, Slot<StateToken> whenToken);
+ void addSiteToken(String token, Listener<StateToken> whenToken);
void gotoContainer(Long containerId);
@@ -38,13 +38,13 @@
void gotoToken(String token);
- void onGroupChanged(Slot2<String, String> slot);
+ void onGroupChanged(Listener2<String, String> listener);
- void onSocialNetworkChanged(Slot<StateDTO> slot);
+ void onSocialNetworkChanged(Listener<StateDTO> listener);
- void onStateChanged(Slot<StateDTO> slot);
+ void onStateChanged(Listener<StateDTO> listener);
- void onToolChanged(Slot2<String, String> slot);
+ void onToolChanged(Listener2<String, String> listener);
void reload();
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/state/StateManagerDefault.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/state/StateManagerDefault.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -33,22 +33,22 @@
import org.ourproject.kune.workspace.client.site.Site;
import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.suco.client.signal.Signal;
-import com.calclab.suco.client.signal.Signal2;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot0;
-import com.calclab.suco.client.signal.Slot2;
+import com.calclab.suco.client.listener.Event;
+import com.calclab.suco.client.listener.Event2;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener0;
+import com.calclab.suco.client.listener.Listener2;
public class StateManagerDefault implements StateManager {
private final ContentProvider contentProvider;
private StateDTO oldState;
private final Session session;
private final HistoryWrapper history;
- private final HashMap<String, Slot<StateToken>> siteTokens;
- private final Signal<StateDTO> onStateChanged;
- private final Signal<StateDTO> onSocialNetworkChanged;
- private final Signal2<String, String> onToolChanged;
- private final Signal2<String, String> onGroupChanged;
+ private final HashMap<String, Listener<StateToken>> siteTokens;
+ private final Event<StateDTO> onStateChanged;
+ private final Event<StateDTO> onSocialNetworkChanged;
+ private final Event2<String, String> onToolChanged;
+ private final Event2<String, String> onGroupChanged;
public StateManagerDefault(final ContentProvider contentProvider, final Session session,
final HistoryWrapper history) {
@@ -56,25 +56,25 @@
this.session = session;
this.history = history;
this.oldState = null;
- this.onStateChanged = new Signal<StateDTO>("onStateChanged");
- this.onGroupChanged = new Signal2<String, String>("onGroupChanged");
- this.onToolChanged = new Signal2<String, String>("onToolChanged");
- this.onSocialNetworkChanged = new Signal<StateDTO>("onSocialNetworkChanged");
- session.onUserSignIn(new Slot<UserInfoDTO>() {
+ this.onStateChanged = new Event<StateDTO>("onStateChanged");
+ this.onGroupChanged = new Event2<String, String>("onGroupChanged");
+ this.onToolChanged = new Event2<String, String>("onToolChanged");
+ this.onSocialNetworkChanged = new Event<StateDTO>("onSocialNetworkChanged");
+ session.onUserSignIn(new Listener<UserInfoDTO>() {
public void onEvent(final UserInfoDTO parameter) {
restorePreviousState();
}
});
- session.onUserSignOut(new Slot0() {
+ session.onUserSignOut(new Listener0() {
public void onEvent() {
reload();
}
});
- siteTokens = new HashMap<String, Slot<StateToken>>();
+ siteTokens = new HashMap<String, Listener<StateToken>>();
}
- public void addSiteToken(final String token, final Slot<StateToken> slot) {
- siteTokens.put(token, slot);
+ public void addSiteToken(final String token, final Listener<StateToken> listener) {
+ siteTokens.put(token, listener);
}
public void gotoContainer(final Long containerId) {
@@ -92,14 +92,14 @@
gotoToken(new StateToken(token));
}
- public void onGroupChanged(final Slot2<String, String> slot) {
- onGroupChanged.add(slot);
+ public void onGroupChanged(final Listener2<String, String> listener) {
+ onGroupChanged.add(listener);
}
public void onHistoryChanged(final String historyToken) {
- final Slot<StateToken> tokenSlot = siteTokens.get(historyToken);
+ final Listener<StateToken> tokenListener = siteTokens.get(historyToken);
Log.debug("history token: " + historyToken);
- if (tokenSlot == null) {
+ if (tokenListener == null) {
onHistoryChanged(new StateToken(historyToken));
} else {
StateToken stateToken;
@@ -110,20 +110,20 @@
} else {
stateToken = oldState.getStateToken();
}
- tokenSlot.onEvent(stateToken);
+ tokenListener.onEvent(stateToken);
}
}
- public void onSocialNetworkChanged(final Slot<StateDTO> slot) {
- onSocialNetworkChanged.add(slot);
+ public void onSocialNetworkChanged(final Listener<StateDTO> listener) {
+ onSocialNetworkChanged.add(listener);
}
- public void onStateChanged(final Slot<StateDTO> slot) {
- onStateChanged.add(slot);
+ public void onStateChanged(final Listener<StateDTO> listener) {
+ onStateChanged.add(listener);
}
- public void onToolChanged(final Slot2<String, String> slot) {
- onToolChanged.add(slot);
+ public void onToolChanged(final Listener2<String, String> listener) {
+ onToolChanged.add(listener);
}
/**
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorItemPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorItemPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorItemPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -5,7 +5,7 @@
import org.ourproject.kune.workspace.client.themes.WsTheme;
import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
-import com.calclab.suco.client.signal.Slot2;
+import com.calclab.suco.client.listener.Listener2;
public class ToolSelectorItemPresenter implements ToolSelectorItem {
@@ -34,7 +34,7 @@
public void init(final ToolSelectorItemView view) {
this.view = view;
toolSelector.addTool(this);
- wsThemePresenter.onThemeChanged(new Slot2<WsTheme, WsTheme>() {
+ wsThemePresenter.onThemeChanged(new Listener2<WsTheme, WsTheme>() {
public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
setTheme(oldTheme, newTheme);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/tool/ToolSelectorPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -5,7 +5,7 @@
import org.ourproject.kune.platf.client.state.StateManager;
import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
-import com.calclab.suco.client.signal.Slot2;
+import com.calclab.suco.client.listener.Listener2;
public class ToolSelectorPresenter implements ToolSelector {
@@ -13,12 +13,12 @@
public ToolSelectorPresenter(final StateManager stateManager, final WsThemePresenter wsThemePresenter) {
tools = new HashMap<String, ToolSelectorItem>();
- stateManager.onGroupChanged(new Slot2<String, String>() {
+ stateManager.onGroupChanged(new Listener2<String, String>() {
public void onEvent(final String oldGroupName, final String newGroupName) {
onGroupChanged(newGroupName);
}
});
- stateManager.onToolChanged(new Slot2<String, String>() {
+ stateManager.onToolChanged(new Listener2<String, String>() {
public void onEvent(final String oldTool, final String newTool) {
onToolChanged(oldTool, newTool);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/MenuItem.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/MenuItem.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/MenuItem.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -1,19 +1,19 @@
package org.ourproject.kune.platf.client.ui;
-import com.calclab.suco.client.signal.Signal;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Event;
+import com.calclab.suco.client.listener.Listener;
public class MenuItem<T> {
final String icon;
final String title;
- private final Signal<T> onClick;
+ private final Event<T> onClick;
- public MenuItem(final String icon, final String title, final Slot<T> slot) {
+ public MenuItem(final String icon, final String title, final Listener<T> listener) {
this.icon = icon;
this.title = title;
- this.onClick = new Signal<T>("onClick");
- onClick(slot);
+ this.onClick = new Event<T>("onClick");
+ onClick(listener);
}
public void fire(final T id) {
@@ -28,7 +28,7 @@
return title;
}
- public void onClick(final Slot<T> slot) {
- onClick.add(slot);
+ public void onClick(final Listener<T> listener) {
+ onClick.add(listener);
}
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/FileUploader.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/FileUploader.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/FileUploader.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -2,6 +2,10 @@
public interface FileUploader {
+ public static final String USERHASH = "userhash";
+ public static final String CURRENT_STATE_TOKEN = "currentStateToken";
+ public static final String FILENAME = "filename";
+
void hide();
void setPermittedExtensions(String extensions);
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/FileUploaderDialog.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/FileUploaderDialog.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/FileUploaderDialog.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -20,8 +20,10 @@
public class FileUploaderDialog implements FileUploader {
- private static final String URL = "/kune/servlets/FileUploadManagerRevisited";
+ protected static final String SITE_FILE_UPLOADER = "k-site-file-uploader";
+ private static final String URL = "/kune/servlets/FileUploadManager";
+
private UploadDialog dialog;
private ToolbarButton traybarButton;
private final I18nUITranslationService i18n;
@@ -42,6 +44,7 @@
public void setPermittedExtensions(final String extensions) {
DeferredCommand.addCommand(new Command() {
public void execute() {
+ Log.error("Debugging setPerm issue, current perms: " + dialog.getPermittedExtensions());
final Object[] objs = KuneStringUtils.splitTags(extensions).toArray();
final String[] exts = new String[objs.length];
for (int i = 0; i < objs.length; i++) {
@@ -78,10 +81,9 @@
private void createDialog(final boolean show) {
DeferredCommand.addCommand(new Command() {
-
public void execute() {
-
dialog = new UploadDialog(i18n.t("File uploader"), false, true);
+ dialog.setId(SITE_FILE_UPLOADER);
// dialog.setUploadAutostart(true);
dialog.setResetOnHide(false);
dialog.addListener(new UploadDialogListenerAdapter() {
@@ -115,9 +117,9 @@
final String filename) {
Log.info("Setting upload params");
final UrlParam param[] = new UrlParam[3];
- param[0] = new UrlParam("userhash", userhash);
- param[1] = new UrlParam("currentStateToken", currentStateToken);
- param[2] = new UrlParam("filename", filename);
+ param[0] = new UrlParam(USERHASH, userhash);
+ param[1] = new UrlParam(CURRENT_STATE_TOKEN, currentStateToken);
+ param[2] = new UrlParam(FILENAME, filename);
dialog.setBaseParams(param);
dialog.setPostVarName(filename);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridButton.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridButton.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridButton.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -1,27 +1,27 @@
package org.ourproject.kune.platf.client.ui.gridmenu;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public class GridButton {
private final String title;
private final String icon;
private final String tooltip;
- private final Slot<String> slot;
+ private final Listener<String> listener;
- public GridButton(final String icon, final String title, final String tooltip, final Slot<String> slot) {
+ public GridButton(final String icon, final String title, final String tooltip, final Listener<String> listener) {
this.icon = icon;
this.title = title;
this.tooltip = tooltip;
- this.slot = slot;
+ this.listener = listener;
}
public String getIcon() {
return icon;
}
- public Slot<String> getSlot() {
- return slot;
+ public Listener<String> getListener() {
+ return listener;
}
public String getTitle() {
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridDropConfiguration.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridDropConfiguration.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridDropConfiguration.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -21,18 +21,18 @@
*/
package org.ourproject.kune.platf.client.ui.gridmenu;
-import com.calclab.suco.client.signal.Signal;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Event;
+import com.calclab.suco.client.listener.Listener;
public class GridDropConfiguration {
private final String ddGroupId;
- private final Signal<String> onDrop;
+ private final Event<String> onDrop;
- public GridDropConfiguration(final String ddGroupId, final Slot<String> slot) {
+ public GridDropConfiguration(final String ddGroupId, final Listener<String> listener) {
this.ddGroupId = ddGroupId;
- this.onDrop = new Signal<String>("onDrop");
- this.onDrop(slot);
+ this.onDrop = new Event<String>("onDrop");
+ this.onDrop(listener);
}
public void fire(final String id) {
@@ -43,8 +43,8 @@
return ddGroupId;
}
- public void onDrop(final Slot<String> slot) {
- onDrop.add(slot);
+ public void onDrop(final Listener<String> listener) {
+ onDrop.add(listener);
}
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridMenuPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridMenuPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridMenuPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -4,8 +4,8 @@
import java.util.HashMap;
import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.suco.client.signal.Signal;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Event;
+import com.calclab.suco.client.listener.Listener;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.core.Ext;
import com.gwtext.client.core.SortDir;
@@ -60,8 +60,8 @@
private GridPanel grid;
private final boolean grouped;
private final boolean withCounters;
- private final Signal<String> onClick;
- private final Signal<String> onDoubleClick;
+ private final Event<String> onClick;
+ private final Event<String> onDoubleClick;
private Toolbar topBar;
private Toolbar bottomBar;
private ColumnModel columnModel;
@@ -92,8 +92,8 @@
public GridMenuPanel(final String emptyText, final GridDragConfiguration gridDragConfiguration,
final GridDropConfiguration gridDropConfiguration, final boolean grouped, final boolean withCounters,
final boolean withTopBar, final boolean withBottomBar, final boolean withEndIcon) {
- this.onClick = new Signal<String>("onClick");
- this.onDoubleClick = new Signal<String>("onDoubleClick");
+ this.onClick = new Event<String>("onClick");
+ this.onDoubleClick = new Event<String>("onDoubleClick");
this.grouped = grouped;
this.withCounters = withCounters;
this.withEndIcon = withEndIcon;
@@ -196,12 +196,12 @@
return topBar;
}
- public void onClick(final Slot<String> slot) {
- onClick.add(slot);
+ public void onClick(final Listener<String> listener) {
+ onClick.add(listener);
}
- public void onDoubleClick(final Slot<String> slot) {
- onDoubleClick.add(slot);
+ public void onDoubleClick(final Listener<String> listener) {
+ onDoubleClick.add(listener);
}
public void removeAll() {
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RateItPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RateItPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RateItPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -27,8 +27,8 @@
import org.ourproject.kune.platf.client.state.StateManager;
import org.ourproject.kune.workspace.client.site.Site;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
public class RateItPresenter implements RateIt {
@@ -47,7 +47,7 @@
this.session = session;
this.contentServiceProvider = contentServiceProvider;
this.stateManager = stateManager;
- stateManager.onStateChanged(new Slot<StateDTO>() {
+ stateManager.onStateChanged(new Listener<StateDTO>() {
public void onEvent(final StateDTO state) {
setState(state);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RatePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RatePresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RatePresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -3,14 +3,14 @@
import org.ourproject.kune.platf.client.dto.StateDTO;
import org.ourproject.kune.platf.client.state.StateManager;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public class RatePresenter {
private RateView view;
public RatePresenter(final StateManager stateManager) {
- stateManager.onStateChanged(new Slot<StateDTO>() {
+ stateManager.onStateChanged(new Listener<StateDTO>() {
public void onEvent(final StateDTO state) {
setState(state);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -64,7 +64,7 @@
import org.ourproject.kune.platf.server.manager.ToolConfigurationManager;
import org.ourproject.kune.platf.server.manager.UserManager;
import org.ourproject.kune.platf.server.manager.impl.FileManagerDefault;
-import org.ourproject.kune.platf.server.manager.impl.FileUploadManagerRevisited;
+import org.ourproject.kune.platf.server.manager.impl.FileUploadManager;
import org.ourproject.kune.platf.server.manager.impl.GroupManagerDefault;
import org.ourproject.kune.platf.server.manager.impl.I18nCountryManagerDefault;
import org.ourproject.kune.platf.server.manager.impl.I18nLanguageManagerDefault;
@@ -108,7 +108,7 @@
bind(KuneProperties.class).to(KunePropertiesDefault.class);
bind(Mapper.class).to(DozerMapper.class);
bind(ToolRegistry.class);
- bind(FileUploadManagerRevisited.class);
+ bind(FileUploadManager.class);
bindInterceptor(Matchers.any(), Matchers.annotatedWith(Authenticated.class),
outermostCall(new AuthenticatedMethodInterceptor()));
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/ChatUserParams.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/ChatUserParams.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/ChatUserParams.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -2,8 +2,7 @@
import java.io.Serializable;
-import com.calclab.emite.client.im.roster.RosterManager;
-import com.calclab.emite.client.im.roster.RosterManager.SubscriptionMode;
+import com.calclab.emiteuimodule.client.SubscriptionMode;
public class ChatUserParams implements Serializable {
@@ -37,7 +36,7 @@
return chatColor;
}
- public RosterManager.SubscriptionMode getSubscriptionMode() {
+ public SubscriptionMode getSubscriptionMode() {
return subscriptionMode;
}
@@ -57,7 +56,7 @@
this.publishRoster = publishRoster;
}
- public void setSubscriptionMode(final RosterManager.SubscriptionMode subscriptionMode) {
+ public void setSubscriptionMode(final SubscriptionMode subscriptionMode) {
this.subscriptionMode = subscriptionMode;
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/FileManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/FileManager.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/FileManager.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -1,5 +1,35 @@
package org.ourproject.kune.platf.server.manager;
+import java.io.File;
+import java.io.IOException;
+
public interface FileManager {
+ /**
+ * Create a new file adding a numeric sequence if the file already exists
+ *
+ * @param dir
+ * the directory (use File.separator for dir delimiters)
+ * @param fileName
+ * (the new file name)
+ * @return if 'file.txt' exists it creates 'file 1.txt' and if 'file 1.txt'
+ * exists it creates 'file 2.txt' and so on
+ * @throws IOException
+ */
+ File createFileWithSequentialName(String dir, String fileName) throws IOException;
+
+ /**
+ * @param dir
+ * the directory (use File.separator for dir delimiters)
+ * @return true if and only if the directory was created, along with all
+ * necessary parent directories; false otherwise
+ */
+ boolean mkdir(String dir);
+
+ /**
+ * @param dir
+ * the directory (use File.separator for dir delimiters)
+ */
+ void rmdir(String dir);
+
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileManagerDefault.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileManagerDefault.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -1,5 +1,8 @@
package org.ourproject.kune.platf.server.manager.impl;
+import java.io.File;
+import java.io.IOException;
+
import org.ourproject.kune.platf.server.manager.FileManager;
import com.google.inject.Singleton;
@@ -7,4 +10,29 @@
@Singleton
public class FileManagerDefault implements FileManager {
+ public File createFileWithSequentialName(final String dir, final String fileName) throws IOException {
+ String fileNameProposal = new String(fileName);
+ File file = new File(dir, fileNameProposal);
+ while (file.exists()) {
+ fileNameProposal = FileUtils.getNextSequentialFileName(fileNameProposal, true);
+ file = new File(dir, fileNameProposal);
+ }
+ file.createNewFile();
+ return file;
+ }
+
+ public boolean mkdir(final String dir) {
+ return (new File(dir)).mkdirs();
+ }
+
+ public void rmdir(final String dir) {
+ final File file = new File(dir);
+ if (!file.isDirectory()) {
+ throw new RuntimeException("rmdir: " + dir + ": Not a directory");
+ }
+ if (file.listFiles().length != 0) {
+ throw new RuntimeException("rmdir: " + dir + ": Directory not empty");
+ }
+ file.delete();
+ }
}
Copied: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUploadManager.java (from rev 878, trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUploadManagerRevisited.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUploadManagerRevisited.java 2008-09-22 11:53:01 UTC (rev 878)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUploadManager.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -0,0 +1,154 @@
+package org.ourproject.kune.platf.server.manager.impl;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import net.sf.json.JSONObject;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.ourproject.kune.platf.client.dto.StateToken;
+import org.ourproject.kune.platf.client.ui.dialogs.FileUploader;
+import org.ourproject.kune.platf.server.access.AccessRol;
+import org.ourproject.kune.platf.server.auth.ActionLevel;
+import org.ourproject.kune.platf.server.auth.Authenticated;
+import org.ourproject.kune.platf.server.auth.Authorizated;
+import org.ourproject.kune.platf.server.content.ContentManager;
+import org.ourproject.kune.platf.server.manager.FileManager;
+import org.ourproject.kune.platf.server.properties.KuneProperties;
+
+import com.google.inject.Inject;
+import com.google.inject.servlet.RequestScoped;
+
+ at RequestScoped
+public class FileUploadManager extends HttpServlet {
+
+ public static final Log log = LogFactory.getLog(FileUploadManager.class);
+
+ private static final long serialVersionUID = 1L;
+
+ @Inject
+ KuneProperties kuneProperties;
+ @Inject
+ ContentManager contentManager;
+ @Inject
+ FileManager fileManager;
+
+ @Override
+ @SuppressWarnings( { "unchecked", "deprecation" })
+ protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException,
+ IOException {
+
+ // i18n
+ JSONObject jsonResponse = createJsonResponse(true, "OK");
+
+ final DiskFileItemFactory factory = new DiskFileItemFactory();
+ // maximum size that will be stored in memory
+ factory.setSizeThreshold(4096);
+ // the location for saving data that is larger than getSizeThreshold()
+ factory.setRepository(new File("/tmp"));
+
+ if (!ServletFileUpload.isMultipartContent(req)) {
+ log.warn("Not a multipart upload");
+ }
+
+ final ServletFileUpload upload = new ServletFileUpload(factory);
+ // maximum size before a FileUploadException will be thrown
+ upload.setSizeMax(new Integer(kuneProperties.get(KuneProperties.UPLOAD_MAX_FILE_SIZE)) * 1024 * 1024);
+
+ try {
+ final List fileItems = upload.parseRequest(req);
+ String userHash = null;
+ StateToken stateToken = null;
+ String fileName = null;
+ FileItem file = null;
+ for (final Iterator iterator = fileItems.iterator(); iterator.hasNext();) {
+ final FileItem item = (FileItem) iterator.next();
+ if (item.isFormField()) {
+ final String name = item.getFieldName();
+ final String value = item.getString();
+ log.info("name: " + name + " value: " + value);
+ if (name.equals(FileUploader.USERHASH)) {
+ userHash = value;
+ }
+ if (name.equals(FileUploader.CURRENT_STATE_TOKEN)) {
+ stateToken = new StateToken(value);
+ }
+ } else {
+ fileName = item.getName();
+ log.info("file: " + fileName + " fieldName: " + item.getFieldName() + " size: " + item.getSize());
+ file = item;
+ }
+ }
+ createFile(userHash, stateToken, fileName, file);
+ } catch (final FileUploadException e) {
+ // i18n
+ jsonResponse = createJsonResponse(false, "Error: File too large");
+ } catch (final Exception e) {
+ // i18n
+ jsonResponse = createJsonResponse(false, "Error uploading file");
+ e.printStackTrace();
+ }
+
+ final Writer w = new OutputStreamWriter(resp.getOutputStream());
+ w.write(jsonResponse.toString());
+ w.close();
+ resp.setStatus(HttpServletResponse.SC_OK);
+ }
+
+ private String calculateUploadDirLocation(final StateToken stateToken) {
+ return kuneProperties.get(KuneProperties.UPLOAD_LOCATION) + File.pathSeparator + stateToken.getGroup()
+ + File.pathSeparator + stateToken.getTool() + File.pathSeparator + stateToken.getFolder();
+ }
+
+ @Authenticated
+ @Authorizated(accessRolRequired = AccessRol.Editor, actionLevel = ActionLevel.container)
+ private JSONObject createFile(final String userHash, final StateToken stateToken, final String fileName,
+ final FileItem fileUploadItem) throws Exception {
+ final String destDir = calculateUploadDirLocation(stateToken);
+ fileManager.mkdir(destDir);
+ final File file = fileManager.createFileWithSequentialName(destDir, fileName);
+ fileUploadItem.write(file);
+ fileUploadItem.getContentType();
+ // here ContentManager code
+ return createJsonResponse(true, "OK");
+ }
+
+ private JSONObject createJsonResponse(final boolean success, final String message) {
+ /**
+ *
+ * http://max-bazhenov.com/dev/upload-dialog-2.0/index.php
+ *
+ * Server side handler.
+ *
+ * The files in the queue are posted one at a time, the file field name
+ * is 'file'. The handler should return json encoded object with
+ * following properties: { success: true|false, // required error:
+ * 'Error or success message' // optional, also can be named 'message' }
+ */
+
+ JSONObject response = null;
+ try {
+ response = new JSONObject();
+ response.put("success", success);
+ response.put("error", message);
+ response.put("code", "232");
+ } catch (final Exception e) {
+ log.error("Error building response");
+ }
+ return response;
+ }
+}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUploadManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUploadManagerDefault.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUploadManagerDefault.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -1,46 +0,0 @@
-package org.ourproject.kune.platf.server.manager.impl;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.cafesip.gwtcomp.server.FileUploadAction;
-import org.cafesip.gwtcomp.server.FormResponse;
-
-public class FileUploadManagerDefault implements FileUploadAction {
-
- public static final Log log = LogFactory.getLog(FileUploadManagerDefault.class);
- private HashMap<String, File> files;
-
- @SuppressWarnings("unchecked")
- public FormResponse onSubmit(final HttpServlet servlet, final HttpServletRequest request) {
- for (final Map.Entry<String, File> entry : files.entrySet()) {
- log.info("file uploaded: " + entry.getKey());
- }
-
- /**
- *
- * http://max-bazhenov.com/dev/upload-dialog-2.0/index.php
- *
- * Server side handler.
- *
- * The files in the queue are posted one at a time, the file field name
- * is 'file'. The handler should return json encoded object with
- * following properties: { success: true|false, // required error:
- * 'Error or success message' // optional, also can be named 'message' }
- */
- return new FormResponse(HttpServletResponse.SC_OK, "{'success':true,'message':'OK'}", false);
- }
-
- public void setFileList(final HashMap<String, File> files) {
- log.info("Setting files");
- this.files = files;
- }
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUploadManagerRevisited.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUploadManagerRevisited.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUploadManagerRevisited.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -1,111 +0,0 @@
-package org.ourproject.kune.platf.server.manager.impl;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import net.sf.json.JSONObject;
-
-import org.apache.commons.fileupload.FileItem;
-import org.apache.commons.fileupload.FileUploadException;
-import org.apache.commons.fileupload.disk.DiskFileItemFactory;
-import org.apache.commons.fileupload.servlet.ServletFileUpload;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.ourproject.kune.platf.server.properties.KuneProperties;
-
-import com.google.inject.Inject;
-import com.google.inject.servlet.RequestScoped;
-
- at RequestScoped
-public class FileUploadManagerRevisited extends HttpServlet {
-
- public static final Log log = LogFactory.getLog(FileUploadManagerRevisited.class);
-
- private static final long serialVersionUID = 1L;
-
- @Inject
- KuneProperties kuneProperties;
-
- @Override
- @SuppressWarnings( { "unchecked", "deprecation" })
- protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException,
- IOException {
-
- // i18n
- String jsonResponse = createJsonResponse(true, "OK");
-
- final DiskFileItemFactory factory = new DiskFileItemFactory();
- // maximum size that will be stored in memory
- factory.setSizeThreshold(4096);
- // the location for saving data that is larger than getSizeThreshold()
- factory.setRepository(new File("/tmp"));
-
- if (!ServletFileUpload.isMultipartContent(req)) {
- log.warn("Not a multipart upload");
- }
-
- final ServletFileUpload upload = new ServletFileUpload(factory);
- // maximum size before a FileUploadException will be thrown
- upload.setSizeMax(new Integer(kuneProperties.get(KuneProperties.UPLOAD_MAX_FILE_SIZE)) * 1024 * 1024);
-
- try {
- final List fileItems = upload.parseRequest(req);
- for (final Iterator iterator = fileItems.iterator(); iterator.hasNext();) {
- final FileItem item = (FileItem) iterator.next();
- if (item.isFormField()) {
- final String name = item.getFieldName();
- final String value = item.getString();
- log.info("name: " + name + " value: " + value);
- } else {
- final String fileName = item.getName();
- log.info("file: " + fileName + " fieldName: " + item.getFieldName() + " size: " + item.getSize());
- item.write(new File(kuneProperties.get(KuneProperties.UPLOAD_LOCATION), fileName));
- }
- }
- } catch (final FileUploadException e) {
- jsonResponse = createJsonResponse(false, "Error: File too large");
- } catch (final Exception e) {
- jsonResponse = createJsonResponse(false, "Error uploading file");
- e.printStackTrace();
- }
-
- final Writer w = new OutputStreamWriter(resp.getOutputStream());
- w.write(jsonResponse);
- w.close();
- resp.setStatus(HttpServletResponse.SC_OK);
- }
-
- private String createJsonResponse(final boolean success, final String message) {
- /**
- *
- * http://max-bazhenov.com/dev/upload-dialog-2.0/index.php
- *
- * Server side handler.
- *
- * The files in the queue are posted one at a time, the file field name
- * is 'file'. The handler should return json encoded object with
- * following properties: { success: true|false, // required error:
- * 'Error or success message' // optional, also can be named 'message' }
- */
-
- JSONObject response = null;
- try {
- response = new JSONObject();
- response.put("success", success);
- response.put("error", message);
- response.put("code", "232");
- } catch (final Exception e) {
- log.error("Error building response");
- }
- return response.toString();
- }
-}
Added: trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUtils.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUtils.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/FileUtils.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -0,0 +1,30 @@
+package org.ourproject.kune.platf.server.manager.impl;
+
+public class FileUtils {
+
+ public static String getNextSequentialFileName(final String fileName) {
+ final int lastSpace = fileName.lastIndexOf(" ");
+ if (lastSpace != -1) {
+ final String suffix = fileName.substring(lastSpace + 1);
+ try {
+ final Integer i = new Integer(suffix);
+ return fileName.substring(0, lastSpace + 1) + (i + 1);
+ } catch (final NumberFormatException e) {
+ }
+ }
+ return fileName + " 1";
+ }
+
+ public static String getNextSequentialFileName(final String fileName, boolean preserveExtension) {
+ if (!preserveExtension) {
+ return getNextSequentialFileName(fileName);
+ }
+ final int dotIndex = fileName.lastIndexOf(".");
+ if (dotIndex == -1 || dotIndex == 0) {
+ return getNextSequentialFileName(fileName);
+ } else {
+ final String ext = fileName.substring(dotIndex);
+ return getNextSequentialFileName(fileName.substring(0, dotIndex)) + ext;
+ }
+ }
+}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -101,6 +101,7 @@
if (!item.getStateToken().hasAll()) {
// is a container
child.setExpandable(true);
+ child.setSingleClickExpand(true);
child.addListener(new TreeNodeListenerAdapter() {
public void onExpand(final Node node) {
treePanel.getNodeById(node.getId()).select();
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -44,9 +44,9 @@
import org.ourproject.kune.workspace.client.site.Site;
import org.ourproject.kune.workspace.client.title.EntityTitle;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener0;
import com.google.gwt.user.client.rpc.AsyncCallback;
public class ContextNavigatorPresenter implements ContextNavigator {
@@ -100,12 +100,12 @@
public void init(final ContextNavigatorView view) {
this.view = view;
- session.onUserSignIn(new Slot<UserInfoDTO>() {
+ session.onUserSignIn(new Listener<UserInfoDTO>() {
public void onEvent(final UserInfoDTO parameter) {
clear();
}
});
- session.onUserSignOut(new Slot0() {
+ session.onUserSignOut(new Listener0() {
public void onEvent() {
clear();
}
@@ -152,7 +152,7 @@
public void selectItem(final StateToken stateToken) {
view.selectItem(genId(stateToken));
toolbar.disableMenusAndClearButtons();
- toolbar.setActions(actionsByItem.get(stateToken), true);
+ toolbar.showActions(actionsByItem.get(stateToken), true);
}
public void setEditOnNextStateChange(final boolean edit) {
@@ -184,7 +184,7 @@
.getTypeId());
view.setRootItem(genId(root.getStateToken()), i18n.t(root.getName()), root.getStateToken(), set
.getItemActions());
- toolbar.setActions(set.getToolbarActions(), false);
+ toolbar.showActions(set.getToolbarActions(), false);
createChildItems(root, containerRights);
actionsByItem.put(root.getStateToken(), set.getToolbarActions());
}
@@ -229,7 +229,7 @@
final boolean isNodeSelected) {
final ActionCollectionSet<StateToken> set = actionRegistry.selectCurrentActions(rights, contentTypeId);
- toolbar.setActions(set.getToolbarActions(), isNodeSelected);
+ toolbar.showActions(set.getToolbarActions(), isNodeSelected);
final ContextNavigatorItem item = new ContextNavigatorItem(genId(stateToken), genId(parentStateToken),
contentIconsRegistry.getContentTypeIcon(contentTypeId), title, status, stateToken,
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/entitylogo/EntityLogoPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -6,14 +6,14 @@
import org.ourproject.kune.workspace.client.themes.WsTheme;
import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot2;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener2;
public class EntityLogoPresenter implements EntityLogo {
private EntityLogoView view;
public EntityLogoPresenter(final StateManager stateManager, final WsThemePresenter theme) {
- stateManager.onStateChanged(new Slot<StateDTO>() {
+ stateManager.onStateChanged(new Listener<StateDTO>() {
public void onEvent(final StateDTO state) {
final GroupDTO group = state.getGroup();
final boolean isAdmin = state.getGroupRights().isAdministrable();
@@ -22,7 +22,7 @@
view.setPutYourLogoVisible(isAdmin);
}
});
- theme.onThemeChanged(new Slot2<WsTheme, WsTheme>() {
+ theme.onThemeChanged(new Listener2<WsTheme, WsTheme>() {
public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
view.setTheme(oldTheme, newTheme);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -25,7 +25,7 @@
import org.ourproject.kune.platf.client.state.Session;
import org.ourproject.kune.workspace.client.site.Site;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.listener.Listener0;
import com.google.gwt.user.client.rpc.AsyncCallback;
public class I18nTranslatorPresenter implements I18nTranslator {
@@ -39,7 +39,7 @@
this.session = session;
this.i18nService = i18nService;
this.i18n = i18n;
- session.onUserSignOut(new Slot0() {
+ session.onUserSignOut(new Listener0() {
public void onEvent() {
view.hideTranslatorAndIcon();
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nUITranslationService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nUITranslationService.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nUITranslationService.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -30,7 +30,7 @@
import org.ourproject.kune.platf.client.ui.WindowUtils;
import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.listener.Listener0;
import com.google.gwt.user.client.rpc.AsyncCallback;
public class I18nUITranslationService extends I18nTranslationService {
@@ -72,7 +72,7 @@
return lexicon;
}
- public void init(final I18nServiceAsync i18nService, final Session session, final Slot0 onReady) {
+ public void init(final I18nServiceAsync i18nService, final Session session, final Listener0 onReady) {
this.i18nService = i18nService;
this.session = session;
final Location loc = WindowUtils.getLocation();
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -24,7 +24,7 @@
import org.ourproject.kune.platf.client.dto.StateDTO;
import org.ourproject.kune.platf.client.state.StateManager;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public class EntityLicensePresenter {
@@ -32,7 +32,7 @@
private LicenseDTO license;
public EntityLicensePresenter(final StateManager stateManager) {
- stateManager.onStateChanged(new Slot<StateDTO>() {
+ stateManager.onStateChanged(new Listener<StateDTO>() {
public void onEvent(final StateDTO state) {
setLicense(state);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -30,7 +30,7 @@
import org.ourproject.kune.workspace.client.licensechoose.LicenseChoosePanel;
import org.ourproject.kune.workspace.client.site.msg.SiteMessagePanel;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.DeckPanel;
import com.google.gwt.user.client.ui.HTML;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -33,8 +33,8 @@
import org.ourproject.kune.workspace.client.site.Site;
import org.ourproject.kune.workspace.client.site.SiteToken;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -52,7 +52,7 @@
this.session = session;
this.stateManager = stateManager;
this.groupServiceProvider = groupServiceProvider;
- stateManager.addSiteToken(SiteToken.newgroup.toString(), new Slot<StateToken>() {
+ stateManager.addSiteToken(SiteToken.newgroup.toString(), new Listener<StateToken>() {
public void onEvent(final StateToken previousStateToken) {
doNewGroup(previousStateToken);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcher.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcher.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcher.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -21,11 +21,11 @@
import org.ourproject.kune.platf.client.dto.LinkDTO;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public interface EntityLiveSearcher {
- void onSelection(Slot<LinkDTO> slot);
+ void onSelection(Listener<LinkDTO> listener);
void show();
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -22,12 +22,12 @@
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.dto.LinkDTO;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public class EntityLiveSearcherPresenter implements EntityLiveSearcher {
private EntityLiveSearcherView view;
- private Slot<LinkDTO> slot;
+ private Listener<LinkDTO> listener;
public EntityLiveSearcherPresenter() {
}
@@ -41,12 +41,12 @@
}
public void onSelection(final LinkDTO link) {
- slot.onEvent(link);
+ listener.onEvent(link);
view.hide();
}
- public void onSelection(final Slot<LinkDTO> slot) {
- this.slot = slot;
+ public void onSelection(final Listener<LinkDTO> listener) {
+ this.listener = listener;
}
public void show() {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -54,6 +54,7 @@
public class SiteSearcherPanel extends AbstractSearcherPanel implements SiteSearcherView {
+ private static final String SITE_SEARCHER_DIALOG = "k-site-searcher-dialog";
private final Window dialog;
private final SiteSearcherPresenter presenter;
private Store groupStore;
@@ -159,6 +160,7 @@
centerPanel.setActiveItemID(panelId);
dialog.setCloseAction(Window.HIDE);
+ dialog.ensureDebugId(SITE_SEARCHER_DIALOG);
return dialog;
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -26,7 +26,7 @@
import org.ourproject.kune.platf.client.state.StateManager;
import org.ourproject.kune.workspace.client.site.Site;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class SiteSearcherPresenter implements SiteSearcher {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -53,6 +53,7 @@
public class SignInPanel implements SignInView {
private class MessagePanel extends Panel {
+ private static final String SIGNIN_MESSAGE_PANEL = "k-signin-message-panel";
private final SimpleMessagePanel messagesPanel;
public MessagePanel() {
@@ -60,6 +61,7 @@
setBorder(false);
setHeight(60);
messagesPanel = new SimpleMessagePanel();
+ messagesPanel.ensureDebugId(SIGNIN_MESSAGE_PANEL);
messagesPanel.setMessage("", SiteErrorType.info, SiteErrorType.error);
add(messagesPanel);
}
@@ -79,6 +81,9 @@
}
}
+ private static final String USER_SIGN_IN_PANEL = "k-user-sign-in-panel";
+ private static final String USER_REGISTER_PANEL = "k-user-register-panel";
+
private BasicDialog dialog;
private final SignInPresenter presenter;
private SignInForm signInForm;
@@ -270,11 +275,13 @@
confPanel(signInPanel);
signInForm = new SignInForm(i18n);
signInPanel.add(signInForm.getForm());
+ signInPanel.ensureDebugId(USER_SIGN_IN_PANEL);
signInPanel.add(createNoAccountRegister());
messagesSignInPanel = new MessagePanel();
signInPanel.add(messagesSignInPanel);
final Panel registerPanel = new Panel(i18n.t("Register"));
+ registerPanel.ensureDebugId(USER_REGISTER_PANEL);
confPanel(registerPanel);
centerPanel.add(signInPanel);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -36,7 +36,7 @@
import org.ourproject.kune.workspace.client.site.rpc.UserServiceAsync;
import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.emite.client.im.roster.RosterManager.SubscriptionMode;
+import com.calclab.emiteuimodule.client.SubscriptionMode;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/site/Site.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/site/Site.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/Site.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -25,7 +25,7 @@
import org.ourproject.kune.workspace.client.site.msg.SiteMessage;
import org.ourproject.kune.workspace.client.sitebar.siteprogress.SiteProgress;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class Site {
public static final String USERHASH = "userHash";
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitelogo/SiteLogoPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitelogo/SiteLogoPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitelogo/SiteLogoPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -4,14 +4,14 @@
import org.ourproject.kune.platf.client.dto.InitDataDTO;
import org.ourproject.kune.platf.client.state.Session;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public class SiteLogoPresenter implements SiteLogo {
private SiteLogoView view;
public SiteLogoPresenter(final Session session) {
- session.onInitDataReceived(new Slot<InitDataDTO>() {
+ session.onInitDataReceived(new Listener<InitDataDTO>() {
public void onEvent(final InitDataDTO initData) {
view.setSiteLogoUrl(initData.getSiteLogoUrl());
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -4,7 +4,7 @@
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.PushButton;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteprogress/SiteProgressPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteprogress/SiteProgressPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteprogress/SiteProgressPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -2,7 +2,7 @@
import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.RootPanel;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -14,6 +14,9 @@
public class SitePublicSpaceLinkPanel implements SitePublicSpaceLinkView {
+ private static final String SITE_GOTO_PUBLIC = "k-site-goto-public";
+ private static final String SITE_CONTENT_NO_PUBLIC = "k-site-content-no-public";
+
private final HorizontalPanel publicHP;
private final IconLabel contentNoPublic;
private final IconLabel gotoPublic;
@@ -23,7 +26,9 @@
final I18nUITranslationService i18n, final Images img) {
publicHP = new HorizontalPanel();
gotoPublic = new IconLabel(img.anybody(), i18n.t("Go to Public Space"), false);
+ gotoPublic.ensureDebugId(SITE_GOTO_PUBLIC);
contentNoPublic = new IconLabel(img.anybody(), i18n.t("This content is not public"));
+ contentNoPublic.ensureDebugId(SITE_CONTENT_NO_PUBLIC);
publicHP.add(gotoPublic);
publicHP.add(contentNoPublic);
final SiteBar siteBar = ws.getSiteBar();
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -6,14 +6,14 @@
import org.ourproject.kune.platf.client.dto.StateToken;
import org.ourproject.kune.platf.client.state.StateManager;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public class SitePublicSpaceLinkPresenter implements SitePublicSpaceLink {
private SitePublicSpaceLinkView view;
public SitePublicSpaceLinkPresenter(final StateManager stateManager) {
- stateManager.onStateChanged(new Slot<StateDTO>() {
+ stateManager.onStateChanged(new Listener<StateDTO>() {
public void onEvent(final StateDTO state) {
setState(state);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesearch/SiteSearchPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesearch/SiteSearchPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesearch/SiteSearchPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -16,6 +16,8 @@
public class SiteSearchPanel implements SiteSearchView {
private static final String SEARCH_TEXT_WIDTH_SMALL = "120";
private static final String SEARCH_TEXT_WIDTH_BIG = "180";
+ private static final String SITE_SEARCH_BUTTON = "k-site-search-button";
+ private static final String SITE_SEARCH_TEXTBOX = "k-site-search-textbox";
private final PushButton searchButton;
private final TextBox searchTextBox;
@@ -29,7 +31,9 @@
siteBar.addSpacer();
siteBar.addSpacer();
searchButton = new PushButton(img.kuneSearchIco().createImage(), img.kuneSearchIcoPush().createImage());
+ searchButton.ensureDebugId(SITE_SEARCH_BUTTON);
searchTextBox = new TextBox();
+ searchTextBox.ensureDebugId(SITE_SEARCH_TEXTBOX);
siteBar.add(searchButton);
siteBar.addSpacer();
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesearch/SiteSearchPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesearch/SiteSearchPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesearch/SiteSearchPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -3,7 +3,7 @@
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.workspace.client.search.SiteSearcher;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class SiteSearchPresenter implements SiteSearch {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignInLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignInLinkPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignInLinkPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -7,11 +7,15 @@
import com.google.gwt.user.client.ui.Hyperlink;
public class SiteSignInLinkPanel implements SiteSignInLinkView {
+
+ private static final String SITE_SIGN_IN = "k-site-sign-in";
+
private final Hyperlink signInHyperlink;
public SiteSignInLinkPanel(final SiteSignInLinkPresenter presenter, final I18nUITranslationService i18n,
final WorkspaceSkeleton ws) {
signInHyperlink = new Hyperlink();
+ signInHyperlink.ensureDebugId(SITE_SIGN_IN);
signInHyperlink.setText(i18n.t("Sign in to collaborate"));
signInHyperlink.setTargetHistoryToken(SiteToken.signin.toString());
ws.getSiteBar().add(signInHyperlink);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignInLinkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignInLinkPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignInLinkPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -4,20 +4,20 @@
import org.ourproject.kune.platf.client.dto.UserInfoDTO;
import org.ourproject.kune.platf.client.state.Session;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener0;
public class SiteSignInLinkPresenter implements SiteSignInLink {
private SiteSignInLinkView view;
public SiteSignInLinkPresenter(final Session session) {
- session.onUserSignIn(new Slot<UserInfoDTO>() {
+ session.onUserSignIn(new Listener<UserInfoDTO>() {
public void onEvent(final UserInfoDTO user) {
view.setVisible(false);
}
});
- session.onUserSignOut(new Slot0() {
+ session.onUserSignOut(new Listener0() {
public void onEvent() {
view.setVisible(true);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -10,6 +10,8 @@
public class SiteSignOutLinkPanel implements SiteSignOutLinkView {
+ private static final String SITE_SIGN_OUT = "k-site-sign-out";
+
private final Label signOutLabel;
public SiteSignOutLinkPanel(final SiteSignOutLinkPresenter presenter, final I18nUITranslationService i18n,
@@ -17,6 +19,7 @@
signOutLabel = new Label();
signOutLabel.setText(i18n.t("Sign out"));
signOutLabel.addStyleName("k-sitebar-labellink");
+ signOutLabel.ensureDebugId(SITE_SIGN_OUT);
ws.getSiteBar().add(signOutLabel);
signOutLabel.addClickListener(new ClickListener() {
public void onClick(final Widget arg0) {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -11,9 +11,9 @@
import org.ourproject.kune.workspace.client.site.Site;
import org.ourproject.kune.workspace.client.site.rpc.UserServiceAsync;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener0;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -28,17 +28,17 @@
final Provider<KuneErrorHandler> kuneErrorHandlerProvider) {
this.session = session;
this.userServiceProvider = userServiceProvider;
- session.onUserSignIn(new Slot<UserInfoDTO>() {
+ session.onUserSignIn(new Listener<UserInfoDTO>() {
public void onEvent(final UserInfoDTO userInfoDTO) {
view.setVisible(true);
}
});
- session.onUserSignOut(new Slot0() {
+ session.onUserSignOut(new Listener0() {
public void onEvent() {
view.setVisible(false);
}
});
- kuneErrorHandlerProvider.get().onSessionExpired(new Slot0() {
+ kuneErrorHandlerProvider.get().onSessionExpired(new Listener0() {
public void onEvent() {
clientUIsignOut();
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -17,6 +17,10 @@
public class SiteUserMenuPanel implements SiteUserMenuView {
+ private static final String LOGGED_USER_MENU = "k-logged-user-menu";
+ private static final String USER_PREFERENCES_MENU_ITEM = "k-user-pref-menu-item";
+ private static final String USER_HOME_PAGE_MENU_ITEM = "k-user-home-page-menu-item";
+ private static final String USER_PARTICIPATION_MENU_ITEM = "k-user-participation-menu-item";
private final PushButton loggedUserMenu;
private final Widget separator;
private final Menu userMenu;
@@ -25,6 +29,7 @@
public SiteUserMenuPanel(final SiteUserMenuPresenter presenter, final WorkspaceSkeleton ws,
final I18nUITranslationService i18n) {
loggedUserMenu = new PushButton("");
+ loggedUserMenu.ensureDebugId(LOGGED_USER_MENU);
loggedUserMenu.setStyleName("k-sitebar-labellink");
ws.getSiteBar().add(loggedUserMenu);
separator = ws.getSiteBar().addSeparator();
@@ -36,6 +41,7 @@
});
final Item userHomePage = new Item(i18n.t("Your homepage"));
userHomePage.setIcon("images/group-home.gif");
+ userHomePage.ensureDebugId(USER_HOME_PAGE_MENU_ITEM);
userHomePage.addListener(new BaseItemListenerAdapter() {
@Override
public void onClick(final BaseItem item, final EventObject e) {
@@ -45,6 +51,7 @@
});
userMenu.addItem(userHomePage);
final Item userPreferences = new Item(i18n.t("Your preferences"));
+ userPreferences.ensureDebugId(USER_PREFERENCES_MENU_ITEM);
userPreferences.setIcon("images/kune-preferences.gif");
userPreferences.addListener(new BaseItemListenerAdapter() {
@Override
@@ -55,6 +62,7 @@
});
userMenu.addItem(userPreferences);
userParticipation = new Menu();
+ userParticipation.ensureDebugId(USER_PARTICIPATION_MENU_ITEM);
final MenuItem userParticipationItem = new MenuItem(i18n.t("Your groups"), userParticipation);
userParticipationItem.setIcon("");
userMenu.addItem(userParticipationItem);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserMenuPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -8,8 +8,8 @@
import org.ourproject.kune.platf.client.ui.MenuItem;
import org.ourproject.kune.platf.client.ui.MenuItemCollection;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener0;
public class SiteUserMenuPresenter implements SiteUserMenu {
@@ -22,13 +22,13 @@
this.session = session;
this.stateManager = stateManager;
participateInGroups = new MenuItemCollection<GroupDTO>();
- session.onUserSignIn(new Slot<UserInfoDTO>() {
+ session.onUserSignIn(new Listener<UserInfoDTO>() {
public void onEvent(final UserInfoDTO userInfoDTO) {
onUserSignIn(userInfoDTO);
}
});
- session.onUserSignOut(new Slot0() {
+ session.onUserSignOut(new Listener0() {
public void onEvent() {
view.setVisible(false);
view.setLoggedUserName("");
@@ -54,7 +54,7 @@
private void addPartipation(final GroupDTO group) {
participateInGroups.add(new MenuItem<GroupDTO>("images/group-def-icon.gif", group.getShortName(),
- new Slot<GroupDTO>() {
+ new Listener<GroupDTO>() {
public void onEvent(final GroupDTO param) {
stateManager.gotoToken(group.getShortName());
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntitySummary.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntitySummary.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntitySummary.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -10,6 +10,9 @@
import com.gwtext.client.widgets.layout.FitLayout;
public class EntitySummary {
+ private static final String SITE_TRAYBAR = "k-site-traybar";
+ private static final String ENTITY_SUMMARY = "k-entity-summary";
+ private static final String ENTITY_TOOLS = "k-entity-tools";
private final Panel entityTools;
private final Panel entitySummary;
private final DefaultBorderLayout mainPanel;
@@ -19,6 +22,7 @@
public EntitySummary() {
mainPanel = new DefaultBorderLayout();
entityTools = new Panel();
+ entityTools.ensureDebugId(ENTITY_TOOLS);
entityTools.setLayout(new FitLayout());
entityTools.setAutoHeight(true);
vpTools = new VerticalPanel();
@@ -28,8 +32,10 @@
entitySummary.setBorder(false);
entityTools.setAutoScroll(false);
entitySummary.setAutoScroll(true);
- entitySummary.setCls("k-entity-summary");
- trayBar = mainPanel.createBottomBar(entitySummary, "k-site-traybar");
+ entitySummary.setCls(ENTITY_SUMMARY);
+ entitySummary.ensureDebugId(ENTITY_SUMMARY);
+ trayBar = mainPanel.createBottomBar(entitySummary, SITE_TRAYBAR);
+ trayBar.ensureDebugId(SITE_TRAYBAR);
mainPanel.add(entityTools, DefaultBorderLayout.Position.NORTH);
mainPanel.add(entitySummary, DefaultBorderLayout.Position.CENTER);
trayBar.addFill();
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntityWorkspace.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntityWorkspace.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/skel/EntityWorkspace.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -10,6 +10,11 @@
import com.gwtext.client.widgets.layout.AnchorLayoutData;
public class EntityWorkspace extends DefaultBorderLayout {
+ private static final String ENTITY_TITLE = "k-entity-title";
+ private static final String ENTITY_SUBTITLE = "k-entity-subtitle";
+ private static final String ENTITY_BOTTOM = "k-entity-bottom";
+ private static final String ENTITY_CONTENT = "k-entity-content";
+ private static final String ENTITY_CONTEXT = "k-entity-context";
private final Panel content;
private final Panel context;
private final TitleBar title;
@@ -33,12 +38,15 @@
title = new TitleBar();
title.setHeight("" + (DEF_TOOLBAR_HEIGHT - 2));
- title.setStylePrimaryName("k-entity-title");
+ title.setStylePrimaryName(ENTITY_TITLE);
+ title.ensureDebugId(ENTITY_TITLE);
subTitle = new TitleBar();
- subTitle.setStylePrimaryName("k-entity-subtitle");
+ subTitle.setStylePrimaryName(ENTITY_SUBTITLE);
+ subTitle.ensureDebugId(ENTITY_SUBTITLE);
bottom = new TitleBar();
bottom.setHeight("" + (DEF_TOOLBAR_HEIGHT - 2));
- bottom.setStylePrimaryName("k-entity-bottom");
+ bottom.setStylePrimaryName(ENTITY_BOTTOM);
+ bottom.ensureDebugId(ENTITY_BOTTOM);
roundedTitle = new RoundedPanel(title, RoundedPanel.TOPLEFT, 2);
roundedBottom = new RoundedPanel(bottom, RoundedPanel.BOTTOMLEFT, 2);
@@ -53,6 +61,8 @@
contextWrap.setBorder(true);
content = new Panel();
context = new Panel();
+ content.ensureDebugId(ENTITY_CONTENT);
+ context.ensureDebugId(ENTITY_CONTEXT);
content.setBorder(false);
context.setBorder(false);
context.setCollapsible(true);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/skel/WorkspaceSkeleton.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/skel/WorkspaceSkeleton.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/skel/WorkspaceSkeleton.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -3,7 +3,7 @@
import org.ourproject.kune.platf.client.ui.DefaultBorderLayout;
import org.ourproject.kune.workspace.client.themes.WsTheme;
-import com.calclab.suco.client.signal.Slot0;
+import com.calclab.suco.client.listener.Listener0;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DeferredCommand;
import com.google.gwt.user.client.ui.RootPanel;
@@ -41,7 +41,7 @@
entity.addToEntityMainHeader(widget);
}
- public void askConfirmation(final String title, final String message, final Slot0 onConfirmed, final Slot0 onCancel) {
+ public void askConfirmation(final String title, final String message, final Listener0 onConfirmed, final Listener0 onCancel) {
MessageBox.confirm(title, message, new MessageBox.ConfirmCallback() {
public void execute(final String btnID) {
if (btnID.equals("yes")) {
@@ -81,7 +81,7 @@
extRootBody.mask(message, "x-mask-loading");
}
- public void promptMessage(final String title, final String message, final Slot0 onEnter) {
+ public void promptMessage(final String title, final String message, final Listener0 onEnter) {
MessageBox.prompt(title, message, new MessageBox.PromptCallback() {
public void execute(final String btnID, final String text) {
// FIXME: use btnID
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -14,7 +14,7 @@
import org.ourproject.kune.workspace.client.themes.WsTheme;
import com.calclab.emiteuimodule.client.users.UserGridPanel;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DeferredCommand;
import com.gwtext.client.core.EventObject;
@@ -47,7 +47,7 @@
+ "<br/>" + i18n.t("Drop into a room to invite the user to join the chat room"));
gridMenuPanel = new GridMenuPanel<GroupDTO>(i18n.t("This is an orphaned project, if you are interested "
+ "please request to join to work on it"), dragConf, true, true, false, true, false);
- gridMenuPanel.onDoubleClick(new Slot<String>() {
+ gridMenuPanel.onDoubleClick(new Listener<String>() {
public void onEvent(final String groupShortName) {
presenter.onDoubleClick(groupShortName);
}
@@ -76,7 +76,7 @@
public void onClick(final Button button, final EventObject e) {
DeferredCommand.addCommand(new Command() {
public void execute() {
- gridButton.getSlot().onEvent("");
+ gridButton.getListener().onEvent("");
}
});
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -24,9 +24,9 @@
import org.ourproject.kune.workspace.client.themes.WsTheme;
import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot2;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener2;
public class GroupMembersSummaryPresenter extends SocialNetworkPresenter implements GroupMembersSummary {
@@ -49,14 +49,14 @@
this.stateManager = stateManager;
this.session = session;
this.snServiceProvider = snServiceProvider;
- final Slot<StateDTO> setStateSlot = new Slot<StateDTO>() {
+ final Listener<StateDTO> setStateListener = new Listener<StateDTO>() {
public void onEvent(StateDTO state) {
setState(state);
}
};
- stateManager.onStateChanged(setStateSlot);
- stateManager.onSocialNetworkChanged(setStateSlot);
- wsThemePresenter.onThemeChanged(new Slot2<WsTheme, WsTheme>() {
+ stateManager.onStateChanged(setStateListener);
+ stateManager.onSocialNetworkChanged(setStateListener);
+ wsThemePresenter.onThemeChanged(new Listener2<WsTheme, WsTheme>() {
public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
view.setTheme(oldTheme, newTheme);
}
@@ -72,9 +72,9 @@
.getImageHtml(ImageDescriptor.alert), true);
// i18n.t("Add member")
addMember = new GridButton("images/add-green.gif", "", i18n
- .t("Add a group or a person as member of this group"), new Slot<String>() {
+ .t("Add a group or a person as member of this group"), new Listener<String>() {
public void onEvent(final String parameter) {
- liveSearcherProvider.get().onSelection(new Slot<LinkDTO>() {
+ liveSearcherProvider.get().onSelection(new Listener<LinkDTO>() {
public void onEvent(final LinkDTO link) {
view.confirmAddCollab(link.getShortName(), link.getLongName());
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -34,9 +34,10 @@
import org.ourproject.kune.workspace.client.themes.WsTheme;
import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot2;
+import com.allen_sauer.gwt.log.client.Log;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener2;
public class ParticipationSummaryPresenter extends SocialNetworkPresenter implements ParticipationSummary {
@@ -56,14 +57,14 @@
collabOnlyCategory = new GridGroup(i18n.t("collaborator in:"), " ", i18n.t("Collaborate in these groups"),
false);
super.addGroupOperation(gotoGroupMenuItem, false);
- final Slot<StateDTO> setStateSlot = new Slot<StateDTO>() {
+ final Listener<StateDTO> setStateListener = new Listener<StateDTO>() {
public void onEvent(StateDTO state) {
setState(state);
}
};
- stateManager.onStateChanged(setStateSlot);
- stateManager.onSocialNetworkChanged(setStateSlot);
- wsThemePresenter.onThemeChanged(new Slot2<WsTheme, WsTheme>() {
+ stateManager.onStateChanged(setStateListener);
+ stateManager.onSocialNetworkChanged(setStateListener);
+ wsThemePresenter.onThemeChanged(new Listener2<WsTheme, WsTheme>() {
public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
view.setTheme(oldTheme, newTheme);
}
@@ -85,6 +86,8 @@
view.clear();
final List<GroupDTO> groupsIsAdmin = participation.getGroupsIsAdmin();
final List<GroupDTO> groupsIsCollab = participation.getGroupsIsCollab();
+ Log.info("Is admin in " + groupsIsAdmin.size() + " groups.");
+ Log.info("Is collab in " + groupsIsCollab.size() + " groups.");
final int numAdmins = groupsIsAdmin.size();
final int numCollaborators = groupsIsCollab.size();
if (numAdmins == 0) {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -21,8 +21,8 @@
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
import org.ourproject.kune.workspace.client.site.Site;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
public class SocialNetworkPresenter {
@@ -101,7 +101,7 @@
private void createButtons() {
requestJoin = new GridButton("images/add-green.gif", i18n.t("Participate"), i18n
- .t("Request to participate in this group"), new Slot<String>() {
+ .t("Request to participate in this group"), new Listener<String>() {
public void onEvent(final String parameter) {
Site.showProgressProcessing();
snServiceProvider.get().requestJoinGroup(session.getUserHash(),
@@ -127,7 +127,7 @@
});
unJoinButton = new GridButton("images/del.gif", i18n.t("Unjoin"), i18n
- .t("Don't participate more in this group"), new Slot<String>() {
+ .t("Don't participate more in this group"), new Listener<String>() {
public void onEvent(final String parameter) {
removeMemberAction();
}
@@ -162,25 +162,25 @@
private void createMenuActions() {
gotoGroupMenuItem = new MenuItem<GroupDTO>("images/group-home.gif", i18n.t("Visit this group homepage"),
- new Slot<GroupDTO>() {
+ new Listener<GroupDTO>() {
public void onEvent(final GroupDTO groupDTO) {
stateManager.gotoToken(groupDTO.getShortName());
}
});
gotoMemberMenuItem = new MenuItem<GroupDTO>("images/group-home.gif", i18n.t("Visit this member homepage"),
- new Slot<GroupDTO>() {
+ new Listener<GroupDTO>() {
public void onEvent(final GroupDTO groupDTO) {
stateManager.gotoToken(groupDTO.getShortName());
}
});
unJoinMenuItem = new MenuItem<GroupDTO>("images/del.gif", i18n
- .t("Don't participate more as a member in this group"), new Slot<GroupDTO>() {
+ .t("Don't participate more as a member in this group"), new Listener<GroupDTO>() {
public void onEvent(final GroupDTO groupDTO) {
removeMemberAction(groupDTO);
}
});
changeToCollabMenuItem = new MenuItem<GroupDTO>("images/arrow-down-green.gif",
- i18n.t("Change to collaborator"), new Slot<GroupDTO>() {
+ i18n.t("Change to collaborator"), new Listener<GroupDTO>() {
public void onEvent(final GroupDTO group) {
Site.showProgressProcessing();
snServiceProvider.get().setAdminAsCollab(session.getUserHash(),
@@ -195,7 +195,7 @@
}
});
removeMemberMenuItem = new MenuItem<GroupDTO>("images/del.gif", i18n.t("Remove this member"),
- new Slot<GroupDTO>() {
+ new Listener<GroupDTO>() {
public void onEvent(final GroupDTO group) {
Site.showProgressProcessing();
snServiceProvider.get().deleteMember(session.getUserHash(),
@@ -214,7 +214,7 @@
}
});
changeToAdminMenuItem = new MenuItem<GroupDTO>("images/arrow-up-green.gif", i18n.t("Change to admin"),
- new Slot<GroupDTO>() {
+ new Listener<GroupDTO>() {
public void onEvent(final GroupDTO group) {
Site.showProgressProcessing();
snServiceProvider.get().setCollabAsAdmin(session.getUserHash(),
@@ -229,7 +229,7 @@
}
});
acceptJoinGroupMenuItem = new MenuItem<GroupDTO>("images/accept.gif", i18n.t("Accept this member"),
- new Slot<GroupDTO>() {
+ new Listener<GroupDTO>() {
public void onEvent(final GroupDTO group) {
Site.showProgressProcessing();
snServiceProvider.get().AcceptJoinGroup(session.getUserHash(),
@@ -244,7 +244,7 @@
}
});
denyJoinGroupMenuItem = new MenuItem<GroupDTO>("images/cancel.gif", i18n.t("Don't accept this member"),
- new Slot<GroupDTO>() {
+ new Listener<GroupDTO>() {
public void onEvent(final GroupDTO group) {
Site.showProgressProcessing();
snServiceProvider.get().denyJoinGroup(session.getUserHash(),
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -25,20 +25,20 @@
import org.ourproject.kune.workspace.client.themes.WsTheme;
import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot2;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener2;
public class GroupSummaryPresenter implements GroupSummary {
private GroupSummaryView view;
public GroupSummaryPresenter(final StateManager stateManager, final WsThemePresenter wsThemePresenter) {
- stateManager.onStateChanged(new Slot<StateDTO>() {
+ stateManager.onStateChanged(new Listener<StateDTO>() {
public void onEvent(final StateDTO state) {
setState(state);
}
});
- wsThemePresenter.onThemeChanged(new Slot2<WsTheme, WsTheme>() {
+ wsThemePresenter.onThemeChanged(new Listener2<WsTheme, WsTheme>() {
public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
view.setTheme(oldTheme, newTheme);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -32,9 +32,9 @@
import org.ourproject.kune.workspace.client.themes.WsTheme;
import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot2;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener2;
public class TagsSummaryPresenter implements TagsSummary {
@@ -46,12 +46,12 @@
final StateManager stateManager, final WsThemePresenter wsThemePresenter) {
this.session = session;
this.searcherProvider = searcherProvider;
- stateManager.onStateChanged(new Slot<StateDTO>() {
+ stateManager.onStateChanged(new Listener<StateDTO>() {
public void onEvent(final StateDTO state) {
setState(state);
}
});
- wsThemePresenter.onThemeChanged(new Slot2<WsTheme, WsTheme>() {
+ wsThemePresenter.onThemeChanged(new Listener2<WsTheme, WsTheme>() {
public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
view.setTheme(oldTheme, newTheme);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePanel.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePanel.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -3,7 +3,7 @@
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import com.calclab.suco.client.signal.Slot2;
+import com.calclab.suco.client.listener.Listener2;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.widgets.ToolbarButton;
import com.gwtext.client.widgets.menu.BaseItem;
@@ -28,7 +28,7 @@
super.setIcon("images/colors.gif");
super.setTooltip(i18n.t("Select Workspace theme for this group"));
ws.getSiteTraybar().addButton(this);
- presenter.onThemeChanged(new Slot2<WsTheme, WsTheme>() {
+ presenter.onThemeChanged(new Listener2<WsTheme, WsTheme>() {
public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
ws.setTheme(oldTheme, newTheme);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePresenter.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -8,16 +8,16 @@
import org.ourproject.kune.platf.client.state.StateManager;
import org.ourproject.kune.workspace.client.site.Site;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Signal2;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot2;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Event2;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener2;
public class WsThemePresenter {
private WsThemeView view;
private WsTheme previousTheme;
- private final Signal2<WsTheme, WsTheme> onThemeChanged;
+ private final Event2<WsTheme, WsTheme> onThemeChanged;
private final Provider<GroupServiceAsync> groupServiceProvider;
private final Session session;
@@ -25,14 +25,14 @@
final StateManager stateManager) {
this.session = session;
this.groupServiceProvider = groupServiceProvider;
- this.onThemeChanged = new Signal2<WsTheme, WsTheme>("onThemeChanged");
- session.onInitDataReceived(new Slot<InitDataDTO>() {
+ this.onThemeChanged = new Event2<WsTheme, WsTheme>("onThemeChanged");
+ session.onInitDataReceived(new Listener<InitDataDTO>() {
public void onEvent(final InitDataDTO initData) {
view.setThemes(initData.getWsThemes());
setTheme(new WsTheme(initData.getWsThemes()[0]));
}
});
- stateManager.onStateChanged(new Slot<StateDTO>() {
+ stateManager.onStateChanged(new Listener<StateDTO>() {
public void onEvent(final StateDTO state) {
setState(state);
}
@@ -43,8 +43,8 @@
this.view = view;
}
- public void onThemeChanged(final Slot2<WsTheme, WsTheme> slot) {
- onThemeChanged.add(slot);
+ public void onThemeChanged(final Listener2<WsTheme, WsTheme> listener) {
+ onThemeChanged.add(listener);
}
protected void onChangeGroupWsTheme(final WsTheme newTheme) {
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 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntitySubTitlePresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -25,7 +25,7 @@
import org.ourproject.kune.platf.client.services.I18nTranslationService;
import org.ourproject.kune.platf.client.state.StateManager;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public class EntitySubTitlePresenter implements EntitySubTitle {
@@ -34,7 +34,7 @@
public EntitySubTitlePresenter(final I18nTranslationService i18n, final StateManager stateManager) {
this.i18n = i18n;
- stateManager.onStateChanged(new Slot<StateDTO>() {
+ stateManager.onStateChanged(new Listener<StateDTO>() {
public void onEvent(final StateDTO state) {
setState(state);
}
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 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePresenter.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -33,8 +33,8 @@
import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
import org.ourproject.kune.workspace.client.site.Site;
-import com.calclab.suco.client.provider.Provider;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.ioc.Provider;
+import com.calclab.suco.client.listener.Listener;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -56,7 +56,7 @@
this.session = session;
this.contentServiceProvider = contentServiceProvider;
this.contextNavigatorProvider = contextNavigatorProvider;
- stateManager.onStateChanged(new Slot<StateDTO>() {
+ stateManager.onStateChanged(new Listener<StateDTO>() {
public void onEvent(final StateDTO state) {
setState(state);
}
Modified: trunk/src/test/java/org/ourproject/kune/platf/client/actions/ActionRegistryTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/client/actions/ActionRegistryTest.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/test/java/org/ourproject/kune/platf/client/actions/ActionRegistryTest.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -9,7 +9,7 @@
import org.ourproject.kune.platf.client.dto.AccessRolDTO;
import org.ourproject.kune.platf.client.dto.StateToken;
-import com.calclab.suco.client.signal.Slot;
+import com.calclab.suco.client.listener.Listener;
public class ActionRegistryTest {
@@ -19,22 +19,29 @@
private ActionDescriptor<StateToken> editorAction;
private ActionDescriptor<StateToken> viewerAction;
+ @Test
+ public void actionsEmptyButNeverNull() {
+ checkActionLists(0, 0, new AccessRightsDTO(true, true, true));
+ checkActionLists(0, 0, new AccessRightsDTO(false, true, true));
+ checkActionLists(0, 0, new AccessRightsDTO(false, false, true));
+ }
+
@Before
public void before() {
registry = new ActionRegistry<StateToken>();
adminAction = new ActionDescriptor<StateToken>(AccessRolDTO.Administrator, ActionPosition.topbarAndItemMenu,
- new Slot<StateToken>() {
+ new Listener<StateToken>() {
public void onEvent(final StateToken parameter) {
}
});
editorAction = new ActionDescriptor<StateToken>(AccessRolDTO.Editor, ActionPosition.topbarAndItemMenu,
- new Slot<StateToken>() {
+ new Listener<StateToken>() {
public void onEvent(final StateToken parameter) {
}
});
viewerAction = new ActionDescriptor<StateToken>(AccessRolDTO.Viewer, ActionPosition.topbarAndItemMenu,
- new Slot<StateToken>() {
+ new Listener<StateToken>() {
public void onEvent(final StateToken parameter) {
}
});
Modified: trunk/src/test/java/org/ourproject/kune/platf/client/state/StateManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/client/state/StateManagerTest.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/test/java/org/ourproject/kune/platf/client/state/StateManagerTest.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -8,8 +8,8 @@
import org.ourproject.kune.platf.client.dto.StateToken;
import org.ourproject.kune.workspace.client.site.SiteToken;
-import com.calclab.suco.client.signal.Slot;
-import com.calclab.suco.client.signal.Slot2;
+import com.calclab.suco.client.listener.Listener;
+import com.calclab.suco.client.listener.Listener2;
import com.google.gwt.user.client.rpc.AsyncCallback;
public class StateManagerTest {
@@ -22,24 +22,24 @@
@SuppressWarnings("unchecked")
@Test
- public void changeStateWithDifferentGroupsMustFireSlot() {
- final Slot2<String, String> groupSlot = Mockito.mock(Slot2.class);
- stateManager.onGroupChanged(groupSlot);
+ public void changeStateWithDifferentGroupsMustFireListener() {
+ final Listener2<String, String> groupListener = Mockito.mock(Listener2.class);
+ stateManager.onGroupChanged(groupListener);
stateManager.onHistoryChanged("group1.tool1");
stateManager.onHistoryChanged("group2.tool1");
// TODO, think how to test this
- // Mockito.verify(groupSlot).onEvent("group1", "group2");
+ // Mockito.verify(groupListener).onEvent("group1", "group2");
}
@SuppressWarnings("unchecked")
@Test
- public void changeStateWithDifferentToolsMustFireSlot() {
- final Slot2<String, String> toolSlot = Mockito.mock(Slot2.class);
- stateManager.onToolChanged(toolSlot);
+ public void changeStateWithDifferentToolsMustFireListener() {
+ final Listener2<String, String> toolListener = Mockito.mock(Listener2.class);
+ stateManager.onToolChanged(toolListener);
stateManager.gotoToken("group1.tool1");
stateManager.gotoToken("group1.tool2");
// TODO, think how to test this
- // Mockito.verify(toolSlot).onEvent("tool1", "tool2");
+ // Mockito.verify(toolListener).onEvent("tool1", "tool2");
}
@SuppressWarnings("unchecked")
@@ -73,12 +73,12 @@
@SuppressWarnings("unchecked")
@Test
- public void siteTokenFirstLoadDefContentAndFireSlot() {
- final Slot slot = Mockito.mock(Slot.class);
+ public void siteTokenFirstLoadDefContentAndFireListener() {
+ final Listener listener = Mockito.mock(Listener.class);
final String token = SiteToken.signin.toString();
- stateManager.addSiteToken(token, slot);
+ stateManager.addSiteToken(token, listener);
stateManager.onHistoryChanged(token);
- Mockito.verify(slot, Mockito.times(1)).onEvent(Mockito.anyObject());
+ Mockito.verify(listener, Mockito.times(1)).onEvent(Mockito.anyObject());
Mockito.verify(contentProvider, Mockito.times(1)).getContent(Mockito.anyString(),
(StateToken) Mockito.anyObject(), (AsyncCallback<StateDTO>) Mockito.anyObject());
}
Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -28,7 +28,7 @@
import org.ourproject.kune.platf.server.users.UserInfoService;
import org.ourproject.kune.workspace.client.site.rpc.UserService;
-import com.calclab.emite.client.im.roster.RosterManager.SubscriptionMode;
+import com.calclab.emiteuimodule.client.SubscriptionMode;
import com.google.inject.Inject;
public class UserServiceTest extends IntegrationTest {
Added: trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/FileManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/FileManagerTest.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/FileManagerTest.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -0,0 +1,62 @@
+package org.ourproject.kune.platf.server.manager.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.ourproject.kune.platf.server.TestHelper;
+import org.ourproject.kune.platf.server.manager.FileManager;
+
+import com.google.inject.Inject;
+
+public class FileManagerTest {
+
+ @Inject
+ FileManager fileManager;
+ private String tempDir;
+
+ @Before
+ public void inject() throws IOException {
+ TestHelper.inject(this);
+ tempDir = File.createTempFile("temp", "txt").getParent();
+ }
+
+ @Test
+ public void test3FileCreationWithSeq() throws IOException {
+ final File tempFile = File.createTempFile("some file name", ".txt");
+ final File newFile1 = fileManager.createFileWithSequentialName(tempDir, tempFile.getName());
+ final File newFile2 = fileManager.createFileWithSequentialName(tempDir, tempFile.getName());
+ final File newFile3 = fileManager.createFileWithSequentialName(tempDir, tempFile.getName());
+ assertEquals(tempDir + File.separator + seq(seq(seq(tempFile.getName()))), newFile3.getAbsolutePath());
+ newFile1.delete();
+ newFile2.delete();
+ newFile3.delete();
+ }
+
+ @Test
+ public void testDirCreation() throws IOException {
+ final String newTestDir = tempDir + File.separator + "test1" + File.separator + "test2" + File.separator;
+ assertTrue(fileManager.mkdir(newTestDir));
+ final File dir = new File(newTestDir);
+ assertTrue(dir.exists());
+ fileManager.rmdir(newTestDir);
+ assertFalse(dir.exists());
+ }
+
+ @Test
+ public void testFileCreationWithSeq() throws IOException {
+ final File tempFile = File.createTempFile("some file name", ".txt");
+ final File newFile = fileManager.createFileWithSequentialName(tempDir, tempFile.getName());
+ assertEquals(tempDir + File.separator + seq(tempFile.getName()), newFile.getAbsolutePath());
+ newFile.delete();
+ }
+
+ private String seq(final String file) {
+ return FileUtils.getNextSequentialFileName(file, true);
+ }
+}
Added: trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/FileUtilsTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/FileUtilsTest.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/FileUtilsTest.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -0,0 +1,53 @@
+package org.ourproject.kune.platf.server.manager.impl;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class FileUtilsTest {
+
+ private static final String SIMPLE_FILE_NAME = "simple file name";
+ private static final String EXT = ".someext";
+
+ @Test
+ public void dotFileRetSeq1() {
+ assertEquals("." + SIMPLE_FILE_NAME + " 1", FileUtils.getNextSequentialFileName("." + SIMPLE_FILE_NAME, true));
+ }
+
+ @Test
+ public void dotFileRetSeq1IgnoreExt() {
+ assertEquals("." + SIMPLE_FILE_NAME + " 1", FileUtils.getNextSequentialFileName("." + SIMPLE_FILE_NAME, false));
+ }
+
+ @Test
+ public void testIfSeq101return102() {
+ assertEquals(SIMPLE_FILE_NAME + " 102", FileUtils.getNextSequentialFileName(SIMPLE_FILE_NAME + " 101"));
+ }
+
+ @Test
+ public void testIfSeq1return2() {
+ assertEquals(SIMPLE_FILE_NAME + " 2", FileUtils.getNextSequentialFileName(SIMPLE_FILE_NAME + " 1"));
+ }
+
+ @Test
+ public void testIfSeq1WithExtreturn2WithExt() {
+ assertEquals(SIMPLE_FILE_NAME + " 2" + EXT, FileUtils.getNextSequentialFileName(SIMPLE_FILE_NAME + " 1" + EXT,
+ true));
+ }
+
+ @Test
+ public void testNoSeqReturn1() {
+ assertEquals(SIMPLE_FILE_NAME + " 1", FileUtils.getNextSequentialFileName(SIMPLE_FILE_NAME));
+ }
+
+ @Test
+ public void testNoSeqWithExtNotTakedIntoAccountReturn1() {
+ assertEquals(SIMPLE_FILE_NAME + EXT + " 1", FileUtils.getNextSequentialFileName(SIMPLE_FILE_NAME + EXT, false));
+ }
+
+ @Test
+ public void testNoSeqWithExtReturn1WithExt() {
+ assertEquals(SIMPLE_FILE_NAME + " 1" + EXT, FileUtils.getNextSequentialFileName(SIMPLE_FILE_NAME + EXT, true));
+ }
+
+}
Modified: trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java 2008-09-23 12:02:42 UTC (rev 880)
+++ trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java 2008-09-24 01:47:16 UTC (rev 881)
@@ -9,7 +9,7 @@
import org.ourproject.kune.workspace.client.search.SiteSearcher;
import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
-import com.calclab.suco.client.provider.Provider;
+import com.calclab.suco.client.ioc.Provider;
public class TagsSummaryPresenterTest {
More information about the kune-commits
mailing list