diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/ApplicationControllerCE.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/ApplicationControllerCE.java index 663a5f913d8c..11c32aa490b3 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/ApplicationControllerCE.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/ApplicationControllerCE.java @@ -326,7 +326,7 @@ public Mono> importApplicationPartially( @PathVariable String branchedApplicationId, @RequestParam(name = FieldName.PAGE_ID) String branchedPageId) { return fileMono.flatMap(fileData -> partialImportService.importResourceInPage( - workspaceId, branchedApplicationId, branchedPageId, null, fileData)) + workspaceId, branchedApplicationId, branchedPageId, fileData)) .map(fetchedResource -> new ResponseDTO<>(HttpStatus.CREATED, fetchedResource)); } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/partial/PartialImportServiceCE.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/partial/PartialImportServiceCE.java index b7daf9cedd84..a207e9f472dd 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/partial/PartialImportServiceCE.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/partial/PartialImportServiceCE.java @@ -8,8 +8,7 @@ public interface PartialImportServiceCE { - Mono importResourceInPage( - String workspaceId, String applicationId, String pageId, String branchName, Part file); + Mono importResourceInPage(String workspaceId, String applicationId, String pageId, Part file); Mono importBuildingBlock(BuildingBlockDTO buildingBlockDTO); } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/partial/PartialImportServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/partial/PartialImportServiceCEImpl.java index 7cdca44ee288..29c9a04ec75d 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/partial/PartialImportServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/partial/PartialImportServiceCEImpl.java @@ -6,7 +6,6 @@ import com.appsmith.external.models.CreatorContextType; import com.appsmith.external.models.Datasource; import com.appsmith.server.acl.AclPermission; -import com.appsmith.server.actioncollections.base.ActionCollectionService; import com.appsmith.server.applications.base.ApplicationService; import com.appsmith.server.constants.FieldName; import com.appsmith.server.datasources.base.DatasourceService; @@ -98,7 +97,6 @@ public class PartialImportServiceCEImpl implements PartialImportServiceCE { private final WidgetRefactorUtil widgetRefactorUtil; private final ApplicationPageService applicationPageService; private final NewActionService newActionService; - private final ActionCollectionService actionCollectionService; private final ArtifactBasedImportService applicationImportService; private final DatasourceService datasourceService; @@ -107,8 +105,7 @@ public class PartialImportServiceCEImpl implements PartialImportServiceCE { private final DryOperationRepository dryOperationRepository; @Override - public Mono importResourceInPage( - String workspaceId, String applicationId, String pageId, String branchName, Part file) { + public Mono importResourceInPage(String workspaceId, String applicationId, String pageId, Part file) { Mono currUserMono = sessionUserService.getCurrentUser(); return importService .extractArtifactExchangeJson(file) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/partial/PartialImportServiceImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/partial/PartialImportServiceImpl.java index ae9e89e9a81b..727558d49007 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/partial/PartialImportServiceImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/imports/internal/partial/PartialImportServiceImpl.java @@ -1,7 +1,6 @@ package com.appsmith.server.imports.internal.partial; import com.appsmith.external.models.Datasource; -import com.appsmith.server.actioncollections.base.ActionCollectionService; import com.appsmith.server.applications.base.ApplicationService; import com.appsmith.server.datasources.base.DatasourceService; import com.appsmith.server.domains.ActionCollection; @@ -67,7 +66,6 @@ public PartialImportServiceImpl( WidgetRefactorUtil widgetRefactorUtil, ApplicationPageService applicationPageService, NewActionService newActionService, - ActionCollectionService actionCollectionService, ArtifactBasedImportService applicationImportService, DatasourceService datasourceService, CustomJSLibService customJSLibService, @@ -98,7 +96,6 @@ public PartialImportServiceImpl( widgetRefactorUtil, applicationPageService, newActionService, - actionCollectionService, applicationImportService, datasourceService, customJSLibService, diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/PartialImportServiceTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/PartialImportServiceTest.java index 1169d8742880..2f8d1eda2a99 100644 --- a/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/PartialImportServiceTest.java +++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/PartialImportServiceTest.java @@ -285,7 +285,7 @@ public void testPartialImport_nonGitConnectedApp_success() { Part filePart = createFilePart("test_assets/ImportExportServiceTest/partial-export-resource.json"); Mono, List>> result = partialImportService - .importResourceInPage(workspaceId, testApplication.getId(), pageId, null, filePart) + .importResourceInPage(workspaceId, testApplication.getId(), pageId, filePart) .flatMap(application -> { Mono> actionList = newActionService .findByPageId(pageId, Optional.empty()) @@ -338,7 +338,7 @@ public void testPartialImport_gitConnectedAppDefaultBranch_success() { PageDTO finalSavedPage = savedPage; Mono, List>> result = partialImportService - .importResourceInPage(workspaceId, application.getId(), savedPage.getId(), "master", filePart) + .importResourceInPage(workspaceId, application.getId(), savedPage.getId(), filePart) .flatMap(application1 -> { Mono> actionList = newActionService .findByPageId(finalSavedPage.getId(), Optional.empty()) @@ -398,9 +398,8 @@ public void testPartialImport_nameClashInAction_successWithNoNameDuplicates() { Part filePart = createFilePart("test_assets/ImportExportServiceTest/partial-export-resource.json"); Mono, List>> result = partialImportService - .importResourceInPage(workspaceId, testApplication.getId(), pageId, null, filePart) - .then(partialImportService.importResourceInPage( - workspaceId, testApplication.getId(), pageId, null, filePart)) + .importResourceInPage(workspaceId, testApplication.getId(), pageId, filePart) + .then(partialImportService.importResourceInPage(workspaceId, testApplication.getId(), pageId, filePart)) .flatMap(application -> { Mono> actionList = newActionService .findByPageId(pageId, Optional.empty())