@Test public void standaloneShouldReturnDefaultDataWithCheNamespaceType() throws Exception { UserCheTenantData data = standaloneDataProvider.getUserCheTenantData(subject, NAMESPACE_TYPE); assertEquals(data.getClusterUrl(), "https: assertEquals(data.getNamespace(), NAMESPACE); assertEquals(data.isClusterCapacityExhausted(), false); }
public UserCheTenantData getUserCheTenantData(Subject subject, String namespaceType) throws InfrastructureException { if (standalone) { return getDataStandalone(namespaceType); } checkSubject(subject); String keycloakToken = subject.getToken(); try { return tenantDataCache.get(new TenantDataCacheKey(keycloakToken, namespaceType)); } catch (ExecutionException e) { throw new InfrastructureException( "Exception during the user tenant data retrieval or parsing", e.getCause()); } }
TenantDataProvider { public UserCheTenantData getUserCheTenantData(Subject subject, String namespaceType) throws InfrastructureException { if (standalone) { return getDataStandalone(namespaceType); } checkSubject(subject); String keycloakToken = subject.getToken(); try { return tenantDataCache.get(new TenantDataCacheKey(keycloakToken, namespaceType)); } catch (ExecutionException e) { throw new InfrastructureException( "Exception during the user tenant data retrieval or parsing", e.getCause()); } } }
TenantDataProvider { public UserCheTenantData getUserCheTenantData(Subject subject, String namespaceType) throws InfrastructureException { if (standalone) { return getDataStandalone(namespaceType); } checkSubject(subject); String keycloakToken = subject.getToken(); try { return tenantDataCache.get(new TenantDataCacheKey(keycloakToken, namespaceType)); } catch (ExecutionException e) { throw new InfrastructureException( "Exception during the user tenant data retrieval or parsing", e.getCause()); } } @Inject  TenantDataProvider(
      TenantDataCacheLoader tenantDataCacheLoader,
      @Named("che.infra.openshift.project") String cheNamespace,
      @Named("che.fabric8.standalone") boolean standalone); }
TenantDataProvider { public UserCheTenantData getUserCheTenantData(Subject subject, String namespaceType) throws InfrastructureException { if (standalone) { return getDataStandalone(namespaceType); } checkSubject(subject); String keycloakToken = subject.getToken(); try { return tenantDataCache.get(new TenantDataCacheKey(keycloakToken, namespaceType)); } catch (ExecutionException e) { throw new InfrastructureException( "Exception during the user tenant data retrieval or parsing", e.getCause()); } } @Inject  TenantDataProvider(
      TenantDataCacheLoader tenantDataCacheLoader,
      @Named("che.infra.openshift.project") String cheNamespace,
      @Named("che.fabric8.standalone") boolean standalone); UserCheTenantData getUserCheTenantData(Subject subject, String namespaceType); }
TenantDataProvider { public UserCheTenantData getUserCheTenantData(Subject subject, String namespaceType) throws InfrastructureException { if (standalone) { return getDataStandalone(namespaceType); } checkSubject(subject); String keycloakToken = subject.getToken(); try { return tenantDataCache.get(new TenantDataCacheKey(keycloakToken, namespaceType)); } catch (ExecutionException e) { throw new InfrastructureException( "Exception during the user tenant data retrieval or parsing", e.getCause()); } } @Inject  TenantDataProvider(
      TenantDataCacheLoader tenantDataCacheLoader,
      @Named("che.infra.openshift.project") String cheNamespace,
      @Named("che.fabric8.standalone") boolean standalone); UserCheTenantData getUserCheTenantData(Subject subject, String namespaceType);  }