diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ConfigServiceImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ConfigServiceImpl.java index 5f96581892..e19ccad98d 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ConfigServiceImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ConfigServiceImpl.java @@ -1,6 +1,8 @@ package com.appsmith.server.services; +import com.appsmith.server.repositories.ApplicationRepository; import com.appsmith.server.repositories.ConfigRepository; +import com.appsmith.server.repositories.DatasourceRepository; import com.appsmith.server.services.ce.ConfigServiceCEImpl; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -9,7 +11,11 @@ import org.springframework.stereotype.Service; @Service public class ConfigServiceImpl extends ConfigServiceCEImpl implements ConfigService { - public ConfigServiceImpl(ConfigRepository repository) { - super(repository); + public ConfigServiceImpl( + ConfigRepository repository, + ApplicationRepository applicationRepository, + DatasourceRepository datasourceRepository) { + + super(repository, applicationRepository, datasourceRepository); } } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ConfigServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ConfigServiceCEImpl.java index ba8f13e235..f28c96e663 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ConfigServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ConfigServiceCEImpl.java @@ -8,7 +8,9 @@ import com.appsmith.server.domains.Config; import com.appsmith.server.domains.User; import com.appsmith.server.exceptions.AppsmithError; import com.appsmith.server.exceptions.AppsmithException; +import com.appsmith.server.repositories.ApplicationRepository; import com.appsmith.server.repositories.ConfigRepository; +import com.appsmith.server.repositories.DatasourceRepository; import lombok.extern.slf4j.Slf4j; import net.minidev.json.JSONObject; import reactor.core.publisher.Flux; @@ -22,12 +24,21 @@ import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; @Slf4j public class ConfigServiceCEImpl implements ConfigServiceCE { + private static final String TEMPLATE_WORKSPACE_CONFIG_NAME = "template-workspace"; private final ConfigRepository repository; + private final ApplicationRepository applicationRepository; + private final DatasourceRepository datasourceRepository; // This is permanently cached through the life of the JVM process as this is not intended to change at runtime ever. private String instanceId = null; - public ConfigServiceCEImpl(ConfigRepository repository) { + public ConfigServiceCEImpl( + ConfigRepository repository, + ApplicationRepository applicationRepository, + DatasourceRepository datasourceRepository) { + + this.applicationRepository = applicationRepository; + this.datasourceRepository = datasourceRepository; this.repository = repository; }