-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow selective topology updates via the web API
The endpoint `POST /plantModel/topologyUpdateRequest` now also accepts an optional list of path names allowing the routing topology to be updated selectively. This allows to increase the performance when updating the routing graph by providing only the (usually significantly reduced) set of paths that have actually changed. Merged-by: Martin Grzenia <martin.grzenia@iml.fraunhofer.de>
- Loading branch information
Showing
6 changed files
with
138 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...a/org/opentcs/kernel/extensions/servicewebapi/v1/binding/PostTopologyUpdateRequestTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* Copyright (c) The openTCS Authors. | ||
* | ||
* This program is free software and subject to the MIT license. (For details, | ||
* see the licensing information (LICENSE.txt) you should have received with | ||
* this copy of the software.) | ||
*/ | ||
package org.opentcs.kernel.extensions.servicewebapi.v1.binding; | ||
|
||
import static java.util.Objects.requireNonNull; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import jakarta.annotation.Nonnull; | ||
import java.util.List; | ||
|
||
/** | ||
* A list of paths that are to be updated when the routing topology gets updated. | ||
*/ | ||
public class PostTopologyUpdateRequestTO { | ||
|
||
@Nonnull | ||
private List<String> paths; | ||
|
||
@JsonCreator | ||
public PostTopologyUpdateRequestTO( | ||
@Nonnull | ||
@JsonProperty(value = "paths", required = true) | ||
List<String> paths | ||
) { | ||
this.paths = requireNonNull(paths, "paths"); | ||
} | ||
|
||
@Nonnull | ||
public List<String> getPaths() { | ||
return paths; | ||
} | ||
|
||
public PostTopologyUpdateRequestTO setPaths( | ||
@Nonnull | ||
List<String> paths | ||
) { | ||
this.paths = requireNonNull(paths, "paths"); | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters