[kune-commits] r1164 - in trunk: . src/main/java/cc/kune/core src/main/java/cc/kune/core/client src/main/java/cc/kune/core/client/cookies src/main/java/cc/kune/core/client/errors src/main/java/cc/kune/core/client/i18n src/main/java/cc/kune/core/client/notify src/main/java/cc/kune/core/client/state src/main/java/cc/kune/core/client/ws src/main/java/cc/kune/core/public src/main/java/org/ourproject/kune/app/client src/main/java/org/ourproject/kune/platf/server/domain src/test/java/cc/kune/core/client/state
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Wed Dec 15 03:26:32 CET 2010
Author: vjrj_
Date: 2010-12-15 03:26:32 +0100 (Wed, 15 Dec 2010)
New Revision: 1164
Added:
trunk/src/main/java/cc/kune/core/client/CoreGinjector.java
trunk/src/main/java/cc/kune/core/client/i18n/I18nReadyEvent.java
trunk/src/main/java/cc/kune/core/client/notify/SpinerPresenter.java
trunk/src/main/java/cc/kune/core/client/notify/SpinerViewImpl.java
trunk/src/main/java/cc/kune/core/client/notify/UserNotifierViewImpl.java
trunk/src/main/java/cc/kune/core/client/ws/CorePlaceManager.java
trunk/src/main/java/cc/kune/core/client/ws/CoreViewImpl.java
Removed:
trunk/src/main/java/cc/kune/core/client/notify/UserNotifierView.java
trunk/src/main/java/cc/kune/core/client/ws/CoreView.java
Modified:
trunk/TROUBLESHOOT
trunk/pom.xml
trunk/src/main/java/cc/kune/core/Core.gwt.xml
trunk/src/main/java/cc/kune/core/client/CoreEventBus.java
trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
trunk/src/main/java/cc/kune/core/client/KuneEntryPoint.java
trunk/src/main/java/cc/kune/core/client/cookies/CookiesManager.java
trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java
trunk/src/main/java/cc/kune/core/client/notify/UserNotifierPresenter.java
trunk/src/main/java/cc/kune/core/client/state/ContentProviderDefault.java
trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java
trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
trunk/src/main/java/cc/kune/core/client/ws/CorePresenter.java
trunk/src/main/java/cc/kune/core/public/ws.css
trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java
trunk/src/main/java/org/ourproject/kune/platf/server/domain/AdmissionType.java
trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java
trunk/src/test/java/cc/kune/core/client/state/StateManagerTest.java
Log:
Incomplete - task : Startup cleanup and gwtp integration
CLOSED - # 8: Startup cleanup and gwtp integration
http://kune.ourproject.org/issues/ticket/8
Modified: trunk/TROUBLESHOOT
===================================================================
--- trunk/TROUBLESHOOT 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/TROUBLESHOOT 2010-12-15 02:26:32 UTC (rev 1164)
@@ -69,3 +69,5 @@
Error: method should override method xxx (or similar)
Fix: Project --> Properties --> Java Compiler ---> Unenable project specific settings
+ Error: Running Web application seems that are running an old GWT code
+ Fix: Open Run > Run configurations and remove a recreate your launch configuration
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/pom.xml 2010-12-15 02:26:32 UTC (rev 1164)
@@ -39,7 +39,7 @@
<dependency>
<groupId>com.googlecode.gwt.inject</groupId>
<artifactId>gin</artifactId>
- <version>1.0</version>
+ <version>r137</version>
</dependency>
<dependency>
<groupId>com.google.code.guice</groupId>
@@ -47,16 +47,6 @@
<version>2.0.1</version>
</dependency>
<dependency>
- <groupId>com.googlecode.mvp4g</groupId>
- <artifactId>mvp4g</artifactId>
- <version>1.2.0</version>
- </dependency>
- <dependency>
- <groupId>com.googlecode.mvc4g</groupId>
- <artifactId>mvc4g</artifactId>
- <version>1.0.0-jboss</version>
- </dependency>
- <dependency>
<groupId>org.ourproject.common</groupId>
<artifactId>gwt-common</artifactId>
<version>0.0.3</version>
@@ -74,10 +64,15 @@
<version>1.3.1</version>
</dependency>
<dependency>
- <groupId>org.ourproject.kune.ws.armor</groupId>
+ <groupId>cc.kune.core.ws.armor</groupId>
<artifactId>ws-armor</artifactId>
- <version>0.0.4</version>
+ <version>0.0.5</version>
</dependency>
+ <dependency>
+ <groupId>com.gwtplatform</groupId>
+ <artifactId>gwtp</artifactId>
+ <version>0.4</version>
+ </dependency>
<!-- cc -->
<dependency>
<groupId>com.gwtext</groupId>
@@ -497,6 +492,11 @@
<name>Cobogw repository at googlecode</name>
<url>http://cobogw.googlecode.com/svn/maven2</url>
</repository>
+ <repository>
+ <id>gwtp</id>
+ <name>gwtp repo</name>
+ <url>http://maven.gwt-platform.googlecode.com/hg/</url>
+ </repository>
<!-- cc -->
<repository>
<id>dyndns-repo</id>
@@ -868,4 +868,4 @@
</dependencies>
</profile>
</profiles>
-</project>
+</project>
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/core/Core.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/core/Core.gwt.xml 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/Core.gwt.xml 2010-12-15 02:26:32 UTC (rev 1164)
@@ -10,16 +10,21 @@
<public path="public" />
<!-- Dependencies ============================================= -->
<inherits name="com.google.gwt.user.User" />
- <inherits name='com.mvp4g.Mvp4gModule' />
- <inherits name="org.ourproject.kune.ws.armor.WsArmor" />
+ <!-- <inherits name='com.mvp4g.Mvp4gModule' /> -->
+ <inherits name="cc.kune.core.ws.armor.WsArmor" />
<inherits name="org.ourproject.common.Common" />
<inherits name="com.extjs.gxt.ui.GXT" />
<inherits name="com.calclab.suco.Suco" />
+ <inherits name='com.gwtplatform.mvp.Mvp' />
+ <define-configuration-property name="gin.ginjector"
+ is-multi-valued="false" />
+ <set-configuration-property name="gin.ginjector"
+ value="cc.kune.core.client.CoreGinjector" />
<!-- Styles =================================================== -->
<stylesheet src="ws.css" />
<stylesheet src="fontface/stylesheet.css" />
<!-- Entrypoint =============================================== -->
- <entry-point class="cc.kune.core.client.KuneEntryPoint" />
+ <!-- <entry-point class="cc.kune.core.client.KuneEntryPoint" /> -->
<!-- NOTE: this only compiles for chromium/safari ============= -->
<!--http://code.google.com/p/google-web-toolkit/issues/detail?id=42 -->
<!-- <set-property name="user.agent" value="gecko1_8" /> -->
Modified: trunk/src/main/java/cc/kune/core/client/CoreEventBus.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreEventBus.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/client/CoreEventBus.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -1,63 +1,49 @@
package cc.kune.core.client;
-import org.ourproject.common.client.CommonGinModule;
-import org.ourproject.common.client.notify.ConfirmationAsk;
-import org.ourproject.common.client.notify.NotifyLevel;
-
-import cc.kune.core.client.cookies.CookiesManager;
-import cc.kune.core.client.notify.UserNotifierPresenter;
-import cc.kune.core.client.ws.CorePresenter;
-import cc.kune.core.client.ws.CoreView;
-
-import com.mvp4g.client.annotation.Debug;
-import com.mvp4g.client.annotation.Debug.LogLevel;
-import com.mvp4g.client.annotation.Event;
-import com.mvp4g.client.annotation.Events;
-import com.mvp4g.client.annotation.Start;
-import com.mvp4g.client.event.EventBus;
-
-/**
- * The Kune Core EventBus.
- */
- at Events(startView = CoreView.class, ginModules = { CoreGinModule.class, CommonGinModule.class })
- at Debug(logLevel = LogLevel.DETAILED)
-public interface CoreEventBus extends EventBus {
-
- @Event(handlers = UserNotifierPresenter.class)
- public void alert(String title, String message);
-
- @Event(handlers = UserNotifierPresenter.class)
- public void confirmationAsk(ConfirmationAsk<?> confirmation);
-
- @Event(handlers = CookiesManager.class)
- public void doNothing();
-
- @Event
- // FIXME (nobody do nothing with this)
- public void gotoToken(String token);
-
- @Event(handlers = UserNotifierPresenter.class)
- public void hideSpin();
-
- @Event
- // FIXME (nobody do nothing with this)
- public void i18nReady();
-
- @Event(handlers = UserNotifierPresenter.class)
- public void notify(NotifyLevel level, String message);
-
- @Event(handlers = UserNotifierPresenter.class)
- public void showSpin(String message);
-
- @Event
- // FIXME (nobody do nothing with this)
- public void showSpinLoading();
-
- /**
- * Application start event
- */
- @Start
- @Event(handlers = { CorePresenter.class })
- void start();
-
+public interface CoreEventBus {
}
+// /**
+// * The Kune Core EventBus.
+// */
+// @Events(startView = CoreView.class, ginModules = { CoreGinModule.class,
+// CommonGinModule.class })
+// @Debug(logLevel = LogLevel.DETAILED)
+// public interface CoreEventBus extends EventBus {
+//
+// @Event(handlers = UserNotifierPresenter.class)
+// public void alert(String title, String message);
+//
+// @Event(handlers = UserNotifierPresenter.class)
+// public void confirmationAsk(ConfirmationAsk<?> confirmation);
+//
+// @Event(handlers = CookiesManager.class)
+// public void doNothing();
+//
+// @Event
+// // FIXME (nobody do nothing with this)
+// public void gotoToken(String token);
+//
+// @Event(handlers = UserNotifierPresenter.class)
+// public void hideSpin();
+//
+// @Event
+// // FIXME (nobody do nothing with this)
+// public void i18nReady();
+//
+// @Event(handlers = UserNotifierPresenter.class)
+// public void notify(NotifyLevel level, String message);
+//
+// @Event(handlers = UserNotifierPresenter.class)
+// public void showSpin(String message);
+//
+// @Event
+// // FIXME (nobody do nothing with this)
+// public void showSpinLoading();
+//
+// /**
+// * Application start event
+// */
+// @Start
+// @Event(handlers = { CorePresenter.class })
+// void start();
+
Modified: trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -1,24 +1,40 @@
package cc.kune.core.client;
-import org.ourproject.kune.ws.armor.client.Body;
-import org.ourproject.kune.ws.armor.client.IBody;
-
+import cc.kune.core.client.errors.ErrorHandler;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.notify.SpinerPresenter;
+import cc.kune.core.client.notify.SpinerViewImpl;
+import cc.kune.core.client.notify.UserNotifierPresenter;
+import cc.kune.core.client.notify.UserNotifierPresenter.UserNotifierProxy;
+import cc.kune.core.client.notify.UserNotifierViewImpl;
import cc.kune.core.client.state.ContentProvider;
import cc.kune.core.client.state.ContentProviderDefault;
import cc.kune.core.client.state.HistoryWrapper;
import cc.kune.core.client.state.HistoryWrapperDefault;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.SessionDefault;
+import cc.kune.core.client.ws.CorePlaceManager;
+import cc.kune.core.client.ws.CorePresenter;
+import cc.kune.core.client.ws.CoreViewImpl;
import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.core.ws.armor.client.Body;
+import cc.kune.core.ws.armor.client.IBody;
-import com.google.gwt.inject.client.AbstractGinModule;
import com.google.inject.Singleton;
+import com.gwtplatform.mvp.client.DefaultEventBus;
+import com.gwtplatform.mvp.client.DefaultProxyFailureHandler;
+import com.gwtplatform.mvp.client.EventBus;
+import com.gwtplatform.mvp.client.RootPresenter;
+import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
+import com.gwtplatform.mvp.client.proxy.ParameterTokenFormatter;
+import com.gwtplatform.mvp.client.proxy.PlaceManager;
+import com.gwtplatform.mvp.client.proxy.ProxyFailureHandler;
+import com.gwtplatform.mvp.client.proxy.TokenFormatter;
/**
* The Class Core GinModule.
*/
-public class CoreGinModule extends AbstractGinModule {
+public class CoreGinModule extends AbstractPresenterModule {
/*
* (non-Javadoc)
@@ -27,10 +43,24 @@
*/
@Override
protected void configure() {
+ bind(EventBus.class).to(DefaultEventBus.class).in(Singleton.class);
+ bind(PlaceManager.class).to(CorePlaceManager.class).in(Singleton.class);
+ bind(TokenFormatter.class).to(ParameterTokenFormatter.class).in(Singleton.class);
+ bind(RootPresenter.class).asEagerSingleton();
+ bind(ProxyFailureHandler.class).to(DefaultProxyFailureHandler.class).in(Singleton.class);
+
+ // Presenters
+ bindPresenter(CorePresenter.class, CorePresenter.CoreView.class, CoreViewImpl.class,
+ CorePresenter.CoreProxy.class);
+ bindPresenter(SpinerPresenter.class, SpinerPresenter.SpinerView.class, SpinerViewImpl.class,
+ SpinerPresenter.SpinerProxy.class);
+ bindPresenter(UserNotifierPresenter.class, UserNotifierPresenter.UserNotifierView.class,
+ UserNotifierViewImpl.class, UserNotifierProxy.class);
+
bind(IBody.class).to(Body.class).in(Singleton.class);
bind(Session.class).to(SessionDefault.class).in(Singleton.class);
bind(I18nTranslationService.class).to(I18nUITranslationService.class).in(Singleton.class);
- // bind(ErrorHandler.class).in(Singleton.class);
+ bind(ErrorHandler.class).in(Singleton.class);
bind(ContentProvider.class).to(ContentProviderDefault.class).in(Singleton.class);
bind(HistoryWrapper.class).to(HistoryWrapperDefault.class).in(Singleton.class);
// bind(StateManager.class).to(StateManagerDefault.class).in(Singleton.class);
Added: trunk/src/main/java/cc/kune/core/client/CoreGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreGinjector.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/CoreGinjector.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -0,0 +1,29 @@
+package cc.kune.core.client;
+
+import cc.kune.core.client.notify.SpinerPresenter;
+import cc.kune.core.client.notify.UserNotifierPresenter;
+import cc.kune.core.client.ws.CorePresenter;
+
+import com.google.gwt.inject.client.AsyncProvider;
+import com.google.gwt.inject.client.GinModules;
+import com.google.gwt.inject.client.Ginjector;
+import com.gwtplatform.mvp.client.EventBus;
+import com.gwtplatform.mvp.client.proxy.PlaceManager;
+import com.gwtplatform.mvp.client.proxy.ProxyFailureHandler;
+
+ at GinModules({ CoreGinModule.class })
+public interface CoreGinjector extends Ginjector {
+
+ AsyncProvider<CorePresenter> getCorePresenter();
+
+ EventBus getEventBus();
+
+ PlaceManager getPlaceManager();
+
+ ProxyFailureHandler getProxyFailureHandler();
+
+ AsyncProvider<SpinerPresenter> getSpinerPresenter();
+
+ AsyncProvider<UserNotifierPresenter> getUserNotifierPresenter();
+
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/core/client/CoreGinjector.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/core/client/KuneEntryPoint.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/KuneEntryPoint.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/client/KuneEntryPoint.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -5,14 +5,13 @@
import com.google.gwt.core.client.GWT.UncaughtExceptionHandler;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
-import com.google.gwt.user.client.ui.RootLayoutPanel;
-import com.google.gwt.user.client.ui.Widget;
-import com.mvp4g.client.Mvp4gModule;
+import com.gwtplatform.mvp.client.DelayedBindRegistry;
/**
* The Class KuneEntryPoint.
*/
public class KuneEntryPoint implements EntryPoint {
+ public final CoreGinjector ginjector = GWT.create(CoreGinjector.class);
/*
* (non-Javadoc)
@@ -39,9 +38,9 @@
* On module load cont.
*/
public void onModuleLoadCont() {
- final Mvp4gModule module = (Mvp4gModule) GWT.create(Mvp4gModule.class);
- module.createAndStartModule();
- RootLayoutPanel.get().add((Widget) module.getStartView());
+ DelayedBindRegistry.bind(ginjector);
+
+ ginjector.getPlaceManager().revealCurrentPlace();
}
}
Modified: trunk/src/main/java/cc/kune/core/client/cookies/CookiesManager.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/cookies/CookiesManager.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/client/cookies/CookiesManager.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -1,16 +1,11 @@
package cc.kune.core.client.cookies;
-import cc.kune.core.client.CoreEventBus;
-import cc.kune.core.client.cookies.CookiesManager.ICookiesView;
import cc.kune.core.client.state.Session;
import com.google.gwt.user.client.Cookies;
import com.google.inject.Inject;
-import com.mvp4g.client.annotation.Presenter;
-import com.mvp4g.client.presenter.BasePresenter;
- at Presenter(view = CookiesView.class)
-public class CookiesManager extends BasePresenter<ICookiesView, CoreEventBus> {
+public class CookiesManager {
public interface ICookiesView {
String getCurrentCookie();
}
Modified: trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -21,7 +21,8 @@
import org.ourproject.common.client.notify.NotifyLevel;
-import cc.kune.core.client.CoreEventBus;
+import cc.kune.core.client.notify.SpinerPresenter;
+import cc.kune.core.client.notify.UserNotifierPresenter;
import cc.kune.core.client.state.Session;
import cc.kune.core.shared.i18n.I18nTranslationService;
@@ -31,23 +32,30 @@
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException;
import com.google.inject.Inject;
-import com.mvp4g.client.event.BaseEventHandler;
+import com.gwtplatform.mvp.client.proxy.PlaceManager;
-public class ErrorHandler extends BaseEventHandler<CoreEventBus> {
+public class ErrorHandler {
private final Session session;
private final I18nTranslationService i18n;
private final Event0 onSessionExpired;
+ private final UserNotifierPresenter notifier;
+ private final SpinerPresenter spiner;
+ private final PlaceManager placeManager;
@Inject
- public ErrorHandler(final Session session, final I18nTranslationService i18n) {
+ public ErrorHandler(final Session session, final I18nTranslationService i18n, final UserNotifierPresenter notifier,
+ final SpinerPresenter spiner, final PlaceManager placeManager) {
this.session = session;
this.i18n = i18n;
+ this.notifier = notifier;
+ this.spiner = spiner;
+ this.placeManager = placeManager;
this.onSessionExpired = new Event0("onSessionExpired");
}
public void doSessionExpired() {
onSessionExpired.fire();
- eventBus.notify(NotifyLevel.info, "Your session has expired. Please log in again.");
+ notifier.notify(NotifyLevel.info, "Your session has expired. Please log in again.");
}
public void onSessionExpired(final Listener0 listener) {
@@ -55,10 +63,10 @@
}
public void process(final Throwable caught) {
- eventBus.hideSpin();
+ spiner.fade();
if (caught instanceof AccessViolationException) {
logException(caught);
- eventBus.notify(NotifyLevel.error, i18n.t("You do not have rights to perform that action"));
+ notifier.notify(NotifyLevel.error, i18n.t("You do not have rights to perform that action"));
} else if (caught instanceof SessionExpiredException) {
logException(caught);
doSessionExpired();
@@ -67,45 +75,48 @@
if (session.isLogged()) {
doSessionExpired();
} else {
- eventBus.notify(NotifyLevel.important, i18n.t("Please sign in or register to collaborate"));
+ notifier.notify(NotifyLevel.important, i18n.t("Please sign in or register to collaborate"));
}
} else if (caught instanceof GroupNotFoundException) {
logException(caught);
-
- eventBus.notify(NotifyLevel.veryImportant, i18n.t("Group not found"));
- eventBus.gotoToken("");
+ notifier.notify(NotifyLevel.veryImportant, i18n.t("Group not found"));
+ goHome();
} else if (caught instanceof IncompatibleRemoteServiceException) {
- eventBus.notify(NotifyLevel.error,
+ notifier.notify(NotifyLevel.error,
i18n.t("Your browser is outdated with the server software. Please reload this page."));
} else if (caught instanceof ContentNotFoundException) {
logException(caught);
- eventBus.notify(NotifyLevel.veryImportant, i18n.t("Content not found"));
- eventBus.gotoToken("");
+ notifier.notify(NotifyLevel.veryImportant, i18n.t("Content not found"));
+ goHome();
} else if (caught instanceof ContentNotPermittedException) {
logException(caught);
- eventBus.notify(NotifyLevel.error, i18n.t("Action not permitted in this location"));
- eventBus.gotoToken("");
+ notifier.notify(NotifyLevel.error, i18n.t("Action not permitted in this location"));
+ goHome();
} else if (caught instanceof ContainerNotPermittedException) {
logException(caught);
- eventBus.notify(NotifyLevel.error, i18n.t("Action not permitted in this location"));
- eventBus.gotoToken("");
+ notifier.notify(NotifyLevel.error, i18n.t("Action not permitted in this location"));
+ goHome();
} else if (caught instanceof LastAdminInGroupException) {
logException(caught);
- eventBus.alert(i18n.t("Warning"), i18n.t("Sorry, you are the last admin of this group."
+ notifier.alert(i18n.t("Warning"), i18n.t("Sorry, you are the last admin of this group."
+ " Look for someone to substitute you appropriately as admin before leaving this group."));
} else if (caught instanceof AlreadyGroupMemberException) {
logException(caught);
- eventBus.notify(NotifyLevel.error, i18n.t("This group is already a group member"));
+ notifier.notify(NotifyLevel.error, i18n.t("This group is already a group member"));
} else if (caught instanceof AlreadyUserMemberException) {
logException(caught);
- eventBus.notify(NotifyLevel.error, i18n.t("This user is already a group member"));
+ notifier.notify(NotifyLevel.error, i18n.t("This user is already a group member"));
} else {
logException(caught, true);
- eventBus.notify(NotifyLevel.error, i18n.t("Error performing operation"));
+ notifier.notify(NotifyLevel.error, i18n.t("Error performing operation"));
GWT.log("Other kind of exception in StateManagerDefault/processErrorException", caught);
}
}
+ private void goHome() {
+ placeManager.revealDefaultPlace();
+ }
+
private void logException(final Throwable caught) {
logException(caught, false);
}
Added: trunk/src/main/java/cc/kune/core/client/i18n/I18nReadyEvent.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/I18nReadyEvent.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/i18n/I18nReadyEvent.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -0,0 +1,32 @@
+package cc.kune.core.client.i18n;
+
+import com.google.gwt.event.shared.EventHandler;
+import com.google.gwt.event.shared.GwtEvent;
+
+public class I18nReadyEvent extends GwtEvent<I18nReadyEvent.I18nReadyHandler> {
+
+ public interface I18nReadyHandler extends EventHandler {
+
+ void fire(I18nReadyEvent event);
+ }
+
+ public static final GwtEvent.Type<I18nReadyHandler> TYPE = new GwtEvent.Type<I18nReadyHandler>();
+
+ public static Type<I18nReadyHandler> getType() {
+ return TYPE;
+ }
+
+ public I18nReadyEvent() {
+ }
+
+ @Override
+ public com.google.gwt.event.shared.GwtEvent.Type<I18nReadyHandler> getAssociatedType() {
+ return TYPE;
+ }
+
+ @Override
+ protected void dispatch(final I18nReadyHandler handler) {
+ handler.fire(this);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/core/client/i18n/I18nReadyEvent.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/notify/SpinerPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/notify/SpinerPresenter.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/notify/SpinerPresenter.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -0,0 +1,45 @@
+package cc.kune.core.client.notify;
+
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.EventBus;
+import com.gwtplatform.mvp.client.Presenter;
+import com.gwtplatform.mvp.client.View;
+import com.gwtplatform.mvp.client.proxy.ProxyPlace;
+import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent;
+
+public class SpinerPresenter extends Presenter<SpinerPresenter.SpinerView, SpinerPresenter.SpinerProxy> {
+
+ public interface SpinerProxy extends ProxyPlace<SpinerPresenter> {
+ }
+
+ public interface SpinerView extends View {
+
+ void fade();
+
+ void show(String message);
+
+ void showLoading();
+ }
+
+ @Inject
+ public SpinerPresenter(final EventBus eventBus, final SpinerView view, final SpinerProxy proxy) {
+ super(eventBus, view, proxy);
+ }
+
+ public void fade() {
+ getView().fade();
+ }
+
+ public void show(final String message) {
+ getView().show(message);
+ }
+
+ public void showLoading() {
+ getView().showLoading();
+ }
+
+ @Override
+ protected void revealInParent() {
+ RevealRootContentEvent.fire(this, this);
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/notify/SpinerPresenter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/notify/SpinerViewImpl.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/notify/SpinerViewImpl.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/notify/SpinerViewImpl.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -0,0 +1,38 @@
+package cc.kune.core.client.notify;
+
+import cc.kune.core.client.notify.SpinerPresenter.SpinerView;
+
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.Widget;
+import com.gwtplatform.mvp.client.ViewImpl;
+
+public class SpinerViewImpl extends ViewImpl implements SpinerView {
+
+ private final Label label;
+
+ public SpinerViewImpl() {
+ label = new Label();
+ }
+
+ @Override
+ public Widget asWidget() {
+ return label;
+ }
+
+ @Override
+ public void fade() {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void show(final String message) {
+ label.setText(message);
+ }
+
+ @Override
+ public void showLoading() {
+ label.setText("FIXME");
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/notify/SpinerViewImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/core/client/notify/UserNotifierPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/notify/UserNotifierPresenter.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/client/notify/UserNotifierPresenter.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -3,45 +3,47 @@
import org.ourproject.common.client.notify.ConfirmationAsk;
import org.ourproject.common.client.notify.NotifyLevel;
-import cc.kune.core.client.CoreEventBus;
-import cc.kune.core.client.notify.UserNotifierPresenter.IUserNotifierView;
+import cc.kune.core.client.notify.UserNotifierPresenter.UserNotifierProxy;
+import cc.kune.core.client.notify.UserNotifierPresenter.UserNotifierView;
-import com.mvp4g.client.annotation.Presenter;
-import com.mvp4g.client.presenter.LazyPresenter;
-import com.mvp4g.client.view.LazyView;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.EventBus;
+import com.gwtplatform.mvp.client.Presenter;
+import com.gwtplatform.mvp.client.View;
+import com.gwtplatform.mvp.client.proxy.ProxyPlace;
- at Presenter(view = UserNotifierView.class)
-public class UserNotifierPresenter extends LazyPresenter<IUserNotifierView, CoreEventBus> {
+public class UserNotifierPresenter extends Presenter<UserNotifierView, UserNotifierProxy> {
- public interface IUserNotifierView extends LazyView {
+ public interface UserNotifierProxy extends ProxyPlace<UserNotifierPresenter> {
+ }
+
+ public interface UserNotifierView extends View {
public void alert(String title, String message);
public void confirmationAsk(ConfirmationAsk<?> ask);
- public void hideSpin();
-
public void notify(NotifyLevel level, String message);
+ }
- public void showSpin(String message);
+ @Inject
+ public UserNotifierPresenter(final EventBus eventBus, final UserNotifierView view, final UserNotifierProxy proxy) {
+ super(eventBus, view, proxy);
}
- public void onAlert(final String title, final String message) {
- view.alert(title, message);
+ public void notify(final NotifyLevel level, final String message) {
+ getView().notify(level, message);
}
- public void onConfirmationAsk(final ConfirmationAsk<?> ask) {
- view.confirmationAsk(ask);
+ public void alert(final String title, final String message) {
+ getView().alert(title, message);
};
- public void onHideSpin() {
- view.hideSpin();
+ public void onConfirmationAsk(final ConfirmationAsk<?> ask) {
+ getView().confirmationAsk(ask);
}
- public void onNotify(final NotifyLevel level, final String message) {
- view.notify(level, message);
+ @Override
+ protected void revealInParent() {
}
- public void onShowSpin(final String message) {
- view.showSpin(message);
- }
}
\ No newline at end of file
Deleted: trunk/src/main/java/cc/kune/core/client/notify/UserNotifierView.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/notify/UserNotifierView.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/client/notify/UserNotifierView.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -1,49 +0,0 @@
-package cc.kune.core.client.notify;
-
-import org.ourproject.common.client.notify.ConfirmationAsk;
-import org.ourproject.common.client.notify.NotifyLevel;
-
-import cc.kune.core.client.notify.UserNotifierPresenter.IUserNotifierView;
-
-import com.google.gwt.user.client.Window;
-
-public class UserNotifierView implements IUserNotifierView {
-
- @Override
- public void alert(final String title, final String message) {
- message(title, message);
- }
-
- @Override
- public void confirmationAsk(final ConfirmationAsk<?> ask) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void createView() {
- // TODO Auto-generated method stub
- }
-
- @Override
- public void hideSpin() {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void notify(final NotifyLevel level, final String message) {
- message("", message);
- }
-
- @Override
- public void showSpin(final String message) {
- // TODO Auto-generated method stub
-
- }
-
- private void message(final String title, final String message) {
- Window.alert(title + " " + message);
- }
-
-}
Copied: trunk/src/main/java/cc/kune/core/client/notify/UserNotifierViewImpl.java (from rev 1163, trunk/src/main/java/cc/kune/core/client/notify/UserNotifierView.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/notify/UserNotifierViewImpl.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/notify/UserNotifierViewImpl.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -0,0 +1,43 @@
+package cc.kune.core.client.notify;
+
+import org.ourproject.common.client.notify.ConfirmationAsk;
+import org.ourproject.common.client.notify.NotifyLevel;
+
+import cc.kune.core.client.notify.UserNotifierPresenter.UserNotifierView;
+
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.ViewImpl;
+
+public class UserNotifierViewImpl extends ViewImpl implements UserNotifierView {
+ @Inject
+ public UserNotifierViewImpl() {
+ }
+
+ @Override
+ public void alert(final String title, final String message) {
+ message(title, message);
+ }
+
+ @Override
+ public Widget asWidget() {
+ return null;
+ }
+
+ @Override
+ public void confirmationAsk(final ConfirmationAsk<?> ask) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void notify(final NotifyLevel level, final String message) {
+ message("", message);
+ }
+
+ private void message(final String title, final String message) {
+ Window.alert(title + " " + message);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/notify/UserNotifierViewImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/core/client/state/ContentProviderDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/ContentProviderDefault.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/client/state/ContentProviderDefault.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -21,23 +21,23 @@
import java.util.HashMap;
-import cc.kune.core.client.CoreEventBus;
+import cc.kune.core.client.notify.SpinerPresenter;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.shared.dto.StateAbstractDTO;
import cc.kune.core.shared.dto.StateToken;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.inject.Inject;
-import com.mvp4g.client.event.BaseEventHandler;
-public class ContentProviderDefault extends BaseEventHandler<CoreEventBus> implements ContentProvider {
-
+public class ContentProviderDefault implements ContentProvider {
private final ContentServiceAsync server;
private final HashMap<StateToken, StateAbstractDTO> cache;
+ private final SpinerPresenter spiner;
@Inject
- public ContentProviderDefault(final ContentServiceAsync server) {
+ public ContentProviderDefault(final ContentServiceAsync server, final SpinerPresenter spiner) {
this.server = server;
+ this.spiner = spiner;
this.cache = new HashMap<StateToken, StateAbstractDTO>();
}
@@ -46,7 +46,7 @@
}
public void getContent(final String user, final StateToken newState, final AsyncCallback<StateAbstractDTO> callback) {
- eventBus.showSpinLoading();
+ spiner.showLoading();
final StateAbstractDTO catched = getCached(newState);
if (catched != null) {
callback.onSuccess(catched);
Modified: trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -22,8 +22,8 @@
import java.util.Collection;
import java.util.List;
-import cc.kune.core.client.CoreEventBus;
import cc.kune.core.client.cookies.CookiesManager;
+import cc.kune.core.client.i18n.I18nReadyEvent;
import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
import cc.kune.core.client.rpcservices.UserServiceAsync;
import cc.kune.core.shared.dto.I18nCountryDTO;
@@ -47,9 +47,9 @@
import com.google.gwt.core.client.GWT;
import com.google.inject.Inject;
import com.google.inject.Provider;
-import com.mvp4g.client.event.BaseEventHandler;
+import com.gwtplatform.mvp.client.EventBus;
-public class SessionDefault extends BaseEventHandler<CoreEventBus> implements Session {
+public class SessionDefault implements Session {
private String userHash;
private InitDataDTO initData;
private UserInfoDTO currentUserInfo;
@@ -64,6 +64,9 @@
private final Provider<UserServiceAsync> userServiceProvider;
@Inject
+ private static EventBus eventBus;
+
+ @Inject
public SessionDefault(final CookiesManager cookieManager, final Provider<UserServiceAsync> userServiceProvider) {
this.userHash = cookieManager.getCurrentCookie();
this.userHash = userHash == null || userHash.equals("null") ? null : userHash;
@@ -241,7 +244,7 @@
public void setCurrentLanguage(final I18nLanguageDTO currentLanguage) {
this.currentLanguage = currentLanguage;
- eventBus.i18nReady();
+ eventBus.fireEvent(new I18nReadyEvent());
}
public void setCurrentState(final StateAbstractDTO currentState) {
Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -21,9 +21,9 @@
import java.util.HashMap;
-import cc.kune.core.client.CoreEventBus;
import cc.kune.core.client.actions.BeforeActionCollection;
import cc.kune.core.client.actions.BeforeActionListener;
+import cc.kune.core.client.notify.SpinerPresenter;
import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
import cc.kune.core.shared.dto.SocialNetworkDataDTO;
import cc.kune.core.shared.dto.StateAbstractDTO;
@@ -40,10 +40,8 @@
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.user.client.History;
import com.google.inject.Inject;
-import com.mvp4g.client.event.BaseEventHandler;
-public class StateManagerDefault extends BaseEventHandler<CoreEventBus> implements StateManager,
- ValueChangeHandler<String> {
+public class StateManagerDefault implements StateManager, ValueChangeHandler<String> {
private final ContentProvider contentProvider;
private StateToken previousToken;
/**
@@ -59,10 +57,12 @@
private final Event2<String, String> onToolChanged;
private final Event2<String, String> onGroupChanged;
private final BeforeActionCollection beforeStateChangeCollection;
+ private final SpinerPresenter spiner;
@Inject
public StateManagerDefault(final ContentProvider contentProvider, final Session session,
- final HistoryWrapper history) {
+ final HistoryWrapper history, final SpinerPresenter spinner) {
+ this.spiner = spinner;
// Put this outside here
History.addValueChangeHandler(this);
this.contentProvider = contentProvider;
@@ -201,7 +201,7 @@
void setState(final StateAbstractDTO newState) {
session.setCurrentState(newState);
onStateChanged.fire(newState);
- eventBus.hideSpin();
+ spiner.fade();
checkGroupAndToolChange(newState);
previousToken = newState.getStateToken();
Added: trunk/src/main/java/cc/kune/core/client/ws/CorePlaceManager.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ws/CorePlaceManager.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/ws/CorePlaceManager.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -0,0 +1,20 @@
+package cc.kune.core.client.ws;
+
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.EventBus;
+import com.gwtplatform.mvp.client.proxy.PlaceManagerImpl;
+import com.gwtplatform.mvp.client.proxy.PlaceRequest;
+import com.gwtplatform.mvp.client.proxy.TokenFormatter;
+
+public class CorePlaceManager extends PlaceManagerImpl {
+
+ @Inject
+ public CorePlaceManager(final EventBus eventBus, final TokenFormatter tokenFormatter) {
+ super(eventBus, tokenFormatter);
+ }
+
+ @Override
+ public void revealDefaultPlace() {
+ revealPlace(new PlaceRequest("home"));
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/ws/CorePlaceManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/core/client/ws/CorePresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ws/CorePresenter.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/client/ws/CorePresenter.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -1,32 +1,37 @@
package cc.kune.core.client.ws;
-import cc.kune.core.client.CoreEventBus;
-import cc.kune.core.client.ws.CorePresenter.ICoreView;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.google.inject.Inject;
-import com.mvp4g.client.annotation.Presenter;
-import com.mvp4g.client.presenter.BasePresenter;
+import com.gwtplatform.mvp.client.EventBus;
+import com.gwtplatform.mvp.client.Presenter;
+import com.gwtplatform.mvp.client.View;
+import com.gwtplatform.mvp.client.annotations.NameToken;
+import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
+import com.gwtplatform.mvp.client.proxy.ProxyPlace;
+import com.gwtplatform.mvp.client.proxy.RevealRootLayoutContentEvent;
/**
* The Class CorePresenter.
*/
- at Presenter(view = CoreView.class)
-public class CorePresenter extends BasePresenter<ICoreView, CoreEventBus> {
+public class CorePresenter extends Presenter<CorePresenter.CoreView, CorePresenter.CoreProxy> {
+ @ProxyCodeSplit
+ @NameToken("home")
+ public interface CoreProxy extends ProxyPlace<CorePresenter> {
+ }
- /**
- * The Interface ICoreView.
- */
- public interface ICoreView {
+ public interface CoreView extends View {
}
@Inject
- public CorePresenter(final I18nTranslationService i18n) {
+ public CorePresenter(final EventBus eventBus, final CoreView view, final CoreProxy proxy,
+ final I18nTranslationService i18n) {
+ super(eventBus, view, proxy);
}
- /**
- * On start.
- */
- public void onStart() {
+ @Override
+ protected void revealInParent() {
+ RevealRootLayoutContentEvent.fire(eventBus, this);
}
+
}
Deleted: trunk/src/main/java/cc/kune/core/client/ws/CoreView.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ws/CoreView.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/client/ws/CoreView.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -1,31 +0,0 @@
-package cc.kune.core.client.ws;
-
-import org.ourproject.kune.ws.armor.client.Body;
-import org.ourproject.kune.ws.armor.client.resources.WsArmorResources;
-
-import cc.kune.core.client.ws.CorePresenter.ICoreView;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.InlineLabel;
-import com.google.inject.Inject;
-
-/**
- * The Class CoreView is where the general armor of Kune it created/attached.
- */
-public class CoreView extends Composite implements ICoreView {
-
- /**
- * Instantiates a new core view.
- *
- * @param body
- * the body
- */
- @Inject
- public CoreView(final Body body) {
- GWT.<WsArmorResources> create(WsArmorResources.class).style().ensureInjected();
- initWidget(body);
- body.getEntityHeader().add(new InlineLabel("Test - a, e, i, o, u"));
- body.getDocHeader().add(new InlineLabel("doc title"));
- }
-}
Copied: trunk/src/main/java/cc/kune/core/client/ws/CoreViewImpl.java (from rev 1162, trunk/src/main/java/cc/kune/core/client/ws/CoreView.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ws/CoreViewImpl.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/ws/CoreViewImpl.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -0,0 +1,37 @@
+package cc.kune.core.client.ws;
+
+import cc.kune.core.ws.armor.client.Body;
+import cc.kune.core.ws.armor.client.resources.WsArmorResources;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.ui.InlineLabel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.ViewImpl;
+
+/**
+ * The Class CoreView is where the general armor of Kune it created/attached.
+ */
+public class CoreViewImpl extends ViewImpl implements CorePresenter.CoreView {
+
+ private final Body body;
+
+ /**
+ * Instantiates a new core view.
+ *
+ * @param body
+ * the body
+ */
+ @Inject
+ public CoreViewImpl(final Body body) {
+ this.body = body;
+ GWT.<WsArmorResources> create(WsArmorResources.class).style().ensureInjected();
+ body.getEntityHeader().add(new InlineLabel("Test - a, e, i, o, u"));
+ body.getDocHeader().add(new InlineLabel("doc title"));
+ }
+
+ @Override
+ public Widget asWidget() {
+ return body;
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/ws/CoreViewImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/cc/kune/core/public/ws.css 2010-12-15 02:26:32 UTC (rev 1164)
@@ -8,6 +8,10 @@
margin: 5px;
}
+* {
+ font-family: 'Droid Sans', Arial;
+}
+
body.fontface {font: 'Droid Sans', Arial;}
a {
Modified: trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -21,9 +21,10 @@
import org.ourproject.kune.platf.client.services.Loader;
import org.ourproject.kune.platf.client.services.PlatformModule;
-import org.ourproject.kune.ws.armor.client.Body;
-import org.ourproject.kune.ws.armor.client.resources.WsArmorResources;
+import cc.kune.core.ws.armor.client.Body;
+import cc.kune.core.ws.armor.client.resources.WsArmorResources;
+
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.Scheduler;
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/AdmissionType.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/AdmissionType.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/AdmissionType.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -19,6 +19,8 @@
*/
package org.ourproject.kune.platf.server.domain;
-public enum AdmissionType {
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+public enum AdmissionType implements IsSerializable {
Moderated, Open, Closed
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -78,7 +78,7 @@
@Length(min = 6, max = 40)
private String password;
- @OneToOne(cascade = CascadeType.ALL)
+ @OneToOne(cascade = CascadeType.REMOVE)
private Group userGroup;
@Field(index = Index.TOKENIZED, store = Store.NO)
@@ -104,7 +104,7 @@
@NotNull
private TimeZone timezone;
- @OneToOne(cascade = CascadeType.ALL)
+ @OneToOne(cascade = CascadeType.REMOVE)
private final CustomProperties customProperties;
private UserBuddiesVisibility buddiesVisibility;
Modified: trunk/src/test/java/cc/kune/core/client/state/StateManagerTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/client/state/StateManagerTest.java 2010-12-09 16:03:51 UTC (rev 1163)
+++ trunk/src/test/java/cc/kune/core/client/state/StateManagerTest.java 2010-12-15 02:26:32 UTC (rev 1164)
@@ -9,6 +9,7 @@
import org.ourproject.kune.workspace.client.site.SiteToken;
import cc.kune.core.client.actions.BeforeActionListener;
+import cc.kune.core.client.notify.SpinerPresenter;
import cc.kune.core.shared.dto.StateAbstractDTO;
import cc.kune.core.shared.dto.StateToken;
@@ -36,7 +37,8 @@
contentProvider = Mockito.mock(ContentProvider.class);
session = Mockito.mock(Session.class);
history = Mockito.mock(HistoryWrapper.class);
- stateManager = new StateManagerDefault(contentProvider, session, history);
+ final SpinerPresenter spiner = Mockito.mock(SpinerPresenter.class);
+ stateManager = new StateManagerDefault(contentProvider, session, history, spiner);
Mockito.when(session.getUserHash()).thenReturn(HASH);
state = Mockito.mock(StateAbstractDTO.class);
stateChangeListener = new MockedListener<StateAbstractDTO>();
More information about the kune-commits
mailing list