Search in sources :

Example 1 with EmailModule

use of com.google.gerrit.server.mail.EmailModule in project gerrit by GerritCodeReview.

the class GerritGlobalModule method configure.

@Override
protected void configure() {
    bind(EmailExpander.class).toProvider(EmailExpanderProvider.class).in(SINGLETON);
    bind(IdGenerator.class);
    bind(RulesCache.class);
    bind(BlameCache.class).to(BlameCacheImpl.class);
    bind(Sequences.class);
    install(authModule);
    install(AccountByEmailCacheImpl.module());
    install(AccountCacheImpl.module());
    install(BatchUpdate.module());
    install(ChangeKindCacheImpl.module());
    install(ConflictsCacheImpl.module());
    install(GroupCacheImpl.module());
    install(GroupIncludeCacheImpl.module());
    install(MergeabilityCacheImpl.module());
    install(PatchListCacheImpl.module());
    install(ProjectCacheImpl.module());
    install(SectionSortCache.module());
    install(SubmitStrategy.module());
    install(TagCache.module());
    install(OAuthTokenCache.module());
    install(new AccessControlModule());
    install(new CmdLineParserModule());
    install(new EmailModule());
    install(new ExternalIdModule());
    install(new GitModule());
    install(new GroupModule());
    install(new NoteDbModule(cfg));
    install(new PrologModule());
    install(new SshAddressesModule());
    install(ThreadLocalRequestContext.module());
    bind(AccountResolver.class);
    factory(AddReviewerSender.Factory.class);
    factory(DeleteReviewerSender.Factory.class);
    factory(AddKeySender.Factory.class);
    factory(CapabilityCollection.Factory.class);
    factory(CapabilityControl.Factory.class);
    factory(ChangeData.Factory.class);
    factory(ChangeJson.AssistedFactory.class);
    factory(CreateChangeSender.Factory.class);
    factory(GroupDetailFactory.Factory.class);
    factory(GroupMembers.Factory.class);
    factory(EmailMerge.Factory.class);
    factory(MergedSender.Factory.class);
    factory(MergeUtil.Factory.class);
    factory(PatchScriptFactory.Factory.class);
    factory(PluginUser.Factory.class);
    factory(ProjectNode.Factory.class);
    factory(ProjectState.Factory.class);
    factory(RegisterNewEmailSender.Factory.class);
    factory(ReplacePatchSetSender.Factory.class);
    factory(SetAssigneeSender.Factory.class);
    bind(PermissionCollection.Factory.class);
    bind(AccountVisibility.class).toProvider(AccountVisibilityProvider.class).in(SINGLETON);
    factory(ProjectOwnerGroupsProvider.Factory.class);
    bind(AuthBackend.class).to(UniversalAuthBackend.class).in(SINGLETON);
    DynamicSet.setOf(binder(), AuthBackend.class);
    bind(GroupControl.Factory.class).in(SINGLETON);
    bind(GroupControl.GenericFactory.class).in(SINGLETON);
    bind(FileTypeRegistry.class).to(MimeUtilFileTypeRegistry.class);
    bind(ToolsCatalog.class);
    bind(EventFactory.class);
    bind(TransferConfig.class);
    bind(GcConfig.class);
    bind(ChangeCleanupConfig.class);
    bind(ApprovalsUtil.class);
    bind(RuntimeInstance.class).toProvider(VelocityRuntimeProvider.class);
    bind(SoyTofu.class).annotatedWith(MailTemplates.class).toProvider(MailSoyTofuProvider.class);
    bind(FromAddressGenerator.class).toProvider(FromAddressGeneratorProvider.class).in(SINGLETON);
    bind(Boolean.class).annotatedWith(DisableReverseDnsLookup.class).toProvider(DisableReverseDnsLookupProvider.class).in(SINGLETON);
    bind(PatchSetInfoFactory.class);
    bind(IdentifiedUser.GenericFactory.class).in(SINGLETON);
    bind(AccountControl.Factory.class);
    install(new AuditModule());
    bind(UiActions.class);
    install(new com.google.gerrit.server.access.Module());
    install(new com.google.gerrit.server.account.Module());
    install(new com.google.gerrit.server.api.Module());
    install(new com.google.gerrit.server.change.Module());
    install(new com.google.gerrit.server.config.Module());
    install(new com.google.gerrit.server.group.Module());
    install(new com.google.gerrit.server.project.Module());
    bind(GitReferenceUpdated.class);
    DynamicMap.mapOf(binder(), new TypeLiteral<Cache<?, ?>>() {
    });
    DynamicSet.setOf(binder(), CacheRemovalListener.class);
    DynamicMap.mapOf(binder(), CapabilityDefinition.class);
    DynamicSet.setOf(binder(), GitReferenceUpdatedListener.class);
    DynamicSet.setOf(binder(), AssigneeChangedListener.class);
    DynamicSet.setOf(binder(), ChangeAbandonedListener.class);
    DynamicSet.setOf(binder(), CommentAddedListener.class);
    DynamicSet.setOf(binder(), DraftPublishedListener.class);
    DynamicSet.setOf(binder(), HashtagsEditedListener.class);
    DynamicSet.setOf(binder(), ChangeMergedListener.class);
    DynamicSet.setOf(binder(), ChangeRestoredListener.class);
    DynamicSet.setOf(binder(), ChangeRevertedListener.class);
    DynamicSet.setOf(binder(), ReviewerAddedListener.class);
    DynamicSet.setOf(binder(), ReviewerDeletedListener.class);
    DynamicSet.setOf(binder(), VoteDeletedListener.class);
    DynamicSet.setOf(binder(), RevisionCreatedListener.class);
    DynamicSet.setOf(binder(), TopicEditedListener.class);
    DynamicSet.setOf(binder(), AgreementSignupListener.class);
    DynamicSet.setOf(binder(), PluginEventListener.class);
    DynamicSet.setOf(binder(), ReceivePackInitializer.class);
    DynamicSet.setOf(binder(), PostReceiveHook.class);
    DynamicSet.setOf(binder(), PreUploadHook.class);
    DynamicSet.setOf(binder(), PostUploadHook.class);
    DynamicSet.setOf(binder(), AccountIndexedListener.class);
    DynamicSet.setOf(binder(), ChangeIndexedListener.class);
    DynamicSet.setOf(binder(), GroupIndexedListener.class);
    DynamicSet.setOf(binder(), NewProjectCreatedListener.class);
    DynamicSet.setOf(binder(), ProjectDeletedListener.class);
    DynamicSet.setOf(binder(), GarbageCollectorListener.class);
    DynamicSet.setOf(binder(), HeadUpdatedListener.class);
    DynamicSet.setOf(binder(), UsageDataPublishedListener.class);
    DynamicSet.bind(binder(), GitReferenceUpdatedListener.class).to(ReindexAfterRefUpdate.class);
    DynamicSet.bind(binder(), GitReferenceUpdatedListener.class).to(ProjectConfigEntry.UpdateChecker.class);
    DynamicSet.setOf(binder(), EventListener.class);
    DynamicSet.bind(binder(), EventListener.class).to(EventsMetrics.class);
    DynamicSet.setOf(binder(), UserScopedEventListener.class);
    DynamicSet.setOf(binder(), CommitValidationListener.class);
    DynamicSet.setOf(binder(), ChangeMessageModifier.class);
    DynamicSet.setOf(binder(), RefOperationValidationListener.class);
    DynamicSet.setOf(binder(), OnSubmitValidationListener.class);
    DynamicSet.setOf(binder(), MergeValidationListener.class);
    DynamicSet.setOf(binder(), ProjectCreationValidationListener.class);
    DynamicSet.setOf(binder(), GroupCreationValidationListener.class);
    DynamicSet.setOf(binder(), HashtagValidationListener.class);
    DynamicSet.setOf(binder(), OutgoingEmailValidationListener.class);
    DynamicItem.itemOf(binder(), AvatarProvider.class);
    DynamicSet.setOf(binder(), LifecycleListener.class);
    DynamicSet.setOf(binder(), TopMenu.class);
    DynamicSet.setOf(binder(), MessageOfTheDay.class);
    DynamicMap.mapOf(binder(), DownloadScheme.class);
    DynamicMap.mapOf(binder(), DownloadCommand.class);
    DynamicMap.mapOf(binder(), CloneCommand.class);
    DynamicMap.mapOf(binder(), ReviewerSuggestion.class);
    DynamicSet.setOf(binder(), ExternalIncludedIn.class);
    DynamicMap.mapOf(binder(), ProjectConfigEntry.class);
    DynamicSet.setOf(binder(), PatchSetWebLink.class);
    DynamicSet.setOf(binder(), ParentWebLink.class);
    DynamicSet.setOf(binder(), FileWebLink.class);
    DynamicSet.setOf(binder(), FileHistoryWebLink.class);
    DynamicSet.setOf(binder(), DiffWebLink.class);
    DynamicSet.setOf(binder(), ProjectWebLink.class);
    DynamicSet.setOf(binder(), BranchWebLink.class);
    DynamicMap.mapOf(binder(), OAuthLoginProvider.class);
    DynamicItem.itemOf(binder(), OAuthTokenEncrypter.class);
    DynamicSet.setOf(binder(), AccountExternalIdCreator.class);
    DynamicSet.setOf(binder(), WebUiPlugin.class);
    DynamicItem.itemOf(binder(), AccountPatchReviewStore.class);
    DynamicSet.setOf(binder(), AssigneeValidationListener.class);
    DynamicSet.setOf(binder(), ActionVisitor.class);
    DynamicMap.mapOf(binder(), MailFilter.class);
    bind(MailFilter.class).annotatedWith(Exports.named("ListMailFilter")).to(ListMailFilter.class);
    factory(UploadValidators.Factory.class);
    DynamicSet.setOf(binder(), UploadValidationListener.class);
    DynamicMap.mapOf(binder(), ChangeQueryBuilder.ChangeOperatorFactory.class);
    DynamicMap.mapOf(binder(), ChangeQueryBuilder.ChangeHasOperandFactory.class);
    DynamicMap.mapOf(binder(), ChangeQueryProcessor.ChangeAttributeFactory.class);
    install(new GitwebConfig.LegacyModule(cfg));
    bind(AnonymousUser.class);
    factory(AbandonOp.Factory.class);
    factory(RefOperationValidators.Factory.class);
    factory(OnSubmitValidators.Factory.class);
    factory(MergeValidators.Factory.class);
    factory(ProjectConfigValidator.Factory.class);
    factory(NotesBranchUtil.Factory.class);
    factory(ReplaceOp.Factory.class);
    factory(MergedByPushOp.Factory.class);
    factory(GitModules.Factory.class);
    factory(VersionedAuthorizedKeys.Factory.class);
    factory(MergeOp.Factory.class);
    bind(AccountManager.class);
    factory(ChangeUserName.Factory.class);
    bind(new TypeLiteral<List<CommentLinkInfo>>() {
    }).toProvider(CommentLinkProvider.class).in(SINGLETON);
    bind(ReloadPluginListener.class).annotatedWith(UniqueAnnotations.create()).to(PluginConfigFactory.class);
}
Also used : NoteDbModule(com.google.gerrit.server.notedb.NoteDbModule) GroupModule(com.google.gerrit.server.group.GroupModule) MergeOp(com.google.gerrit.server.git.MergeOp) EmailModule(com.google.gerrit.server.mail.EmailModule) FileTypeRegistry(com.google.gerrit.server.mime.FileTypeRegistry) MimeUtilFileTypeRegistry(com.google.gerrit.server.mime.MimeUtilFileTypeRegistry) SetAssigneeSender(com.google.gerrit.server.mail.send.SetAssigneeSender) UniversalAuthBackend(com.google.gerrit.server.auth.UniversalAuthBackend) RuntimeInstance(org.apache.velocity.runtime.RuntimeInstance) FromAddressGeneratorProvider(com.google.gerrit.server.mail.send.FromAddressGeneratorProvider) List(java.util.List) DeleteReviewerSender(com.google.gerrit.server.mail.send.DeleteReviewerSender) CapabilityCollection(com.google.gerrit.server.account.CapabilityCollection) AbandonOp(com.google.gerrit.server.git.AbandonOp) GitModules(com.google.gerrit.server.git.GitModules) ChangeData(com.google.gerrit.server.query.change.ChangeData) GitReferenceUpdatedListener(com.google.gerrit.extensions.events.GitReferenceUpdatedListener) MergedSender(com.google.gerrit.server.mail.send.MergedSender) MailTemplates(com.google.gerrit.server.mail.send.MailTemplates) AddReviewerSender(com.google.gerrit.server.mail.send.AddReviewerSender) PatchScriptFactory(com.google.gerrit.server.patch.PatchScriptFactory) ExternalIdModule(com.google.gerrit.server.account.externalids.ExternalIdModule) ProjectState(com.google.gerrit.server.project.ProjectState) ChangeUserName(com.google.gerrit.server.account.ChangeUserName) AuditModule(com.google.gerrit.audit.AuditModule) CmdLineParserModule(com.google.gerrit.server.CmdLineParserModule) GroupMembers(com.google.gerrit.server.account.GroupMembers) ReplacePatchSetSender(com.google.gerrit.server.mail.send.ReplacePatchSetSender) ProjectConfigValidator(com.google.gerrit.server.git.validators.MergeValidators.ProjectConfigValidator) TagCache(com.google.gerrit.server.git.TagCache) BlameCache(com.google.gitiles.blame.BlameCache) RulesCache(com.google.gerrit.rules.RulesCache) OAuthTokenCache(com.google.gerrit.server.auth.oauth.OAuthTokenCache) SectionSortCache(com.google.gerrit.server.project.SectionSortCache) Cache(com.google.common.cache.Cache) PermissionCollection(com.google.gerrit.server.project.PermissionCollection) OnSubmitValidators(com.google.gerrit.server.git.validators.OnSubmitValidators) CapabilityControl(com.google.gerrit.server.account.CapabilityControl) AddKeySender(com.google.gerrit.server.mail.send.AddKeySender) GroupDetailFactory(com.google.gerrit.server.account.GroupDetailFactory) EventFactory(com.google.gerrit.server.events.EventFactory) PatchSetInfoFactory(com.google.gerrit.server.patch.PatchSetInfoFactory) PatchScriptFactory(com.google.gerrit.server.patch.PatchScriptFactory) SshAddressesModule(com.google.gerrit.server.ssh.SshAddressesModule) UploadValidators(com.google.gerrit.server.git.validators.UploadValidators) RegisterNewEmailSender(com.google.gerrit.server.mail.send.RegisterNewEmailSender) MergeUtil(com.google.gerrit.server.git.MergeUtil) AccountControl(com.google.gerrit.server.account.AccountControl) ReplaceOp(com.google.gerrit.server.git.ReplaceOp) RefOperationValidators(com.google.gerrit.server.git.validators.RefOperationValidators) EventListener(com.google.gerrit.common.EventListener) UserScopedEventListener(com.google.gerrit.common.UserScopedEventListener) PluginEventListener(com.google.gerrit.extensions.events.PluginEventListener) MergeValidators(com.google.gerrit.server.git.validators.MergeValidators) CommentLinkProvider(com.google.gerrit.server.project.CommentLinkProvider) ChangeQueryBuilder(com.google.gerrit.server.query.change.ChangeQueryBuilder) AccessControlModule(com.google.gerrit.server.project.AccessControlModule) ChangeJson(com.google.gerrit.server.change.ChangeJson) PrologModule(com.google.gerrit.rules.PrologModule) ChangeQueryProcessor(com.google.gerrit.server.query.change.ChangeQueryProcessor) GitModule(com.google.gerrit.server.git.GitModule) CreateChangeSender(com.google.gerrit.server.mail.send.CreateChangeSender) GroupDetailFactory(com.google.gerrit.server.account.GroupDetailFactory) BlameCache(com.google.gitiles.blame.BlameCache) AccountVisibilityProvider(com.google.gerrit.server.account.AccountVisibilityProvider) NotesBranchUtil(com.google.gerrit.server.git.NotesBranchUtil) ProjectNode(com.google.gerrit.server.project.ProjectNode) VersionedAuthorizedKeys(com.google.gerrit.server.account.VersionedAuthorizedKeys) EmailMerge(com.google.gerrit.server.git.EmailMerge) MergedByPushOp(com.google.gerrit.server.git.MergedByPushOp) PluginUser(com.google.gerrit.server.PluginUser)

Aggregations

Cache (com.google.common.cache.Cache)1 AuditModule (com.google.gerrit.audit.AuditModule)1 EventListener (com.google.gerrit.common.EventListener)1 UserScopedEventListener (com.google.gerrit.common.UserScopedEventListener)1 GitReferenceUpdatedListener (com.google.gerrit.extensions.events.GitReferenceUpdatedListener)1 PluginEventListener (com.google.gerrit.extensions.events.PluginEventListener)1 PrologModule (com.google.gerrit.rules.PrologModule)1 RulesCache (com.google.gerrit.rules.RulesCache)1 CmdLineParserModule (com.google.gerrit.server.CmdLineParserModule)1 PluginUser (com.google.gerrit.server.PluginUser)1 AccountControl (com.google.gerrit.server.account.AccountControl)1 AccountVisibilityProvider (com.google.gerrit.server.account.AccountVisibilityProvider)1 CapabilityCollection (com.google.gerrit.server.account.CapabilityCollection)1 CapabilityControl (com.google.gerrit.server.account.CapabilityControl)1 ChangeUserName (com.google.gerrit.server.account.ChangeUserName)1 GroupDetailFactory (com.google.gerrit.server.account.GroupDetailFactory)1 GroupMembers (com.google.gerrit.server.account.GroupMembers)1 VersionedAuthorizedKeys (com.google.gerrit.server.account.VersionedAuthorizedKeys)1 ExternalIdModule (com.google.gerrit.server.account.externalids.ExternalIdModule)1 UniversalAuthBackend (com.google.gerrit.server.auth.UniversalAuthBackend)1