-
Notifications
You must be signed in to change notification settings - Fork 0
Add the possibility to evaluate a filter and restrict the result to specified equipment types #169
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
Conversation
…DTOs (`FiltersWithEquipmentTypes`, `EquipmentTypesByElement`) to handle filters and equipment types Signed-off-by: Florent MILLOT <[email protected]>
… of throwing an exception. Signed-off-by: Florent MILLOT <[email protected]>
…y for substation/voltage level equipment filtering Signed-off-by: Florent MILLOT <[email protected]>
src/main/java/org/gridsuite/filter/server/utils/FilterWithEquipmentTypesUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/filter/server/utils/FilterWithEquipmentTypesUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/filter/server/utils/FilterWithEquipmentTypesUtils.java
Outdated
Show resolved
Hide resolved
… explicit field-specific methods. Updated copyright year. Signed-off-by: Florent MILLOT <[email protected]>
src/main/java/org/gridsuite/filter/server/dto/EquipmentTypesByFilterId.java
Show resolved
Hide resolved
… coverage Signed-off-by: Florent MILLOT <[email protected]>
Remarks fixed and tests added |
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.
minor thing
src/test/java/org/gridsuite/filter/server/utils/FilterWithEquipmentTypesUtilsTest.java
Show resolved
Hide resolved
Signed-off-by: Florent MILLOT <[email protected]>
… class Signed-off-by: Florent MILLOT <[email protected]>
…earer semantics and update references accordingly. Signed-off-by: Florent MILLOT <[email protected]>
…s documentation Signed-off-by: Florent MILLOT <[email protected]>
src/main/java/org/gridsuite/filter/server/dto/FiltersWithEquipmentTypes.java
Show resolved
Hide resolved
you have sonar issue at least one can be resolved (switch instead of if) |
…or improved readability and reduced duplication Signed-off-by: Florent MILLOT <[email protected]>
Done, the other one is a false one because we are already in transactional function |
Signed-off-by: Florent MILLOT <[email protected]>
List<ExpertFilter> filters = FilterWithEquipmentTypesUtils.createFiltersForSubEquipments(filterEquipmentType, | ||
filteredEquipmentIds, | ||
selectedEquipmentTypes); | ||
filters.stream().flatMap(expertFilter -> evaluateFilter(expertFilter, networkUuid, variantId).stream()) |
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.
Sonar high level while using @transactional method evaluateFilter()
=> you can try to use directly getIdentifiableAttributes
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.
Test Ok Code Ok
…tion in `FilterService`. Signed-off-by: Florent MILLOT <[email protected]>
|
Refactored filter evaluation API: switched to POST method, added new DTOs (
FiltersWithEquipmentTypes
,EquipmentTypesByElement
) to handle filters and equipment types