Skip to content

Conversation

@basseche
Copy link
Contributor

PR Summary

@basseche basseche self-assigned this Dec 17, 2025
@basseche basseche force-pushed the export_network_explorer branch 4 times, most recently from 28c9be9 to 5e920ec Compare December 18, 2025 10:28
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
}

public UUID exportNetwork(UUID networkUuid, UUID studyUuid, String variantId, String fileName, String format, String userId, String parametersJson) {
public UUID exportNetwork(UUID networkUuid, UUID studyUuid, String variantId, String filename, NodeExportInfos exportInfos, String format, String userId, String parametersJson) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move filename to NodeExportInfos ?
It will also fix your problems of too many parameters

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
@basseche basseche force-pushed the export_network_explorer branch 2 times, most recently from 6ac474f to 82df1f8 Compare January 20, 2026 16:23
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
@basseche basseche force-pushed the export_network_explorer branch from 82df1f8 to 88a1c24 Compare January 20, 2026 16:26
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
@sonarqubecloud
Copy link

Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
this(elementUuid, elementName, type, owner, subdirectoriesCount, description, null, null);
}

// DTO in directory-server has others properties : creationDate, lastModificationDate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To remove. It's accepted in gridsuite to duplicate dtos between servers

studyService.assertRootNodeOrBuiltNode(studyUuid, nodeUuid, rootNetworkUuid);
UUID exportUuid = studyService.exportNetwork(studyUuid, nodeUuid, rootNetworkUuid, fileName, format, userId, parametersJson);
UUID parentDirectoryUuid = parentDirectoryUuidStr != null ? UUID.fromString(parentDirectoryUuidStr) : null;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove empty row

UUID caseUuid = caseService.createCase(exportFolder + DELIMITER + exportUuid + DELIMITER + nodeExport.fileName() + ZIP_EXTENSION, "application/zip");
directoryService.createElement(nodeExport.directoryUuid(), nodeExport.description(), caseUuid, nodeExport.fileName(), DirectoryService.CASE, userId);
} catch (Exception e) {
errorMessage = e.getMessage();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong error management. You should use the new system a93f6ef

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this error will be sent in the notification

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but i can change if you wish to throw a studyException

UUID exportUuid = networkConversionService.exportNetwork(networkUuid, studyUuid, variantId, fileName, format, userId, parametersJson);

if (exportInfos.exportToExplorer() && directoryService.elementExists(exportInfos.directoryUuid(), exportInfos.fileName(), DirectoryService.CASE)) {
throw new StudyException(ELEMENT_ALREADY_EXISTS);
Copy link
Contributor

@etiennehomer etiennehomer Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The snackbar is weird on front's side. Maybe the front code is to be adjusted ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i 've put a translation in commons-ui

Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
@basseche basseche force-pushed the export_network_explorer branch from 58a722b to 7e490c3 Compare January 22, 2026 15:44
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants