Skip to content
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

Rename composite modification methods #116

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SlimaneAmar
Copy link
Contributor

No description provided.

@SlimaneAmar SlimaneAmar requested a review from dbraquart January 13, 2025 10:32
Copy link
Contributor

@dbraquart dbraquart left a comment

Choose a reason for hiding this comment

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

code: naming suggestions
tests: ok

@Operation(summary = "duplicate modification element")
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "Modifications have been duplicated and corresponding elements created in the directory")})
public ResponseEntity<Void> duplicateNetworkModifications(@RequestParam("duplicateFrom") UUID networkModificationId,
public ResponseEntity<Void> duplicateCompositeNetworkModifications(@RequestParam("duplicateFrom") UUID networkModificationId,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
public ResponseEntity<Void> duplicateCompositeNetworkModifications(@RequestParam("duplicateFrom") UUID networkModificationId,
public ResponseEntity<Void> duplicateCompositeNetworkModification(@RequestParam("duplicateFrom") UUID networkModificationId,

@RequestParam(name = QUERY_PARAM_PARENT_DIRECTORY_ID, required = false) UUID targetDirectoryId,
@RequestHeader(QUERY_PARAM_USER_ID) String userId) {
exploreService.duplicateNetworkModifications(networkModificationId, targetDirectoryId, userId);
exploreService.duplicateCompositeModifications(networkModificationId, targetDirectoryId, userId);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
exploreService.duplicateCompositeModifications(networkModificationId, targetDirectoryId, userId);
exploreService.duplicateCompositeModification(networkModificationId, targetDirectoryId, userId);

ElementAttributes elementAttributes = new ElementAttributes(modificationsUuid, name, MODIFICATION,
userId, 0L, description);
directoryService.createElementWithNewName(elementAttributes, parentDirectoryUuid, userId, true);
}

public void duplicateNetworkModifications(UUID sourceId, UUID parentDirectoryUuid, String userId) {
public void duplicateCompositeModifications(UUID sourceId, UUID parentDirectoryUuid, String userId) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
public void duplicateCompositeModifications(UUID sourceId, UUID parentDirectoryUuid, String userId) {
public void duplicateCompositeModification(UUID sourceId, UUID parentDirectoryUuid, String userId) {

return ResponseEntity.ok().build();
}

@PostMapping(value = "/explore/modifications", params = "duplicateFrom")
@PostMapping(value = "/explore/composite-modifications", params = "duplicateFrom")
@Operation(summary = "duplicate modification element")
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "Modifications have been duplicated and corresponding elements created in the directory")})
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "Modifications have been duplicated and corresponding elements created in the directory")})
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "Composite modification has been duplicated and corresponding element created in the directory")})

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.

2 participants