-
Notifications
You must be signed in to change notification settings - Fork 2
rework export network file #899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| @Lazy StudyService studyService, | ||
| RootNetworkService rootNetworkService, | ||
| RootNetworkNodeInfoService rootNetworkNodeInfoService, | ||
| DirectoryService directoryService) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reformatted code to be reverted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
|
||
| @ElementCollection | ||
| @CollectionTable( | ||
| name = "exportUuids", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| name = "exportUuids", | |
| name = "node_export", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| @CollectionTable( | ||
| name = "exportUuids", | ||
| joinColumns = @JoinColumn(name = "root_network_node_info_id"), | ||
| foreignKey = @ForeignKey(name = "rootNetworkNodeInfo_exportUuids_fk") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| foreignKey = @ForeignKey(name = "rootNetworkNodeInfo_exportUuids_fk") | |
| foreignKey = @ForeignKey(name = "rootNetworkNodeInfo_nodeExport_fk") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| joinColumns = @JoinColumn(name = "root_network_node_info_id"), | ||
| foreignKey = @ForeignKey(name = "rootNetworkNodeInfo_exportUuids_fk") | ||
| ) | ||
| @MapKeyColumn(name = "export_uuid_key") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @MapKeyColumn(name = "export_uuid_key") | |
| @MapKeyColumn(name = "export_uuid") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| @MapKeyColumn(name = "export_uuid_key") | ||
| @Column(name = "status") | ||
| @Enumerated(EnumType.STRING) | ||
| private Map<UUID, ExportNetworkStatus> exportNetworkUuids = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Entries in the sub table should be deleted when the node is unbuild (and also when a modification is added to the node ? to be done later maybe)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see
study-server/src/main/java/org/gridsuite/study/server/service/RootNetworkNodeInfoService.java
Line 242 in 30130ce
| public InvalidateNodeInfos invalidateRootNetworkNode(RootNetworkNodeInfoEntity rootNetworkNodeInfoEntity, InvalidateNodeTreeParameters invalidateTreeParameters) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ll look into how to do it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it would be simpler by using a NodeExportEmbeddable and remove @MapKeyColumn and @Enumerated.
After your PR, Bassel will add some columns to this table
| uriComponentsBuilder.queryParam("fileName", fileName); | ||
| } | ||
| String receiver = URLEncoder.encode(objectMapper.writeValueAsString(new NetworkExportReceiver(studyUuid, userId)), StandardCharsets.UTF_8); | ||
| String receiver = URLEncoder.encode(objectMapper.writeValueAsString(new NetworkExportReceiver(studyUuid, nodeUuid, rootNetworkUuid, userId)), StandardCharsets.UTF_8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you add this ? I guess it's not used as you didn't change the conversion-server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need it because I use nodeUuid and rootNetworkUuid to look up the rootNetworkNodeInfoEntity. Even if the conversion-server wasn’t changed, these values are required for that lookup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need it in some other methods yes. But not this one that is dedicated to the request to network-conversion-server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum ok it's for the nodeUuid and rootNetworkUuid to be present in the notification ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rootNetworkUuid and nodeUuid removed
done
… rework-export-network-file
| joinColumns = @JoinColumn(name = "root_network_node_info_id"), | ||
| foreignKey = @ForeignKey(name = "rootNetworkNodeInfo_nodeExport_fk") | ||
| ) | ||
| private Map<UUID, NodeExportEmbeddable> nodeExportNetwork = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a list and add exportUuid to NodeExportEmbeddable ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
map replaced by list
done
… rework-export-network-file
|



PR Summary
rework export network file