Search in sources :

Example 1 with DevfileModule

use of org.eclipse.che.api.workspace.server.devfile.DevfileModule in project che-server by eclipse-che.

the class WsMasterModule method configure.

@Override
protected void configure() {
    // Can be removed after upgrade to Fabric8 4.10.2 or higher or to Java 11
    if (System.getProperty("java.version", "").startsWith("1.8")) {
        System.setProperty("http2.disable", "true");
    }
    // db related components modules
    install(new org.eclipse.che.account.api.AccountModule());
    install(new org.eclipse.che.api.ssh.server.jpa.SshJpaModule());
    install(new org.eclipse.che.api.core.jsonrpc.impl.JsonRpcModule());
    install(new org.eclipse.che.api.core.websocket.impl.WebSocketModule());
    // db configuration
    bind(SchemaInitializer.class).to(org.eclipse.che.core.db.schema.impl.flyway.FlywaySchemaInitializer.class);
    bind(org.eclipse.che.core.db.DBInitializer.class).asEagerSingleton();
    bind(PlaceholderReplacer.class).toProvider(org.eclipse.che.core.db.schema.impl.flyway.PlaceholderReplacerProvider.class);
    // factory
    bind(FactoryAcceptValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryAcceptValidatorImpl.class);
    bind(FactoryCreateValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryCreateValidatorImpl.class);
    bind(FactoryEditValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryEditValidatorImpl.class);
    bind(org.eclipse.che.api.factory.server.FactoryService.class);
    bind(ScmService.class);
    install(new org.eclipse.che.api.factory.server.jpa.FactoryJpaModule());
    // Service-specific factory resolvers.
    Multibinder<FactoryParametersResolver> factoryParametersResolverMultibinder = Multibinder.newSetBinder(binder(), FactoryParametersResolver.class);
    factoryParametersResolverMultibinder.addBinding().to(GithubFactoryParametersResolver.class);
    factoryParametersResolverMultibinder.addBinding().to(BitbucketServerAuthorizingFactoryParametersResolver.class);
    factoryParametersResolverMultibinder.addBinding().to(GitlabFactoryParametersResolver.class);
    Multibinder<ScmFileResolver> scmFileResolverResolverMultibinder = Multibinder.newSetBinder(binder(), ScmFileResolver.class);
    scmFileResolverResolverMultibinder.addBinding().to(GithubScmFileResolver.class);
    scmFileResolverResolverMultibinder.addBinding().to(GitlabScmFileResolver.class);
    scmFileResolverResolverMultibinder.addBinding().to(BitbucketServerScmFileResolver.class);
    install(new org.eclipse.che.api.factory.server.scm.KubernetesScmModule());
    install(new org.eclipse.che.api.factory.server.bitbucket.BitbucketServerModule());
    install(new org.eclipse.che.api.factory.server.gitlab.GitlabModule());
    install(new org.eclipse.che.api.factory.server.github.GithubModule());
    bind(org.eclipse.che.api.core.rest.ApiInfoService.class);
    bind(org.eclipse.che.api.ssh.server.SshService.class);
    bind(org.eclipse.che.api.user.server.UserService.class);
    bind(org.eclipse.che.api.user.server.ProfileService.class);
    bind(org.eclipse.che.api.user.server.PreferencesService.class);
    bind(org.eclipse.che.security.oauth.OAuthAuthenticationService.class);
    bind(org.eclipse.che.security.oauth1.OAuthAuthenticationService.class);
    install(new DevfileModule());
    bind(WorkspaceEntityProvider.class);
    bind(org.eclipse.che.api.workspace.server.TemporaryWorkspaceRemover.class);
    bind(org.eclipse.che.api.workspace.server.WorkspaceService.class);
    bind(org.eclipse.che.api.devfile.server.DevfileService.class);
    bind(org.eclipse.che.api.devfile.server.UserDevfileEntityProvider.class);
    install(new FactoryModuleBuilder().build(ServersCheckerFactory.class));
    Multibinder<InternalEnvironmentProvisioner> internalEnvironmentProvisioners = Multibinder.newSetBinder(binder(), InternalEnvironmentProvisioner.class);
    internalEnvironmentProvisioners.addBinding().to(EnvVarEnvironmentProvisioner.class);
    internalEnvironmentProvisioners.addBinding().to(MachineNameProvisioner.class);
    Multibinder<EnvVarProvider> envVarProviders = Multibinder.newSetBinder(binder(), EnvVarProvider.class);
    envVarProviders.addBinding().to(CheApiEnvVarProvider.class);
    envVarProviders.addBinding().to(CheApiInternalEnvVarProvider.class);
    envVarProviders.addBinding().to(CheApiExternalEnvVarProvider.class);
    envVarProviders.addBinding().to(MachineTokenEnvVarProvider.class);
    envVarProviders.addBinding().to(WorkspaceIdEnvVarProvider.class);
    envVarProviders.addBinding().to(WorkspaceNamespaceNameEnvVarProvider.class);
    envVarProviders.addBinding().to(WorkspaceNameEnvVarProvider.class);
    envVarProviders.addBinding().to(ProjectsRootEnvVariableProvider.class);
    Multibinder<LegacyEnvVarProvider> legacyEnvVarProviderMultibinders = Multibinder.newSetBinder(binder(), LegacyEnvVarProvider.class);
    legacyEnvVarProviderMultibinders.addBinding().to(JavaOptsEnvVariableProvider.class);
    legacyEnvVarProviderMultibinders.addBinding().to(MavenOptsEnvVariableProvider.class);
    legacyEnvVarProviderMultibinders.addBinding().to(AgentAuthEnableEnvVarProvider.class);
    bind(org.eclipse.che.api.workspace.server.event.WorkspaceJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.everrest.EverrestDownloadFileResponseFilter.class);
    bind(org.eclipse.che.everrest.ETagResponseFilter.class);
    // temporary solution
    bind(org.eclipse.che.api.workspace.server.event.RuntimeStatusJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.api.workspace.server.event.MachineStatusJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.api.workspace.server.event.ServerStatusJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.api.workspace.server.event.RuntimeLogJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.security.oauth.OAuthAuthenticatorProvider.class).to(org.eclipse.che.security.oauth.OAuthAuthenticatorProviderImpl.class);
    install(new org.eclipse.che.api.core.rest.CoreRestModule());
    install(new org.eclipse.che.api.core.util.FileCleaner.FileCleanerModule());
    install(new org.eclipse.che.swagger.deploy.DocsModule());
    install(new org.eclipse.che.commons.schedule.executor.ScheduleModule());
    install(new org.eclipse.che.api.logger.deploy.LoggerModule());
    final Multibinder<MessageBodyAdapter> adaptersMultibinder = Multibinder.newSetBinder(binder(), MessageBodyAdapter.class);
    final MessageBodyAdapterInterceptor interceptor = new MessageBodyAdapterInterceptor();
    requestInjection(interceptor);
    bindInterceptor(subclassesOf(CheJsonProvider.class), names("readFrom"), interceptor);
    // system components
    install(new SystemModule());
    Multibinder<ServiceTermination> terminationMultiBinder = Multibinder.newSetBinder(binder(), ServiceTermination.class);
    terminationMultiBinder.addBinding().to(org.eclipse.che.api.workspace.server.WorkspaceServiceTermination.class);
    terminationMultiBinder.addBinding().to(org.eclipse.che.api.system.server.CronThreadPullTermination.class);
    terminationMultiBinder.addBinding().to(org.eclipse.che.api.workspace.server.hc.probe.ProbeSchedulerTermination.class);
    bind(DBTermination.class);
    final Map<String, String> persistenceProperties = new HashMap<>();
    persistenceProperties.put(PersistenceUnitProperties.TARGET_SERVER, "None");
    persistenceProperties.put(PersistenceUnitProperties.LOGGING_LOGGER, "DefaultLogger");
    persistenceProperties.put(PersistenceUnitProperties.LOGGING_LEVEL, "SEVERE");
    persistenceProperties.put(PersistenceUnitProperties.NON_JTA_DATASOURCE, "java:/comp/env/jdbc/che");
    bindConstant().annotatedWith(Names.named("jndi.datasource.name")).to("java:/comp/env/jdbc/che");
    String infrastructure = System.getenv("CHE_INFRASTRUCTURE_ACTIVE");
    install(new FactoryModuleBuilder().build(JwtProxyConfigBuilderFactory.class));
    install(new FactoryModuleBuilder().build(PassThroughProxyProvisionerFactory.class));
    installDefaultSecureServerExposer(infrastructure);
    install(new org.eclipse.che.security.oauth1.BitbucketModule());
    install(new GitLabModule());
    configureMultiUserMode(persistenceProperties, infrastructure);
    install(new com.google.inject.persist.jpa.JpaPersistModule("main").properties(persistenceProperties));
    if (OpenShiftInfrastructure.NAME.equals(infrastructure)) {
        install(new OpenShiftInfraModule());
    } else if (KubernetesInfrastructure.NAME.equals(infrastructure)) {
        install(new KubernetesInfraModule());
    }
    install(new CheJsonRpcWebSocketConfigurationModule());
    bind(org.eclipse.che.api.user.server.AppStatesPreferenceCleaner.class);
    MapBinder.newMapBinder(binder(), String.class, ChePluginsApplier.class);
    if (Boolean.valueOf(System.getenv("CHE_TRACING_ENABLED"))) {
        install(new org.eclipse.che.core.tracing.TracingModule());
    } else {
        install(new org.eclipse.che.core.tracing.NopTracingModule());
    }
    if (Boolean.valueOf(System.getenv("CHE_METRICS_ENABLED"))) {
        install(new org.eclipse.che.core.metrics.MetricsModule());
        install(new WsMasterMetricsModule());
        install(new InfrastructureMetricsModule());
    } else {
        install(new org.eclipse.che.core.metrics.NoopMetricsModule());
    }
    if (Boolean.valueOf(System.getenv("CHE_TRACING_ENABLED")) && Boolean.valueOf(System.getenv("CHE_METRICS_ENABLED"))) {
        install(new TracingMetricsModule());
    }
    install(new ExecutorWrapperModule());
    install(new OpenShiftOAuthModule());
}
Also used : HashMap(java.util.HashMap) GitLabModule(org.eclipse.che.security.oauth.GitLabModule) FactoryEditValidator(org.eclipse.che.api.factory.server.FactoryEditValidator) CheJsonProvider(org.eclipse.che.api.core.rest.CheJsonProvider) MessageBodyAdapter(org.eclipse.che.api.core.rest.MessageBodyAdapter) DevfileModule(org.eclipse.che.api.workspace.server.devfile.DevfileModule) ServiceTermination(org.eclipse.che.api.system.server.ServiceTermination) WorkspaceStatusCache(org.eclipse.che.api.workspace.server.WorkspaceStatusCache) SystemModule(org.eclipse.che.api.system.server.SystemModule) ServersCheckerFactory(org.eclipse.che.api.workspace.server.hc.ServersCheckerFactory) FactoryCreateValidator(org.eclipse.che.api.factory.server.FactoryCreateValidator) GithubScmFileResolver(org.eclipse.che.api.factory.server.github.GithubScmFileResolver) GitlabScmFileResolver(org.eclipse.che.api.factory.server.gitlab.GitlabScmFileResolver) BitbucketServerScmFileResolver(org.eclipse.che.api.factory.server.bitbucket.BitbucketServerScmFileResolver) ScmFileResolver(org.eclipse.che.api.factory.server.ScmFileResolver) InternalEnvironmentProvisioner(org.eclipse.che.api.workspace.server.spi.provision.InternalEnvironmentProvisioner) WsMasterMetricsModule(org.eclipse.che.api.metrics.WsMasterMetricsModule) KubernetesInfraModule(org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesInfraModule) MessageBodyAdapterInterceptor(org.eclipse.che.api.core.rest.MessageBodyAdapterInterceptor) CheApiEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiEnvVarProvider) MachineTokenEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.MachineTokenEnvVarProvider) WorkspaceNamespaceNameEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceNamespaceNameEnvVarProvider) CheApiInternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiInternalEnvVarProvider) AgentAuthEnableEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.AgentAuthEnableEnvVarProvider) CheApiExternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiExternalEnvVarProvider) EnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.EnvVarProvider) WorkspaceNameEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceNameEnvVarProvider) LegacyEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.LegacyEnvVarProvider) WorkspaceIdEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceIdEnvVarProvider) GitlabFactoryParametersResolver(org.eclipse.che.api.factory.server.gitlab.GitlabFactoryParametersResolver) FactoryParametersResolver(org.eclipse.che.api.factory.server.FactoryParametersResolver) GithubFactoryParametersResolver(org.eclipse.che.api.factory.server.github.GithubFactoryParametersResolver) BitbucketServerAuthorizingFactoryParametersResolver(org.eclipse.che.api.factory.server.bitbucket.BitbucketServerAuthorizingFactoryParametersResolver) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) PlaceholderReplacer(org.flywaydb.core.internal.util.PlaceholderReplacer) OpenShiftOAuthModule(org.eclipse.che.security.oauth.OpenShiftOAuthModule) SchemaInitializer(org.eclipse.che.core.db.schema.SchemaInitializer) LegacyEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.LegacyEnvVarProvider) CheJsonRpcWebSocketConfigurationModule(org.eclipse.che.api.deploy.jsonrpc.CheJsonRpcWebSocketConfigurationModule) PassThroughProxyProvisionerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.PassThroughProxyProvisionerFactory) OpenShiftInfraModule(org.eclipse.che.workspace.infrastructure.openshift.OpenShiftInfraModule) InfrastructureMetricsModule(org.eclipse.che.workspace.infrastructure.metrics.InfrastructureMetricsModule) FactoryAcceptValidator(org.eclipse.che.api.factory.server.FactoryAcceptValidator) ExecutorWrapperModule(org.eclipse.che.commons.observability.deploy.ExecutorWrapperModule) JwtProxyConfigBuilderFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.JwtProxyConfigBuilderFactory) TracingMetricsModule(org.eclipse.che.core.tracing.metrics.TracingMetricsModule)

Example 2 with DevfileModule

use of org.eclipse.che.api.workspace.server.devfile.DevfileModule in project che-server by eclipse-che.

the class JpaEntitiesCascadeRemovalTest method setUp.

@BeforeMethod
public void setUp() throws Exception {
    injector = Guice.createInjector(Stage.PRODUCTION, new AbstractModule() {

        @Override
        protected void configure() {
            H2DBTestServer server = H2DBTestServer.startDefault();
            install(new JpaPersistModule("main"));
            bind(H2JpaCleaner.class).toInstance(new H2JpaCleaner(server));
            bind(EventService.class).in(Singleton.class);
            bind(SchemaInitializer.class).toInstance(new FlywaySchemaInitializer(server.getDataSource(), "che-schema"));
            bind(DBInitializer.class).asEagerSingleton();
            install(new InitModule(PostConstruct.class));
            install(new UserJpaModule());
            install(new AccountModule());
            install(new SshJpaModule());
            install(new FactoryJpaModule());
            install(new OrganizationJpaModule());
            install(new MultiuserWorkspaceJpaModule());
            install(new MachineAuthModule());
            install(new DevfileModule());
            install(new MultiuserUserDevfileJpaModule());
            bind(ExecutorServiceWrapper.class).to(NoopExecutorServiceWrapper.class);
            bind(FreeResourcesLimitDao.class).to(JpaFreeResourcesLimitDao.class);
            bind(RemoveFreeResourcesLimitSubscriber.class).asEagerSingleton();
            // initialize empty binder
            Multibinder.newSetBinder(binder(), WorkspaceAttributeValidator.class);
            bind(WorkspaceManager.class);
            bind(WorkspaceLockService.class).to(DefaultWorkspaceLockService.class);
            bind(WorkspaceStatusCache.class).to(DefaultWorkspaceStatusCache.class);
            bind(RuntimeInfrastructure.class).toInstance(mock(RuntimeInfrastructure.class));
            MapBinder.newMapBinder(binder(), String.class, InternalEnvironmentFactory.class);
            bind(PermissionsManager.class);
            bind(PermissionChecker.class).to(PermissionCheckerImpl.class);
            bind(AccountManager.class);
            bind(Boolean.class).annotatedWith(Names.named("che.workspace.auto_snapshot")).toInstance(false);
            bind(Boolean.class).annotatedWith(Names.named("che.workspace.auto_restore")).toInstance(false);
            bind(Boolean.class).annotatedWith(Names.named("che.devworkspaces.enabled")).toInstance(false);
            bind(WorkspaceSharedPool.class).toInstance(new WorkspaceSharedPool("cached", null, null, new NoopExecutorServiceWrapper()));
            bind(String[].class).annotatedWith(Names.named("che.auth.reserved_user_names")).toInstance(new String[0]);
            bind(RemoveOrganizationOnLastUserRemovedEventSubscriber.class).asEagerSingleton();
            Multibinder.newSetBinder(binder(), ResourceLockKeyProvider.class);
            Multibinder.newSetBinder(binder(), ResourceUsageTracker.class);
            MapBinder.newMapBinder(binder(), String.class, AvailableResourcesProvider.class);
            bind(String.class).annotatedWith(Names.named("che.workspace.plugin_registry_url")).toInstance("");
            bind(String.class).annotatedWith(Names.named("che.factory.scm_file_fetcher_limit_bytes")).toInstance("1024");
            MapBinder.newMapBinder(binder(), String.class, ChePluginsApplier.class);
            Multibinder.newSetBinder(binder(), ResourceType.class).addBinding().to(RamResourceType.class);
            Multibinder.newSetBinder(binder(), ResourcesProvider.class).addBinding().toInstance((accountId) -> singletonList(new ProvidedResourcesImpl("test", null, accountId, -1L, -1L, singletonList(new ResourceImpl(RamResourceType.ID, 1024, RamResourceType.UNIT)))));
            bindConstant().annotatedWith(Names.named("che.workspace.probe_pool_size")).to(1);
            // setup bindings for the devfile that would otherwise be read from the config
            bindConstant().annotatedWith(Names.named("che.workspace.devfile.default_editor")).to("default/editor/0.0.1");
            bindConstant().annotatedWith(Names.named("che.websocket.endpoint")).to("che.websocket.endpoint");
            bind(String.class).annotatedWith(Names.named("che.workspace.devfile.default_editor.plugins")).toInstance("default/plugin/0.0.1");
            bind(String.class).annotatedWith(Names.named("che.workspace.devfile.async.storage.plugin")).toInstance("");
        }
    });
    eventService = injector.getInstance(EventService.class);
    accountDao = injector.getInstance(AccountDao.class);
    accountManager = injector.getInstance(AccountManager.class);
    userDao = injector.getInstance(UserDao.class);
    userManager = injector.getInstance(UserManager.class);
    preferenceDao = injector.getInstance(PreferenceDao.class);
    profileDao = injector.getInstance(ProfileDao.class);
    sshDao = injector.getInstance(SshDao.class);
    workspaceDao = injector.getInstance(WorkspaceDao.class);
    factoryDao = injector.getInstance(FactoryDao.class);
    workerDao = injector.getInstance(WorkerDao.class);
    userDevfileDao = injector.getInstance(UserDevfileDao.class);
    userDevfilePermissionDao = injector.getInstance(UserDevfilePermissionDao.class);
    signatureKeyDao = injector.getInstance(SignatureKeyDao.class);
    freeResourcesLimitDao = injector.getInstance(FreeResourcesLimitDao.class);
    organizationManager = injector.getInstance(OrganizationManager.class);
    memberDao = injector.getInstance(MemberDao.class);
    organizationResourcesDistributor = injector.getInstance(OrganizationResourcesDistributor.class);
    h2JpaCleaner = injector.getInstance(H2JpaCleaner.class);
}
Also used : RuntimeInfrastructure(org.eclipse.che.api.workspace.server.spi.RuntimeInfrastructure) ProvidedResourcesImpl(org.eclipse.che.multiuser.resource.spi.impl.ProvidedResourcesImpl) ExecutorServiceWrapper(org.eclipse.che.commons.observability.ExecutorServiceWrapper) NoopExecutorServiceWrapper(org.eclipse.che.commons.observability.NoopExecutorServiceWrapper) UserDevfilePermissionDao(org.eclipse.che.multiuser.permission.devfile.server.spi.UserDevfilePermissionDao) UserJpaModule(org.eclipse.che.api.user.server.jpa.UserJpaModule) MemberDao(org.eclipse.che.multiuser.organization.spi.MemberDao) InitModule(org.eclipse.che.inject.lifecycle.InitModule) H2JpaCleaner(org.eclipse.che.commons.test.db.H2JpaCleaner) OrganizationManager(org.eclipse.che.multiuser.organization.api.OrganizationManager) NoopExecutorServiceWrapper(org.eclipse.che.commons.observability.NoopExecutorServiceWrapper) UserDevfileDao(org.eclipse.che.api.devfile.server.spi.UserDevfileDao) WorkspaceSharedPool(org.eclipse.che.api.workspace.server.WorkspaceSharedPool) SignatureKeyDao(org.eclipse.che.multiuser.machine.authentication.server.signature.spi.SignatureKeyDao) SchemaInitializer(org.eclipse.che.core.db.schema.SchemaInitializer) FlywaySchemaInitializer(org.eclipse.che.core.db.schema.impl.flyway.FlywaySchemaInitializer) FlywaySchemaInitializer(org.eclipse.che.core.db.schema.impl.flyway.FlywaySchemaInitializer) ProfileDao(org.eclipse.che.api.user.server.spi.ProfileDao) WorkerDao(org.eclipse.che.multiuser.permission.workspace.server.spi.WorkerDao) UserDao(org.eclipse.che.api.user.server.spi.UserDao) DBInitializer(org.eclipse.che.core.db.DBInitializer) AccountModule(org.eclipse.che.account.api.AccountModule) PermissionChecker(org.eclipse.che.multiuser.api.permission.server.PermissionChecker) DevfileModule(org.eclipse.che.api.workspace.server.devfile.DevfileModule) FactoryDao(org.eclipse.che.api.factory.server.spi.FactoryDao) RemoveFreeResourcesLimitSubscriber(org.eclipse.che.multiuser.resource.spi.jpa.JpaFreeResourcesLimitDao.RemoveFreeResourcesLimitSubscriber) WorkspaceLockService(org.eclipse.che.api.workspace.server.WorkspaceLockService) DefaultWorkspaceLockService(org.eclipse.che.api.workspace.server.DefaultWorkspaceLockService) OrganizationResourcesDistributor(org.eclipse.che.multiuser.organization.api.resource.OrganizationResourcesDistributor) H2DBTestServer(org.eclipse.che.commons.test.db.H2DBTestServer) OrganizationJpaModule(org.eclipse.che.multiuser.organization.api.OrganizationJpaModule) DefaultWorkspaceStatusCache(org.eclipse.che.api.workspace.server.DefaultWorkspaceStatusCache) WorkspaceStatusCache(org.eclipse.che.api.workspace.server.WorkspaceStatusCache) MultiuserUserDevfileJpaModule(org.eclipse.che.multiuser.permission.devfile.server.jpa.MultiuserUserDevfileJpaModule) EventService(org.eclipse.che.api.core.notification.EventService) FactoryJpaModule(org.eclipse.che.api.factory.server.jpa.FactoryJpaModule) MultiuserWorkspaceJpaModule(org.eclipse.che.multiuser.permission.workspace.server.jpa.MultiuserWorkspaceJpaModule) AccountDao(org.eclipse.che.account.spi.AccountDao) PreferenceDao(org.eclipse.che.api.user.server.spi.PreferenceDao) SshDao(org.eclipse.che.api.ssh.server.spi.SshDao) JpaPersistModule(com.google.inject.persist.jpa.JpaPersistModule) AbstractModule(com.google.inject.AbstractModule) MachineAuthModule(org.eclipse.che.multiuser.machine.authentication.server.MachineAuthModule) ResourceImpl(org.eclipse.che.multiuser.resource.spi.impl.ResourceImpl) UserManager(org.eclipse.che.api.user.server.UserManager) FreeResourcesLimitDao(org.eclipse.che.multiuser.resource.spi.FreeResourcesLimitDao) JpaFreeResourcesLimitDao(org.eclipse.che.multiuser.resource.spi.jpa.JpaFreeResourcesLimitDao) RemoveOrganizationOnLastUserRemovedEventSubscriber(org.eclipse.che.multiuser.organization.api.listener.RemoveOrganizationOnLastUserRemovedEventSubscriber) AccountManager(org.eclipse.che.account.api.AccountManager) SshJpaModule(org.eclipse.che.api.ssh.server.jpa.SshJpaModule) PostConstruct(jakarta.annotation.PostConstruct) WorkspaceDao(org.eclipse.che.api.workspace.server.spi.WorkspaceDao) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 3 with DevfileModule

use of org.eclipse.che.api.workspace.server.devfile.DevfileModule in project devspaces-images by redhat-developer.

the class JpaEntitiesCascadeRemovalTest method setUp.

@BeforeMethod
public void setUp() throws Exception {
    injector = Guice.createInjector(Stage.PRODUCTION, new AbstractModule() {

        @Override
        protected void configure() {
            H2DBTestServer server = H2DBTestServer.startDefault();
            install(new JpaPersistModule("main"));
            bind(H2JpaCleaner.class).toInstance(new H2JpaCleaner(server));
            bind(EventService.class).in(Singleton.class);
            bind(SchemaInitializer.class).toInstance(new FlywaySchemaInitializer(server.getDataSource(), "che-schema"));
            bind(DBInitializer.class).asEagerSingleton();
            install(new InitModule(PostConstruct.class));
            install(new UserJpaModule());
            install(new AccountModule());
            install(new SshJpaModule());
            install(new FactoryJpaModule());
            install(new OrganizationJpaModule());
            install(new MultiuserWorkspaceJpaModule());
            install(new MachineAuthModule());
            install(new DevfileModule());
            install(new MultiuserUserDevfileJpaModule());
            bind(ExecutorServiceWrapper.class).to(NoopExecutorServiceWrapper.class);
            bind(FreeResourcesLimitDao.class).to(JpaFreeResourcesLimitDao.class);
            bind(RemoveFreeResourcesLimitSubscriber.class).asEagerSingleton();
            // initialize empty binder
            Multibinder.newSetBinder(binder(), WorkspaceAttributeValidator.class);
            bind(WorkspaceManager.class);
            bind(WorkspaceLockService.class).to(DefaultWorkspaceLockService.class);
            bind(WorkspaceStatusCache.class).to(DefaultWorkspaceStatusCache.class);
            bind(RuntimeInfrastructure.class).toInstance(mock(RuntimeInfrastructure.class));
            MapBinder.newMapBinder(binder(), String.class, InternalEnvironmentFactory.class);
            bind(PermissionsManager.class);
            bind(PermissionChecker.class).to(PermissionCheckerImpl.class);
            bind(AccountManager.class);
            bind(Boolean.class).annotatedWith(Names.named("che.workspace.auto_snapshot")).toInstance(false);
            bind(Boolean.class).annotatedWith(Names.named("che.workspace.auto_restore")).toInstance(false);
            bind(Boolean.class).annotatedWith(Names.named("che.devworkspaces.enabled")).toInstance(false);
            bind(WorkspaceSharedPool.class).toInstance(new WorkspaceSharedPool("cached", null, null, new NoopExecutorServiceWrapper()));
            bind(String[].class).annotatedWith(Names.named("che.auth.reserved_user_names")).toInstance(new String[0]);
            bind(RemoveOrganizationOnLastUserRemovedEventSubscriber.class).asEagerSingleton();
            Multibinder.newSetBinder(binder(), ResourceLockKeyProvider.class);
            Multibinder.newSetBinder(binder(), ResourceUsageTracker.class);
            MapBinder.newMapBinder(binder(), String.class, AvailableResourcesProvider.class);
            bind(String.class).annotatedWith(Names.named("che.workspace.plugin_registry_url")).toInstance("");
            bind(String.class).annotatedWith(Names.named("che.factory.scm_file_fetcher_limit_bytes")).toInstance("1024");
            MapBinder.newMapBinder(binder(), String.class, ChePluginsApplier.class);
            Multibinder.newSetBinder(binder(), ResourceType.class).addBinding().to(RamResourceType.class);
            Multibinder.newSetBinder(binder(), ResourcesProvider.class).addBinding().toInstance((accountId) -> singletonList(new ProvidedResourcesImpl("test", null, accountId, -1L, -1L, singletonList(new ResourceImpl(RamResourceType.ID, 1024, RamResourceType.UNIT)))));
            bindConstant().annotatedWith(Names.named("che.workspace.probe_pool_size")).to(1);
            // setup bindings for the devfile that would otherwise be read from the config
            bindConstant().annotatedWith(Names.named("che.workspace.devfile.default_editor")).to("default/editor/0.0.1");
            bindConstant().annotatedWith(Names.named("che.websocket.endpoint")).to("che.websocket.endpoint");
            bind(String.class).annotatedWith(Names.named("che.workspace.devfile.default_editor.plugins")).toInstance("default/plugin/0.0.1");
            bind(String.class).annotatedWith(Names.named("che.workspace.devfile.async.storage.plugin")).toInstance("");
        }
    });
    eventService = injector.getInstance(EventService.class);
    accountDao = injector.getInstance(AccountDao.class);
    accountManager = injector.getInstance(AccountManager.class);
    userDao = injector.getInstance(UserDao.class);
    userManager = injector.getInstance(UserManager.class);
    preferenceDao = injector.getInstance(PreferenceDao.class);
    profileDao = injector.getInstance(ProfileDao.class);
    sshDao = injector.getInstance(SshDao.class);
    workspaceDao = injector.getInstance(WorkspaceDao.class);
    factoryDao = injector.getInstance(FactoryDao.class);
    workerDao = injector.getInstance(WorkerDao.class);
    userDevfileDao = injector.getInstance(UserDevfileDao.class);
    userDevfilePermissionDao = injector.getInstance(UserDevfilePermissionDao.class);
    signatureKeyDao = injector.getInstance(SignatureKeyDao.class);
    freeResourcesLimitDao = injector.getInstance(FreeResourcesLimitDao.class);
    organizationManager = injector.getInstance(OrganizationManager.class);
    memberDao = injector.getInstance(MemberDao.class);
    organizationResourcesDistributor = injector.getInstance(OrganizationResourcesDistributor.class);
    h2JpaCleaner = injector.getInstance(H2JpaCleaner.class);
}
Also used : RuntimeInfrastructure(org.eclipse.che.api.workspace.server.spi.RuntimeInfrastructure) ProvidedResourcesImpl(org.eclipse.che.multiuser.resource.spi.impl.ProvidedResourcesImpl) ExecutorServiceWrapper(org.eclipse.che.commons.observability.ExecutorServiceWrapper) NoopExecutorServiceWrapper(org.eclipse.che.commons.observability.NoopExecutorServiceWrapper) UserDevfilePermissionDao(org.eclipse.che.multiuser.permission.devfile.server.spi.UserDevfilePermissionDao) UserJpaModule(org.eclipse.che.api.user.server.jpa.UserJpaModule) MemberDao(org.eclipse.che.multiuser.organization.spi.MemberDao) InitModule(org.eclipse.che.inject.lifecycle.InitModule) H2JpaCleaner(org.eclipse.che.commons.test.db.H2JpaCleaner) OrganizationManager(org.eclipse.che.multiuser.organization.api.OrganizationManager) NoopExecutorServiceWrapper(org.eclipse.che.commons.observability.NoopExecutorServiceWrapper) UserDevfileDao(org.eclipse.che.api.devfile.server.spi.UserDevfileDao) WorkspaceSharedPool(org.eclipse.che.api.workspace.server.WorkspaceSharedPool) SignatureKeyDao(org.eclipse.che.multiuser.machine.authentication.server.signature.spi.SignatureKeyDao) SchemaInitializer(org.eclipse.che.core.db.schema.SchemaInitializer) FlywaySchemaInitializer(org.eclipse.che.core.db.schema.impl.flyway.FlywaySchemaInitializer) FlywaySchemaInitializer(org.eclipse.che.core.db.schema.impl.flyway.FlywaySchemaInitializer) ProfileDao(org.eclipse.che.api.user.server.spi.ProfileDao) WorkerDao(org.eclipse.che.multiuser.permission.workspace.server.spi.WorkerDao) UserDao(org.eclipse.che.api.user.server.spi.UserDao) DBInitializer(org.eclipse.che.core.db.DBInitializer) AccountModule(org.eclipse.che.account.api.AccountModule) PermissionChecker(org.eclipse.che.multiuser.api.permission.server.PermissionChecker) DevfileModule(org.eclipse.che.api.workspace.server.devfile.DevfileModule) FactoryDao(org.eclipse.che.api.factory.server.spi.FactoryDao) RemoveFreeResourcesLimitSubscriber(org.eclipse.che.multiuser.resource.spi.jpa.JpaFreeResourcesLimitDao.RemoveFreeResourcesLimitSubscriber) WorkspaceLockService(org.eclipse.che.api.workspace.server.WorkspaceLockService) DefaultWorkspaceLockService(org.eclipse.che.api.workspace.server.DefaultWorkspaceLockService) OrganizationResourcesDistributor(org.eclipse.che.multiuser.organization.api.resource.OrganizationResourcesDistributor) H2DBTestServer(org.eclipse.che.commons.test.db.H2DBTestServer) OrganizationJpaModule(org.eclipse.che.multiuser.organization.api.OrganizationJpaModule) DefaultWorkspaceStatusCache(org.eclipse.che.api.workspace.server.DefaultWorkspaceStatusCache) WorkspaceStatusCache(org.eclipse.che.api.workspace.server.WorkspaceStatusCache) MultiuserUserDevfileJpaModule(org.eclipse.che.multiuser.permission.devfile.server.jpa.MultiuserUserDevfileJpaModule) EventService(org.eclipse.che.api.core.notification.EventService) FactoryJpaModule(org.eclipse.che.api.factory.server.jpa.FactoryJpaModule) MultiuserWorkspaceJpaModule(org.eclipse.che.multiuser.permission.workspace.server.jpa.MultiuserWorkspaceJpaModule) AccountDao(org.eclipse.che.account.spi.AccountDao) PreferenceDao(org.eclipse.che.api.user.server.spi.PreferenceDao) SshDao(org.eclipse.che.api.ssh.server.spi.SshDao) JpaPersistModule(com.google.inject.persist.jpa.JpaPersistModule) AbstractModule(com.google.inject.AbstractModule) MachineAuthModule(org.eclipse.che.multiuser.machine.authentication.server.MachineAuthModule) ResourceImpl(org.eclipse.che.multiuser.resource.spi.impl.ResourceImpl) UserManager(org.eclipse.che.api.user.server.UserManager) FreeResourcesLimitDao(org.eclipse.che.multiuser.resource.spi.FreeResourcesLimitDao) JpaFreeResourcesLimitDao(org.eclipse.che.multiuser.resource.spi.jpa.JpaFreeResourcesLimitDao) RemoveOrganizationOnLastUserRemovedEventSubscriber(org.eclipse.che.multiuser.organization.api.listener.RemoveOrganizationOnLastUserRemovedEventSubscriber) AccountManager(org.eclipse.che.account.api.AccountManager) SshJpaModule(org.eclipse.che.api.ssh.server.jpa.SshJpaModule) PostConstruct(jakarta.annotation.PostConstruct) WorkspaceDao(org.eclipse.che.api.workspace.server.spi.WorkspaceDao) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 4 with DevfileModule

use of org.eclipse.che.api.workspace.server.devfile.DevfileModule in project devspaces-images by redhat-developer.

the class WsMasterModule method configure.

@Override
protected void configure() {
    // Can be removed after upgrade to Fabric8 4.10.2 or higher or to Java 11
    if (System.getProperty("java.version", "").startsWith("1.8")) {
        System.setProperty("http2.disable", "true");
    }
    // db related components modules
    install(new org.eclipse.che.account.api.AccountModule());
    install(new org.eclipse.che.api.ssh.server.jpa.SshJpaModule());
    install(new org.eclipse.che.api.core.jsonrpc.impl.JsonRpcModule());
    install(new org.eclipse.che.api.core.websocket.impl.WebSocketModule());
    // db configuration
    bind(SchemaInitializer.class).to(org.eclipse.che.core.db.schema.impl.flyway.FlywaySchemaInitializer.class);
    bind(org.eclipse.che.core.db.DBInitializer.class).asEagerSingleton();
    bind(PlaceholderReplacer.class).toProvider(org.eclipse.che.core.db.schema.impl.flyway.PlaceholderReplacerProvider.class);
    // factory
    bind(FactoryAcceptValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryAcceptValidatorImpl.class);
    bind(FactoryCreateValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryCreateValidatorImpl.class);
    bind(FactoryEditValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryEditValidatorImpl.class);
    bind(org.eclipse.che.api.factory.server.FactoryService.class);
    bind(ScmService.class);
    install(new org.eclipse.che.api.factory.server.jpa.FactoryJpaModule());
    // Service-specific factory resolvers.
    Multibinder<FactoryParametersResolver> factoryParametersResolverMultibinder = Multibinder.newSetBinder(binder(), FactoryParametersResolver.class);
    factoryParametersResolverMultibinder.addBinding().to(GithubFactoryParametersResolver.class);
    factoryParametersResolverMultibinder.addBinding().to(BitbucketServerAuthorizingFactoryParametersResolver.class);
    factoryParametersResolverMultibinder.addBinding().to(GitlabFactoryParametersResolver.class);
    Multibinder<ScmFileResolver> scmFileResolverResolverMultibinder = Multibinder.newSetBinder(binder(), ScmFileResolver.class);
    scmFileResolverResolverMultibinder.addBinding().to(GithubScmFileResolver.class);
    scmFileResolverResolverMultibinder.addBinding().to(GitlabScmFileResolver.class);
    scmFileResolverResolverMultibinder.addBinding().to(BitbucketServerScmFileResolver.class);
    install(new org.eclipse.che.api.factory.server.scm.KubernetesScmModule());
    install(new org.eclipse.che.api.factory.server.bitbucket.BitbucketServerModule());
    install(new org.eclipse.che.api.factory.server.gitlab.GitlabModule());
    install(new org.eclipse.che.api.factory.server.github.GithubModule());
    bind(org.eclipse.che.api.core.rest.ApiInfoService.class);
    bind(org.eclipse.che.api.ssh.server.SshService.class);
    bind(org.eclipse.che.api.user.server.UserService.class);
    bind(org.eclipse.che.api.user.server.ProfileService.class);
    bind(org.eclipse.che.api.user.server.PreferencesService.class);
    bind(org.eclipse.che.security.oauth.OAuthAuthenticationService.class);
    bind(org.eclipse.che.security.oauth1.OAuthAuthenticationService.class);
    install(new DevfileModule());
    bind(WorkspaceEntityProvider.class);
    bind(org.eclipse.che.api.workspace.server.TemporaryWorkspaceRemover.class);
    bind(org.eclipse.che.api.workspace.server.WorkspaceService.class);
    bind(org.eclipse.che.api.devfile.server.DevfileService.class);
    bind(org.eclipse.che.api.devfile.server.UserDevfileEntityProvider.class);
    install(new FactoryModuleBuilder().build(ServersCheckerFactory.class));
    Multibinder<InternalEnvironmentProvisioner> internalEnvironmentProvisioners = Multibinder.newSetBinder(binder(), InternalEnvironmentProvisioner.class);
    internalEnvironmentProvisioners.addBinding().to(EnvVarEnvironmentProvisioner.class);
    internalEnvironmentProvisioners.addBinding().to(MachineNameProvisioner.class);
    Multibinder<EnvVarProvider> envVarProviders = Multibinder.newSetBinder(binder(), EnvVarProvider.class);
    envVarProviders.addBinding().to(CheApiEnvVarProvider.class);
    envVarProviders.addBinding().to(CheApiInternalEnvVarProvider.class);
    envVarProviders.addBinding().to(CheApiExternalEnvVarProvider.class);
    envVarProviders.addBinding().to(MachineTokenEnvVarProvider.class);
    envVarProviders.addBinding().to(WorkspaceIdEnvVarProvider.class);
    envVarProviders.addBinding().to(WorkspaceNamespaceNameEnvVarProvider.class);
    envVarProviders.addBinding().to(WorkspaceNameEnvVarProvider.class);
    envVarProviders.addBinding().to(ProjectsRootEnvVariableProvider.class);
    Multibinder<LegacyEnvVarProvider> legacyEnvVarProviderMultibinders = Multibinder.newSetBinder(binder(), LegacyEnvVarProvider.class);
    legacyEnvVarProviderMultibinders.addBinding().to(JavaOptsEnvVariableProvider.class);
    legacyEnvVarProviderMultibinders.addBinding().to(MavenOptsEnvVariableProvider.class);
    legacyEnvVarProviderMultibinders.addBinding().to(AgentAuthEnableEnvVarProvider.class);
    bind(org.eclipse.che.api.workspace.server.event.WorkspaceJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.everrest.EverrestDownloadFileResponseFilter.class);
    bind(org.eclipse.che.everrest.ETagResponseFilter.class);
    // temporary solution
    bind(org.eclipse.che.api.workspace.server.event.RuntimeStatusJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.api.workspace.server.event.MachineStatusJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.api.workspace.server.event.ServerStatusJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.api.workspace.server.event.RuntimeLogJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.security.oauth.OAuthAuthenticatorProvider.class).to(org.eclipse.che.security.oauth.OAuthAuthenticatorProviderImpl.class);
    install(new org.eclipse.che.api.core.rest.CoreRestModule());
    install(new org.eclipse.che.api.core.util.FileCleaner.FileCleanerModule());
    install(new org.eclipse.che.swagger.deploy.DocsModule());
    install(new org.eclipse.che.commons.schedule.executor.ScheduleModule());
    install(new org.eclipse.che.api.logger.deploy.LoggerModule());
    final Multibinder<MessageBodyAdapter> adaptersMultibinder = Multibinder.newSetBinder(binder(), MessageBodyAdapter.class);
    final MessageBodyAdapterInterceptor interceptor = new MessageBodyAdapterInterceptor();
    requestInjection(interceptor);
    bindInterceptor(subclassesOf(CheJsonProvider.class), names("readFrom"), interceptor);
    // system components
    install(new SystemModule());
    Multibinder<ServiceTermination> terminationMultiBinder = Multibinder.newSetBinder(binder(), ServiceTermination.class);
    terminationMultiBinder.addBinding().to(org.eclipse.che.api.workspace.server.WorkspaceServiceTermination.class);
    terminationMultiBinder.addBinding().to(org.eclipse.che.api.system.server.CronThreadPullTermination.class);
    terminationMultiBinder.addBinding().to(org.eclipse.che.api.workspace.server.hc.probe.ProbeSchedulerTermination.class);
    bind(DBTermination.class);
    final Map<String, String> persistenceProperties = new HashMap<>();
    persistenceProperties.put(PersistenceUnitProperties.TARGET_SERVER, "None");
    persistenceProperties.put(PersistenceUnitProperties.LOGGING_LOGGER, "DefaultLogger");
    persistenceProperties.put(PersistenceUnitProperties.LOGGING_LEVEL, "SEVERE");
    persistenceProperties.put(PersistenceUnitProperties.NON_JTA_DATASOURCE, "java:/comp/env/jdbc/che");
    bindConstant().annotatedWith(Names.named("jndi.datasource.name")).to("java:/comp/env/jdbc/che");
    String infrastructure = System.getenv("CHE_INFRASTRUCTURE_ACTIVE");
    install(new FactoryModuleBuilder().build(JwtProxyConfigBuilderFactory.class));
    install(new FactoryModuleBuilder().build(PassThroughProxyProvisionerFactory.class));
    installDefaultSecureServerExposer(infrastructure);
    install(new org.eclipse.che.security.oauth1.BitbucketModule());
    install(new GitLabModule());
    configureMultiUserMode(persistenceProperties, infrastructure);
    install(new com.google.inject.persist.jpa.JpaPersistModule("main").properties(persistenceProperties));
    if (OpenShiftInfrastructure.NAME.equals(infrastructure)) {
        install(new OpenShiftInfraModule());
    } else if (KubernetesInfrastructure.NAME.equals(infrastructure)) {
        install(new KubernetesInfraModule());
    }
    install(new CheJsonRpcWebSocketConfigurationModule());
    bind(org.eclipse.che.api.user.server.AppStatesPreferenceCleaner.class);
    MapBinder.newMapBinder(binder(), String.class, ChePluginsApplier.class);
    if (Boolean.valueOf(System.getenv("CHE_TRACING_ENABLED"))) {
        install(new org.eclipse.che.core.tracing.TracingModule());
    } else {
        install(new org.eclipse.che.core.tracing.NopTracingModule());
    }
    if (Boolean.valueOf(System.getenv("CHE_METRICS_ENABLED"))) {
        install(new org.eclipse.che.core.metrics.MetricsModule());
        install(new WsMasterMetricsModule());
        install(new InfrastructureMetricsModule());
    } else {
        install(new org.eclipse.che.core.metrics.NoopMetricsModule());
    }
    if (Boolean.valueOf(System.getenv("CHE_TRACING_ENABLED")) && Boolean.valueOf(System.getenv("CHE_METRICS_ENABLED"))) {
        install(new TracingMetricsModule());
    }
    install(new ExecutorWrapperModule());
    install(new OpenShiftOAuthModule());
}
Also used : HashMap(java.util.HashMap) GitLabModule(org.eclipse.che.security.oauth.GitLabModule) FactoryEditValidator(org.eclipse.che.api.factory.server.FactoryEditValidator) CheJsonProvider(org.eclipse.che.api.core.rest.CheJsonProvider) MessageBodyAdapter(org.eclipse.che.api.core.rest.MessageBodyAdapter) DevfileModule(org.eclipse.che.api.workspace.server.devfile.DevfileModule) ServiceTermination(org.eclipse.che.api.system.server.ServiceTermination) WorkspaceStatusCache(org.eclipse.che.api.workspace.server.WorkspaceStatusCache) SystemModule(org.eclipse.che.api.system.server.SystemModule) ServersCheckerFactory(org.eclipse.che.api.workspace.server.hc.ServersCheckerFactory) FactoryCreateValidator(org.eclipse.che.api.factory.server.FactoryCreateValidator) GithubScmFileResolver(org.eclipse.che.api.factory.server.github.GithubScmFileResolver) GitlabScmFileResolver(org.eclipse.che.api.factory.server.gitlab.GitlabScmFileResolver) BitbucketServerScmFileResolver(org.eclipse.che.api.factory.server.bitbucket.BitbucketServerScmFileResolver) ScmFileResolver(org.eclipse.che.api.factory.server.ScmFileResolver) InternalEnvironmentProvisioner(org.eclipse.che.api.workspace.server.spi.provision.InternalEnvironmentProvisioner) WsMasterMetricsModule(org.eclipse.che.api.metrics.WsMasterMetricsModule) KubernetesInfraModule(org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesInfraModule) MessageBodyAdapterInterceptor(org.eclipse.che.api.core.rest.MessageBodyAdapterInterceptor) CheApiEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiEnvVarProvider) MachineTokenEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.MachineTokenEnvVarProvider) WorkspaceNamespaceNameEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceNamespaceNameEnvVarProvider) CheApiInternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiInternalEnvVarProvider) AgentAuthEnableEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.AgentAuthEnableEnvVarProvider) CheApiExternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiExternalEnvVarProvider) EnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.EnvVarProvider) WorkspaceNameEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceNameEnvVarProvider) LegacyEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.LegacyEnvVarProvider) WorkspaceIdEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceIdEnvVarProvider) GitlabFactoryParametersResolver(org.eclipse.che.api.factory.server.gitlab.GitlabFactoryParametersResolver) FactoryParametersResolver(org.eclipse.che.api.factory.server.FactoryParametersResolver) GithubFactoryParametersResolver(org.eclipse.che.api.factory.server.github.GithubFactoryParametersResolver) BitbucketServerAuthorizingFactoryParametersResolver(org.eclipse.che.api.factory.server.bitbucket.BitbucketServerAuthorizingFactoryParametersResolver) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) PlaceholderReplacer(org.flywaydb.core.internal.util.PlaceholderReplacer) OpenShiftOAuthModule(org.eclipse.che.security.oauth.OpenShiftOAuthModule) SchemaInitializer(org.eclipse.che.core.db.schema.SchemaInitializer) LegacyEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.LegacyEnvVarProvider) CheJsonRpcWebSocketConfigurationModule(org.eclipse.che.api.deploy.jsonrpc.CheJsonRpcWebSocketConfigurationModule) PassThroughProxyProvisionerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.PassThroughProxyProvisionerFactory) OpenShiftInfraModule(org.eclipse.che.workspace.infrastructure.openshift.OpenShiftInfraModule) InfrastructureMetricsModule(org.eclipse.che.workspace.infrastructure.metrics.InfrastructureMetricsModule) FactoryAcceptValidator(org.eclipse.che.api.factory.server.FactoryAcceptValidator) ExecutorWrapperModule(org.eclipse.che.commons.observability.deploy.ExecutorWrapperModule) JwtProxyConfigBuilderFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.JwtProxyConfigBuilderFactory) TracingMetricsModule(org.eclipse.che.core.tracing.metrics.TracingMetricsModule)

Aggregations

WorkspaceStatusCache (org.eclipse.che.api.workspace.server.WorkspaceStatusCache)4 DevfileModule (org.eclipse.che.api.workspace.server.devfile.DevfileModule)4 SchemaInitializer (org.eclipse.che.core.db.schema.SchemaInitializer)4 AbstractModule (com.google.inject.AbstractModule)2 FactoryModuleBuilder (com.google.inject.assistedinject.FactoryModuleBuilder)2 JpaPersistModule (com.google.inject.persist.jpa.JpaPersistModule)2 PostConstruct (jakarta.annotation.PostConstruct)2 HashMap (java.util.HashMap)2 AccountManager (org.eclipse.che.account.api.AccountManager)2 AccountModule (org.eclipse.che.account.api.AccountModule)2 AccountDao (org.eclipse.che.account.spi.AccountDao)2 EventService (org.eclipse.che.api.core.notification.EventService)2 CheJsonProvider (org.eclipse.che.api.core.rest.CheJsonProvider)2 MessageBodyAdapter (org.eclipse.che.api.core.rest.MessageBodyAdapter)2 MessageBodyAdapterInterceptor (org.eclipse.che.api.core.rest.MessageBodyAdapterInterceptor)2 CheJsonRpcWebSocketConfigurationModule (org.eclipse.che.api.deploy.jsonrpc.CheJsonRpcWebSocketConfigurationModule)2 UserDevfileDao (org.eclipse.che.api.devfile.server.spi.UserDevfileDao)2 FactoryAcceptValidator (org.eclipse.che.api.factory.server.FactoryAcceptValidator)2 FactoryCreateValidator (org.eclipse.che.api.factory.server.FactoryCreateValidator)2 FactoryEditValidator (org.eclipse.che.api.factory.server.FactoryEditValidator)2