Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bb758db
extract composite to share description
EtienneLt Sep 11, 2026
81b4eb2
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Sep 14, 2026
0024da5
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Sep 16, 2026
f83c2a3
add userId
EtienneLt Sep 17, 2026
4222783
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Sep 17, 2026
b1ea19c
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Sep 17, 2026
c8c4240
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Sep 23, 2026
a82ef0c
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Sep 24, 2026
8880691
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Sep 25, 2026
5a099e4
review
EtienneLt Sep 25, 2026
58e7561
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Sep 25, 2026
ef493c6
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Sep 25, 2026
108f8d9
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Sep 28, 2026
283b81c
fix encode
EtienneLt Sep 28, 2026
3ec13ac
put description in body request
EtienneLt Sep 28, 2026
f49aee0
clean
EtienneLt Sep 28, 2026
8dd27c9
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Sep 30, 2026
144db76
clean
EtienneLt Oct 1, 2026
25a757c
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Oct 1, 2026
a5d6b0e
clean and add test
EtienneLt Oct 2, 2026
e8a6e50
checkstyle
EtienneLt Oct 2, 2026
168050e
add test
EtienneLt Oct 2, 2026
fa214db
Merge branch 'main' into extract-composite-to-share-description
Mathieu-Deharbe Oct 2, 2026
ef5a535
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Oct 5, 2026
82d713c
Merge branch 'main' into extract-composite-to-share-description
EtienneLt Oct 5, 2026
a6dcc62
review
EtienneLt Oct 6, 2026
ed7515d
clean
EtienneLt Oct 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class NetworkModificationService {
private static final String NETWORK_MODIFICATIONS_COUNT_PATH = "network-modifications-count";
private static final String QUERY_PARAM_ACTION = "action";
private static final String QUERY_PARAM_NAME = "name";
private static final String QUERY_PARAM_DESCRIPTION = "description";
private static final String QUERY_PARAM_GROUP_UUID = "groupUuid";
private static final String QUERY_PARAM_ROOT_NETWORK_TAG = "rootNetworkTag";
private static final String QUERY_PARAM_GROUP_UUIDS = "groupUuids";
Expand Down Expand Up @@ -269,13 +270,14 @@ public void stashModifications(UUID groupUUid, List<UUID> modificationsUuids) {
restTemplate.exchange(path, HttpMethod.PUT, httpEntity, Void.class);
}

public void updateModificationsMetadata(UUID groupUUid, List<UUID> modificationsUuids, NetworkModificationMetadata metadata) {
public void updateModificationsMetadata(UUID groupUUid, List<UUID> modificationsUuids, NetworkModificationMetadata metadata, String userId) {
Objects.requireNonNull(groupUUid);
Objects.requireNonNull(modificationsUuids);
var path = UriComponentsBuilder
.fromUriString(getNetworkModificationServerURI(false) + NETWORK_MODIFICATIONS_PATH)
.queryParam(UUIDS, modificationsUuids)
.queryParam(GROUP_UUID, groupUUid)
.queryParam(HEADER_USER_ID, userId)
Comment thread
Mathieu-Deharbe marked this conversation as resolved.
Outdated
.buildAndExpand()
.toUriString();

Expand Down Expand Up @@ -528,9 +530,10 @@ public NetworkModificationsResult insertCompositeModifications(UUID groupUuid,
* @return the reference modification left in place of the composite modification, either in the group of the node
* or in a parent composite
*/
public ModificationReference extractCompositeModificationToShare(@NonNull UUID groupUuid, @NonNull UUID modificationUuid, @NonNull String name) {
public ModificationReference extractCompositeModificationToShare(@NonNull UUID groupUuid, @NonNull UUID modificationUuid, @NonNull String name, String description) {
String path = UriComponentsBuilder.fromPath(COMPOSITE_PATH + "{modificationUuid}" + DELIMITER + "share")
.queryParam(QUERY_PARAM_NAME, name)
.queryParam(QUERY_PARAM_DESCRIPTION, description)
Comment thread
EtienneLt marked this conversation as resolved.
Outdated
.queryParam(QUERY_PARAM_GROUP_UUID, groupUuid)
.buildAndExpand(modificationUuid)
.toUriString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ public void updateNetworkModificationsMetadata(UUID studyUuid, UUID nodeUuid, Li
throw new StudyException(NOT_ALLOWED);
}
UUID groupId = networkModificationTreeService.getModificationGroupUuid(nodeUuid);
networkModificationService.updateModificationsMetadata(groupId, modificationsUuids, metadata);
networkModificationService.updateModificationsMetadata(groupId, modificationsUuids, metadata, userId);
if (metadata.getActivated() != null || metadata.getName() != null) {
invalidateNodeTree(studyUuid, nodeUuid);
}
Expand Down Expand Up @@ -2035,7 +2035,7 @@ public void shareCompositeNetworkModification(
List<UUID> childrenUuids = networkModificationTreeService.getChildrenUuids(nodeUuid);
try {
// the applied modifications are left unchanged : the node does not need to be rebuilt
ModificationReference newReference = networkModificationService.extractCompositeModificationToShare(groupUuid, modificationUuid, name);
ModificationReference newReference = networkModificationService.extractCompositeModificationToShare(groupUuid, modificationUuid, name, description);
// the composite modification keeps its uuid when extracted, so it is shared under that same uuid
directoryService.createElement(parentDirectoryUuid, description, modificationUuid, name, DirectoryService.MODIFICATION, userId);
// extraction replaced the local composite by a new reference modification, in the node group or in a parent
Expand Down
Loading