[kune-commits] r777 - in trunk: . src/main/java/org/ourproject/kune/chat/client src/main/java/org/ourproject/kune/docs/client src/main/java/org/ourproject/kune/platf/client src/main/java/org/ourproject/kune/platf/client/actions src/main/java/org/ourproject/kune/platf/client/services

vjrj vjrj at ourproject.org
Tue Jun 10 10:54:48 CEST 2008


Author: vjrj
Date: 2008-06-10 10:54:46 +0200 (Tue, 10 Jun 2008)
New Revision: 777

Modified:
   trunk/pom.xml
   trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java
   trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java
   trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java
   trunk/src/main/java/org/ourproject/kune/platf/client/PlatformClientModule.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/GotoAction.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/GotoContainerAction.java
   trunk/src/main/java/org/ourproject/kune/platf/client/services/Kune.java
   trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
Log:
modular update

Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml	2008-06-05 19:21:44 UTC (rev 776)
+++ trunk/pom.xml	2008-06-10 08:54:46 UTC (rev 777)
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project>
   <modelVersion>4.0.0</modelVersion>
-  <groupId>org.ourproject.kune</groupId>
-  <artifactId>org.ourproject.kune</artifactId>
+  <groupId>org.ourproject</groupId>
+  <artifactId>kune</artifactId>
   <packaging>jar</packaging>
   <version>0.0.4</version>
   <description>kune free/open/libre collaboration platform</description>
-  <name>Kune</name>
+  <name>kune</name>
   <url>http://kune.ourproject.org</url>
 
   <dependencies>
@@ -272,11 +272,16 @@
       <artifactId>emite</artifactId>
       <version>0.2.8</version>
     </dependency>
-         <dependency>
+    <dependency>
       <groupId>com.calclab.emite</groupId>
       <artifactId>emiteuimodule</artifactId>
       <version>0.2.8</version>
     </dependency>
+    <dependency>
+      <groupId>com.calclab.emite</groupId>
+      <artifactId>emitemodular</artifactId>
+      <version>0.2.8</version>
+    </dependency>
   </dependencies>
   <!-- http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/index.html -->
   <repositories>

Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java	2008-06-05 19:21:44 UTC (rev 776)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientNewModule.java	2008-06-10 08:54:46 UTC (rev 777)
@@ -5,36 +5,36 @@
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
 
-import com.calclab.emite.client.modular.Container;
-import com.calclab.emite.client.modular.Module;
-import com.calclab.emite.client.modular.ModuleBuilder;
-import com.calclab.emite.client.modular.Provider;
-import com.calclab.emite.client.modular.Scopes;
 import com.calclab.emiteuimodule.client.EmiteUIDialog;
+import com.calclab.modular.client.container.Container;
+import com.calclab.modular.client.container.Provider;
+import com.calclab.modular.client.modules.Module;
+import com.calclab.modular.client.modules.ModuleBuilder;
+import com.calclab.modular.client.scopes.SingletonScope;
 
 public class ChatClientNewModule implements Module {
     public static ChatClientTool getChatClientTool(final Container components) {
-        return components.getInstance(ChatClientTool.class);
+	return components.getInstance(ChatClientTool.class);
     }
 
     public Class<? extends Module> getType() {
-        return ChatClientNewModule.class;
+	return ChatClientNewModule.class;
     }
 
     public void onLoad(final ModuleBuilder builder) {
-        builder.registerProvider(ChatClientTool.class, new Provider<ChatClientTool>() {
-            public ChatClientTool get() {
-                return new ChatClientTool(builder.getInstance(I18nUITranslationService.class), builder
-                        .getInstance(EmiteUIDialog.class));
-            }
-        }, Scopes.SINGLETON_EAGER);
+	builder.registerProvider(ChatClientTool.class, new Provider<ChatClientTool>() {
+	    public ChatClientTool get() {
+		return new ChatClientTool(builder.getInstance(I18nUITranslationService.class), builder
+			.getInstance(EmiteUIDialog.class));
+	    }
+	}, SingletonScope.class);
 
-        KunePlatform platform = builder.getInstance(KunePlatform.class);
-        ChatClientTool chatClientTool = getChatClientTool(builder);
-        platform.addTool(chatClientTool);
+	KunePlatform platform = builder.getInstance(KunePlatform.class);
+	ChatClientTool chatClientTool = getChatClientTool(builder);
+	platform.addTool(chatClientTool);
 
-        Session session = builder.getInstance(Session.class);
-        StateManager stateManager = builder.getInstance(StateManager.class);
-        platform.install(new ChatClientModule(session, stateManager, chatClientTool));
+	Session session = builder.getInstance(Session.class);
+	StateManager stateManager = builder.getInstance(StateManager.class);
+	platform.install(new ChatClientModule(session, stateManager, chatClientTool));
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java	2008-06-05 19:21:44 UTC (rev 776)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatEngineXmpp.java	2008-06-10 08:54:46 UTC (rev 777)
@@ -23,13 +23,13 @@
 
 import org.ourproject.kune.platf.client.services.I18nTranslationService;
 
-import com.calclab.emite.client.core.signal.Listener;
 import com.calclab.emite.client.im.roster.RosterManager.SubscriptionMode;
 import com.calclab.emite.client.xmpp.stanzas.XmppURI;
 import com.calclab.emiteuimodule.client.EmiteUIDialog;
 import com.calclab.emiteuimodule.client.UserChatOptions;
 import com.calclab.emiteuimodule.client.params.AvatarProvider;
 import com.calclab.emiteuimodule.client.status.OwnPresence.OwnStatus;
+import com.calclab.modular.client.signal.Slot;
 import com.google.gwt.user.client.Window;
 
 class ChatEngineXmpp implements ChatEngine {
@@ -38,56 +38,56 @@
     private final I18nTranslationService i18n;
 
     public ChatEngineXmpp(final EmiteUIDialog emiteUIDialog, final ChatOptions chatOptions,
-            final I18nTranslationService i18n) {
-        this.emiteDialog = emiteUIDialog;
-        this.chatOptions = chatOptions;
-        this.i18n = i18n;
+	    final I18nTranslationService i18n) {
+	this.emiteDialog = emiteUIDialog;
+	this.chatOptions = chatOptions;
+	this.i18n = i18n;
     }
 
     public ChatOptions getChatOptions() {
-        return chatOptions;
+	return chatOptions;
     }
 
     public void joinRoom(final String roomName, final String userAlias) {
-        XmppURI roomURI = XmppURI.uri(roomName + "@" + chatOptions.roomHost + "/"
-                + XmppURI.jid(chatOptions.userOptions.getUserJid()));
-        emiteDialog.joinRoom(roomURI);
+	XmppURI roomURI = XmppURI.uri(roomName + "@" + chatOptions.roomHost + "/"
+		+ XmppURI.jid(chatOptions.userOptions.getUserJid()));
+	emiteDialog.joinRoom(roomURI);
     }
 
     public void login(final String chatName, final String chatPassword) {
-        final String resource = "emiteui-" + new Date().getTime() + "-kune"; // +
-        // getGwtMetaProperty(GWT_PROPERTY_RELEASE);
-        // FIXME, get this from user profile
-        final UserChatOptions userChatOptions = new UserChatOptions(chatName + "@" + chatOptions.domain, chatPassword,
-                resource, "blue", SubscriptionMode.autoAcceptAll, true);
-        // FIXME: Avatar provider
-        final AvatarProvider avatarProvider = new AvatarProvider() {
-            public String getAvatarURL(XmppURI userURI) {
-                return "images/person-def.gif";
-            }
-        };
+	final String resource = "emiteui-" + new Date().getTime() + "-kune"; // +
+	// getGwtMetaProperty(GWT_PROPERTY_RELEASE);
+	// FIXME, get this from user profile
+	final UserChatOptions userChatOptions = new UserChatOptions(chatName + "@" + chatOptions.domain, chatPassword,
+		resource, "blue", SubscriptionMode.autoAcceptAll, true);
+	// FIXME: Avatar provider
+	final AvatarProvider avatarProvider = new AvatarProvider() {
+	    public String getAvatarURL(XmppURI userURI) {
+		return "images/person-def.gif";
+	    }
+	};
 
-        final String initialWindowTitle = Window.getTitle();
-        chatOptions.userOptions = userChatOptions;
-        emiteDialog.start(userChatOptions, chatOptions.httpBase, chatOptions.roomHost, avatarProvider, i18n.t("Chat"));
-        emiteDialog.show(OwnStatus.online);
-        // emiteDialog.hide();
-        emiteDialog.onChatAttended(new Listener<String>() {
-            public void onEvent(final String parameter) {
-                Window.setTitle(initialWindowTitle);
-            }
-        });
-        emiteDialog.onChatUnattendedWithActivity(new Listener<String>() {
-            public void onEvent(final String chatTitle) {
-                Window.setTitle("(* " + chatTitle + ") " + initialWindowTitle);
-            }
-        });
+	final String initialWindowTitle = Window.getTitle();
+	chatOptions.userOptions = userChatOptions;
+	emiteDialog.start(userChatOptions, chatOptions.httpBase, chatOptions.roomHost, avatarProvider, i18n.t("Chat"));
+	emiteDialog.show(OwnStatus.online);
+	// emiteDialog.hide();
+	emiteDialog.onChatAttended(new Slot<String>() {
+	    public void onEvent(final String parameter) {
+		Window.setTitle(initialWindowTitle);
+	    }
+	});
+	emiteDialog.onChatUnattendedWithActivity(new Slot<String>() {
+	    public void onEvent(final String chatTitle) {
+		Window.setTitle("(* " + chatTitle + ") " + initialWindowTitle);
+	    }
+	});
     }
 
     public void logout() {
-        if (!emiteDialog.isDialogNotStarted()) {
-            emiteDialog.closeAllChats(false);
-            emiteDialog.setOwnPresence(OwnStatus.offline);
-        }
+	if (!emiteDialog.isDialogNotStarted()) {
+	    emiteDialog.closeAllChats(false);
+	    emiteDialog.setOwnPresence(OwnStatus.offline);
+	}
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java	2008-06-05 19:21:44 UTC (rev 776)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientNewModule.java	2008-06-10 08:54:46 UTC (rev 777)
@@ -7,44 +7,44 @@
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
 
-import com.calclab.emite.client.modular.Container;
-import com.calclab.emite.client.modular.Module;
-import com.calclab.emite.client.modular.ModuleBuilder;
-import com.calclab.emite.client.modular.Provider;
-import com.calclab.emite.client.modular.Scopes;
+import com.calclab.modular.client.container.Container;
+import com.calclab.modular.client.container.Provider;
+import com.calclab.modular.client.modules.Module;
+import com.calclab.modular.client.modules.ModuleBuilder;
+import com.calclab.modular.client.scopes.SingletonScope;
 
 public class DocumentClientNewModule implements Module {
     public static DocumentClientTool getDocumentClientTool(final Container components) {
-        return components.getInstance(DocumentClientTool.class);
+	return components.getInstance(DocumentClientTool.class);
     }
 
     public Class<? extends Module> getType() {
-        return DocumentClientNewModule.class;
+	return DocumentClientNewModule.class;
     }
 
     public void onLoad(final ModuleBuilder builder) {
-        builder.registerProvider(DocumentFactory.class, new Provider<DocumentFactory>() {
-            public DocumentFactory get() {
-                return new DocumentFactory(builder.getInstance(I18nUITranslationService.class));
-            }
-        }, Scopes.SINGLETON);
+	builder.registerProvider(DocumentFactory.class, new Provider<DocumentFactory>() {
+	    public DocumentFactory get() {
+		return new DocumentFactory(builder.getInstance(I18nUITranslationService.class));
+	    }
+	}, SingletonScope.class);
 
-        builder.registerProvider(DocumentClientTool.class, new Provider<DocumentClientTool>() {
-            public DocumentClientTool get() {
-                DocumentFactory factory = builder.getInstance(DocumentFactory.class);
-                return new DocumentClientTool(factory, builder.getInstance(I18nUITranslationService.class));
-            }
-        }, Scopes.SINGLETON_EAGER);
+	builder.registerProvider(DocumentClientTool.class, new Provider<DocumentClientTool>() {
+	    public DocumentClientTool get() {
+		DocumentFactory factory = builder.getInstance(DocumentFactory.class);
+		return new DocumentClientTool(factory, builder.getInstance(I18nUITranslationService.class));
+	    }
+	}, SingletonScope.class);
 
-        KunePlatform platform = builder.getInstance(KunePlatform.class);
-        DocumentClientTool docClientTool = getDocumentClientTool(builder);
-        platform.addTool(docClientTool);
+	KunePlatform platform = builder.getInstance(KunePlatform.class);
+	DocumentClientTool docClientTool = getDocumentClientTool(builder);
+	platform.addTool(docClientTool);
 
-        Session session = builder.getInstance(Session.class);
-        StateManager stateManager = builder.getInstance(StateManager.class);
-        Application application = builder.getInstance(Application.class);
-        I18nUITranslationService i18n = builder.getInstance(I18nUITranslationService.class);
-        platform.install(new DocsClientModule(session, stateManager, application.getWorkspace(), i18n));
+	Session session = builder.getInstance(Session.class);
+	StateManager stateManager = builder.getInstance(StateManager.class);
+	Application application = builder.getInstance(Application.class);
+	I18nUITranslationService i18n = builder.getInstance(I18nUITranslationService.class);
+	platform.install(new DocsClientModule(session, stateManager, application.getWorkspace(), i18n));
     }
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/PlatformClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/PlatformClientModule.java	2008-06-05 19:21:44 UTC (rev 776)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/PlatformClientModule.java	2008-06-10 08:54:46 UTC (rev 777)
@@ -27,19 +27,19 @@
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 
-import com.calclab.emite.client.modular.Provider;
+import com.calclab.modular.client.container.Provider;
 
 public class PlatformClientModule implements ClientModule {
     private final Provider<StateManager> stateManager;
     private final Session session;
 
     public PlatformClientModule(final Session session, final Provider<StateManager> provider) {
-        this.stateManager = provider;
-        this.session = session;
+	this.stateManager = provider;
+	this.session = session;
     }
 
     public void configure(final Register register) {
-        register.addAction(PlatformEvents.GOTO, new GotoAction(stateManager));
-        register.addAction(PlatformEvents.GOTO_CONTAINER, new GotoContainerAction(stateManager, session));
+	register.addAction(PlatformEvents.GOTO, new GotoAction(stateManager));
+	register.addAction(PlatformEvents.GOTO_CONTAINER, new GotoContainerAction(stateManager, session));
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/GotoAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/GotoAction.java	2008-06-05 19:21:44 UTC (rev 776)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/GotoAction.java	2008-06-10 08:54:46 UTC (rev 777)
@@ -23,21 +23,21 @@
 import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.platf.client.state.StateManager;
 
-import com.calclab.emite.client.modular.Provider;
+import com.calclab.modular.client.container.Provider;
 
 public class GotoAction implements Action<String> {
 
     private final Provider<StateManager> stateManager;
 
     public GotoAction(final Provider<StateManager> stateManager) {
-        this.stateManager = stateManager;
+	this.stateManager = stateManager;
     }
 
     public void execute(final String value) {
-        onGoto(value);
+	onGoto(value);
     }
 
     private void onGoto(final String token) {
-        stateManager.get().setState(new StateToken(token));
+	stateManager.get().setState(new StateToken(token));
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/GotoContainerAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/GotoContainerAction.java	2008-06-05 19:21:44 UTC (rev 776)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/GotoContainerAction.java	2008-06-10 08:54:46 UTC (rev 777)
@@ -24,7 +24,7 @@
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 
-import com.calclab.emite.client.modular.Provider;
+import com.calclab.modular.client.container.Provider;
 
 public class GotoContainerAction implements Action<Long> {
 
@@ -32,18 +32,18 @@
     private final Provider<StateManager> stateManager;
 
     public GotoContainerAction(final Provider<StateManager> stateManager, final Session session) {
-        this.stateManager = stateManager;
-        this.session = session;
+	this.stateManager = stateManager;
+	this.session = session;
     }
 
     public void execute(final Long value) {
-        onGoto(value);
+	onGoto(value);
     }
 
     private void onGoto(final Long folderId) {
-        StateToken newStateToken = session.getCurrentState().getStateToken();
-        newStateToken.setDocument(null);
-        newStateToken.setFolder(folderId.toString());
-        stateManager.get().setState(newStateToken);
+	StateToken newStateToken = session.getCurrentState().getStateToken();
+	newStateToken.setDocument(null);
+	newStateToken.setFolder(folderId.toString());
+	stateManager.get().setState(newStateToken);
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/Kune.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/Kune.java	2008-06-05 19:21:44 UTC (rev 776)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/Kune.java	2008-06-10 08:54:46 UTC (rev 777)
@@ -27,50 +27,50 @@
 import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
 import org.ourproject.kune.workspace.client.workspace.Workspace;
 
-import com.calclab.emite.client.modular.Container;
-import com.calclab.emite.client.modular.DelegatedContainer;
-import com.calclab.emite.client.modular.Module;
-import com.calclab.emite.client.modular.ModuleBuilder;
 import com.calclab.emiteuimodule.client.EmiteUIDialog;
+import com.calclab.modular.client.container.Container;
+import com.calclab.modular.client.container.DelegatedContainer;
+import com.calclab.modular.client.modules.Module;
+import com.calclab.modular.client.modules.ModuleBuilder;
 
 public class Kune extends DelegatedContainer {
 
     public static Kune create(final Module... modules) {
-        final ModuleBuilder container = new ModuleBuilder();
-        container.add(modules);
-        return container.getInstance(Kune.class);
+	final ModuleBuilder container = new ModuleBuilder();
+	container.add(modules);
+	return container.getInstance(Kune.class);
     }
 
     protected Kune(final Container container) {
-        super(container);
+	super(container);
     }
 
     public ColorTheme getColorTheme() {
-        return this.getInstance(ColorTheme.class);
+	return this.getInstance(ColorTheme.class);
     }
 
     public EmiteUIDialog getEmiteUIDialog() {
-        return this.getInstance(EmiteUIDialog.class);
+	return this.getInstance(EmiteUIDialog.class);
     }
 
     public I18nUITranslationService getI18N() {
-        return this.getInstance(I18nUITranslationService.class);
+	return this.getInstance(I18nUITranslationService.class);
     }
 
     public KunePlatform getPlatform() {
-        return this.getInstance(KunePlatform.class);
+	return this.getInstance(KunePlatform.class);
     }
 
     public Session getSession() {
-        return this.getInstance(Session.class);
+	return this.getInstance(Session.class);
     }
 
     public StateManager getStateManager() {
-        return this.getInstance(StateManager.class);
+	return this.getInstance(StateManager.class);
     }
 
     public Workspace getWorkspace() {
-        return this.getInstance(Application.class).getWorkspace();
+	return this.getInstance(Application.class).getWorkspace();
     }
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java	2008-06-05 19:21:44 UTC (rev 776)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java	2008-06-10 08:54:46 UTC (rev 777)
@@ -18,10 +18,10 @@
 import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
 import org.ourproject.kune.workspace.client.sitebar.Site;
 
-import com.calclab.emite.client.modular.Module;
-import com.calclab.emite.client.modular.ModuleBuilder;
-import com.calclab.emite.client.modular.Provider;
-import com.calclab.emite.client.modular.Scopes;
+import com.calclab.modular.client.container.Provider;
+import com.calclab.modular.client.modules.Module;
+import com.calclab.modular.client.modules.ModuleBuilder;
+import com.calclab.modular.client.scopes.SingletonScope;
 import com.google.gwt.user.client.Cookies;
 import com.google.gwt.user.client.History;
 
@@ -30,85 +30,85 @@
     private final HashMap<String, String> lexicon;
 
     public KuneModule(final I18nLanguageDTO initialLang, final HashMap<String, String> lexicon) {
-        this.initialLang = initialLang;
-        this.lexicon = lexicon;
+	this.initialLang = initialLang;
+	this.lexicon = lexicon;
     }
 
     public Class<? extends Module> getType() {
-        return KuneModule.class;
+	return KuneModule.class;
     }
 
     public void onLoad(final ModuleBuilder builder) {
-        builder.registerProvider(Kune.class, new Provider<Kune>() {
-            public Kune get() {
-                return new Kune(builder);
-            }
-        }, Scopes.SINGLETON);
+	builder.registerProvider(Kune.class, new Provider<Kune>() {
+	    public Kune get() {
+		return new Kune(builder);
+	    }
+	}, SingletonScope.class);
 
-        builder.registerProvider(I18nUITranslationService.class, new Provider<I18nUITranslationService>() {
-            public I18nUITranslationService get() {
-                I18nUITranslationService translationService = new I18nUITranslationService();
-                translationService.setCurrentLanguage(initialLang.getCode());
-                translationService.setLexicon(lexicon);
-                return translationService;
-            }
-        }, Scopes.SINGLETON);
+	builder.registerProvider(I18nUITranslationService.class, new Provider<I18nUITranslationService>() {
+	    public I18nUITranslationService get() {
+		I18nUITranslationService translationService = new I18nUITranslationService();
+		translationService.setCurrentLanguage(initialLang.getCode());
+		translationService.setLexicon(lexicon);
+		return translationService;
+	    }
+	}, SingletonScope.class);
 
-        Site.init(builder.getInstance(I18nUITranslationService.class));
+	Site.init(builder.getInstance(I18nUITranslationService.class));
 
-        builder.registerProvider(Session.class, new Provider<Session>() {
-            public Session get() {
-                return new SessionImpl(Cookies.getCookie("userHash"), initialLang);
-            }
-        }, Scopes.SINGLETON);
+	builder.registerProvider(Session.class, new Provider<Session>() {
+	    public Session get() {
+		return new SessionImpl(Cookies.getCookie("userHash"), initialLang);
+	    }
+	}, SingletonScope.class);
 
-        builder.registerProvider(KuneErrorHandler.class, new Provider<KuneErrorHandler>() {
-            public KuneErrorHandler get() {
-                return new KuneErrorHandler(builder.getInstance(Session.class), builder
-                        .getInstance(I18nUITranslationService.class));
-            }
-        }, Scopes.SINGLETON);
+	builder.registerProvider(KuneErrorHandler.class, new Provider<KuneErrorHandler>() {
+	    public KuneErrorHandler get() {
+		return new KuneErrorHandler(builder.getInstance(Session.class), builder
+			.getInstance(I18nUITranslationService.class));
+	    }
+	}, SingletonScope.class);
 
-        builder.registerProvider(ColorTheme.class, new Provider<ColorTheme>() {
-            public ColorTheme get() {
-                return new ColorTheme();
-            }
-        }, Scopes.SINGLETON);
+	builder.registerProvider(ColorTheme.class, new Provider<ColorTheme>() {
+	    public ColorTheme get() {
+		return new ColorTheme();
+	    }
+	}, SingletonScope.class);
 
-        builder.registerProvider(KunePlatform.class, new Provider<KunePlatform>() {
-            public KunePlatform get() {
-                return new KunePlatform();
-            }
-        }, Scopes.SINGLETON);
+	builder.registerProvider(KunePlatform.class, new Provider<KunePlatform>() {
+	    public KunePlatform get() {
+		return new KunePlatform();
+	    }
+	}, SingletonScope.class);
 
-        builder.registerProvider(ExtensibleWidgetsManager.class, new Provider<ExtensibleWidgetsManager>() {
-            public ExtensibleWidgetsManager get() {
-                return new ExtensibleWidgetsManager();
-            }
-        }, Scopes.SINGLETON);
+	builder.registerProvider(ExtensibleWidgetsManager.class, new Provider<ExtensibleWidgetsManager>() {
+	    public ExtensibleWidgetsManager get() {
+		return new ExtensibleWidgetsManager();
+	    }
+	}, SingletonScope.class);
 
-        builder.registerProvider(Application.class, new Provider<Application>() {
-            public Application get() {
-                Session session = builder.getInstance(Session.class);
-                ExtensibleWidgetsManager extensionPointManager = builder.getInstance(ExtensibleWidgetsManager.class);
-                return new ApplicationDefault(session, extensionPointManager, builder
-                        .getInstance(I18nUITranslationService.class), builder.getInstance(ColorTheme.class), builder
-                        .getInstance(KuneErrorHandler.class));
-            }
-        }, Scopes.SINGLETON);
+	builder.registerProvider(Application.class, new Provider<Application>() {
+	    public Application get() {
+		Session session = builder.getInstance(Session.class);
+		ExtensibleWidgetsManager extensionPointManager = builder.getInstance(ExtensibleWidgetsManager.class);
+		return new ApplicationDefault(session, extensionPointManager, builder
+			.getInstance(I18nUITranslationService.class), builder.getInstance(ColorTheme.class), builder
+			.getInstance(KuneErrorHandler.class));
+	    }
+	}, SingletonScope.class);
 
-        builder.registerProvider(StateManager.class, new Provider<StateManager>() {
-            public StateManager get() {
-                Session session = builder.getInstance(Session.class);
-                ContentProviderImpl provider = new ContentProviderImpl(ContentService.App.getInstance());
-                final HistoryWrapper historyWrapper = new HistoryWrapperImpl();
-                Application application = builder.getInstance(Application.class);
-                StateManagerDefault stateManager = new StateManagerDefault(provider, application, session,
-                        historyWrapper);
-                History.addHistoryListener(stateManager);
-                return stateManager;
-            }
-        }, Scopes.SINGLETON);
+	builder.registerProvider(StateManager.class, new Provider<StateManager>() {
+	    public StateManager get() {
+		Session session = builder.getInstance(Session.class);
+		ContentProviderImpl provider = new ContentProviderImpl(ContentService.App.getInstance());
+		final HistoryWrapper historyWrapper = new HistoryWrapperImpl();
+		Application application = builder.getInstance(Application.class);
+		StateManagerDefault stateManager = new StateManagerDefault(provider, application, session,
+			historyWrapper);
+		History.addHistoryListener(stateManager);
+		return stateManager;
+	    }
+	}, SingletonScope.class);
 
     }
 }




More information about the kune-commits mailing list