r1653 - in trunk/src: main/java/cc/kune/client main/java/cc/kune/common/client main/java/cc/kune/common/client/actions/gwtui main/java/cc/kune/common/client/actions/gxtui main/java/cc/kune/common/client/actions/ui main/java/cc/kune/common/client/notify main/java/cc/kune/common/client/notify/events main/java/cc/kune/core/client main/java/cc/kune/core/client/auth main/java/cc/kune/core/client/cnt main/java/cc/kune/core/client/errors main/java/cc/kune/core/client/events main/java/cc/kune/core/cl
Author: vjrj_ Date: 2012-01-02 21:12:42 +0100 (Mon, 02 Jan 2012) New Revision: 1653 Added: trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiBinding.java trunk/src/main/java/cc/kune/common/client/actions/ui/DefaultGuiProvider.java trunk/src/main/java/cc/kune/common/client/actions/ui/GuiBinding.java trunk/src/main/java/cc/kune/common/client/actions/ui/GuiChildBinding.java trunk/src/main/java/cc/kune/common/client/actions/ui/GuiProvider.java trunk/src/main/java/cc/kune/common/client/notify/ProgressHideEvent.java trunk/src/main/java/cc/kune/common/client/notify/ProgressShowEvent.java trunk/src/main/java/cc/kune/common/client/notify/UserNotifyEvent.java trunk/src/main/java/cc/kune/common/client/notify/events/ trunk/src/main/java/cc/kune/core/client/events/GoHomeEvent.java trunk/src/main/java/cc/kune/core/client/events/StackErrorEvent.java trunk/src/main/java/cc/kune/core/client/events/UserMustBeLoggedEvent.java trunk/src/main/java/cc/kune/core/client/state/SessionExpirationManager.java trunk/src/main/java/cc/kune/core/client/state/StateTokenUtils.java trunk/src/main/java/cc/kune/domain/ParticipationData.java trunk/src/main/java/cc/kune/domain/SocialNetworkData.java trunk/src/main/java/cc/kune/domain/UserBuddiesData.java Removed: trunk/src/main/java/cc/kune/common/client/actions/ui/bind/ trunk/src/main/java/cc/kune/common/client/events/ trunk/src/main/java/cc/kune/common/client/notify/events/ProgressHideEvent.java trunk/src/main/java/cc/kune/common/client/notify/events/ProgressShowEvent.java trunk/src/main/java/cc/kune/common/client/notify/events/UserNotifyEvent.java trunk/src/main/java/cc/kune/core/shared/dto/StateTokenUtils.java trunk/src/main/java/cc/kune/domain/utils/ParticipationData.java trunk/src/main/java/cc/kune/domain/utils/SocialNetworkData.java trunk/src/main/java/cc/kune/domain/utils/UserBuddiesData.java Modified: trunk/src/main/java/cc/kune/client/KuneEntryPoint.java trunk/src/main/java/cc/kune/client/KuneGinjector.java trunk/src/main/java/cc/kune/common/client/SampleGinModule.java trunk/src/main/java/cc/kune/common/client/SampleGinjector.java trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtGuiProvider.java trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSimpleGuiItem.java trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtGuiProvider.java trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractComposedGuiItem.java trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java trunk/src/main/java/cc/kune/common/client/actions/ui/ActionFlowPanel.java trunk/src/main/java/cc/kune/common/client/actions/ui/ActionSimplePanel.java trunk/src/main/java/cc/kune/common/client/notify/NotifyUser.java trunk/src/main/java/cc/kune/core/client/CoreGinModule.java trunk/src/main/java/cc/kune/core/client/auth/AnonUsersManager.java trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java trunk/src/main/java/cc/kune/core/client/cnt/ActionContentToolbarImpl.java trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java trunk/src/main/java/cc/kune/core/client/init/AppStarterDefault.java trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierPresenter.java trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierViewImpl.java trunk/src/main/java/cc/kune/core/client/notify/spiner/SpinerPresenter.java trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.java trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java trunk/src/main/java/cc/kune/core/client/sn/AbstractSNPanel.java trunk/src/main/java/cc/kune/core/client/sn/GroupSNPanel.java trunk/src/main/java/cc/kune/core/client/sn/UserSNPanel.java trunk/src/main/java/cc/kune/core/client/state/ContentCacheDefault.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/entheader/EntityHeaderPanel.java trunk/src/main/java/cc/kune/core/server/mail/FormatedString.java trunk/src/main/java/cc/kune/core/server/manager/SocialNetworkManager.java trunk/src/main/java/cc/kune/core/server/manager/UserManager.java trunk/src/main/java/cc/kune/core/server/manager/impl/KuneWaveManagerDefault.java trunk/src/main/java/cc/kune/core/server/manager/impl/SocialNetworkManagerDefault.java trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java trunk/src/main/java/cc/kune/core/server/state/StateAbstract.java trunk/src/main/java/cc/kune/core/server/users/UserInfoServiceDefault.java trunk/src/main/java/cc/kune/core/shared/FileConstants.java trunk/src/main/java/cc/kune/core/shared/utils/SharedFileDownloadUtils.java trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPanel.java trunk/src/main/java/cc/kune/gspace/client/themes/GSpaceThemeSelectorPanel.java trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsTablePanel.java trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java trunk/src/main/java/cc/kune/wave/client/WebClient.java trunk/src/main/java/com/google/wave/splash/web/template/ThreadedWaveRenderer.java trunk/src/main/resources/dozerBeanMapping.xml trunk/src/test/java/cc/kune/core/server/manager/impl/SocialNetworkManagerMoreTest.java trunk/src/test/java/cc/kune/core/server/mapper/MapperTest.java Log: Refactorization solving dep cycles Modified: trunk/src/main/java/cc/kune/client/KuneEntryPoint.java =================================================================== --- trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -67,6 +67,7 @@ ginjector.getSpinerPresenter(); ginjector.getGlobalShortcutRegister().enable(); AsyncCallbackSimple.init(ginjector.getErrorHandler()); + ginjector.getSessionExpirationManager(); ginjector.getEventLogger(); NotifyUser.init(ginjector.getEventBus(), ginjector.getI18n()); ginjector.getCorePresenter().get().forceReveal(); Modified: trunk/src/main/java/cc/kune/client/KuneGinjector.java =================================================================== --- trunk/src/main/java/cc/kune/client/KuneGinjector.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/client/KuneGinjector.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -26,7 +26,7 @@ import cc.kune.chat.client.ChatGinModule; import cc.kune.chat.client.ChatGinjector; import cc.kune.common.client.actions.gwtui.GwtGuiProvider; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.client.log.EventBusWithLogging; import cc.kune.common.client.shortcuts.GlobalShortcutRegister; import cc.kune.common.shared.i18n.I18nTranslationService; @@ -46,6 +46,7 @@ import cc.kune.core.client.sitebar.spaces.SpaceSelectorPresenter; import cc.kune.core.client.sn.GroupSNPresenter; import cc.kune.core.client.sn.UserSNPresenter; +import cc.kune.core.client.state.SessionExpirationManager; import cc.kune.core.client.state.SiteTokenListeners; import cc.kune.core.client.state.StateManager; import cc.kune.core.client.state.TokenMatcher; @@ -116,10 +117,10 @@ GwtGuiProvider getGwtGuiProvider(); + HSpaceParts getHSpaceParts(); + // GxtGuiProvider getGxtGuiProvider(); - HSpaceParts getHSpaceParts(); - AsyncProvider<HSpacePresenter> getHSpacePresenter(); I18nTranslationService getI18n(); @@ -136,6 +137,8 @@ AsyncProvider<RegisterPresenter> getRegisterPresenter(); + SessionExpirationManager getSessionExpirationManager(); + AsyncProvider<SignInPresenter> getSignInPresenter(); AsyncProvider<SitebarActionsPresenter> getSitebarActionsPresenter(); Modified: trunk/src/main/java/cc/kune/common/client/SampleGinModule.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/SampleGinModule.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/common/client/SampleGinModule.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -21,8 +21,8 @@ import cc.kune.common.client.actions.gwtui.GwtGuiProvider; import cc.kune.common.client.actions.gxtui.GxtGuiProvider; -import cc.kune.common.client.actions.ui.bind.DefaultGuiProvider; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.DefaultGuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.client.shortcuts.DefaultGlobalShortcutRegister; import cc.kune.common.client.shortcuts.GlobalShortcutRegister; Modified: trunk/src/main/java/cc/kune/common/client/SampleGinjector.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/SampleGinjector.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/common/client/SampleGinjector.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -21,7 +21,7 @@ import cc.kune.common.client.actions.gwtui.GwtGuiProvider; import cc.kune.common.client.actions.gxtui.GxtGuiProvider; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.client.shortcuts.GlobalShortcutRegister; import com.google.gwt.inject.client.GinModules; Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtGuiProvider.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtGuiProvider.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtGuiProvider.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -19,7 +19,7 @@ */ package cc.kune.common.client.actions.gwtui; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor; import cc.kune.common.client.actions.ui.descrip.IconLabelDescriptor; import cc.kune.common.client.actions.ui.descrip.MenuCheckItemDescriptor; Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSimpleGuiItem.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSimpleGuiItem.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSimpleGuiItem.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -21,7 +21,7 @@ import cc.kune.common.client.actions.ui.AbstractComposedGuiItem; import cc.kune.common.client.actions.ui.AbstractGuiItem; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.shared.i18n.HasRTL; import com.google.gwt.user.client.ui.HorizontalPanel; Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtGuiProvider.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtGuiProvider.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtGuiProvider.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -20,7 +20,7 @@ package cc.kune.common.client.actions.gxtui; import cc.kune.common.client.actions.gwtui.GwtIconLabelGui; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor; import cc.kune.common.client.actions.ui.descrip.IconLabelDescriptor; import cc.kune.common.client.actions.ui.descrip.MenuCheckItemDescriptor; Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractComposedGuiItem.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractComposedGuiItem.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractComposedGuiItem.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -21,8 +21,6 @@ import java.util.List; -import cc.kune.common.client.actions.ui.bind.GuiBinding; -import cc.kune.common.client.actions.ui.bind.GuiProvider; import cc.kune.common.client.actions.ui.descrip.AbstractParentGuiActionDescrip; import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection; import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip; Copied: trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiBinding.java (from rev 1647, trunk/src/main/java/cc/kune/common/client/actions/ui/bind/AbstractGuiBinding.java) =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiBinding.java (rev 0) +++ trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiBinding.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,41 @@ +/* + * + * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.common.client.actions.ui; + +import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip; + +public abstract class AbstractGuiBinding implements GuiBinding { + + @Override + public AbstractGuiItem create(final GuiActionDescrip descriptor) { // NOPMD + // by + // vjrj + // on + // 18/01/11 + // 0:47 + return null; + } + + @Override + public boolean shouldBeAdded() { // NOPMD by vjrj on 18/01/11 0:47 + return true; + } + +} Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -24,7 +24,6 @@ import cc.kune.common.client.actions.ActionEvent; import cc.kune.common.client.actions.PropertyChangeEvent; import cc.kune.common.client.actions.PropertyChangeListener; -import cc.kune.common.client.actions.ui.bind.GuiBinding; import cc.kune.common.client.actions.ui.descrip.DropTarget; import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip; import cc.kune.common.client.errors.NotImplementedException; Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/ActionFlowPanel.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/ui/ActionFlowPanel.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/common/client/actions/ui/ActionFlowPanel.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -19,7 +19,6 @@ */ package cc.kune.common.client.actions.ui; -import cc.kune.common.client.actions.ui.bind.GuiProvider; import cc.kune.common.shared.i18n.HasRTL; import com.google.gwt.user.client.ui.FlowPanel; Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/ActionSimplePanel.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/ui/ActionSimplePanel.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/common/client/actions/ui/ActionSimplePanel.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -19,7 +19,6 @@ */ package cc.kune.common.client.actions.ui; -import cc.kune.common.client.actions.ui.bind.GuiProvider; import cc.kune.common.shared.i18n.HasRTL; import com.google.gwt.user.client.ui.HorizontalPanel; Copied: trunk/src/main/java/cc/kune/common/client/actions/ui/DefaultGuiProvider.java (from rev 1647, trunk/src/main/java/cc/kune/common/client/actions/ui/bind/DefaultGuiProvider.java) =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/ui/DefaultGuiProvider.java (rev 0) +++ trunk/src/main/java/cc/kune/common/client/actions/ui/DefaultGuiProvider.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,45 @@ +/* + * + * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.common.client.actions.ui; + +import java.util.HashMap; +import java.util.Map; + + +import com.google.inject.Provider; + +public class DefaultGuiProvider implements GuiProvider { + + private final Map<Class<?>, Provider<?>> map; + + public DefaultGuiProvider() { + map = new HashMap<Class<?>, Provider<?>>(); + } + + @Override + public <T> GuiBinding get(final Class<T> classType) { + return (GuiBinding) map.get(classType).get(); + } + + @Override + public <T, Z> void register(final Class<T> classType, final Provider<Z> binding) { + map.put(classType, binding); + } +} Copied: trunk/src/main/java/cc/kune/common/client/actions/ui/GuiBinding.java (from rev 1647, trunk/src/main/java/cc/kune/common/client/actions/ui/bind/GuiBinding.java) =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/ui/GuiBinding.java (rev 0) +++ trunk/src/main/java/cc/kune/common/client/actions/ui/GuiBinding.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,30 @@ +/* + * + * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.common.client.actions.ui; + +import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip; + +public interface GuiBinding { + + AbstractGuiItem create(GuiActionDescrip descriptor); + + boolean shouldBeAdded(); + +} Copied: trunk/src/main/java/cc/kune/common/client/actions/ui/GuiChildBinding.java (from rev 1647, trunk/src/main/java/cc/kune/common/client/actions/ui/bind/GuiChildBinding.java) =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/ui/GuiChildBinding.java (rev 0) +++ trunk/src/main/java/cc/kune/common/client/actions/ui/GuiChildBinding.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,54 @@ +/* + * + * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.common.client.actions.ui; + +import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip; +import cc.kune.common.client.errors.UIException; + +import com.google.gwt.user.client.ui.UIObject; + +public abstract class GuiChildBinding extends AbstractGuiBinding { + + protected UIObject child; + protected ParentWidget parent; + + @Override + public AbstractGuiItem create(final GuiActionDescrip descriptor) { + final int position = descriptor.getPosition(); + if (descriptor.isChild()) { + // A menu item is a child, a toolbar separator, also. A button can + // be a child of a toolbar or not + parent = ((ParentWidget) descriptor.getParent().getValue(ParentWidget.PARENT_UI)); + if (parent == null) { + throw new UIException("To add a item you need to add its parent before. Item: " + descriptor); + } + if (child != null) { + // Sometimes (menu/toolbar separators), there is no Widget to + // add/insert + if (position == GuiActionDescrip.NO_POSITION) { + parent.add(child); + } else { + parent.insert(position, child); + } + } + } + return super.create(descriptor); + } +} Copied: trunk/src/main/java/cc/kune/common/client/actions/ui/GuiProvider.java (from rev 1647, trunk/src/main/java/cc/kune/common/client/actions/ui/bind/GuiProvider.java) =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/ui/GuiProvider.java (rev 0) +++ trunk/src/main/java/cc/kune/common/client/actions/ui/GuiProvider.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,31 @@ +/* + * + * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.common.client.actions.ui; + + +import com.google.inject.Provider; + +public interface GuiProvider { + + <T> GuiBinding get(final Class<T> classType); + + <T, Z> void register(final Class<T> classType, final Provider<Z> provider); + +} Modified: trunk/src/main/java/cc/kune/common/client/notify/NotifyUser.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/notify/NotifyUser.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/common/client/notify/NotifyUser.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -19,9 +19,6 @@ */ package cc.kune.common.client.notify; -import cc.kune.common.client.events.ProgressHideEvent; -import cc.kune.common.client.events.ProgressShowEvent; -import cc.kune.common.client.events.UserNotifyEvent; import cc.kune.common.client.utils.SimpleResponseCallback; import cc.kune.common.shared.i18n.I18nTranslationService; import cc.kune.common.shared.utils.TextUtils; Copied: trunk/src/main/java/cc/kune/common/client/notify/ProgressHideEvent.java (from rev 1647, trunk/src/main/java/cc/kune/common/client/events/ProgressHideEvent.java) =================================================================== --- trunk/src/main/java/cc/kune/common/client/notify/ProgressHideEvent.java (rev 0) +++ trunk/src/main/java/cc/kune/common/client/notify/ProgressHideEvent.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,81 @@ +/* + * + * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.common.client.notify; + +import com.google.gwt.event.shared.EventHandler; +import com.google.gwt.event.shared.GwtEvent; +import com.google.gwt.event.shared.HandlerRegistration; +import com.google.gwt.event.shared.HasHandlers; + +public class ProgressHideEvent extends GwtEvent<ProgressHideEvent.ProgressHideHandler> { + + public interface HasProgressHideHandlers extends HasHandlers { + HandlerRegistration addProgressHideHandler(ProgressHideHandler handler); + } + + public interface ProgressHideHandler extends EventHandler { + public void onProgressHide(ProgressHideEvent event); + } + + private static final Type<ProgressHideHandler> TYPE = new Type<ProgressHideHandler>(); + + public static void fire(final HasHandlers source) { + source.fireEvent(new ProgressHideEvent()); + } + + public static Type<ProgressHideHandler> getType() { + return TYPE; + } + + public ProgressHideEvent() { + } + + @Override + protected void dispatch(final ProgressHideHandler handler) { + handler.onProgressHide(this); + } + + @Override + public boolean equals(final Object other) { + if (other != null && other.getClass().equals(this.getClass())) { + final ProgressHideEvent o = (ProgressHideEvent) other; + return true; + } + return false; + } + + @Override + public Type<ProgressHideHandler> getAssociatedType() { + return TYPE; + } + + @Override + public int hashCode() { + int hashCode = 23; + hashCode = (hashCode * 37) + getClass().hashCode(); + return hashCode; + } + + @Override + public String toString() { + return "ProgressHideEvent[" + "]"; + } + +} Copied: trunk/src/main/java/cc/kune/common/client/notify/ProgressShowEvent.java (from rev 1647, trunk/src/main/java/cc/kune/common/client/events/ProgressShowEvent.java) =================================================================== --- trunk/src/main/java/cc/kune/common/client/notify/ProgressShowEvent.java (rev 0) +++ trunk/src/main/java/cc/kune/common/client/notify/ProgressShowEvent.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,93 @@ +/* + * + * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.common.client.notify; + +import com.google.gwt.event.shared.EventHandler; +import com.google.gwt.event.shared.GwtEvent; +import com.google.gwt.event.shared.HandlerRegistration; +import com.google.gwt.event.shared.HasHandlers; + +public class ProgressShowEvent extends GwtEvent<ProgressShowEvent.ProgressShowHandler> { + + public interface HasProgressShowHandlers extends HasHandlers { + HandlerRegistration addProgressShowHandler(ProgressShowHandler handler); + } + + public interface ProgressShowHandler extends EventHandler { + public void onProgressShow(ProgressShowEvent event); + } + + private static final Type<ProgressShowHandler> TYPE = new Type<ProgressShowHandler>(); + + public static void fire(final HasHandlers source, final java.lang.String message) { + source.fireEvent(new ProgressShowEvent(message)); + } + + public static Type<ProgressShowHandler> getType() { + return TYPE; + } + + private final java.lang.String message; + + public ProgressShowEvent() { + this(""); + } + + public ProgressShowEvent(final java.lang.String message) { + this.message = message; + } + + @Override + protected void dispatch(final ProgressShowHandler handler) { + handler.onProgressShow(this); + } + + @Override + public boolean equals(final Object other) { + if (other != null && other.getClass().equals(this.getClass())) { + final ProgressShowEvent o = (ProgressShowEvent) other; + return true && ((o.message == null && this.message == null) || (o.message != null && o.message.equals(this.message))); + } + return false; + } + + @Override + public Type<ProgressShowHandler> getAssociatedType() { + return TYPE; + } + + public java.lang.String getMessage() { + return message; + } + + @Override + public int hashCode() { + int hashCode = 23; + hashCode = (hashCode * 37) + getClass().hashCode(); + hashCode = (hashCode * 37) + (message == null ? 1 : message.hashCode()); + return hashCode; + } + + @Override + public String toString() { + return "ProgressShowEvent[" + message + "]"; + } + +} Copied: trunk/src/main/java/cc/kune/common/client/notify/UserNotifyEvent.java (from rev 1647, trunk/src/main/java/cc/kune/common/client/events/UserNotifyEvent.java) =================================================================== --- trunk/src/main/java/cc/kune/common/client/notify/UserNotifyEvent.java (rev 0) +++ trunk/src/main/java/cc/kune/common/client/notify/UserNotifyEvent.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,154 @@ +/* + * + * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.common.client.notify; + + +import com.google.gwt.event.dom.client.ClickHandler; +import com.google.gwt.event.shared.EventHandler; +import com.google.gwt.event.shared.GwtEvent; +import com.google.gwt.event.shared.HandlerRegistration; +import com.google.gwt.event.shared.HasHandlers; + +public class UserNotifyEvent extends GwtEvent<UserNotifyEvent.UserNotifyHandler> { + + public interface HasUserNotifyHandlers extends HasHandlers { + HandlerRegistration addUserNotifyHandler(UserNotifyHandler handler); + } + + public interface UserNotifyCloser { + public void close(); + } + + public interface UserNotifyHandler extends EventHandler { + public void onUserNotify(UserNotifyEvent event); + } + + private static final Type<UserNotifyHandler> TYPE = new Type<UserNotifyHandler>(); + + public static void fire(final HasHandlers source, final NotifyLevel level, + final java.lang.String message) { + source.fireEvent(new UserNotifyEvent(level, "", message)); + } + + public static void fire(final HasHandlers source, final NotifyLevel level, + final java.lang.String message, final Boolean closeable) { + source.fireEvent(new UserNotifyEvent(level, "", message, closeable)); + } + + public static void fire(final HasHandlers source, final NotifyLevel level, + final java.lang.String title, final java.lang.String message) { + source.fireEvent(new UserNotifyEvent(level, title, message)); + } + + public static UserNotifyEvent fire(final HasHandlers source, final NotifyLevel level, + final java.lang.String title, final java.lang.String message, final Boolean closeable) { + final UserNotifyEvent event = new UserNotifyEvent(level, title, message, closeable); + source.fireEvent(event); + return event; + } + + public static Type<UserNotifyHandler> getType() { + return TYPE; + } + + private ClickHandler clickHandler; + private final Boolean closeable; + private UserNotifyCloser closer; + private java.lang.String id; + private final NotifyLevel level; + private final java.lang.String message; + private final java.lang.String title; + + public UserNotifyEvent(final NotifyLevel level, final java.lang.String message) { + this(level, "", message, false); + } + + public UserNotifyEvent(final NotifyLevel level, final java.lang.String message, final Boolean closeable) { + this(level, "", message, closeable); + } + + public UserNotifyEvent(final NotifyLevel level, final java.lang.String title, + final java.lang.String message) { + this(level, title, message, false); + } + + public UserNotifyEvent(final NotifyLevel level, final java.lang.String title, + final java.lang.String message, final Boolean closeable) { + this.level = level; + this.title = title; + this.message = message; + this.closeable = closeable; + } + + public UserNotifyEvent(final String message) { + this(NotifyLevel.info, message); + } + + @Override + protected void dispatch(final UserNotifyHandler handler) { + handler.onUserNotify(this); + } + + @Override + public Type<UserNotifyHandler> getAssociatedType() { + return TYPE; + } + + public ClickHandler getClickHandler() { + return clickHandler; + } + + public Boolean getCloseable() { + return closeable; + } + + public UserNotifyCloser getCloser() { + return closer; + } + + public java.lang.String getId() { + return id; + } + + public NotifyLevel getLevel() { + return level; + } + + public java.lang.String getMessage() { + return message; + } + + public java.lang.String getTitle() { + return title; + } + + public void setClickHandler(final ClickHandler clickHandler) { + this.clickHandler = clickHandler; + } + + public void setCloser(final UserNotifyCloser closer) { + this.closer = closer; + } + + public void setId(final String id) { + this.id = id; + } + +} Copied: trunk/src/main/java/cc/kune/common/client/notify/events (from rev 1647, trunk/src/main/java/cc/kune/common/client/events) Deleted: trunk/src/main/java/cc/kune/common/client/notify/events/ProgressHideEvent.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/events/ProgressHideEvent.java 2011-12-21 23:32:22 UTC (rev 1647) +++ trunk/src/main/java/cc/kune/common/client/notify/events/ProgressHideEvent.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -1,81 +0,0 @@ -/* - * - * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package cc.kune.common.client.events; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.event.shared.HasHandlers; - -public class ProgressHideEvent extends GwtEvent<ProgressHideEvent.ProgressHideHandler> { - - public interface HasProgressHideHandlers extends HasHandlers { - HandlerRegistration addProgressHideHandler(ProgressHideHandler handler); - } - - public interface ProgressHideHandler extends EventHandler { - public void onProgressHide(ProgressHideEvent event); - } - - private static final Type<ProgressHideHandler> TYPE = new Type<ProgressHideHandler>(); - - public static void fire(final HasHandlers source) { - source.fireEvent(new ProgressHideEvent()); - } - - public static Type<ProgressHideHandler> getType() { - return TYPE; - } - - public ProgressHideEvent() { - } - - @Override - protected void dispatch(final ProgressHideHandler handler) { - handler.onProgressHide(this); - } - - @Override - public boolean equals(final Object other) { - if (other != null && other.getClass().equals(this.getClass())) { - final ProgressHideEvent o = (ProgressHideEvent) other; - return true; - } - return false; - } - - @Override - public Type<ProgressHideHandler> getAssociatedType() { - return TYPE; - } - - @Override - public int hashCode() { - int hashCode = 23; - hashCode = (hashCode * 37) + getClass().hashCode(); - return hashCode; - } - - @Override - public String toString() { - return "ProgressHideEvent[" + "]"; - } - -} Deleted: trunk/src/main/java/cc/kune/common/client/notify/events/ProgressShowEvent.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/events/ProgressShowEvent.java 2011-12-21 23:32:22 UTC (rev 1647) +++ trunk/src/main/java/cc/kune/common/client/notify/events/ProgressShowEvent.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -1,93 +0,0 @@ -/* - * - * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package cc.kune.common.client.events; - -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.event.shared.HasHandlers; - -public class ProgressShowEvent extends GwtEvent<ProgressShowEvent.ProgressShowHandler> { - - public interface HasProgressShowHandlers extends HasHandlers { - HandlerRegistration addProgressShowHandler(ProgressShowHandler handler); - } - - public interface ProgressShowHandler extends EventHandler { - public void onProgressShow(ProgressShowEvent event); - } - - private static final Type<ProgressShowHandler> TYPE = new Type<ProgressShowHandler>(); - - public static void fire(final HasHandlers source, final java.lang.String message) { - source.fireEvent(new ProgressShowEvent(message)); - } - - public static Type<ProgressShowHandler> getType() { - return TYPE; - } - - private final java.lang.String message; - - public ProgressShowEvent() { - this(""); - } - - public ProgressShowEvent(final java.lang.String message) { - this.message = message; - } - - @Override - protected void dispatch(final ProgressShowHandler handler) { - handler.onProgressShow(this); - } - - @Override - public boolean equals(final Object other) { - if (other != null && other.getClass().equals(this.getClass())) { - final ProgressShowEvent o = (ProgressShowEvent) other; - return true && ((o.message == null && this.message == null) || (o.message != null && o.message.equals(this.message))); - } - return false; - } - - @Override - public Type<ProgressShowHandler> getAssociatedType() { - return TYPE; - } - - public java.lang.String getMessage() { - return message; - } - - @Override - public int hashCode() { - int hashCode = 23; - hashCode = (hashCode * 37) + getClass().hashCode(); - hashCode = (hashCode * 37) + (message == null ? 1 : message.hashCode()); - return hashCode; - } - - @Override - public String toString() { - return "ProgressShowEvent[" + message + "]"; - } - -} Deleted: trunk/src/main/java/cc/kune/common/client/notify/events/UserNotifyEvent.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/events/UserNotifyEvent.java 2011-12-21 23:32:22 UTC (rev 1647) +++ trunk/src/main/java/cc/kune/common/client/notify/events/UserNotifyEvent.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -1,155 +0,0 @@ -/* - * - * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package cc.kune.common.client.events; - -import cc.kune.common.client.notify.NotifyLevel; - -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.event.shared.EventHandler; -import com.google.gwt.event.shared.GwtEvent; -import com.google.gwt.event.shared.HandlerRegistration; -import com.google.gwt.event.shared.HasHandlers; - -public class UserNotifyEvent extends GwtEvent<UserNotifyEvent.UserNotifyHandler> { - - public interface HasUserNotifyHandlers extends HasHandlers { - HandlerRegistration addUserNotifyHandler(UserNotifyHandler handler); - } - - public interface UserNotifyCloser { - public void close(); - } - - public interface UserNotifyHandler extends EventHandler { - public void onUserNotify(UserNotifyEvent event); - } - - private static final Type<UserNotifyHandler> TYPE = new Type<UserNotifyHandler>(); - - public static void fire(final HasHandlers source, final NotifyLevel level, - final java.lang.String message) { - source.fireEvent(new UserNotifyEvent(level, "", message)); - } - - public static void fire(final HasHandlers source, final NotifyLevel level, - final java.lang.String message, final Boolean closeable) { - source.fireEvent(new UserNotifyEvent(level, "", message, closeable)); - } - - public static void fire(final HasHandlers source, final NotifyLevel level, - final java.lang.String title, final java.lang.String message) { - source.fireEvent(new UserNotifyEvent(level, title, message)); - } - - public static UserNotifyEvent fire(final HasHandlers source, final NotifyLevel level, - final java.lang.String title, final java.lang.String message, final Boolean closeable) { - final UserNotifyEvent event = new UserNotifyEvent(level, title, message, closeable); - source.fireEvent(event); - return event; - } - - public static Type<UserNotifyHandler> getType() { - return TYPE; - } - - private ClickHandler clickHandler; - private final Boolean closeable; - private UserNotifyCloser closer; - private java.lang.String id; - private final NotifyLevel level; - private final java.lang.String message; - private final java.lang.String title; - - public UserNotifyEvent(final NotifyLevel level, final java.lang.String message) { - this(level, "", message, false); - } - - public UserNotifyEvent(final NotifyLevel level, final java.lang.String message, final Boolean closeable) { - this(level, "", message, closeable); - } - - public UserNotifyEvent(final NotifyLevel level, final java.lang.String title, - final java.lang.String message) { - this(level, title, message, false); - } - - public UserNotifyEvent(final NotifyLevel level, final java.lang.String title, - final java.lang.String message, final Boolean closeable) { - this.level = level; - this.title = title; - this.message = message; - this.closeable = closeable; - } - - public UserNotifyEvent(final String message) { - this(NotifyLevel.info, message); - } - - @Override - protected void dispatch(final UserNotifyHandler handler) { - handler.onUserNotify(this); - } - - @Override - public Type<UserNotifyHandler> getAssociatedType() { - return TYPE; - } - - public ClickHandler getClickHandler() { - return clickHandler; - } - - public Boolean getCloseable() { - return closeable; - } - - public UserNotifyCloser getCloser() { - return closer; - } - - public java.lang.String getId() { - return id; - } - - public NotifyLevel getLevel() { - return level; - } - - public java.lang.String getMessage() { - return message; - } - - public java.lang.String getTitle() { - return title; - } - - public void setClickHandler(final ClickHandler clickHandler) { - this.clickHandler = clickHandler; - } - - public void setCloser(final UserNotifyCloser closer) { - this.closer = closer; - } - - public void setId(final String id) { - this.id = id; - } - -} Modified: trunk/src/main/java/cc/kune/core/client/CoreGinModule.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -20,8 +20,8 @@ package cc.kune.core.client; import cc.kune.common.client.actions.gxtui.GxtGuiProvider; -import cc.kune.common.client.actions.ui.bind.DefaultGuiProvider; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.DefaultGuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.client.log.EventBusWithLogging; import cc.kune.common.client.shortcuts.DefaultGlobalShortcutRegister; import cc.kune.common.client.shortcuts.GlobalShortcutRegister; @@ -98,6 +98,7 @@ 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.state.SessionExpirationManager; import cc.kune.core.client.state.SiteTokenListeners; import cc.kune.core.client.state.SiteTokens; import cc.kune.core.client.state.StateManager; @@ -201,6 +202,7 @@ // Core App bind(Session.class).to(SessionDefault.class).in(Singleton.class); + s(SessionExpirationManager.class); s(ErrorHandler.class); s(StateManagerDefault.class); bind(StateManager.class).to(StateManagerDefault.class).in(Singleton.class); Modified: trunk/src/main/java/cc/kune/core/client/auth/AnonUsersManager.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/AnonUsersManager.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/auth/AnonUsersManager.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -19,8 +19,8 @@ */ package cc.kune.core.client.auth; -import cc.kune.common.client.events.UserNotifyEvent; import cc.kune.common.client.notify.NotifyLevel; +import cc.kune.common.client.notify.UserNotifyEvent; import cc.kune.common.shared.utils.TextUtils; import cc.kune.core.client.cookies.CookiesManager; import cc.kune.core.client.i18n.I18nUITranslationService; Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -19,10 +19,10 @@ */ package cc.kune.core.client.auth; -import cc.kune.common.client.events.ProgressHideEvent; -import cc.kune.common.client.events.ProgressShowEvent; import cc.kune.common.client.log.Log; import cc.kune.common.client.notify.NotifyLevel; +import cc.kune.common.client.notify.ProgressHideEvent; +import cc.kune.common.client.notify.ProgressShowEvent; import cc.kune.common.client.utils.OnAcceptCallback; import cc.kune.common.client.utils.TimerWrapper; import cc.kune.common.client.utils.TimerWrapper.Executer; Modified: trunk/src/main/java/cc/kune/core/client/cnt/ActionContentToolbarImpl.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/cnt/ActionContentToolbarImpl.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/cnt/ActionContentToolbarImpl.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -20,7 +20,7 @@ package cc.kune.core.client.cnt; import cc.kune.common.client.actions.ui.ActionFlowPanel; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.shared.i18n.I18nTranslationService; import cc.kune.gspace.client.GSpaceArmor; Modified: trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -19,19 +19,16 @@ */ package cc.kune.core.client.errors; -import org.waveprotocol.wave.client.common.safehtml.SafeHtml; -import org.waveprotocol.wave.client.common.util.AsyncHolder.Accessor; - -import cc.kune.common.client.events.ProgressHideEvent; -import cc.kune.common.client.events.UserNotifyEvent; import cc.kune.common.client.log.Log; import cc.kune.common.client.notify.NotifyLevel; import cc.kune.common.client.notify.NotifyUser; +import cc.kune.common.client.notify.ProgressHideEvent; +import cc.kune.common.client.notify.UserNotifyEvent; import cc.kune.common.shared.i18n.I18nTranslationService; import cc.kune.common.shared.utils.TextUtils; -import cc.kune.core.client.state.Session; -import cc.kune.core.client.state.StateManager; -import cc.kune.wave.client.WaveClientProvider; +import cc.kune.core.client.events.GoHomeEvent; +import cc.kune.core.client.events.StackErrorEvent; +import cc.kune.core.client.events.UserMustBeLoggedEvent; import com.google.gwt.event.shared.EventBus; import com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException; @@ -41,28 +38,19 @@ private final EventBus eventBus; private final I18nTranslationService i18n; - private final Session session; - private final StateManager stateManager; - private final WaveClientProvider waveClient; @Inject - public ErrorHandler(final Session session, final I18nTranslationService i18n, - final StateManager stateManager, final EventBus eventBus, final WaveClientProvider waveClient) { - this.session = session; + public ErrorHandler(final I18nTranslationService i18n, final EventBus eventBus) { this.i18n = i18n; - this.stateManager = stateManager; this.eventBus = eventBus; - this.waveClient = waveClient; } public void doSessionExpired() { eventBus.fireEvent(new SessionExpiredEvent()); - eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.info, - "Your session has expired. Please log in again.")); } private void goHome() { - stateManager.gotoDefaultHomepage(); + GoHomeEvent.fire(eventBus); } private void logException(final Throwable caught) { @@ -91,12 +79,7 @@ doSessionExpired(); } else if (caught instanceof UserMustBeLoggedException) { logException(caught); - if (session.isLogged()) { - doSessionExpired(); - } else { - eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.important, - i18n.t("Please sign in or register to collaborate"))); - } + UserMustBeLoggedEvent.fire(eventBus); } else if (caught instanceof GroupNotFoundException) { logException(caught); eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.veryImportant, i18n.t("Group not found"))); @@ -148,14 +131,7 @@ i18n.t("Oops! Something has gone wrong with our servers. Retry later, please."))); final String error = "Other kind of exception received in ErrorHandler"; Log.error(error, caught); - waveClient.get().getStackTraceAsync(caught, new Accessor<SafeHtml>() { - @Override - public void use(final SafeHtml stack) { - final String stackAsString = stack.asString().replace("<br>", "\n"); - NotifyUser.logError(stackAsString); - Log.error("Stack: " + stackAsString); - } - }); + StackErrorEvent.fire(eventBus, caught); } } Added: trunk/src/main/java/cc/kune/core/client/events/GoHomeEvent.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/events/GoHomeEvent.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/events/GoHomeEvent.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,58 @@ +package cc.kune.core.client.events; + +import com.google.gwt.event.shared.EventHandler; +import com.google.gwt.event.shared.GwtEvent; +import com.google.gwt.event.shared.HandlerRegistration; + +import com.google.gwt.event.shared.HasHandlers; + +public class GoHomeEvent extends GwtEvent<GoHomeEvent.GoHomeHandler> { + + public interface HasGoHomeHandlers extends HasHandlers { + HandlerRegistration addGoHomeHandler(GoHomeHandler handler); + } + + public interface GoHomeHandler extends EventHandler { + public void onGoHome(GoHomeEvent event); + } + + private static final Type<GoHomeHandler> TYPE = new Type<GoHomeHandler>(); + + public static void fire(HasHandlers source) { + source.fireEvent(new GoHomeEvent()); + } + + public static Type<GoHomeHandler> getType() { + return TYPE; + } + + + public GoHomeEvent() { + } + + @Override + public Type<GoHomeHandler> getAssociatedType() { + return TYPE; + } + + @Override + protected void dispatch(GoHomeHandler handler) { + handler.onGoHome(this); + } + + @Override + public boolean equals(Object obj) { + return super.equals(obj); + } + + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public String toString() { + return "GoHomeEvent[" + + "]"; + } +} Added: trunk/src/main/java/cc/kune/core/client/events/StackErrorEvent.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/events/StackErrorEvent.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/events/StackErrorEvent.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,83 @@ +package cc.kune.core.client.events; + +import com.google.gwt.event.shared.EventHandler; +import com.google.gwt.event.shared.GwtEvent; +import com.google.gwt.event.shared.HandlerRegistration; + +import com.google.gwt.event.shared.HasHandlers; + +public class StackErrorEvent extends GwtEvent<StackErrorEvent.StackErrorHandler> { + + public interface HasStackErrorHandlers extends HasHandlers { + HandlerRegistration addStackErrorHandler(StackErrorHandler handler); + } + + public interface StackErrorHandler extends EventHandler { + public void onStackError(StackErrorEvent event); + } + + private static final Type<StackErrorHandler> TYPE = new Type<StackErrorHandler>(); + + public static void fire(HasHandlers source, java.lang.Throwable exception) { + source.fireEvent(new StackErrorEvent(exception)); + } + + public static Type<StackErrorHandler> getType() { + return TYPE; + } + + java.lang.Throwable exception; + + public StackErrorEvent(java.lang.Throwable exception) { + this.exception = exception; + } + + protected StackErrorEvent() { + // Possibly for serialization. + } + + @Override + public Type<StackErrorHandler> getAssociatedType() { + return TYPE; + } + + public java.lang.Throwable getException() { + return exception; + } + + @Override + protected void dispatch(StackErrorHandler handler) { + handler.onStackError(this); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + StackErrorEvent other = (StackErrorEvent) obj; + if (exception == null) { + if (other.exception != null) + return false; + } else if (!exception.equals(other.exception)) + return false; + return true; + } + + @Override + public int hashCode() { + int hashCode = 23; + hashCode = (hashCode * 37) + (exception == null ? 1 : exception.hashCode()); + return hashCode; + } + + @Override + public String toString() { + return "StackErrorEvent[" + + exception + + "]"; + } +} Added: trunk/src/main/java/cc/kune/core/client/events/UserMustBeLoggedEvent.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/events/UserMustBeLoggedEvent.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/events/UserMustBeLoggedEvent.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,55 @@ +package cc.kune.core.client.events; + +import com.google.gwt.event.shared.EventHandler; +import com.google.gwt.event.shared.GwtEvent; +import com.google.gwt.event.shared.HandlerRegistration; +import com.google.gwt.event.shared.HasHandlers; + +public class UserMustBeLoggedEvent extends GwtEvent<UserMustBeLoggedEvent.UserMustBeLoggedHandler> { + + public interface HasUserMustBeLoggedHandlers extends HasHandlers { + HandlerRegistration addUserMustBeLoggedHandler(UserMustBeLoggedHandler handler); + } + + public interface UserMustBeLoggedHandler extends EventHandler { + public void onUserMustBeLogged(UserMustBeLoggedEvent event); + } + + private static final Type<UserMustBeLoggedHandler> TYPE = new Type<UserMustBeLoggedHandler>(); + + public static void fire(final HasHandlers source) { + source.fireEvent(new UserMustBeLoggedEvent()); + } + + public static Type<UserMustBeLoggedHandler> getType() { + return TYPE; + } + + public UserMustBeLoggedEvent() { + } + + @Override + protected void dispatch(final UserMustBeLoggedHandler handler) { + handler.onUserMustBeLogged(this); + } + + @Override + public boolean equals(final Object obj) { + return super.equals(obj); + } + + @Override + public Type<UserMustBeLoggedHandler> getAssociatedType() { + return TYPE; + } + + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public String toString() { + return "UserMustBeLoggedEvent[" + "]"; + } +} Modified: trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -125,6 +125,7 @@ }); } }); + session.onUserSignIn(true, new UserSignInHandler() { @Override public void onUserSignIn(final UserSignInEvent event) { Modified: trunk/src/main/java/cc/kune/core/client/init/AppStarterDefault.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/init/AppStarterDefault.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/init/AppStarterDefault.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -19,11 +19,11 @@ */ package cc.kune.core.client.init; -import cc.kune.common.client.events.ProgressHideEvent; -import cc.kune.common.client.events.UserNotifyEvent; import cc.kune.common.client.log.Log; import cc.kune.common.client.notify.NotifyLevel; import cc.kune.common.client.notify.NotifyUser; +import cc.kune.common.client.notify.ProgressHideEvent; +import cc.kune.common.client.notify.UserNotifyEvent; import cc.kune.common.client.resources.CommonResources; import cc.kune.common.client.utils.SimpleResponseCallback; import cc.kune.core.client.rpcservices.SiteServiceAsync; Modified: trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierPresenter.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierPresenter.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierPresenter.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -19,8 +19,8 @@ */ package cc.kune.core.client.notify.msgs; -import cc.kune.common.client.events.UserNotifyEvent; import cc.kune.common.client.notify.NotifyLevel; +import cc.kune.common.client.notify.UserNotifyEvent; import cc.kune.core.client.notify.msgs.UserNotifierPresenter.UserNotifierProxy; import cc.kune.core.client.notify.msgs.UserNotifierPresenter.UserNotifierView; Modified: trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierViewImpl.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierViewImpl.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierViewImpl.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -19,7 +19,7 @@ */ package cc.kune.core.client.notify.msgs; -import cc.kune.common.client.events.UserNotifyEvent; +import cc.kune.common.client.notify.UserNotifyEvent; import cc.kune.common.client.ui.PopupBottomPanel; import cc.kune.core.client.notify.msgs.UserNotifierPresenter.UserNotifierView; import cc.kune.msgs.client.CloseCallback; Modified: trunk/src/main/java/cc/kune/core/client/notify/spiner/SpinerPresenter.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/notify/spiner/SpinerPresenter.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/notify/spiner/SpinerPresenter.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -19,8 +19,8 @@ */ package cc.kune.core.client.notify.spiner; -import cc.kune.common.client.events.ProgressHideEvent; -import cc.kune.common.client.events.ProgressShowEvent; +import cc.kune.common.client.notify.ProgressHideEvent; +import cc.kune.common.client.notify.ProgressShowEvent; import cc.kune.common.shared.i18n.I18nTranslationService; import cc.kune.core.client.i18n.I18nReadyEvent; Modified: trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/sitebar/ErrorsDialog.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -19,8 +19,8 @@ */ package cc.kune.core.client.sitebar; -import cc.kune.common.client.events.UserNotifyEvent; import cc.kune.common.client.notify.NotifyLevel; +import cc.kune.common.client.notify.UserNotifyEvent; import cc.kune.common.client.ui.IconLabel; import cc.kune.common.client.ui.dialogs.BasicTopDialog; import cc.kune.common.shared.i18n.I18nTranslationService; Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -25,8 +25,8 @@ import cc.kune.common.client.actions.BeforeActionCollection; import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor; import cc.kune.common.client.errors.UIException; -import cc.kune.common.client.events.ProgressHideEvent; -import cc.kune.common.client.events.ProgressShowEvent; +import cc.kune.common.client.notify.ProgressHideEvent; +import cc.kune.common.client.notify.ProgressShowEvent; import cc.kune.common.shared.i18n.I18nTranslationService; import cc.kune.core.client.auth.WaveClientSimpleAuthenticator; import cc.kune.core.client.cookies.CookiesManager; Modified: trunk/src/main/java/cc/kune/core/client/sn/AbstractSNPanel.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/sn/AbstractSNPanel.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/sn/AbstractSNPanel.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -22,8 +22,8 @@ import cc.kune.common.client.actions.gxtui.AbstractGxtMenuGui; import cc.kune.common.client.actions.ui.ActionFlowPanel; import cc.kune.common.client.actions.ui.ActionSimplePanel; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.client.actions.ui.IsActionExtensible; -import cc.kune.common.client.actions.ui.bind.GuiProvider; import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection; import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip; import cc.kune.common.client.actions.ui.descrip.MenuDescriptor; Modified: trunk/src/main/java/cc/kune/core/client/sn/GroupSNPanel.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/sn/GroupSNPanel.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/sn/GroupSNPanel.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -20,7 +20,7 @@ package cc.kune.core.client.sn; import cc.kune.common.client.actions.ui.ActionFlowPanel; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection; import cc.kune.common.client.tooltip.Tooltip; import cc.kune.common.shared.i18n.I18nTranslationService; Modified: trunk/src/main/java/cc/kune/core/client/sn/UserSNPanel.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/sn/UserSNPanel.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/sn/UserSNPanel.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -20,7 +20,7 @@ package cc.kune.core.client.sn; import cc.kune.common.client.actions.ui.ActionFlowPanel; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection; import cc.kune.common.shared.i18n.I18nTranslationService; import cc.kune.core.client.avatar.SmallAvatarDecorator; Modified: trunk/src/main/java/cc/kune/core/client/state/ContentCacheDefault.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/state/ContentCacheDefault.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/state/ContentCacheDefault.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -22,7 +22,7 @@ import java.util.HashMap; import java.util.Map; -import cc.kune.common.client.events.ProgressShowEvent; +import cc.kune.common.client.notify.ProgressShowEvent; import cc.kune.core.client.init.AppStartEvent; import cc.kune.core.client.init.AppStartEvent.AppStartHandler; import cc.kune.core.client.rpcservices.ContentServiceAsync; Modified: trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -24,7 +24,6 @@ import cc.kune.common.client.log.Log; import cc.kune.core.client.cookies.CookiesManager; -import cc.kune.core.client.errors.SessionExpiredEvent; import cc.kune.core.client.init.AppStartEvent; import cc.kune.core.client.init.AppStartEvent.AppStartHandler; import cc.kune.core.client.rpcservices.AsyncCallbackSimple; @@ -72,12 +71,6 @@ this.userHash = userHash == null || userHash.equals("null") ? null : userHash; this.userServiceProvider = userServiceProvider; languagesArray = null; - eventBus.addHandler(SessionExpiredEvent.getType(), new SessionExpiredEvent.SessionExpiredHandler() { - @Override - public void onSessionExpired(final SessionExpiredEvent event) { - signOut(); - } - }); check(new AsyncCallbackSimple<Void>() { @Override public void onSuccess(final Void result) { Added: trunk/src/main/java/cc/kune/core/client/state/SessionExpirationManager.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/state/SessionExpirationManager.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/state/SessionExpirationManager.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,34 @@ +package cc.kune.core.client.state; + +import cc.kune.common.client.notify.NotifyUser; +import cc.kune.common.shared.i18n.I18nTranslationService; +import cc.kune.core.client.errors.SessionExpiredEvent; +import cc.kune.core.client.events.UserMustBeLoggedEvent; +import cc.kune.core.client.events.UserMustBeLoggedEvent.UserMustBeLoggedHandler; + +import com.google.gwt.event.shared.EventBus; +import com.google.inject.Inject; + +public class SessionExpirationManager { + @Inject + public SessionExpirationManager(final EventBus eventBus, final Session session, + final I18nTranslationService i18n) { + eventBus.addHandler(UserMustBeLoggedEvent.getType(), new UserMustBeLoggedHandler() { + @Override + public void onUserMustBeLogged(final UserMustBeLoggedEvent event) { + if (session.isLogged()) { + SessionExpiredEvent.fire(eventBus); + } else { + NotifyUser.important(i18n.t("Please sign in or register to collaborate")); + } + } + }); + eventBus.addHandler(SessionExpiredEvent.getType(), new SessionExpiredEvent.SessionExpiredHandler() { + @Override + public void onSessionExpired(final SessionExpiredEvent event) { + NotifyUser.info(i18n.t("Please sign in again")); + } + }); + } + +} Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -27,9 +27,10 @@ import cc.kune.common.client.actions.BeforeActionCollection; import cc.kune.common.client.actions.BeforeActionListener; -import cc.kune.common.client.events.ProgressHideEvent; import cc.kune.common.client.log.Log; +import cc.kune.common.client.notify.ProgressHideEvent; import cc.kune.common.client.utils.Pair; +import cc.kune.core.client.events.GoHomeEvent; import cc.kune.core.client.init.AppStartEvent; import cc.kune.core.client.init.AppStartEvent.AppStartHandler; import cc.kune.core.client.rpcservices.AsyncCallbackSimple; @@ -102,6 +103,12 @@ contentCache.removeCacheOfGroup(event.getState().getStateToken().getGroup()); } }); + eventBus.addHandler(GoHomeEvent.getType(), new GoHomeEvent.GoHomeHandler() { + @Override + public void onGoHome(final GoHomeEvent event) { + gotoDefaultHomepage(); + } + }); } @Override Copied: trunk/src/main/java/cc/kune/core/client/state/StateTokenUtils.java (from rev 1647, trunk/src/main/java/cc/kune/core/shared/dto/StateTokenUtils.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/state/StateTokenUtils.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/state/StateTokenUtils.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,62 @@ +/* + * + * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.state; + +import cc.kune.core.client.state.Session; +import cc.kune.core.shared.domain.utils.StateToken; + +import com.google.inject.Inject; + +public class StateTokenUtils { + + private static final String SEPARATOR = "."; + private final Session session; + + @Inject + public StateTokenUtils(final Session session) { + this.session = session; + } + + public String getPublicUrl(final StateToken token) { + String publicUrl = ""; + + final String group = token.getGroup(); + final String tool = token.getTool(); + final String folder = token.getFolder(); + final String document = token.getDocument(); + + publicUrl += session.getSiteUrl() + "/public"; + + if (group != null) { + publicUrl += "/" + group; + } + if (tool != null) { + publicUrl += SEPARATOR + tool; + } + if (folder != null) { + publicUrl += SEPARATOR + folder; + } + if (document != null) { + publicUrl += SEPARATOR + document; + } + + return publicUrl; + } +} Modified: trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPanel.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPanel.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPanel.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -20,7 +20,7 @@ package cc.kune.core.client.ws.entheader; import cc.kune.common.client.actions.ui.ActionFlowPanel; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip; import cc.kune.common.shared.i18n.I18nTranslationService; import cc.kune.common.shared.utils.UrlParam; Modified: trunk/src/main/java/cc/kune/core/server/mail/FormatedString.java =================================================================== --- trunk/src/main/java/cc/kune/core/server/mail/FormatedString.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/server/mail/FormatedString.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -5,7 +5,8 @@ /** * The Class FormatedString is used to separate, String templates (usually html) * from args (indicated with %s) and also to allow the translation of this - * templates. + * templates. More info + * http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html#syntax */ public class FormatedString { Modified: trunk/src/main/java/cc/kune/core/server/manager/SocialNetworkManager.java =================================================================== --- trunk/src/main/java/cc/kune/core/server/manager/SocialNetworkManager.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/server/manager/SocialNetworkManager.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -25,10 +25,10 @@ import cc.kune.core.client.errors.DefaultException; import cc.kune.core.shared.dto.SocialNetworkRequestResult; import cc.kune.domain.Group; +import cc.kune.domain.ParticipationData; import cc.kune.domain.SocialNetwork; +import cc.kune.domain.SocialNetworkData; import cc.kune.domain.User; -import cc.kune.domain.utils.ParticipationData; -import cc.kune.domain.utils.SocialNetworkData; public interface SocialNetworkManager extends Manager<SocialNetwork, Long> { Modified: trunk/src/main/java/cc/kune/core/server/manager/UserManager.java =================================================================== --- trunk/src/main/java/cc/kune/core/server/manager/UserManager.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/server/manager/UserManager.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -27,7 +27,7 @@ import cc.kune.core.shared.dto.I18nLanguageSimpleDTO; import cc.kune.core.shared.dto.UserDTO; import cc.kune.domain.User; -import cc.kune.domain.utils.UserBuddiesData; +import cc.kune.domain.UserBuddiesData; public interface UserManager { User changePasswd(Long userId, String oldPassword, String newPassword); Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/KuneWaveManagerDefault.java =================================================================== --- trunk/src/main/java/cc/kune/core/server/manager/impl/KuneWaveManagerDefault.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/server/manager/impl/KuneWaveManagerDefault.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -34,8 +34,8 @@ import cc.kune.core.shared.domain.AccessRol; import cc.kune.domain.Group; import cc.kune.domain.User; +import cc.kune.domain.UserBuddiesData; import cc.kune.domain.finders.GroupFinder; -import cc.kune.domain.utils.UserBuddiesData; import cc.kune.wave.server.KuneWaveService; import cc.kune.wave.server.KuneWaveUtils; import cc.kune.wave.server.ParticipantUtils; Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/SocialNetworkManagerDefault.java =================================================================== --- trunk/src/main/java/cc/kune/core/server/manager/impl/SocialNetworkManagerDefault.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/server/manager/impl/SocialNetworkManagerDefault.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -41,12 +41,12 @@ import cc.kune.core.shared.dto.GroupType; import cc.kune.core.shared.dto.SocialNetworkRequestResult; import cc.kune.domain.Group; +import cc.kune.domain.ParticipationData; import cc.kune.domain.SocialNetwork; +import cc.kune.domain.SocialNetworkData; import cc.kune.domain.User; +import cc.kune.domain.UserBuddiesData; import cc.kune.domain.finders.GroupFinder; -import cc.kune.domain.utils.ParticipationData; -import cc.kune.domain.utils.SocialNetworkData; -import cc.kune.domain.utils.UserBuddiesData; import com.google.inject.Inject; import com.google.inject.Provider; Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java =================================================================== --- trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -70,8 +70,8 @@ import cc.kune.domain.I18nCountry; import cc.kune.domain.I18nLanguage; import cc.kune.domain.User; +import cc.kune.domain.UserBuddiesData; import cc.kune.domain.finders.UserFinder; -import cc.kune.domain.utils.UserBuddiesData; import cc.kune.wave.server.CustomUserRegistrationServlet; import cc.kune.wave.server.KuneWaveService; import cc.kune.wave.server.ParticipantUtils; Modified: trunk/src/main/java/cc/kune/core/server/state/StateAbstract.java =================================================================== --- trunk/src/main/java/cc/kune/core/server/state/StateAbstract.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/server/state/StateAbstract.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -24,10 +24,10 @@ import cc.kune.core.shared.domain.utils.AccessRights; import cc.kune.core.shared.domain.utils.StateToken; import cc.kune.domain.Group; +import cc.kune.domain.ParticipationData; import cc.kune.domain.SocialNetwork; -import cc.kune.domain.utils.ParticipationData; -import cc.kune.domain.utils.SocialNetworkData; -import cc.kune.domain.utils.UserBuddiesData; +import cc.kune.domain.SocialNetworkData; +import cc.kune.domain.UserBuddiesData; public abstract class StateAbstract { Modified: trunk/src/main/java/cc/kune/core/server/users/UserInfoServiceDefault.java =================================================================== --- trunk/src/main/java/cc/kune/core/server/users/UserInfoServiceDefault.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/server/users/UserInfoServiceDefault.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -25,8 +25,8 @@ import cc.kune.core.server.manager.SocialNetworkManager; import cc.kune.domain.Content; import cc.kune.domain.Group; +import cc.kune.domain.ParticipationData; import cc.kune.domain.User; -import cc.kune.domain.utils.ParticipationData; import com.google.inject.Inject; import com.google.inject.Singleton; Modified: trunk/src/main/java/cc/kune/core/shared/FileConstants.java =================================================================== --- trunk/src/main/java/cc/kune/core/shared/FileConstants.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/shared/FileConstants.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -29,10 +29,7 @@ public static final String DOWNLOADSERVLET = ASITE_PREFIX + "servlets/FileDownloadManager"; public final static String FILENAME = "filename"; public final static String GROUP_LOGO_FIELD = "k-glogov-ff"; - // public static final String GROUP_NO_AVATAR_IMAGE = ASITE_PREFIX + - // "images/group-def-icon.png"; public static final String GROUP_NO_AVATAR_IMAGE = "others/defgroup.gif"; - public static final String GROUP_NO_AVATAR_IMAGE_PATH = ASITE_PREFIX + GROUP_NO_AVATAR_IMAGE; public final static String HASH = "hash"; public final static String IMGSIZE = "imgsize"; @@ -41,8 +38,7 @@ public final static int LOGO_MIN_HEIGHT = 28; public final static int LOGO_MIN_WIDTH = 468; public static final String LOGODOWNLOADSERVLET = ASITE_PREFIX + "servlets/EntityLogoDownloadManager"; - public final static String PERSON_NO_AVATAR_IMAGE = "images/unknown.jpg"; - public final static String PERSON_NO_AVATAR_IMAGE_PATH = ASITE_PREFIX + PERSON_NO_AVATAR_IMAGE; + public final static String PERSON_NO_AVATAR_IMAGE = "others/unknown.jpg"; public final static String TOKEN = "token"; public final static String TYPE_ID = "typeid"; public final static String USER_LOGO_FIELD = "k-ulogov-ff"; Deleted: trunk/src/main/java/cc/kune/core/shared/dto/StateTokenUtils.java =================================================================== --- trunk/src/main/java/cc/kune/core/shared/dto/StateTokenUtils.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/shared/dto/StateTokenUtils.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -1,62 +0,0 @@ -/* - * - * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package cc.kune.core.shared.dto; - -import cc.kune.core.client.state.Session; -import cc.kune.core.shared.domain.utils.StateToken; - -import com.google.inject.Inject; - -public class StateTokenUtils { - - private static final String SEPARATOR = "."; - private final Session session; - - @Inject - public StateTokenUtils(final Session session) { - this.session = session; - } - - public String getPublicUrl(final StateToken token) { - String publicUrl = ""; - - final String group = token.getGroup(); - final String tool = token.getTool(); - final String folder = token.getFolder(); - final String document = token.getDocument(); - - publicUrl += session.getSiteUrl() + "/public"; - - if (group != null) { - publicUrl += "/" + group; - } - if (tool != null) { - publicUrl += SEPARATOR + tool; - } - if (folder != null) { - publicUrl += SEPARATOR + folder; - } - if (document != null) { - publicUrl += SEPARATOR + document; - } - - return publicUrl; - } -} Modified: trunk/src/main/java/cc/kune/core/shared/utils/SharedFileDownloadUtils.java =================================================================== --- trunk/src/main/java/cc/kune/core/shared/utils/SharedFileDownloadUtils.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/core/shared/utils/SharedFileDownloadUtils.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -21,8 +21,8 @@ public String getGroupLogo(final GroupDTO group) { return prefix + (group.hasLogo() ? getLogoImageUrl(group.getShortName()) - : group.isPersonal() ? FileConstants.PERSON_NO_AVATAR_IMAGE_PATH - : FileConstants.GROUP_NO_AVATAR_IMAGE_PATH); + : group.isPersonal() ? FileConstants.PERSON_NO_AVATAR_IMAGE + : FileConstants.GROUP_NO_AVATAR_IMAGE); } public String getLogoAvatarHtml(final String groupName, final boolean groupHasLogo, @@ -49,8 +49,7 @@ public String getUserAvatar(final UserSimpleDTO user) { return prefix - + (user.hasLogo() ? getLogoImageUrl(user.getShortName()) - : FileConstants.PERSON_NO_AVATAR_IMAGE_PATH); + + (user.hasLogo() ? getLogoImageUrl(user.getShortName()) : FileConstants.PERSON_NO_AVATAR_IMAGE); } } \ No newline at end of file Copied: trunk/src/main/java/cc/kune/domain/ParticipationData.java (from rev 1647, trunk/src/main/java/cc/kune/domain/utils/ParticipationData.java) =================================================================== --- trunk/src/main/java/cc/kune/domain/ParticipationData.java (rev 0) +++ trunk/src/main/java/cc/kune/domain/ParticipationData.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,54 @@ +/* + * + * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.domain; + +import java.util.Set; + + +public class ParticipationData { + private Set<Group> groupsIsAdmin; + private Set<Group> groupsIsCollab; + + public ParticipationData() { + this(null, null); + } + + public ParticipationData(final Set<Group> groupsIsAdmin, final Set<Group> groupsIsCollab) { + this.groupsIsAdmin = groupsIsAdmin; + this.groupsIsCollab = groupsIsCollab; + } + + public Set<Group> getGroupsIsAdmin() { + return groupsIsAdmin; + } + + public Set<Group> getGroupsIsCollab() { + return groupsIsCollab; + } + + public void setGroupsIsAdmin(final Set<Group> groupsIsAdmin) { + this.groupsIsAdmin = groupsIsAdmin; + } + + public void setGroupsIsCollab(final Set<Group> groupsIsCollab) { + this.groupsIsCollab = groupsIsCollab; + } + +} Copied: trunk/src/main/java/cc/kune/domain/SocialNetworkData.java (from rev 1647, trunk/src/main/java/cc/kune/domain/utils/SocialNetworkData.java) =================================================================== --- trunk/src/main/java/cc/kune/domain/SocialNetworkData.java (rev 0) +++ trunk/src/main/java/cc/kune/domain/SocialNetworkData.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,133 @@ +/* + * + * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.domain; + +import cc.kune.core.shared.domain.SocialNetworkVisibility; +import cc.kune.core.shared.domain.UserSNetVisibility; +import cc.kune.core.shared.domain.utils.AccessRights; + +public class SocialNetworkData { + private SocialNetworkVisibility socialNetworkVisibility; + private SocialNetwork groupMembers; + private ParticipationData userParticipation; + private UserSNetVisibility userBuddiesVisibility; + private UserBuddiesData userBuddies; + private AccessRights groupRights; + private boolean isBuddiesVisible; + private boolean isMembersVisible; + + public SocialNetworkData() { + this(null, null, null, null, null, null, false, false); + } + + public SocialNetworkData(SocialNetworkVisibility socialNetworkVisibility, SocialNetwork groupMembers, + ParticipationData userParticipation, UserSNetVisibility userBuddiesVisibility, + UserBuddiesData userBuddies, AccessRights groupRights, boolean isBuddiesVisible, boolean isMembersVisible) { + this.socialNetworkVisibility = socialNetworkVisibility; + this.groupMembers = groupMembers; + this.userParticipation = userParticipation; + this.userBuddiesVisibility = userBuddiesVisibility; + this.userBuddies = userBuddies; + this.groupRights = groupRights; + this.isBuddiesVisible = isBuddiesVisible; + this.isMembersVisible = isMembersVisible; + } + + public SocialNetwork getGroupMembers() { + return groupMembers; + } + + public AccessRights getGroupRights() { + return groupRights; + } + + public boolean getIsBuddiesVisible() { + return isBuddiesVisible; + } + + public boolean getIsMembersVisible() { + return isMembersVisible; + } + + public SocialNetworkVisibility getSocialNetworkVisibility() { + return socialNetworkVisibility; + } + + public UserBuddiesData getUserBuddies() { + return userBuddies; + } + + public UserSNetVisibility getUserBuddiesVisibility() { + return userBuddiesVisibility; + } + + public ParticipationData getUserParticipation() { + return userParticipation; + } + + public boolean isBuddiesVisible() { + return isBuddiesVisible; + } + + public boolean isMembersVisible() { + return isMembersVisible; + } + + public void setBuddiesVisible(boolean isBuddiesVisible) { + this.isBuddiesVisible = isBuddiesVisible; + } + + public void setGroupMembers(SocialNetwork groupMembers) { + this.groupMembers = groupMembers; + } + + public void setGroupRights(AccessRights groupRights) { + this.groupRights = groupRights; + } + + public void setIsBuddiesVisible(boolean isBuddiesVisible) { + setBuddiesVisible(isBuddiesVisible); + } + + public void setIsMembersVisible(boolean isMembersVisible) { + setMembersVisible(isMembersVisible); + } + + public void setMembersVisible(boolean isMembersVisible) { + this.isMembersVisible = isMembersVisible; + } + + public void setSocialNetworkVisibility(SocialNetworkVisibility socialNetworkVisibility) { + this.socialNetworkVisibility = socialNetworkVisibility; + } + + public void setUserBuddies(UserBuddiesData userBuddies) { + this.userBuddies = userBuddies; + } + + public void setUserBuddiesVisibility(UserSNetVisibility userBuddiesVisibility) { + this.userBuddiesVisibility = userBuddiesVisibility; + } + + public void setUserParticipation(ParticipationData userParticipation) { + this.userParticipation = userParticipation; + } + +} Copied: trunk/src/main/java/cc/kune/domain/UserBuddiesData.java (from rev 1647, trunk/src/main/java/cc/kune/domain/utils/UserBuddiesData.java) =================================================================== --- trunk/src/main/java/cc/kune/domain/UserBuddiesData.java (rev 0) +++ trunk/src/main/java/cc/kune/domain/UserBuddiesData.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -0,0 +1,67 @@ +/* + * + * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + \*/ +package cc.kune.domain; + +import java.util.ArrayList; +import java.util.List; + + +public class UserBuddiesData { + + public static final UserBuddiesData EMPTY = new UserBuddiesData(); + + private List<User> buddies; + private int otherExtBuddies; + + public UserBuddiesData() { + otherExtBuddies = 0; + buddies = new ArrayList<User>(); + } + + public boolean contains(final String shortName) { + for (User buddie : buddies) { + if (buddie.getShortName().equals(shortName)) { + return true; + } + } + return false; + } + + public List<User> getBuddies() { + return buddies; + } + + public int getOtherExtBuddies() { + return otherExtBuddies; + } + + public void setBuddies(final List<User> buddies) { + this.buddies = buddies; + } + + public void setOtherExtBuddies(final int otherExtBuddies) { + this.otherExtBuddies = otherExtBuddies; + } + + @Override + public String toString() { + return "UserBuddiesData[ext: " + otherExtBuddies + " / int: " + buddies + "]"; + } +} Deleted: trunk/src/main/java/cc/kune/domain/utils/ParticipationData.java =================================================================== --- trunk/src/main/java/cc/kune/domain/utils/ParticipationData.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/domain/utils/ParticipationData.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -1,55 +0,0 @@ -/* - * - * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package cc.kune.domain.utils; - -import java.util.Set; - -import cc.kune.domain.Group; - -public class ParticipationData { - private Set<Group> groupsIsAdmin; - private Set<Group> groupsIsCollab; - - public ParticipationData() { - this(null, null); - } - - public ParticipationData(final Set<Group> groupsIsAdmin, final Set<Group> groupsIsCollab) { - this.groupsIsAdmin = groupsIsAdmin; - this.groupsIsCollab = groupsIsCollab; - } - - public Set<Group> getGroupsIsAdmin() { - return groupsIsAdmin; - } - - public Set<Group> getGroupsIsCollab() { - return groupsIsCollab; - } - - public void setGroupsIsAdmin(final Set<Group> groupsIsAdmin) { - this.groupsIsAdmin = groupsIsAdmin; - } - - public void setGroupsIsCollab(final Set<Group> groupsIsCollab) { - this.groupsIsCollab = groupsIsCollab; - } - -} Deleted: trunk/src/main/java/cc/kune/domain/utils/SocialNetworkData.java =================================================================== --- trunk/src/main/java/cc/kune/domain/utils/SocialNetworkData.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/domain/utils/SocialNetworkData.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -1,134 +0,0 @@ -/* - * - * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package cc.kune.domain.utils; - -import cc.kune.core.shared.domain.SocialNetworkVisibility; -import cc.kune.core.shared.domain.UserSNetVisibility; -import cc.kune.core.shared.domain.utils.AccessRights; -import cc.kune.domain.SocialNetwork; - -public class SocialNetworkData { - private SocialNetworkVisibility socialNetworkVisibility; - private SocialNetwork groupMembers; - private ParticipationData userParticipation; - private UserSNetVisibility userBuddiesVisibility; - private UserBuddiesData userBuddies; - private AccessRights groupRights; - private boolean isBuddiesVisible; - private boolean isMembersVisible; - - public SocialNetworkData() { - this(null, null, null, null, null, null, false, false); - } - - public SocialNetworkData(SocialNetworkVisibility socialNetworkVisibility, SocialNetwork groupMembers, - ParticipationData userParticipation, UserSNetVisibility userBuddiesVisibility, - UserBuddiesData userBuddies, AccessRights groupRights, boolean isBuddiesVisible, boolean isMembersVisible) { - this.socialNetworkVisibility = socialNetworkVisibility; - this.groupMembers = groupMembers; - this.userParticipation = userParticipation; - this.userBuddiesVisibility = userBuddiesVisibility; - this.userBuddies = userBuddies; - this.groupRights = groupRights; - this.isBuddiesVisible = isBuddiesVisible; - this.isMembersVisible = isMembersVisible; - } - - public SocialNetwork getGroupMembers() { - return groupMembers; - } - - public AccessRights getGroupRights() { - return groupRights; - } - - public boolean getIsBuddiesVisible() { - return isBuddiesVisible; - } - - public boolean getIsMembersVisible() { - return isMembersVisible; - } - - public SocialNetworkVisibility getSocialNetworkVisibility() { - return socialNetworkVisibility; - } - - public UserBuddiesData getUserBuddies() { - return userBuddies; - } - - public UserSNetVisibility getUserBuddiesVisibility() { - return userBuddiesVisibility; - } - - public ParticipationData getUserParticipation() { - return userParticipation; - } - - public boolean isBuddiesVisible() { - return isBuddiesVisible; - } - - public boolean isMembersVisible() { - return isMembersVisible; - } - - public void setBuddiesVisible(boolean isBuddiesVisible) { - this.isBuddiesVisible = isBuddiesVisible; - } - - public void setGroupMembers(SocialNetwork groupMembers) { - this.groupMembers = groupMembers; - } - - public void setGroupRights(AccessRights groupRights) { - this.groupRights = groupRights; - } - - public void setIsBuddiesVisible(boolean isBuddiesVisible) { - setBuddiesVisible(isBuddiesVisible); - } - - public void setIsMembersVisible(boolean isMembersVisible) { - setMembersVisible(isMembersVisible); - } - - public void setMembersVisible(boolean isMembersVisible) { - this.isMembersVisible = isMembersVisible; - } - - public void setSocialNetworkVisibility(SocialNetworkVisibility socialNetworkVisibility) { - this.socialNetworkVisibility = socialNetworkVisibility; - } - - public void setUserBuddies(UserBuddiesData userBuddies) { - this.userBuddies = userBuddies; - } - - public void setUserBuddiesVisibility(UserSNetVisibility userBuddiesVisibility) { - this.userBuddiesVisibility = userBuddiesVisibility; - } - - public void setUserParticipation(ParticipationData userParticipation) { - this.userParticipation = userParticipation; - } - -} Deleted: trunk/src/main/java/cc/kune/domain/utils/UserBuddiesData.java =================================================================== --- trunk/src/main/java/cc/kune/domain/utils/UserBuddiesData.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/domain/utils/UserBuddiesData.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -1,68 +0,0 @@ -/* - * - * Copyright (C) 2007-2011 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - \*/ -package cc.kune.domain.utils; - -import java.util.ArrayList; -import java.util.List; - -import cc.kune.domain.User; - -public class UserBuddiesData { - - public static final UserBuddiesData EMPTY = new UserBuddiesData(); - - private List<User> buddies; - private int otherExtBuddies; - - public UserBuddiesData() { - otherExtBuddies = 0; - buddies = new ArrayList<User>(); - } - - public boolean contains(final String shortName) { - for (User buddie : buddies) { - if (buddie.getShortName().equals(shortName)) { - return true; - } - } - return false; - } - - public List<User> getBuddies() { - return buddies; - } - - public int getOtherExtBuddies() { - return otherExtBuddies; - } - - public void setBuddies(final List<User> buddies) { - this.buddies = buddies; - } - - public void setOtherExtBuddies(final int otherExtBuddies) { - this.otherExtBuddies = otherExtBuddies; - } - - @Override - public String toString() { - return "UserBuddiesData[ext: " + otherExtBuddies + " / int: " + buddies + "]"; - } -} Modified: trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPanel.java =================================================================== --- trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPanel.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPanel.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -3,7 +3,7 @@ import java.util.ArrayList; import java.util.Date; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.shared.i18n.I18nTranslationService; import cc.kune.core.client.dnd.FolderViewerDropController; import cc.kune.core.client.dnd.KuneDragController; Modified: trunk/src/main/java/cc/kune/gspace/client/themes/GSpaceThemeSelectorPanel.java =================================================================== --- trunk/src/main/java/cc/kune/gspace/client/themes/GSpaceThemeSelectorPanel.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/gspace/client/themes/GSpaceThemeSelectorPanel.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -21,7 +21,7 @@ import cc.kune.common.client.actions.ui.ActionExtensibleView; import cc.kune.common.client.actions.ui.ActionFlowPanel; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.shared.i18n.I18nTranslationService; import com.google.inject.Inject; Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsTablePanel.java =================================================================== --- trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsTablePanel.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsTablePanel.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -22,7 +22,7 @@ import org.waveprotocol.wave.client.common.util.DateUtils; import cc.kune.common.client.actions.ui.ActionSimplePanel; -import cc.kune.common.client.actions.ui.bind.GuiProvider; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection; import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip; import cc.kune.common.client.actions.ui.descrip.MenuDescriptor; Modified: trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java =================================================================== --- trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -20,8 +20,8 @@ package cc.kune.pspace.client; import cc.kune.common.client.actions.ui.ActionFlowPanel; +import cc.kune.common.client.actions.ui.GuiProvider; import cc.kune.common.client.actions.ui.IsActionExtensible; -import cc.kune.common.client.actions.ui.bind.GuiProvider; import cc.kune.common.shared.i18n.I18nTranslationService; import cc.kune.core.client.resources.CoreResources; import cc.kune.gspace.client.GSpaceArmor; Modified: trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java =================================================================== --- trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -27,13 +27,13 @@ import cc.kune.core.client.state.StateChangedEvent; import cc.kune.core.client.state.StateChangedEvent.StateChangedHandler; import cc.kune.core.client.state.StateManager; +import cc.kune.core.client.state.StateTokenUtils; import cc.kune.core.shared.domain.ContentStatus; import cc.kune.core.shared.domain.utils.StateToken; import cc.kune.core.shared.dto.GroupListDTO; import cc.kune.core.shared.dto.StateAbstractDTO; import cc.kune.core.shared.dto.StateContainerDTO; import cc.kune.core.shared.dto.StateContentDTO; -import cc.kune.core.shared.dto.StateTokenUtils; import com.google.gwt.event.shared.EventBus; import com.google.gwt.user.client.ui.HasText; Modified: trunk/src/main/java/cc/kune/wave/client/WebClient.java =================================================================== --- trunk/src/main/java/cc/kune/wave/client/WebClient.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/cc/kune/wave/client/WebClient.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -71,6 +71,7 @@ import cc.kune.common.client.notify.NotifyUser; import cc.kune.common.shared.i18n.I18nTranslationService; import cc.kune.core.client.errors.DefaultException; +import cc.kune.core.client.events.StackErrorEvent; import cc.kune.core.client.sitebar.spaces.Space; import cc.kune.core.client.sitebar.spaces.SpaceConfEvent; import cc.kune.core.client.state.SiteTokens; @@ -278,6 +279,19 @@ this.i18n = i18n; searchPanel = new SearchPanelWidget(new SearchPanelRenderer(profiles)); ErrorHandler.install(); + eventBus.addHandler(StackErrorEvent.getType(), new StackErrorEvent.StackErrorHandler() { + @Override + public void onStackError(final StackErrorEvent event) { + getStackTraceAsync(event.getException(), new Accessor<SafeHtml>() { + @Override + public void use(final SafeHtml stack) { + final String stackAsString = stack.asString().replace("<br>", "\n"); + NotifyUser.logError(stackAsString); + cc.kune.common.client.log.Log.error("Stack: " + stackAsString); + } + }); + } + }); ClientEvents.get().addWaveCreationEventHandler( new WaveCreationEventHandler() { Modified: trunk/src/main/java/com/google/wave/splash/web/template/ThreadedWaveRenderer.java =================================================================== --- trunk/src/main/java/com/google/wave/splash/web/template/ThreadedWaveRenderer.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/java/com/google/wave/splash/web/template/ThreadedWaveRenderer.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -153,7 +153,7 @@ avatar = new Url(FileConstants.AVATARDOWNLOADSERVLET, new UrlParam(FileConstants.USERNAME, address.split("@")[0])).toString(); } else { - avatar = FileConstants.PERSON_NO_AVATAR_IMAGE_PATH; + avatar = FileConstants.PERSON_NO_AVATAR_IMAGE; } return avatar; } Modified: trunk/src/main/resources/dozerBeanMapping.xml =================================================================== --- trunk/src/main/resources/dozerBeanMapping.xml 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/main/resources/dozerBeanMapping.xml 2012-01-02 20:12:42 UTC (rev 1653) @@ -187,7 +187,7 @@ </mapping> <mapping> <class-a> cc.kune.core.shared.dto.ParticipationDataDTO </class-a> - <class-b> cc.kune.domain.utils.ParticipationData </class-b> + <class-b> cc.kune.domain.ParticipationData </class-b> </mapping> <mapping> <class-a> cc.kune.core.shared.dto.I18nLanguageDTO </class-a> @@ -231,11 +231,11 @@ </mapping> <mapping> <class-a> cc.kune.core.shared.dto.UserBuddiesDataDTO </class-a> - <class-b> cc.kune.domain.utils.UserBuddiesData </class-b> + <class-b> cc.kune.domain.UserBuddiesData </class-b> </mapping> <mapping> <class-a> cc.kune.core.shared.dto.SocialNetworkDataDTO </class-a> - <class-b> cc.kune.domain.utils.SocialNetworkData </class-b> + <class-b> cc.kune.domain.SocialNetworkData </class-b> </mapping> <mapping> <class-a> cc.kune.core.shared.dto.HomeStatsDTO </class-a> Modified: trunk/src/test/java/cc/kune/core/server/manager/impl/SocialNetworkManagerMoreTest.java =================================================================== --- trunk/src/test/java/cc/kune/core/server/manager/impl/SocialNetworkManagerMoreTest.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/test/java/cc/kune/core/server/manager/impl/SocialNetworkManagerMoreTest.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -33,8 +33,8 @@ import cc.kune.core.shared.domain.GroupListMode; import cc.kune.core.shared.dto.GroupType; import cc.kune.core.shared.dto.SocialNetworkRequestResult; +import cc.kune.domain.ParticipationData; import cc.kune.domain.User; -import cc.kune.domain.utils.ParticipationData; import com.google.inject.Inject; Modified: trunk/src/test/java/cc/kune/core/server/mapper/MapperTest.java =================================================================== --- trunk/src/test/java/cc/kune/core/server/mapper/MapperTest.java 2012-01-01 17:58:40 UTC (rev 1652) +++ trunk/src/test/java/cc/kune/core/server/mapper/MapperTest.java 2012-01-02 20:12:42 UTC (rev 1653) @@ -61,12 +61,12 @@ import cc.kune.domain.Group; import cc.kune.domain.GroupList; import cc.kune.domain.License; +import cc.kune.domain.ParticipationData; import cc.kune.domain.Revision; import cc.kune.domain.SocialNetwork; +import cc.kune.domain.SocialNetworkData; import cc.kune.domain.User; -import cc.kune.domain.utils.ParticipationData; -import cc.kune.domain.utils.SocialNetworkData; -import cc.kune.domain.utils.UserBuddiesData; +import cc.kune.domain.UserBuddiesData; import com.google.inject.Inject;
participants (1)
-
Vicente J. Ruiz Jurado