chore: Split get by page id for export (#29910)

This commit is contained in:
Nidhi 2023-12-28 10:23:41 +05:30 committed by GitHub
parent c1491c6db7
commit b12e7538e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

@ -138,6 +138,8 @@ public interface NewActionServiceCE extends CrudService<NewAction, String> {
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,

View File

@ -1759,6 +1759,12 @@ public class NewActionServiceCEImpl extends BaseService<NewActionRepository, New
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,

View File

@ -38,8 +38,8 @@ public class NewActionExportableServiceCEImpl implements ExportableServiceCE<New
}
// 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,
@ -51,7 +51,7 @@ public class NewActionExportableServiceCEImpl implements ExportableServiceCE<New
exportingMetaDTO.getIsGitSync(), exportingMetaDTO.getExportWithConfiguration()));
Flux<NewAction> actionFlux =
newActionService.findByPageIds(exportingMetaDTO.getUnpublishedPages(), optionalPermission);
newActionService.findByPageIdsForExport(exportingMetaDTO.getUnpublishedPages(), optionalPermission);
return actionFlux
.collectList()