Skip to content

Commit

Permalink
chore: Split get by page id for export (#29910)
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhi-nair authored Dec 28, 2023
1 parent c1491c6 commit b12e753
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ Mono<ImportedActionAndCollectionMapsDTO> updateActionsWithImportedCollectionIds(

Flux<NewAction> findByPageIds(List<String> unpublishedPages, Optional<AclPermission> optionalPermission);

Flux<NewAction> findByPageIdsForExport(List<String> unpublishedPages, Optional<AclPermission> optionalPermission);

Flux<NewAction> findAllActionsByContextIdAndContextTypeAndViewMode(
String contextId,
CreatorContextType contextType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1759,6 +1759,12 @@ public Flux<NewAction> findByPageIds(List<String> unpublishedPages, Optional<Acl
return repository.findByPageIds(unpublishedPages, optionalPermission);
}

@Override
public Flux<NewAction> findByPageIdsForExport(
List<String> unpublishedPages, Optional<AclPermission> optionalPermission) {
return repository.findByPageIds(unpublishedPages, optionalPermission);
}

@Override
public Flux<NewAction> findAllActionsByContextIdAndContextTypeAndViewMode(
String contextId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public NewActionExportableServiceCEImpl(NewActionService newActionService, Actio
}

// Requires datasourceIdToNameMap, pageIdToNameMap, pluginMap, collectionIdToNameMap
// Updates actionId to name map in exportable resources. Also directly updates required collection information in
// application json
// Updates actionId to name map in exportable resources.
// Also, directly updates required collection information in application json
@Override
public Mono<Void> getExportableEntities(
ExportingMetaDTO exportingMetaDTO,
Expand All @@ -51,7 +51,7 @@ public Mono<Void> getExportableEntities(
exportingMetaDTO.getIsGitSync(), exportingMetaDTO.getExportWithConfiguration()));

Flux<NewAction> actionFlux =
newActionService.findByPageIds(exportingMetaDTO.getUnpublishedPages(), optionalPermission);
newActionService.findByPageIdsForExport(exportingMetaDTO.getUnpublishedPages(), optionalPermission);

return actionFlux
.collectList()
Expand Down

0 comments on commit b12e753

Please sign in to comment.