| | |
| | | import com.gitblit.manager.IFederationManager; |
| | | import com.gitblit.manager.IGitblit; |
| | | import com.gitblit.manager.INotificationManager; |
| | | import com.gitblit.manager.IPluginManager; |
| | | import com.gitblit.manager.IProjectManager; |
| | | import com.gitblit.manager.IRepositoryManager; |
| | | import com.gitblit.manager.IRuntimeManager; |
| | | import com.gitblit.manager.IUserManager; |
| | | import com.gitblit.manager.NotificationManager; |
| | | import com.gitblit.manager.PluginManager; |
| | | import com.gitblit.manager.ProjectManager; |
| | | import com.gitblit.manager.RepositoryManager; |
| | | import com.gitblit.manager.RuntimeManager; |
| | |
| | | import com.gitblit.transport.ssh.IPublicKeyManager; |
| | | import com.gitblit.transport.ssh.MemoryKeyManager; |
| | | import com.gitblit.transport.ssh.NullKeyManager; |
| | | import com.gitblit.utils.JSoupXssFilter; |
| | | import com.gitblit.utils.StringUtils; |
| | | import com.gitblit.utils.XssFilter; |
| | | import com.gitblit.wicket.GitBlitWebApp; |
| | | |
| | | import dagger.Module; |
| | |
| | | library = true, |
| | | injects = { |
| | | IStoredSettings.class, |
| | | XssFilter.class, |
| | | |
| | | // core managers |
| | | IRuntimeManager.class, |
| | | IPluginManager.class, |
| | | INotificationManager.class, |
| | | IUserManager.class, |
| | | IAuthenticationManager.class, |
| | |
| | | return new FileSettings(); |
| | | } |
| | | |
| | | @Provides @Singleton IRuntimeManager provideRuntimeManager(IStoredSettings settings) { |
| | | return new RuntimeManager(settings); |
| | | @Provides @Singleton XssFilter provideXssFilter() { |
| | | return new JSoupXssFilter(); |
| | | } |
| | | |
| | | @Provides @Singleton IRuntimeManager provideRuntimeManager(IStoredSettings settings, XssFilter xssFilter) { |
| | | return new RuntimeManager(settings, xssFilter); |
| | | } |
| | | |
| | | @Provides @Singleton IPluginManager providePluginManager(IRuntimeManager runtimeManager) { |
| | | return new PluginManager(runtimeManager); |
| | | } |
| | | |
| | | @Provides @Singleton INotificationManager provideNotificationManager(IStoredSettings settings) { |
| | | return new NotificationManager(settings); |
| | | } |
| | | |
| | | @Provides @Singleton IUserManager provideUserManager(IRuntimeManager runtimeManager) { |
| | | return new UserManager(runtimeManager); |
| | | @Provides @Singleton IUserManager provideUserManager( |
| | | IRuntimeManager runtimeManager, |
| | | IPluginManager pluginManager) { |
| | | |
| | | return new UserManager(runtimeManager, pluginManager); |
| | | } |
| | | |
| | | @Provides @Singleton IAuthenticationManager provideAuthenticationManager( |
| | |
| | | |
| | | @Provides @Singleton IRepositoryManager provideRepositoryManager( |
| | | IRuntimeManager runtimeManager, |
| | | IPluginManager pluginManager, |
| | | IUserManager userManager) { |
| | | |
| | | return new RepositoryManager( |
| | | runtimeManager, |
| | | pluginManager, |
| | | userManager); |
| | | } |
| | | |
| | |
| | | |
| | | @Provides @Singleton IGitblit provideGitblit( |
| | | IRuntimeManager runtimeManager, |
| | | IPluginManager pluginManager, |
| | | INotificationManager notificationManager, |
| | | IUserManager userManager, |
| | | IAuthenticationManager authenticationManager, |
| | |
| | | |
| | | return new GitBlit( |
| | | runtimeManager, |
| | | pluginManager, |
| | | notificationManager, |
| | | userManager, |
| | | authenticationManager, |
| | |
| | | |
| | | @Provides @Singleton GitBlitWebApp provideWebApplication( |
| | | IRuntimeManager runtimeManager, |
| | | IPluginManager pluginManager, |
| | | INotificationManager notificationManager, |
| | | IUserManager userManager, |
| | | IAuthenticationManager authenticationManager, |
| | |
| | | |
| | | return new GitBlitWebApp( |
| | | runtimeManager, |
| | | pluginManager, |
| | | notificationManager, |
| | | userManager, |
| | | authenticationManager, |