Search in sources :

Example 6 with ProvidedResourcesImpl

use of org.eclipse.che.multiuser.resource.spi.impl.ProvidedResourcesImpl in project che-server by eclipse-che.

the class ResourceManagerTest method testReturnsResourceDetailsForGivenAccount.

@Test
public void testReturnsResourceDetailsForGivenAccount() throws Exception {
    final ResourceImpl testResource = new ResourceImpl("RAM", 1000, "mb");
    final ResourceImpl reducedResource = new ResourceImpl("timeout", 2000, "m");
    final ProvidedResourcesImpl providedResource = new ProvidedResourcesImpl("test", null, ACCOUNT_ID, 123L, 321L, singletonList(testResource));
    when(resourcesProvider.getResources(eq(ACCOUNT_ID))).thenReturn(singletonList(providedResource));
    when(resourceAggregator.aggregateByType(any())).thenReturn(ImmutableMap.of(reducedResource.getType(), reducedResource));
    final ResourcesDetails resourcesDetails = resourceManager.getResourceDetails(ACCOUNT_ID);
    verify(resourcesProvider).getResources(eq(ACCOUNT_ID));
    verify(resourceAggregator).aggregateByType(eq(singletonList(testResource)));
    assertEquals(resourcesDetails.getAccountId(), ACCOUNT_ID);
    assertEquals(resourcesDetails.getProvidedResources().size(), 1);
    assertEquals(resourcesDetails.getProvidedResources().get(0), providedResource);
    assertEquals(resourcesDetails.getTotalResources().size(), 1);
    assertEquals(resourcesDetails.getTotalResources().get(0), reducedResource);
}
Also used : ProvidedResourcesImpl(org.eclipse.che.multiuser.resource.spi.impl.ProvidedResourcesImpl) ResourceImpl(org.eclipse.che.multiuser.resource.spi.impl.ResourceImpl) ResourcesDetails(org.eclipse.che.multiuser.resource.model.ResourcesDetails) Test(org.testng.annotations.Test)

Example 7 with ProvidedResourcesImpl

use of org.eclipse.che.multiuser.resource.spi.impl.ProvidedResourcesImpl in project che-server by eclipse-che.

the class SuborganizationResourcesProviderTest method shouldProvideResourcesForSuborganizationalAccount.

@Test
public void shouldProvideResourcesForSuborganizationalAccount() throws Exception {
    // given
    when(account.getType()).thenReturn(OrganizationImpl.ORGANIZATIONAL_ACCOUNT);
    when(organization.getParent()).thenReturn("parentOrg");
    final ResourceImpl parentNotCapedResource = new ResourceImpl("test", 1234, "unit");
    final ResourceImpl parentCapedResource = new ResourceImpl("caped", 20, "unit");
    final ResourceImpl parentUnlimitedCapedResource = new ResourceImpl("unlimited", -1, "unit");
    doReturn(asList(parentNotCapedResource, parentCapedResource, parentUnlimitedCapedResource)).when(resourceManager).getTotalResources(anyString());
    final ResourceImpl capedResourceCap = new ResourceImpl("caped", 10, "unit");
    final ResourceImpl unlimitedCapedResourceCap = new ResourceImpl("unlimited", 40, "unit");
    doReturn(asList(capedResourceCap, unlimitedCapedResourceCap)).when(resourcesDistributor).getResourcesCaps(any());
    // when
    final List<ProvidedResources> providedResources = suborganizationResourcesProvider.getResources("organization123");
    // then
    assertEquals(providedResources.size(), 1);
    assertEquals(providedResources.get(0), new ProvidedResourcesImpl(SuborganizationResourcesProvider.PARENT_RESOURCES_PROVIDER, null, "organization123", -1L, -1L, asList(parentNotCapedResource, capedResourceCap, unlimitedCapedResourceCap)));
    verify(accountManager).getById("organization123");
    verify(organizationManager).getById("organization123");
    verify(resourcesDistributor).getResourcesCaps("organization123");
    verify(resourceManager).getTotalResources("parentOrg");
}
Also used : ProvidedResourcesImpl(org.eclipse.che.multiuser.resource.spi.impl.ProvidedResourcesImpl) ResourceImpl(org.eclipse.che.multiuser.resource.spi.impl.ResourceImpl) ProvidedResources(org.eclipse.che.multiuser.resource.model.ProvidedResources) Test(org.testng.annotations.Test)

Example 8 with ProvidedResourcesImpl

use of org.eclipse.che.multiuser.resource.spi.impl.ProvidedResourcesImpl in project che-server by eclipse-che.

the class SuborganizationResourcesProvider method getResources.

@Override
public List<ProvidedResources> getResources(String accountId) throws NotFoundException, ServerException {
    final Account account = accountManager.getById(accountId);
    String parent;
    if (!OrganizationImpl.ORGANIZATIONAL_ACCOUNT.equals(account.getType()) || (parent = organizationManager.getById(accountId).getParent()) == null) {
        return emptyList();
    }
    // given account is suborganization's account and can have resources provided by parent
    List<? extends Resource> parentTotalResources = resourceManagerProvider.get().getTotalResources(parent);
    if (!parentTotalResources.isEmpty()) {
        try {
            List<? extends Resource> resourcesCaps = distributorProvider.get().getResourcesCaps(accountId);
            return singletonList(new ProvidedResourcesImpl(PARENT_RESOURCES_PROVIDER, null, accountId, -1L, -1L, cap(parentTotalResources, resourcesCaps)));
        } catch (ConflictException e) {
            throw new ServerException(e.getLocalizedMessage());
        }
    }
    return emptyList();
}
Also used : Account(org.eclipse.che.account.shared.model.Account) ProvidedResourcesImpl(org.eclipse.che.multiuser.resource.spi.impl.ProvidedResourcesImpl) ServerException(org.eclipse.che.api.core.ServerException) ConflictException(org.eclipse.che.api.core.ConflictException)

Example 9 with ProvidedResourcesImpl

use of org.eclipse.che.multiuser.resource.spi.impl.ProvidedResourcesImpl 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 10 with ProvidedResourcesImpl

use of org.eclipse.che.multiuser.resource.spi.impl.ProvidedResourcesImpl 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)

Aggregations

ProvidedResourcesImpl (org.eclipse.che.multiuser.resource.spi.impl.ProvidedResourcesImpl)16 ResourceImpl (org.eclipse.che.multiuser.resource.spi.impl.ResourceImpl)14 Test (org.testng.annotations.Test)10 ProvidedResources (org.eclipse.che.multiuser.resource.model.ProvidedResources)8 NotFoundException (org.eclipse.che.api.core.NotFoundException)4 AbstractModule (com.google.inject.AbstractModule)2 JpaPersistModule (com.google.inject.persist.jpa.JpaPersistModule)2 PostConstruct (jakarta.annotation.PostConstruct)2 AccountManager (org.eclipse.che.account.api.AccountManager)2 AccountModule (org.eclipse.che.account.api.AccountModule)2 Account (org.eclipse.che.account.shared.model.Account)2 AccountDao (org.eclipse.che.account.spi.AccountDao)2 ConflictException (org.eclipse.che.api.core.ConflictException)2 ServerException (org.eclipse.che.api.core.ServerException)2 EventService (org.eclipse.che.api.core.notification.EventService)2 UserDevfileDao (org.eclipse.che.api.devfile.server.spi.UserDevfileDao)2 FactoryJpaModule (org.eclipse.che.api.factory.server.jpa.FactoryJpaModule)2 FactoryDao (org.eclipse.che.api.factory.server.spi.FactoryDao)2 SshJpaModule (org.eclipse.che.api.ssh.server.jpa.SshJpaModule)2 SshDao (org.eclipse.che.api.ssh.server.spi.SshDao)2