diff --git a/src/main/java/org/gridsuite/filter/server/FilterController.java b/src/main/java/org/gridsuite/filter/server/FilterController.java index c3ae7f06..cf9eb1ec 100644 --- a/src/main/java/org/gridsuite/filter/server/FilterController.java +++ b/src/main/java/org/gridsuite/filter/server/FilterController.java @@ -11,9 +11,9 @@ import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import org.gridsuite.filter.server.dto.AbstractFilter; -import org.gridsuite.filter.server.dto.FilterEquipments; +import org.gridsuite.filter.server.dto.identifierlistfilter.FilterEquipments; import org.gridsuite.filter.server.dto.IFilterAttributes; -import org.gridsuite.filter.server.dto.IdentifiableAttributes; +import org.gridsuite.filter.server.dto.identifierlistfilter.IdentifiableAttributes; import org.springframework.context.annotation.ComponentScan; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/src/main/java/org/gridsuite/filter/server/FilterService.java b/src/main/java/org/gridsuite/filter/server/FilterService.java index 85de37d9..47da3c76 100644 --- a/src/main/java/org/gridsuite/filter/server/FilterService.java +++ b/src/main/java/org/gridsuite/filter/server/FilterService.java @@ -9,9 +9,26 @@ import com.powsybl.commons.PowsyblException; import com.powsybl.iidm.network.*; import com.powsybl.network.store.client.NetworkStoreService; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.IFilterAttributes; +import org.gridsuite.filter.server.dto.criteriafilter.*; +import org.gridsuite.filter.server.dto.expertfilter.ExpertFilter; +import org.gridsuite.filter.server.dto.identifierlistfilter.FilterEquipments; +import org.gridsuite.filter.server.dto.identifierlistfilter.IdentifiableAttributes; +import org.gridsuite.filter.server.dto.identifierlistfilter.IdentifierListFilter; +import org.gridsuite.filter.server.dto.identifierlistfilter.IdentifierListFilterEquipmentAttributes; +import org.gridsuite.filter.server.dto.scriptfilter.ScriptFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.repositories.*; +import org.gridsuite.filter.server.repositories.FilterRepository; +import org.gridsuite.filter.server.repositories.criteriafilter.*; +import org.gridsuite.filter.server.repositories.expertfilter.ExpertFilterRepository; +import org.gridsuite.filter.server.repositories.identifierlistfilter.IdentifierListFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; +import org.gridsuite.filter.server.repositories.proxies.criteriafilter.*; +import org.gridsuite.filter.server.repositories.proxies.expertfiler.ExpertFilterRepositoryProxy; +import org.gridsuite.filter.server.repositories.proxies.identifierlistfilter.IdentifierListFilterRepositoryProxy; +import org.gridsuite.filter.server.repositories.proxies.scriptfilter.ScriptFilterRepositoryProxy; +import org.gridsuite.filter.server.repositories.scriptfilter.ScriptFilterRepository; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; import org.gridsuite.filter.server.utils.FiltersUtils; @@ -26,7 +43,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.gridsuite.filter.server.AbstractFilterRepositoryProxy.WRONG_FILTER_TYPE; +import static org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy.WRONG_FILTER_TYPE; /** * @author Jacques Borsenberger diff --git a/src/main/java/org/gridsuite/filter/server/FiltersToGroovyScript.java b/src/main/java/org/gridsuite/filter/server/FiltersToGroovyScript.java index 44ae009e..858139ad 100644 --- a/src/main/java/org/gridsuite/filter/server/FiltersToGroovyScript.java +++ b/src/main/java/org/gridsuite/filter/server/FiltersToGroovyScript.java @@ -14,18 +14,19 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; -import org.gridsuite.filter.server.dto.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; import org.gridsuite.filter.server.dto.AbstractFilter; -import org.gridsuite.filter.server.dto.AbstractInjectionFilter; -import org.gridsuite.filter.server.dto.CriteriaFilter; -import org.gridsuite.filter.server.dto.GeneratorFilter; -import org.gridsuite.filter.server.dto.HvdcLineFilter; -import org.gridsuite.filter.server.dto.LineFilter; -import org.gridsuite.filter.server.dto.NumericalFilter; -import org.gridsuite.filter.server.dto.SubstationFilter; -import org.gridsuite.filter.server.dto.ThreeWindingsTransformerFilter; -import org.gridsuite.filter.server.dto.TwoWindingsTransformerFilter; -import org.gridsuite.filter.server.dto.VoltageLevelFilter; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractInjectionFilter; +import org.gridsuite.filter.server.dto.criteriafilter.CriteriaFilter; +import org.gridsuite.filter.server.dto.criteriafilter.GeneratorFilter; +import org.gridsuite.filter.server.dto.criteriafilter.HvdcLineFilter; +import org.gridsuite.filter.server.dto.criteriafilter.LineFilter; +import org.gridsuite.filter.server.dto.criteriafilter.NumericalFilter; +import org.gridsuite.filter.server.dto.criteriafilter.SubstationFilter; +import org.gridsuite.filter.server.dto.criteriafilter.ThreeWindingsTransformerFilter; +import org.gridsuite.filter.server.dto.criteriafilter.TwoWindingsTransformerFilter; +import org.gridsuite.filter.server.dto.criteriafilter.VoltageLevelFilter; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.RangeType; import org.springframework.core.io.ClassPathResource; import org.springframework.stereotype.Service; diff --git a/src/main/java/org/gridsuite/filter/server/dto/AbstractFilter.java b/src/main/java/org/gridsuite/filter/server/dto/AbstractFilter.java index 35ad8b15..af137dac 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/AbstractFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/AbstractFilter.java @@ -10,6 +10,12 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import lombok.*; import lombok.experimental.SuperBuilder; +import org.gridsuite.filter.server.dto.criteriafilter.CriteriaFilter; +import org.gridsuite.filter.server.dto.expertfilter.ExpertFilter; +import org.gridsuite.filter.server.dto.identifierlistfilter.FilterEquipments; +import org.gridsuite.filter.server.dto.identifierlistfilter.IdentifiableAttributes; +import org.gridsuite.filter.server.dto.identifierlistfilter.IdentifierListFilter; +import org.gridsuite.filter.server.dto.scriptfilter.ScriptFilter; import org.gridsuite.filter.server.utils.EquipmentType; import java.util.Date; diff --git a/src/main/java/org/gridsuite/filter/server/dto/AbstractEquipmentFilterForm.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/AbstractEquipmentFilterForm.java similarity index 92% rename from src/main/java/org/gridsuite/filter/server/dto/AbstractEquipmentFilterForm.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/AbstractEquipmentFilterForm.java index ff201dd5..13e40842 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/AbstractEquipmentFilterForm.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/AbstractEquipmentFilterForm.java @@ -4,9 +4,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/gridsuite/filter/server/dto/AbstractInjectionFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/AbstractInjectionFilter.java similarity index 97% rename from src/main/java/org/gridsuite/filter/server/dto/AbstractInjectionFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/AbstractInjectionFilter.java index a1162784..133b5170 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/AbstractInjectionFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/AbstractInjectionFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/gridsuite/filter/server/dto/AbstractLineFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/AbstractLineFilter.java similarity index 97% rename from src/main/java/org/gridsuite/filter/server/dto/AbstractLineFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/AbstractLineFilter.java index 241cfd7b..87b3a434 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/AbstractLineFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/AbstractLineFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/gridsuite/filter/server/dto/AbstractTransformerFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/AbstractTransformerFilter.java similarity index 97% rename from src/main/java/org/gridsuite/filter/server/dto/AbstractTransformerFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/AbstractTransformerFilter.java index 60ef393e..481989d9 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/AbstractTransformerFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/AbstractTransformerFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/gridsuite/filter/server/dto/BatteryFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/BatteryFilter.java similarity index 94% rename from src/main/java/org/gridsuite/filter/server/dto/BatteryFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/BatteryFilter.java index 2a6db4d8..213b4934 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/BatteryFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/BatteryFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/dto/BusBarSectionFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/BusBarSectionFilter.java similarity index 94% rename from src/main/java/org/gridsuite/filter/server/dto/BusBarSectionFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/BusBarSectionFilter.java index dcdad560..8c0a86dc 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/BusBarSectionFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/BusBarSectionFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/dto/CriteriaFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/CriteriaFilter.java similarity index 93% rename from src/main/java/org/gridsuite/filter/server/dto/CriteriaFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/CriteriaFilter.java index f800139e..3ee5370e 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/CriteriaFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/CriteriaFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Getter; @@ -12,6 +12,7 @@ import lombok.Setter; import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.gridsuite.filter.server.dto.AbstractFilter; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/dto/DanglingLineFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/DanglingLineFilter.java similarity index 94% rename from src/main/java/org/gridsuite/filter/server/dto/DanglingLineFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/DanglingLineFilter.java index 8d76e556..059447da 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/DanglingLineFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/DanglingLineFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/dto/GeneratorFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/GeneratorFilter.java similarity index 96% rename from src/main/java/org/gridsuite/filter/server/dto/GeneratorFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/GeneratorFilter.java index c37eaa4a..7ffb5f01 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/GeneratorFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/GeneratorFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import com.powsybl.iidm.network.EnergySource; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/gridsuite/filter/server/dto/HvdcLineFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/HvdcLineFilter.java similarity index 96% rename from src/main/java/org/gridsuite/filter/server/dto/HvdcLineFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/HvdcLineFilter.java index 236eae86..1f67b25c 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/HvdcLineFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/HvdcLineFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/dto/InjectionFilterAttributes.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/InjectionFilterAttributes.java similarity index 94% rename from src/main/java/org/gridsuite/filter/server/dto/InjectionFilterAttributes.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/InjectionFilterAttributes.java index 45af9cd8..01862988 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/InjectionFilterAttributes.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/InjectionFilterAttributes.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/dto/LccConverterStationFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/LccConverterStationFilter.java similarity index 94% rename from src/main/java/org/gridsuite/filter/server/dto/LccConverterStationFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/LccConverterStationFilter.java index f70929d3..7745baec 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/LccConverterStationFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/LccConverterStationFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/dto/LineFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/LineFilter.java similarity index 95% rename from src/main/java/org/gridsuite/filter/server/dto/LineFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/LineFilter.java index 76ae816f..a8c8fcf7 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/LineFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/LineFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; diff --git a/src/main/java/org/gridsuite/filter/server/dto/LoadFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/LoadFilter.java similarity index 94% rename from src/main/java/org/gridsuite/filter/server/dto/LoadFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/LoadFilter.java index c1439961..43e3c2a5 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/LoadFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/LoadFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/dto/NumericalFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/NumericalFilter.java similarity index 91% rename from src/main/java/org/gridsuite/filter/server/dto/NumericalFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/NumericalFilter.java index d76c19a9..d666468c 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/NumericalFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/NumericalFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import lombok.*; import org.gridsuite.filter.server.utils.RangeType; diff --git a/src/main/java/org/gridsuite/filter/server/dto/ShuntCompensatorFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/ShuntCompensatorFilter.java similarity index 94% rename from src/main/java/org/gridsuite/filter/server/dto/ShuntCompensatorFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/ShuntCompensatorFilter.java index 870a2344..af77021e 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/ShuntCompensatorFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/ShuntCompensatorFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/dto/StaticVarCompensatorFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/StaticVarCompensatorFilter.java similarity index 95% rename from src/main/java/org/gridsuite/filter/server/dto/StaticVarCompensatorFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/StaticVarCompensatorFilter.java index 15c01673..ac8f659b 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/StaticVarCompensatorFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/StaticVarCompensatorFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/dto/SubstationFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/SubstationFilter.java similarity index 97% rename from src/main/java/org/gridsuite/filter/server/dto/SubstationFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/SubstationFilter.java index 9b1367c1..5bb48ae9 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/SubstationFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/SubstationFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/gridsuite/filter/server/dto/ThreeWindingsTransformerFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/ThreeWindingsTransformerFilter.java similarity index 96% rename from src/main/java/org/gridsuite/filter/server/dto/ThreeWindingsTransformerFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/ThreeWindingsTransformerFilter.java index 0218bd98..4b93bbd7 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/ThreeWindingsTransformerFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/ThreeWindingsTransformerFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/dto/TwoWindingsTransformerFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/TwoWindingsTransformerFilter.java similarity index 97% rename from src/main/java/org/gridsuite/filter/server/dto/TwoWindingsTransformerFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/TwoWindingsTransformerFilter.java index 864dcede..c87c897c 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/TwoWindingsTransformerFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/TwoWindingsTransformerFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/dto/VoltageLevelFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/VoltageLevelFilter.java similarity index 97% rename from src/main/java/org/gridsuite/filter/server/dto/VoltageLevelFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/VoltageLevelFilter.java index 15593b12..a2f5f958 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/VoltageLevelFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/VoltageLevelFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import java.util.List; import java.util.Map; diff --git a/src/main/java/org/gridsuite/filter/server/dto/VscConverterStationFilter.java b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/VscConverterStationFilter.java similarity index 94% rename from src/main/java/org/gridsuite/filter/server/dto/VscConverterStationFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/criteriafilter/VscConverterStationFilter.java index 7cc04666..6ffc4214 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/VscConverterStationFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/criteriafilter/VscConverterStationFilter.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.criteriafilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/dto/ExpertFilter.java b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/ExpertFilter.java similarity index 86% rename from src/main/java/org/gridsuite/filter/server/dto/ExpertFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/expertfilter/ExpertFilter.java index 1867e4d2..57f219db 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/ExpertFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/ExpertFilter.java @@ -4,14 +4,15 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.expertfilter; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; -import org.gridsuite.filter.server.dto.expertrule.AbstractExpertRule; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.expertfilter.expertrule.AbstractExpertRule; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/dto/expertrule/AbstractExpertRule.java b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/AbstractExpertRule.java similarity index 85% rename from src/main/java/org/gridsuite/filter/server/dto/expertrule/AbstractExpertRule.java rename to src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/AbstractExpertRule.java index 09b17987..18d74b7f 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/expertrule/AbstractExpertRule.java +++ b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/AbstractExpertRule.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto.expertrule; +package org.gridsuite.filter.server.dto.expertfilter.expertrule; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; @@ -16,10 +16,10 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; -import org.gridsuite.filter.server.utils.CombinatorType; -import org.gridsuite.filter.server.utils.DataType; -import org.gridsuite.filter.server.utils.FieldType; -import org.gridsuite.filter.server.utils.OperatorType; +import org.gridsuite.filter.server.utils.expertfilter.CombinatorType; +import org.gridsuite.filter.server.utils.expertfilter.DataType; +import org.gridsuite.filter.server.utils.expertfilter.FieldType; +import org.gridsuite.filter.server.utils.expertfilter.OperatorType; import java.util.List; diff --git a/src/main/java/org/gridsuite/filter/server/dto/expertrule/BooleanExpertRule.java b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/BooleanExpertRule.java similarity index 88% rename from src/main/java/org/gridsuite/filter/server/dto/expertrule/BooleanExpertRule.java rename to src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/BooleanExpertRule.java index 4f33e4ef..8ae16f3d 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/expertrule/BooleanExpertRule.java +++ b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/BooleanExpertRule.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto.expertrule; +package org.gridsuite.filter.server.dto.expertfilter.expertrule; import com.fasterxml.jackson.annotation.JsonProperty; import com.powsybl.commons.PowsyblException; @@ -14,9 +14,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; -import org.gridsuite.filter.server.utils.DataType; +import org.gridsuite.filter.server.utils.expertfilter.DataType; -import static org.gridsuite.filter.server.utils.ExpertFilterUtils.getFieldValue; +import static org.gridsuite.filter.server.utils.expertfilter.ExpertFilterUtils.getFieldValue; /** * @author Antoine Bouhours diff --git a/src/main/java/org/gridsuite/filter/server/dto/expertrule/CombinatorExpertRule.java b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/CombinatorExpertRule.java similarity index 90% rename from src/main/java/org/gridsuite/filter/server/dto/expertrule/CombinatorExpertRule.java rename to src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/CombinatorExpertRule.java index 28455b61..e506a6e0 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/expertrule/CombinatorExpertRule.java +++ b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/CombinatorExpertRule.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto.expertrule; +package org.gridsuite.filter.server.dto.expertfilter.expertrule; import com.fasterxml.jackson.annotation.JsonProperty; import com.powsybl.commons.PowsyblException; @@ -12,8 +12,8 @@ import lombok.AllArgsConstructor; import lombok.Getter; import lombok.experimental.SuperBuilder; -import org.gridsuite.filter.server.utils.CombinatorType; -import org.gridsuite.filter.server.utils.DataType; +import org.gridsuite.filter.server.utils.expertfilter.CombinatorType; +import org.gridsuite.filter.server.utils.expertfilter.DataType; /** * @author Antoine Bouhours diff --git a/src/main/java/org/gridsuite/filter/server/dto/expertrule/EnumExpertRule.java b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/EnumExpertRule.java similarity index 87% rename from src/main/java/org/gridsuite/filter/server/dto/expertrule/EnumExpertRule.java rename to src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/EnumExpertRule.java index 932933f8..88088abb 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/expertrule/EnumExpertRule.java +++ b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/EnumExpertRule.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto.expertrule; +package org.gridsuite.filter.server.dto.expertfilter.expertrule; import com.fasterxml.jackson.annotation.JsonProperty; import com.powsybl.commons.PowsyblException; @@ -14,9 +14,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; -import org.gridsuite.filter.server.utils.DataType; +import org.gridsuite.filter.server.utils.expertfilter.DataType; -import static org.gridsuite.filter.server.utils.ExpertFilterUtils.getFieldValue; +import static org.gridsuite.filter.server.utils.expertfilter.ExpertFilterUtils.getFieldValue; /** * @author Antoine Bouhours diff --git a/src/main/java/org/gridsuite/filter/server/dto/expertrule/NumberExpertRule.java b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/NumberExpertRule.java similarity index 90% rename from src/main/java/org/gridsuite/filter/server/dto/expertrule/NumberExpertRule.java rename to src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/NumberExpertRule.java index aeef1a84..26c83406 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/expertrule/NumberExpertRule.java +++ b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/NumberExpertRule.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto.expertrule; +package org.gridsuite.filter.server.dto.expertfilter.expertrule; import com.fasterxml.jackson.annotation.JsonProperty; import com.powsybl.commons.PowsyblException; @@ -14,9 +14,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; -import org.gridsuite.filter.server.utils.DataType; +import org.gridsuite.filter.server.utils.expertfilter.DataType; -import static org.gridsuite.filter.server.utils.ExpertFilterUtils.getFieldValue; +import static org.gridsuite.filter.server.utils.expertfilter.ExpertFilterUtils.getFieldValue; /** * @author Antoine Bouhours diff --git a/src/main/java/org/gridsuite/filter/server/dto/expertrule/StringExpertRule.java b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/StringExpertRule.java similarity index 89% rename from src/main/java/org/gridsuite/filter/server/dto/expertrule/StringExpertRule.java rename to src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/StringExpertRule.java index 03330166..a965fe83 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/expertrule/StringExpertRule.java +++ b/src/main/java/org/gridsuite/filter/server/dto/expertfilter/expertrule/StringExpertRule.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto.expertrule; +package org.gridsuite.filter.server.dto.expertfilter.expertrule; import com.fasterxml.jackson.annotation.JsonProperty; import com.powsybl.commons.PowsyblException; @@ -15,9 +15,9 @@ import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; import org.apache.commons.lang3.StringUtils; -import org.gridsuite.filter.server.utils.DataType; +import org.gridsuite.filter.server.utils.expertfilter.DataType; -import static org.gridsuite.filter.server.utils.ExpertFilterUtils.getFieldValue; +import static org.gridsuite.filter.server.utils.expertfilter.ExpertFilterUtils.getFieldValue; /** * @author Antoine Bouhours diff --git a/src/main/java/org/gridsuite/filter/server/dto/FilterEquipments.java b/src/main/java/org/gridsuite/filter/server/dto/identifierlistfilter/FilterEquipments.java similarity index 90% rename from src/main/java/org/gridsuite/filter/server/dto/FilterEquipments.java rename to src/main/java/org/gridsuite/filter/server/dto/identifierlistfilter/FilterEquipments.java index b20e0360..d89fde7f 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/FilterEquipments.java +++ b/src/main/java/org/gridsuite/filter/server/dto/identifierlistfilter/FilterEquipments.java @@ -1,4 +1,4 @@ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.identifierlistfilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; diff --git a/src/main/java/org/gridsuite/filter/server/dto/IdentifiableAttributes.java b/src/main/java/org/gridsuite/filter/server/dto/identifierlistfilter/IdentifiableAttributes.java similarity index 93% rename from src/main/java/org/gridsuite/filter/server/dto/IdentifiableAttributes.java rename to src/main/java/org/gridsuite/filter/server/dto/identifierlistfilter/IdentifiableAttributes.java index 850050ff..fd538b75 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/IdentifiableAttributes.java +++ b/src/main/java/org/gridsuite/filter/server/dto/identifierlistfilter/IdentifiableAttributes.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.identifierlistfilter; import com.powsybl.iidm.network.IdentifiableType; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/gridsuite/filter/server/dto/IdentifierListFilter.java b/src/main/java/org/gridsuite/filter/server/dto/identifierlistfilter/IdentifierListFilter.java similarity index 96% rename from src/main/java/org/gridsuite/filter/server/dto/IdentifierListFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/identifierlistfilter/IdentifierListFilter.java index c069a6f4..c0ceb45e 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/IdentifierListFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/identifierlistfilter/IdentifierListFilter.java @@ -5,13 +5,14 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.identifierlistfilter; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.gridsuite.filter.server.dto.AbstractFilter; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/dto/IdentifierListFilterEquipmentAttributes.java b/src/main/java/org/gridsuite/filter/server/dto/identifierlistfilter/IdentifierListFilterEquipmentAttributes.java similarity index 91% rename from src/main/java/org/gridsuite/filter/server/dto/IdentifierListFilterEquipmentAttributes.java rename to src/main/java/org/gridsuite/filter/server/dto/identifierlistfilter/IdentifierListFilterEquipmentAttributes.java index 387e8d6f..c8e25cce 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/IdentifierListFilterEquipmentAttributes.java +++ b/src/main/java/org/gridsuite/filter/server/dto/identifierlistfilter/IdentifierListFilterEquipmentAttributes.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.identifierlistfilter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/dto/ScriptFilter.java b/src/main/java/org/gridsuite/filter/server/dto/scriptfilter/ScriptFilter.java similarity index 92% rename from src/main/java/org/gridsuite/filter/server/dto/ScriptFilter.java rename to src/main/java/org/gridsuite/filter/server/dto/scriptfilter/ScriptFilter.java index 2bb0f430..a6bb48fc 100644 --- a/src/main/java/org/gridsuite/filter/server/dto/ScriptFilter.java +++ b/src/main/java/org/gridsuite/filter/server/dto/scriptfilter/ScriptFilter.java @@ -4,13 +4,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.dto; +package org.gridsuite.filter.server.dto.scriptfilter; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.gridsuite.filter.server.dto.AbstractFilter; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/entities/AbstractGenericFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/AbstractGenericFilterEntity.java similarity index 87% rename from src/main/java/org/gridsuite/filter/server/entities/AbstractGenericFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/AbstractGenericFilterEntity.java index f7eebebb..f7dce3f7 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/AbstractGenericFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/AbstractGenericFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,6 +14,7 @@ import lombok.experimental.SuperBuilder; import jakarta.persistence.*; +import org.gridsuite.filter.server.entities.AbstractFilterEntity; /** * @author Jacques Borsenberger diff --git a/src/main/java/org/gridsuite/filter/server/entities/AbstractInjectionFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/AbstractInjectionFilterEntity.java similarity index 82% rename from src/main/java/org/gridsuite/filter/server/entities/AbstractInjectionFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/AbstractInjectionFilterEntity.java index d82748ab..437c846f 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/AbstractInjectionFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/AbstractInjectionFilterEntity.java @@ -5,22 +5,14 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; +import jakarta.persistence.*; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; -import jakarta.persistence.CascadeType; -import jakarta.persistence.CollectionTable; -import jakarta.persistence.Column; -import jakarta.persistence.ElementCollection; -import jakarta.persistence.FetchType; -import jakarta.persistence.ForeignKey; -import jakarta.persistence.JoinColumn; -import jakarta.persistence.MappedSuperclass; -import jakarta.persistence.OneToOne; import java.util.Set; /** diff --git a/src/main/java/org/gridsuite/filter/server/entities/BatteryFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/BatteryFilterEntity.java similarity index 91% rename from src/main/java/org/gridsuite/filter/server/entities/BatteryFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/BatteryFilterEntity.java index d8478397..24703365 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/BatteryFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/BatteryFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/entities/BusBarSectionFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/BusBarSectionFilterEntity.java similarity index 91% rename from src/main/java/org/gridsuite/filter/server/entities/BusBarSectionFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/BusBarSectionFilterEntity.java index 91738dd4..50018d7e 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/BusBarSectionFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/BusBarSectionFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/entities/DanglingLineFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/DanglingLineFilterEntity.java similarity index 91% rename from src/main/java/org/gridsuite/filter/server/entities/DanglingLineFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/DanglingLineFilterEntity.java index 63769efb..1cfd2eb5 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/DanglingLineFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/DanglingLineFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/entities/FreePropertiesFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/FreePropertiesFilterEntity.java similarity index 95% rename from src/main/java/org/gridsuite/filter/server/entities/FreePropertiesFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/FreePropertiesFilterEntity.java index 910c6f4f..6bb4d269 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/FreePropertiesFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/FreePropertiesFilterEntity.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import java.util.List; import java.util.UUID; diff --git a/src/main/java/org/gridsuite/filter/server/entities/FreePropertyFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/FreePropertyFilterEntity.java similarity index 68% rename from src/main/java/org/gridsuite/filter/server/entities/FreePropertyFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/FreePropertyFilterEntity.java index 37178034..9d5466d3 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/FreePropertyFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/FreePropertyFilterEntity.java @@ -5,26 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; - -import java.util.List; -import java.util.UUID; - -import jakarta.persistence.CollectionTable; -import jakarta.persistence.Column; -import jakarta.persistence.ElementCollection; -import jakarta.persistence.Entity; -import jakarta.persistence.FetchType; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.GenerationType; -import jakarta.persistence.Id; -import jakarta.persistence.OrderColumn; -import jakarta.persistence.Table; +package org.gridsuite.filter.server.entities.criteriafilter; +import jakarta.persistence.*; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import java.util.List; +import java.util.UUID; + /** * @author Laurent Garnier */ diff --git a/src/main/java/org/gridsuite/filter/server/entities/GeneratorFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/GeneratorFilterEntity.java similarity index 92% rename from src/main/java/org/gridsuite/filter/server/entities/GeneratorFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/GeneratorFilterEntity.java index 52021ca1..bbe7cdc2 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/GeneratorFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/GeneratorFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import com.powsybl.iidm.network.EnergySource; import lombok.Getter; diff --git a/src/main/java/org/gridsuite/filter/server/entities/HvdcLineFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/HvdcLineFilterEntity.java similarity index 97% rename from src/main/java/org/gridsuite/filter/server/entities/HvdcLineFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/HvdcLineFilterEntity.java index c79eb1be..139d2191 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/HvdcLineFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/HvdcLineFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/gridsuite/filter/server/entities/LccConverterStationFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/LccConverterStationFilterEntity.java similarity index 91% rename from src/main/java/org/gridsuite/filter/server/entities/LccConverterStationFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/LccConverterStationFilterEntity.java index ec940228..c4a86854 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/LccConverterStationFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/LccConverterStationFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/entities/LineFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/LineFilterEntity.java similarity index 97% rename from src/main/java/org/gridsuite/filter/server/entities/LineFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/LineFilterEntity.java index f84e6e58..06b44c77 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/LineFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/LineFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/gridsuite/filter/server/entities/LoadFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/LoadFilterEntity.java similarity index 91% rename from src/main/java/org/gridsuite/filter/server/entities/LoadFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/LoadFilterEntity.java index 063793a9..e2b2fd6b 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/LoadFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/LoadFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/entities/NumericFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/NumericFilterEntity.java similarity index 94% rename from src/main/java/org/gridsuite/filter/server/entities/NumericFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/NumericFilterEntity.java index dce15611..1a3a10f9 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/NumericFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/NumericFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/gridsuite/filter/server/entities/ShuntCompensatorFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/ShuntCompensatorFilterEntity.java similarity index 91% rename from src/main/java/org/gridsuite/filter/server/entities/ShuntCompensatorFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/ShuntCompensatorFilterEntity.java index d737b275..6f41749a 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/ShuntCompensatorFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/ShuntCompensatorFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/entities/StaticVarCompensatorFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/StaticVarCompensatorFilterEntity.java similarity index 91% rename from src/main/java/org/gridsuite/filter/server/entities/StaticVarCompensatorFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/StaticVarCompensatorFilterEntity.java index fd38df41..dba90470 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/StaticVarCompensatorFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/StaticVarCompensatorFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/entities/SubstationFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/SubstationFilterEntity.java similarity index 96% rename from src/main/java/org/gridsuite/filter/server/entities/SubstationFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/SubstationFilterEntity.java index cfd8a5f2..6b8a5576 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/SubstationFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/SubstationFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/gridsuite/filter/server/entities/ThreeWindingsTransformerFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/ThreeWindingsTransformerFilterEntity.java similarity index 97% rename from src/main/java/org/gridsuite/filter/server/entities/ThreeWindingsTransformerFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/ThreeWindingsTransformerFilterEntity.java index 55d8608d..b1d7205b 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/ThreeWindingsTransformerFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/ThreeWindingsTransformerFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/gridsuite/filter/server/entities/TwoWindingsTransformerFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/TwoWindingsTransformerFilterEntity.java similarity index 97% rename from src/main/java/org/gridsuite/filter/server/entities/TwoWindingsTransformerFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/TwoWindingsTransformerFilterEntity.java index ec9ef8db..f5e05071 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/TwoWindingsTransformerFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/TwoWindingsTransformerFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/gridsuite/filter/server/entities/VoltageLevelFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/VoltageLevelFilterEntity.java similarity index 97% rename from src/main/java/org/gridsuite/filter/server/entities/VoltageLevelFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/VoltageLevelFilterEntity.java index 5e0d16c5..9c2f2d33 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/VoltageLevelFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/VoltageLevelFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/gridsuite/filter/server/entities/VscConverterStationFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/VscConverterStationFilterEntity.java similarity index 91% rename from src/main/java/org/gridsuite/filter/server/entities/VscConverterStationFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/criteriafilter/VscConverterStationFilterEntity.java index 1d0be727..ff5b69db 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/VscConverterStationFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/criteriafilter/VscConverterStationFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.criteriafilter; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/src/main/java/org/gridsuite/filter/server/entities/ExpertFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/expertfilter/ExpertFilterEntity.java similarity index 90% rename from src/main/java/org/gridsuite/filter/server/entities/ExpertFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/expertfilter/ExpertFilterEntity.java index d595e08e..df9a4c93 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/ExpertFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/expertfilter/ExpertFilterEntity.java @@ -5,13 +5,14 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.expertfilter; import jakarta.persistence.*; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.gridsuite.filter.server.entities.AbstractFilterEntity; import org.gridsuite.filter.server.utils.EquipmentType; /** diff --git a/src/main/java/org/gridsuite/filter/server/entities/ExpertRuleEntity.java b/src/main/java/org/gridsuite/filter/server/entities/expertfilter/ExpertRuleEntity.java similarity index 82% rename from src/main/java/org/gridsuite/filter/server/entities/ExpertRuleEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/expertfilter/ExpertRuleEntity.java index 8d270ad3..26888648 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/ExpertRuleEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/expertfilter/ExpertRuleEntity.java @@ -5,17 +5,17 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.expertfilter; import jakarta.persistence.*; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; -import org.gridsuite.filter.server.utils.CombinatorType; -import org.gridsuite.filter.server.utils.DataType; -import org.gridsuite.filter.server.utils.FieldType; -import org.gridsuite.filter.server.utils.OperatorType; +import org.gridsuite.filter.server.utils.expertfilter.CombinatorType; +import org.gridsuite.filter.server.utils.expertfilter.DataType; +import org.gridsuite.filter.server.utils.expertfilter.FieldType; +import org.gridsuite.filter.server.utils.expertfilter.OperatorType; import java.util.List; import java.util.UUID; diff --git a/src/main/java/org/gridsuite/filter/server/entities/IdentifierListFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/identifierlistfilter/IdentifierListFilterEntity.java similarity index 89% rename from src/main/java/org/gridsuite/filter/server/entities/IdentifierListFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/identifierlistfilter/IdentifierListFilterEntity.java index 25dd7700..7e0e87bd 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/IdentifierListFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/identifierlistfilter/IdentifierListFilterEntity.java @@ -5,12 +5,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.identifierlistfilter; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import org.gridsuite.filter.server.entities.AbstractFilterEntity; import org.gridsuite.filter.server.utils.EquipmentType; import jakarta.persistence.CascadeType; diff --git a/src/main/java/org/gridsuite/filter/server/entities/IdentifierListFilterEquipmentEntity.java b/src/main/java/org/gridsuite/filter/server/entities/identifierlistfilter/IdentifierListFilterEquipmentEntity.java similarity index 93% rename from src/main/java/org/gridsuite/filter/server/entities/IdentifierListFilterEquipmentEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/identifierlistfilter/IdentifierListFilterEquipmentEntity.java index db25cb30..81a0e6af 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/IdentifierListFilterEquipmentEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/identifierlistfilter/IdentifierListFilterEquipmentEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.identifierlistfilter; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/gridsuite/filter/server/entities/ScriptFilterEntity.java b/src/main/java/org/gridsuite/filter/server/entities/scriptfilter/ScriptFilterEntity.java similarity index 86% rename from src/main/java/org/gridsuite/filter/server/entities/ScriptFilterEntity.java rename to src/main/java/org/gridsuite/filter/server/entities/scriptfilter/ScriptFilterEntity.java index 7d467912..680513d3 100644 --- a/src/main/java/org/gridsuite/filter/server/entities/ScriptFilterEntity.java +++ b/src/main/java/org/gridsuite/filter/server/entities/scriptfilter/ScriptFilterEntity.java @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.entities; +package org.gridsuite.filter.server.entities.scriptfilter; import lombok.AllArgsConstructor; import lombok.Getter; @@ -15,6 +15,7 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; +import org.gridsuite.filter.server.entities.AbstractFilterEntity; /** * @author Jacques Borsenberger diff --git a/src/main/java/org/gridsuite/filter/server/repositories/BatteryFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/BatteryFilterRepository.java similarity index 70% rename from src/main/java/org/gridsuite/filter/server/repositories/BatteryFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/BatteryFilterRepository.java index 7adfee43..5b7fbd74 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/BatteryFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/BatteryFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.BatteryFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.BatteryFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/BusBarSectionFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/BusBarSectionFilterRepository.java similarity index 69% rename from src/main/java/org/gridsuite/filter/server/repositories/BusBarSectionFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/BusBarSectionFilterRepository.java index 1f97c5f4..934c50d4 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/BusBarSectionFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/BusBarSectionFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.BusBarSectionFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.BusBarSectionFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/DanglingLineFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/DanglingLineFilterRepository.java similarity index 70% rename from src/main/java/org/gridsuite/filter/server/repositories/DanglingLineFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/DanglingLineFilterRepository.java index 31ff573d..f029fb6d 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/DanglingLineFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/DanglingLineFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.DanglingLineFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.DanglingLineFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/GeneratorFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/GeneratorFilterRepository.java similarity index 70% rename from src/main/java/org/gridsuite/filter/server/repositories/GeneratorFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/GeneratorFilterRepository.java index 5c9543ae..7c287071 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/GeneratorFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/GeneratorFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.GeneratorFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.GeneratorFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/HvdcLineFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/HvdcLineFilterRepository.java similarity index 70% rename from src/main/java/org/gridsuite/filter/server/repositories/HvdcLineFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/HvdcLineFilterRepository.java index 48ff13fd..9bd0d95a 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/HvdcLineFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/HvdcLineFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.HvdcLineFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.HvdcLineFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/LccConverterStationFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/LccConverterStationFilterRepository.java similarity index 69% rename from src/main/java/org/gridsuite/filter/server/repositories/LccConverterStationFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/LccConverterStationFilterRepository.java index 7db76585..bc4157f4 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/LccConverterStationFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/LccConverterStationFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.LccConverterStationFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.LccConverterStationFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/LineFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/LineFilterRepository.java similarity index 70% rename from src/main/java/org/gridsuite/filter/server/repositories/LineFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/LineFilterRepository.java index 1e1ef5b2..a165d68b 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/LineFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/LineFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.LineFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.LineFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/LoadFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/LoadFilterRepository.java similarity index 70% rename from src/main/java/org/gridsuite/filter/server/repositories/LoadFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/LoadFilterRepository.java index 81838960..d60e67dc 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/LoadFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/LoadFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.LoadFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.LoadFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/ShuntCompensatorFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/ShuntCompensatorFilterRepository.java similarity index 69% rename from src/main/java/org/gridsuite/filter/server/repositories/ShuntCompensatorFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/ShuntCompensatorFilterRepository.java index bb1918f7..d97bfa1d 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/ShuntCompensatorFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/ShuntCompensatorFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.ShuntCompensatorFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.ShuntCompensatorFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/StaticVarCompensatorFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/StaticVarCompensatorFilterRepository.java similarity index 69% rename from src/main/java/org/gridsuite/filter/server/repositories/StaticVarCompensatorFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/StaticVarCompensatorFilterRepository.java index 2c32c8ae..1b4e46ba 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/StaticVarCompensatorFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/StaticVarCompensatorFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.StaticVarCompensatorFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.StaticVarCompensatorFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/SubstationFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/SubstationFilterRepository.java similarity index 70% rename from src/main/java/org/gridsuite/filter/server/repositories/SubstationFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/SubstationFilterRepository.java index 4245e401..7dde7ca4 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/SubstationFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/SubstationFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.SubstationFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.SubstationFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/ThreeWindingsTransformerFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/ThreeWindingsTransformerFilterRepository.java similarity index 69% rename from src/main/java/org/gridsuite/filter/server/repositories/ThreeWindingsTransformerFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/ThreeWindingsTransformerFilterRepository.java index 2d807f70..b9a7eb11 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/ThreeWindingsTransformerFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/ThreeWindingsTransformerFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.ThreeWindingsTransformerFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.ThreeWindingsTransformerFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/TwoWindingsTransformerFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/TwoWindingsTransformerFilterRepository.java similarity index 69% rename from src/main/java/org/gridsuite/filter/server/repositories/TwoWindingsTransformerFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/TwoWindingsTransformerFilterRepository.java index d880c4f2..649c44f1 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/TwoWindingsTransformerFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/TwoWindingsTransformerFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.TwoWindingsTransformerFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.TwoWindingsTransformerFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/VoltageLevelFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/VoltageLevelFilterRepository.java similarity index 70% rename from src/main/java/org/gridsuite/filter/server/repositories/VoltageLevelFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/VoltageLevelFilterRepository.java index 2d671357..8bbbdfc2 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/VoltageLevelFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/VoltageLevelFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.VoltageLevelFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.VoltageLevelFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/VscConverterStationFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/VscConverterStationFilterRepository.java similarity index 69% rename from src/main/java/org/gridsuite/filter/server/repositories/VscConverterStationFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/VscConverterStationFilterRepository.java index e60b6e16..ba2632f4 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/VscConverterStationFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/criteriafilter/VscConverterStationFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.criteriafilter; -import org.gridsuite.filter.server.entities.VscConverterStationFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.VscConverterStationFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; /** diff --git a/src/main/java/org/gridsuite/filter/server/repositories/ExpertFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/expertfilter/ExpertFilterRepository.java similarity index 70% rename from src/main/java/org/gridsuite/filter/server/repositories/ExpertFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/expertfilter/ExpertFilterRepository.java index 1cb0eae9..878852b0 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/ExpertFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/expertfilter/ExpertFilterRepository.java @@ -4,9 +4,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.expertfilter; -import org.gridsuite.filter.server.entities.ExpertFilterEntity; +import org.gridsuite.filter.server.entities.expertfilter.ExpertFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; diff --git a/src/main/java/org/gridsuite/filter/server/repositories/IdentifierListFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/identifierlistfilter/IdentifierListFilterRepository.java similarity index 65% rename from src/main/java/org/gridsuite/filter/server/repositories/IdentifierListFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/identifierlistfilter/IdentifierListFilterRepository.java index c7aaaa9f..236eb421 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/IdentifierListFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/identifierlistfilter/IdentifierListFilterRepository.java @@ -5,9 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.identifierlistfilter; -import org.gridsuite.filter.server.entities.IdentifierListFilterEntity; +import org.gridsuite.filter.server.entities.identifierlistfilter.IdentifierListFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; /** * @author Seddik Yengui diff --git a/src/main/java/org/gridsuite/filter/server/AbstractFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/AbstractFilterRepositoryProxy.java similarity index 78% rename from src/main/java/org/gridsuite/filter/server/AbstractFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/AbstractFilterRepositoryProxy.java index c4754ec8..49c57a92 100644 --- a/src/main/java/org/gridsuite/filter/server/AbstractFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/AbstractFilterRepositoryProxy.java @@ -5,12 +5,14 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies; import com.powsybl.commons.PowsyblException; import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.*; import org.gridsuite.filter.server.entities.*; +import org.gridsuite.filter.server.entities.criteriafilter.*; import org.gridsuite.filter.server.repositories.FilterMetadata; import org.gridsuite.filter.server.repositories.FilterRepository; import org.gridsuite.filter.server.utils.EquipmentType; @@ -36,15 +38,15 @@ static Set cloneIfNotEmptyOrNull(Set set) { return null; } - static NumericalFilter convert(NumericFilterEntity entity) { + public static NumericalFilter convert(NumericFilterEntity entity) { return entity != null ? new NumericalFilter(entity.getFilterType(), entity.getValue1(), entity.getValue2()) : null; } - static SortedSet setToSorterSet(Set set) { + public static SortedSet setToSorterSet(Set set) { return CollectionUtils.isEmpty(set) ? null : new TreeSet<>(set); } - static Map> convert(FreePropertiesFilterEntity entity) { + public static Map> convert(FreePropertiesFilterEntity entity) { if (entity == null) { return null; } @@ -62,13 +64,13 @@ static Map> convert(FreePropertiesFilterEntity entity) { return ret; } - static NumericFilterEntity convert(NumericalFilter numericalFilter) { + public static NumericFilterEntity convert(NumericalFilter numericalFilter) { return numericalFilter != null ? new NumericFilterEntity(null, numericalFilter.getType(), numericalFilter.getValue1(), numericalFilter.getValue2()) : null; } - static FreePropertiesFilterEntity convert(Map> dto) { + public static FreePropertiesFilterEntity convert(Map> dto) { if (dto == null) { return null; } @@ -79,21 +81,21 @@ static FreePropertiesFilterEntity convert(Map> dto) { return FreePropertiesFilterEntity.builder().freePropertyFilterEntities(innerEntities).build(); } - abstract R getRepository(); + public abstract R getRepository(); - abstract AbstractFilter toDto(F filterEntity); + public abstract AbstractFilter toDto(F filterEntity); - abstract F fromDto(AbstractFilter dto); + public abstract F fromDto(AbstractFilter dto); - abstract FilterType getFilterType(); + public abstract FilterType getFilterType(); - abstract EquipmentType getEquipmentType(); + public abstract EquipmentType getEquipmentType(); - EquipmentType getEquipmentType(UUID id) { + public EquipmentType getEquipmentType(UUID id) { return getEquipmentType(); } - Optional getFilter(UUID id) { + public Optional getFilter(UUID id) { Optional element = getRepository().findById(id); if (element.isPresent()) { return element.map(this::toDto); @@ -101,14 +103,14 @@ Optional getFilter(UUID id) { return Optional.empty(); } - List getFilters(List ids) { + public List getFilters(List ids) { return getRepository().findAllById(ids) .stream() .map(this::toDto) .collect(Collectors.toList()); } - Stream getFiltersAttributes() { + public Stream getFiltersAttributes() { return getRepository().getFiltersMetadata().stream().map(this::metadataToAttribute); } @@ -116,30 +118,30 @@ FilterAttributes metadataToAttribute(FilterMetadata f) { return new FilterAttributes(f, getFilterType(), getEquipmentType(f.getId())); } - AbstractFilter insert(AbstractFilter f) { + public AbstractFilter insert(AbstractFilter f) { return toDto(getRepository().save(fromDto(f))); } - void modify(UUID id, AbstractFilter f) { + public void modify(UUID id, AbstractFilter f) { f.setId(id); toDto(getRepository().save(fromDto(f))); } - boolean deleteById(UUID id) { + public boolean deleteById(UUID id) { return getRepository().removeById(id) != 0; } - void deleteAll() { + public void deleteAll() { getRepository().deleteAll(); } - void buildGenericFilter(AbstractGenericFilterEntity.AbstractGenericFilterEntityBuilder builder, CriteriaFilter dto) { + public void buildGenericFilter(AbstractGenericFilterEntity.AbstractGenericFilterEntityBuilder builder, CriteriaFilter dto) { buildAbstractFilter(builder, dto); builder.equipmentId(dto.getEquipmentFilterForm().getEquipmentID()) .equipmentName(dto.getEquipmentFilterForm().getEquipmentName()); } - void buildInjectionFilter(AbstractInjectionFilterEntity.AbstractInjectionFilterEntityBuilder builder, CriteriaFilter dto) { + public void buildInjectionFilter(AbstractInjectionFilterEntity.AbstractInjectionFilterEntityBuilder builder, CriteriaFilter dto) { buildGenericFilter(builder, dto); if (!(dto.getEquipmentFilterForm() instanceof AbstractInjectionFilter)) { throw new PowsyblException(WRONG_FILTER_TYPE); @@ -151,7 +153,7 @@ void buildInjectionFilter(AbstractInjectionFilterEntity.AbstractInjectionFilterE .nominalVoltage(AbstractFilterRepositoryProxy.convert(injectionFilter.getNominalVoltage())); } - void buildAbstractFilter(AbstractFilterEntity.AbstractFilterEntityBuilder builder, AbstractFilter dto) { + public void buildAbstractFilter(AbstractFilterEntity.AbstractFilterEntityBuilder builder, AbstractFilter dto) { /* modification date is managed by jpa, so we don't process it */ builder.id(dto.getId()); } diff --git a/src/main/java/org/gridsuite/filter/server/BatteryFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/BatteryFilterRepositoryProxy.java similarity index 74% rename from src/main/java/org/gridsuite/filter/server/BatteryFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/BatteryFilterRepositoryProxy.java index 57a9e3a8..5a45c51e 100644 --- a/src/main/java/org/gridsuite/filter/server/BatteryFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/BatteryFilterRepositoryProxy.java @@ -5,13 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.criteriafilter.BatteryFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.AbstractInjectionFilterEntity; -import org.gridsuite.filter.server.entities.BatteryFilterEntity; -import org.gridsuite.filter.server.repositories.BatteryFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.AbstractInjectionFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.BatteryFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.BatteryFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/BusBarSectionFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/BusBarSectionFilterRepositoryProxy.java similarity index 75% rename from src/main/java/org/gridsuite/filter/server/BusBarSectionFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/BusBarSectionFilterRepositoryProxy.java index f21e26dc..f490e533 100644 --- a/src/main/java/org/gridsuite/filter/server/BusBarSectionFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/BusBarSectionFilterRepositoryProxy.java @@ -5,13 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.criteriafilter.BusBarSectionFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.AbstractInjectionFilterEntity; -import org.gridsuite.filter.server.entities.BusBarSectionFilterEntity; -import org.gridsuite.filter.server.repositories.BusBarSectionFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.AbstractInjectionFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.BusBarSectionFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.BusBarSectionFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/DanglingLineFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/DanglingLineFilterRepositoryProxy.java similarity index 75% rename from src/main/java/org/gridsuite/filter/server/DanglingLineFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/DanglingLineFilterRepositoryProxy.java index 6bed375f..c4370dc7 100644 --- a/src/main/java/org/gridsuite/filter/server/DanglingLineFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/DanglingLineFilterRepositoryProxy.java @@ -5,13 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.criteriafilter.DanglingLineFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.AbstractInjectionFilterEntity; -import org.gridsuite.filter.server.entities.DanglingLineFilterEntity; -import org.gridsuite.filter.server.repositories.DanglingLineFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.AbstractInjectionFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.DanglingLineFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.DanglingLineFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/GeneratorFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/GeneratorFilterRepositoryProxy.java similarity index 81% rename from src/main/java/org/gridsuite/filter/server/GeneratorFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/GeneratorFilterRepositoryProxy.java index 2ae150f2..5378a80e 100644 --- a/src/main/java/org/gridsuite/filter/server/GeneratorFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/GeneratorFilterRepositoryProxy.java @@ -5,12 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.criteriafilter.CriteriaFilter; +import org.gridsuite.filter.server.dto.criteriafilter.GeneratorFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.GeneratorFilterEntity; -import org.gridsuite.filter.server.repositories.GeneratorFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.GeneratorFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.GeneratorFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/HvdcLineFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/HvdcLineFilterRepositoryProxy.java similarity index 84% rename from src/main/java/org/gridsuite/filter/server/HvdcLineFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/HvdcLineFilterRepositoryProxy.java index cd3a68eb..6c2369d5 100644 --- a/src/main/java/org/gridsuite/filter/server/HvdcLineFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/HvdcLineFilterRepositoryProxy.java @@ -5,12 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.criteriafilter.CriteriaFilter; +import org.gridsuite.filter.server.dto.criteriafilter.HvdcLineFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.HvdcLineFilterEntity; -import org.gridsuite.filter.server.repositories.HvdcLineFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.HvdcLineFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.HvdcLineFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/LccConverterStationFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/LccConverterStationFilterRepositoryProxy.java similarity index 76% rename from src/main/java/org/gridsuite/filter/server/LccConverterStationFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/LccConverterStationFilterRepositoryProxy.java index ccd138b0..e4631cde 100644 --- a/src/main/java/org/gridsuite/filter/server/LccConverterStationFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/LccConverterStationFilterRepositoryProxy.java @@ -5,13 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.criteriafilter.LccConverterStationFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.AbstractInjectionFilterEntity; -import org.gridsuite.filter.server.entities.LccConverterStationFilterEntity; -import org.gridsuite.filter.server.repositories.LccConverterStationFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.AbstractInjectionFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.LccConverterStationFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.LccConverterStationFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/LineFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/LineFilterRepositoryProxy.java similarity index 84% rename from src/main/java/org/gridsuite/filter/server/LineFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/LineFilterRepositoryProxy.java index 792872e3..688c74ea 100644 --- a/src/main/java/org/gridsuite/filter/server/LineFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/LineFilterRepositoryProxy.java @@ -5,12 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.criteriafilter.CriteriaFilter; +import org.gridsuite.filter.server.dto.criteriafilter.LineFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.LineFilterEntity; -import org.gridsuite.filter.server.repositories.LineFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.LineFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.LineFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/LoadFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/LoadFilterRepositoryProxy.java similarity index 74% rename from src/main/java/org/gridsuite/filter/server/LoadFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/LoadFilterRepositoryProxy.java index 7762bfe1..c29d3f4b 100644 --- a/src/main/java/org/gridsuite/filter/server/LoadFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/LoadFilterRepositoryProxy.java @@ -5,13 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.criteriafilter.LoadFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.AbstractInjectionFilterEntity; -import org.gridsuite.filter.server.entities.LoadFilterEntity; -import org.gridsuite.filter.server.repositories.LoadFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.AbstractInjectionFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.LoadFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.LoadFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/ShuntCompensatorFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/ShuntCompensatorFilterRepositoryProxy.java similarity index 75% rename from src/main/java/org/gridsuite/filter/server/ShuntCompensatorFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/ShuntCompensatorFilterRepositoryProxy.java index faabeaad..cca2fbef 100644 --- a/src/main/java/org/gridsuite/filter/server/ShuntCompensatorFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/ShuntCompensatorFilterRepositoryProxy.java @@ -5,13 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.criteriafilter.ShuntCompensatorFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.AbstractInjectionFilterEntity; -import org.gridsuite.filter.server.entities.ShuntCompensatorFilterEntity; -import org.gridsuite.filter.server.repositories.ShuntCompensatorFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.AbstractInjectionFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.ShuntCompensatorFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.ShuntCompensatorFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/StaticVarCompensatorFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/StaticVarCompensatorFilterRepositoryProxy.java similarity index 76% rename from src/main/java/org/gridsuite/filter/server/StaticVarCompensatorFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/StaticVarCompensatorFilterRepositoryProxy.java index e522ebd7..4a7ed0be 100644 --- a/src/main/java/org/gridsuite/filter/server/StaticVarCompensatorFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/StaticVarCompensatorFilterRepositoryProxy.java @@ -5,13 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.criteriafilter.StaticVarCompensatorFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.AbstractInjectionFilterEntity; -import org.gridsuite.filter.server.entities.StaticVarCompensatorFilterEntity; -import org.gridsuite.filter.server.repositories.StaticVarCompensatorFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.AbstractInjectionFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.StaticVarCompensatorFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.StaticVarCompensatorFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/SubstationFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/SubstationFilterRepositoryProxy.java similarity index 81% rename from src/main/java/org/gridsuite/filter/server/SubstationFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/SubstationFilterRepositoryProxy.java index 06c3680b..675eda7f 100644 --- a/src/main/java/org/gridsuite/filter/server/SubstationFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/SubstationFilterRepositoryProxy.java @@ -5,15 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; import org.gridsuite.filter.server.dto.AbstractFilter; -import org.gridsuite.filter.server.dto.CriteriaFilter; -import org.gridsuite.filter.server.dto.SubstationFilter; +import org.gridsuite.filter.server.dto.criteriafilter.CriteriaFilter; +import org.gridsuite.filter.server.dto.criteriafilter.SubstationFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.SubstationFilterEntity; -import org.gridsuite.filter.server.repositories.SubstationFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.SubstationFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.SubstationFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/ThreeWindingsTransformerFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/ThreeWindingsTransformerFilterRepositoryProxy.java similarity index 85% rename from src/main/java/org/gridsuite/filter/server/ThreeWindingsTransformerFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/ThreeWindingsTransformerFilterRepositoryProxy.java index 61d70cfa..e7b3d14b 100644 --- a/src/main/java/org/gridsuite/filter/server/ThreeWindingsTransformerFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/ThreeWindingsTransformerFilterRepositoryProxy.java @@ -5,12 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.criteriafilter.CriteriaFilter; +import org.gridsuite.filter.server.dto.criteriafilter.ThreeWindingsTransformerFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.ThreeWindingsTransformerFilterEntity; -import org.gridsuite.filter.server.repositories.ThreeWindingsTransformerFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.ThreeWindingsTransformerFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.ThreeWindingsTransformerFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/TwoWindingsTransformerFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/TwoWindingsTransformerFilterRepositoryProxy.java similarity index 83% rename from src/main/java/org/gridsuite/filter/server/TwoWindingsTransformerFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/TwoWindingsTransformerFilterRepositoryProxy.java index 597754de..a3d7e382 100644 --- a/src/main/java/org/gridsuite/filter/server/TwoWindingsTransformerFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/TwoWindingsTransformerFilterRepositoryProxy.java @@ -5,12 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.criteriafilter.CriteriaFilter; +import org.gridsuite.filter.server.dto.criteriafilter.TwoWindingsTransformerFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.TwoWindingsTransformerFilterEntity; -import org.gridsuite.filter.server.repositories.TwoWindingsTransformerFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.TwoWindingsTransformerFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.TwoWindingsTransformerFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/VoltageLevelFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/VoltageLevelFilterRepositoryProxy.java similarity index 82% rename from src/main/java/org/gridsuite/filter/server/VoltageLevelFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/VoltageLevelFilterRepositoryProxy.java index 14233f2b..3321053f 100644 --- a/src/main/java/org/gridsuite/filter/server/VoltageLevelFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/VoltageLevelFilterRepositoryProxy.java @@ -5,15 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; import org.gridsuite.filter.server.dto.AbstractFilter; -import org.gridsuite.filter.server.dto.CriteriaFilter; -import org.gridsuite.filter.server.dto.VoltageLevelFilter; +import org.gridsuite.filter.server.dto.criteriafilter.CriteriaFilter; +import org.gridsuite.filter.server.dto.criteriafilter.VoltageLevelFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.VoltageLevelFilterEntity; -import org.gridsuite.filter.server.repositories.VoltageLevelFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.VoltageLevelFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.VoltageLevelFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/VscConverterStationFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/VscConverterStationFilterRepositoryProxy.java similarity index 76% rename from src/main/java/org/gridsuite/filter/server/VscConverterStationFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/VscConverterStationFilterRepositoryProxy.java index 116070c4..9d7ff307 100644 --- a/src/main/java/org/gridsuite/filter/server/VscConverterStationFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/criteriafilter/VscConverterStationFilterRepositoryProxy.java @@ -5,13 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.criteriafilter; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.criteriafilter.VscConverterStationFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.AbstractInjectionFilterEntity; -import org.gridsuite.filter.server.entities.VscConverterStationFilterEntity; -import org.gridsuite.filter.server.repositories.VscConverterStationFilterRepository; +import org.gridsuite.filter.server.entities.criteriafilter.AbstractInjectionFilterEntity; +import org.gridsuite.filter.server.entities.criteriafilter.VscConverterStationFilterEntity; +import org.gridsuite.filter.server.repositories.criteriafilter.VscConverterStationFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; diff --git a/src/main/java/org/gridsuite/filter/server/ExpertFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/expertfiler/ExpertFilterRepositoryProxy.java similarity index 87% rename from src/main/java/org/gridsuite/filter/server/ExpertFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/expertfiler/ExpertFilterRepositoryProxy.java index bfafa799..896dac12 100644 --- a/src/main/java/org/gridsuite/filter/server/ExpertFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/expertfiler/ExpertFilterRepositoryProxy.java @@ -5,13 +5,18 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.expertfiler; import com.powsybl.commons.PowsyblException; -import org.gridsuite.filter.server.dto.*; -import org.gridsuite.filter.server.dto.expertrule.*; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.expertfilter.ExpertFilter; +import org.gridsuite.filter.server.dto.expertfilter.expertrule.*; import org.gridsuite.filter.server.entities.*; -import org.gridsuite.filter.server.repositories.ExpertFilterRepository; +import org.gridsuite.filter.server.entities.expertfilter.ExpertFilterEntity; +import org.gridsuite.filter.server.entities.expertfilter.ExpertRuleEntity; +import org.gridsuite.filter.server.repositories.expertfilter.ExpertFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; @@ -31,12 +36,12 @@ public ExpertFilterRepositoryProxy(ExpertFilterRepository expertFilterRepository } @Override - ExpertFilterRepository getRepository() { + public ExpertFilterRepository getRepository() { return expertFilterRepository; } @Override - AbstractFilter toDto(ExpertFilterEntity filterEntity) { + public AbstractFilter toDto(ExpertFilterEntity filterEntity) { return ExpertFilter.builder() .id(filterEntity.getId()) .modificationDate(filterEntity.getModificationDate()) @@ -96,7 +101,7 @@ private static List entitiesToDto(List ent } @Override - ExpertFilterEntity fromDto(AbstractFilter dto) { + public ExpertFilterEntity fromDto(AbstractFilter dto) { if (dto instanceof ExpertFilter filter) { var expertFilterEntityBuilder = ExpertFilterEntity.builder() .modificationDate(filter.getModificationDate()) @@ -145,7 +150,7 @@ private static List dtoToEntities(List rul } @Override - FilterType getFilterType() { + public FilterType getFilterType() { return FilterType.EXPERT; } diff --git a/src/main/java/org/gridsuite/filter/server/IdentifierListFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/identifierlistfilter/IdentifierListFilterRepositoryProxy.java similarity index 77% rename from src/main/java/org/gridsuite/filter/server/IdentifierListFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/identifierlistfilter/IdentifierListFilterRepositoryProxy.java index 5fe00623..5c09e061 100644 --- a/src/main/java/org/gridsuite/filter/server/IdentifierListFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/identifierlistfilter/IdentifierListFilterRepositoryProxy.java @@ -5,17 +5,18 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.identifierlistfilter; import com.powsybl.commons.PowsyblException; -import org.gridsuite.filter.server.dto.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; import org.gridsuite.filter.server.dto.AbstractFilter; -import org.gridsuite.filter.server.dto.IdentifierListFilterEquipmentAttributes; -import org.gridsuite.filter.server.dto.IdentifierListFilter; +import org.gridsuite.filter.server.dto.identifierlistfilter.IdentifierListFilterEquipmentAttributes; +import org.gridsuite.filter.server.dto.identifierlistfilter.IdentifierListFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.IdentifierListFilterEntity; -import org.gridsuite.filter.server.entities.IdentifierListFilterEquipmentEntity; -import org.gridsuite.filter.server.repositories.IdentifierListFilterRepository; +import org.gridsuite.filter.server.entities.identifierlistfilter.IdentifierListFilterEntity; +import org.gridsuite.filter.server.entities.identifierlistfilter.IdentifierListFilterEquipmentEntity; +import org.gridsuite.filter.server.repositories.identifierlistfilter.IdentifierListFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; @@ -34,12 +35,12 @@ public IdentifierListFilterRepositoryProxy(IdentifierListFilterRepository identi } @Override - IdentifierListFilterRepository getRepository() { + public IdentifierListFilterRepository getRepository() { return identifierListFilterRepository; } @Override - AbstractFilter toDto(IdentifierListFilterEntity filterEntity) { + public AbstractFilter toDto(IdentifierListFilterEntity filterEntity) { return new IdentifierListFilter(filterEntity.getId(), filterEntity.getModificationDate(), filterEntity.getEquipmentType(), @@ -51,7 +52,7 @@ AbstractFilter toDto(IdentifierListFilterEntity filterEntity) { } @Override - IdentifierListFilterEntity fromDto(AbstractFilter dto) { + public IdentifierListFilterEntity fromDto(AbstractFilter dto) { if (dto instanceof IdentifierListFilter) { var filter = (IdentifierListFilter) dto; var identifierListFilterEntityBuilder = IdentifierListFilterEntity.builder() @@ -72,7 +73,7 @@ IdentifierListFilterEntity fromDto(AbstractFilter dto) { } @Override - FilterType getFilterType() { + public FilterType getFilterType() { return FilterType.IDENTIFIER_LIST; } diff --git a/src/main/java/org/gridsuite/filter/server/ScriptFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/scriptfilter/ScriptFilterRepositoryProxy.java similarity index 76% rename from src/main/java/org/gridsuite/filter/server/ScriptFilterRepositoryProxy.java rename to src/main/java/org/gridsuite/filter/server/repositories/proxies/scriptfilter/ScriptFilterRepositoryProxy.java index c55b1b10..0de3049f 100644 --- a/src/main/java/org/gridsuite/filter/server/ScriptFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/scriptfilter/ScriptFilterRepositoryProxy.java @@ -5,22 +5,23 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server; +package org.gridsuite.filter.server.repositories.proxies.scriptfilter; import com.powsybl.commons.PowsyblException; -import org.gridsuite.filter.server.dto.AbstractEquipmentFilterForm; +import org.gridsuite.filter.server.dto.criteriafilter.AbstractEquipmentFilterForm; import org.gridsuite.filter.server.dto.AbstractFilter; -import org.gridsuite.filter.server.dto.ScriptFilter; +import org.gridsuite.filter.server.dto.scriptfilter.ScriptFilter; import org.gridsuite.filter.server.entities.AbstractFilterEntity; -import org.gridsuite.filter.server.entities.ScriptFilterEntity; -import org.gridsuite.filter.server.repositories.ScriptFilterRepository; +import org.gridsuite.filter.server.entities.scriptfilter.ScriptFilterEntity; +import org.gridsuite.filter.server.repositories.scriptfilter.ScriptFilterRepository; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.EquipmentType; import org.gridsuite.filter.server.utils.FilterType; /** * @author Jacques Borsenberger */ -class ScriptFilterRepositoryProxy extends AbstractFilterRepositoryProxy { +public class ScriptFilterRepositoryProxy extends AbstractFilterRepositoryProxy { private final ScriptFilterRepository scriptFiltersRepository; public ScriptFilterRepositoryProxy(ScriptFilterRepository scriptFiltersRepository) { diff --git a/src/main/java/org/gridsuite/filter/server/repositories/ScriptFilterRepository.java b/src/main/java/org/gridsuite/filter/server/repositories/scriptfilter/ScriptFilterRepository.java similarity index 70% rename from src/main/java/org/gridsuite/filter/server/repositories/ScriptFilterRepository.java rename to src/main/java/org/gridsuite/filter/server/repositories/scriptfilter/ScriptFilterRepository.java index 46a6e9d4..e2e44b84 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/ScriptFilterRepository.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/scriptfilter/ScriptFilterRepository.java @@ -4,9 +4,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.repositories; +package org.gridsuite.filter.server.repositories.scriptfilter; -import org.gridsuite.filter.server.entities.ScriptFilterEntity; +import org.gridsuite.filter.server.entities.scriptfilter.ScriptFilterEntity; +import org.gridsuite.filter.server.repositories.FilterRepository; import org.springframework.stereotype.Repository; diff --git a/src/main/java/org/gridsuite/filter/server/utils/CombinatorType.java b/src/main/java/org/gridsuite/filter/server/utils/expertfilter/CombinatorType.java similarity index 87% rename from src/main/java/org/gridsuite/filter/server/utils/CombinatorType.java rename to src/main/java/org/gridsuite/filter/server/utils/expertfilter/CombinatorType.java index 21f4ef31..f3d313be 100644 --- a/src/main/java/org/gridsuite/filter/server/utils/CombinatorType.java +++ b/src/main/java/org/gridsuite/filter/server/utils/expertfilter/CombinatorType.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.utils; +package org.gridsuite.filter.server.utils.expertfilter; /** * @author Antoine Bouhours diff --git a/src/main/java/org/gridsuite/filter/server/utils/DataType.java b/src/main/java/org/gridsuite/filter/server/utils/expertfilter/DataType.java similarity index 88% rename from src/main/java/org/gridsuite/filter/server/utils/DataType.java rename to src/main/java/org/gridsuite/filter/server/utils/expertfilter/DataType.java index ca0e7e81..b254a321 100644 --- a/src/main/java/org/gridsuite/filter/server/utils/DataType.java +++ b/src/main/java/org/gridsuite/filter/server/utils/expertfilter/DataType.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.utils; +package org.gridsuite.filter.server.utils.expertfilter; /** * @author Antoine Bouhours diff --git a/src/main/java/org/gridsuite/filter/server/utils/ExpertFilterUtils.java b/src/main/java/org/gridsuite/filter/server/utils/expertfilter/ExpertFilterUtils.java similarity index 97% rename from src/main/java/org/gridsuite/filter/server/utils/ExpertFilterUtils.java rename to src/main/java/org/gridsuite/filter/server/utils/expertfilter/ExpertFilterUtils.java index bbd5b5d6..bed023e4 100644 --- a/src/main/java/org/gridsuite/filter/server/utils/ExpertFilterUtils.java +++ b/src/main/java/org/gridsuite/filter/server/utils/expertfilter/ExpertFilterUtils.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.utils; +package org.gridsuite.filter.server.utils.expertfilter; import com.powsybl.commons.PowsyblException; import com.powsybl.iidm.network.*; diff --git a/src/main/java/org/gridsuite/filter/server/utils/FieldType.java b/src/main/java/org/gridsuite/filter/server/utils/expertfilter/FieldType.java similarity index 90% rename from src/main/java/org/gridsuite/filter/server/utils/FieldType.java rename to src/main/java/org/gridsuite/filter/server/utils/expertfilter/FieldType.java index ce44d1fc..b61f466f 100644 --- a/src/main/java/org/gridsuite/filter/server/utils/FieldType.java +++ b/src/main/java/org/gridsuite/filter/server/utils/expertfilter/FieldType.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.utils; +package org.gridsuite.filter.server.utils.expertfilter; /** * @author Antoine Bouhours diff --git a/src/main/java/org/gridsuite/filter/server/utils/OperatorType.java b/src/main/java/org/gridsuite/filter/server/utils/expertfilter/OperatorType.java similarity index 90% rename from src/main/java/org/gridsuite/filter/server/utils/OperatorType.java rename to src/main/java/org/gridsuite/filter/server/utils/expertfilter/OperatorType.java index 2eeabde7..492c79f0 100644 --- a/src/main/java/org/gridsuite/filter/server/utils/OperatorType.java +++ b/src/main/java/org/gridsuite/filter/server/utils/expertfilter/OperatorType.java @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.gridsuite.filter.server.utils; +package org.gridsuite.filter.server.utils.expertfilter; /** * @author Antoine Bouhours diff --git a/src/test/java/org/gridsuite/filter/server/ExpertFilterUtilsTest.java b/src/test/java/org/gridsuite/filter/server/ExpertFilterUtilsTest.java index 787ccfb0..22f5915d 100644 --- a/src/test/java/org/gridsuite/filter/server/ExpertFilterUtilsTest.java +++ b/src/test/java/org/gridsuite/filter/server/ExpertFilterUtilsTest.java @@ -9,10 +9,10 @@ import com.powsybl.iidm.network.EnergySource; import com.powsybl.iidm.network.Generator; import com.powsybl.iidm.network.IdentifiableType; -import org.gridsuite.filter.server.dto.expertrule.*; -import org.gridsuite.filter.server.utils.CombinatorType; -import org.gridsuite.filter.server.utils.FieldType; -import org.gridsuite.filter.server.utils.OperatorType; +import org.gridsuite.filter.server.dto.expertfilter.expertrule.*; +import org.gridsuite.filter.server.utils.expertfilter.CombinatorType; +import org.gridsuite.filter.server.utils.expertfilter.FieldType; +import org.gridsuite.filter.server.utils.expertfilter.OperatorType; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; diff --git a/src/test/java/org/gridsuite/filter/server/FilterEntityControllerTest.java b/src/test/java/org/gridsuite/filter/server/FilterEntityControllerTest.java index 460fe0b6..ee223509 100644 --- a/src/test/java/org/gridsuite/filter/server/FilterEntityControllerTest.java +++ b/src/test/java/org/gridsuite/filter/server/FilterEntityControllerTest.java @@ -24,10 +24,23 @@ import jakarta.servlet.ServletException; import org.apache.commons.collections4.OrderedMap; import org.apache.commons.collections4.map.LinkedMap; -import org.gridsuite.filter.server.dto.DanglingLineFilter; -import org.gridsuite.filter.server.dto.*; -import org.gridsuite.filter.server.dto.expertrule.*; +import org.gridsuite.filter.server.dto.AbstractFilter; +import org.gridsuite.filter.server.dto.FilterAttributes; +import org.gridsuite.filter.server.dto.IFilterAttributes; +import org.gridsuite.filter.server.dto.criteriafilter.DanglingLineFilter; +import org.gridsuite.filter.server.dto.criteriafilter.*; +import org.gridsuite.filter.server.dto.expertfilter.ExpertFilter; +import org.gridsuite.filter.server.dto.expertfilter.expertrule.*; +import org.gridsuite.filter.server.dto.identifierlistfilter.FilterEquipments; +import org.gridsuite.filter.server.dto.identifierlistfilter.IdentifiableAttributes; +import org.gridsuite.filter.server.dto.identifierlistfilter.IdentifierListFilter; +import org.gridsuite.filter.server.dto.identifierlistfilter.IdentifierListFilterEquipmentAttributes; +import org.gridsuite.filter.server.dto.scriptfilter.ScriptFilter; +import org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy; import org.gridsuite.filter.server.utils.*; +import org.gridsuite.filter.server.utils.expertfilter.CombinatorType; +import org.gridsuite.filter.server.utils.expertfilter.FieldType; +import org.gridsuite.filter.server.utils.expertfilter.OperatorType; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -51,7 +64,7 @@ import java.util.*; import static org.apache.commons.lang3.StringUtils.join; -import static org.gridsuite.filter.server.AbstractFilterRepositoryProxy.WRONG_FILTER_TYPE; +import static org.gridsuite.filter.server.repositories.proxies.AbstractFilterRepositoryProxy.WRONG_FILTER_TYPE; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.*; import static org.mockito.BDDMockito.given; diff --git a/src/test/java/org/gridsuite/filter/server/GenerateScriptFromFiltersTest.java b/src/test/java/org/gridsuite/filter/server/GenerateScriptFromFiltersTest.java index 1a440d2f..f0c1c499 100644 --- a/src/test/java/org/gridsuite/filter/server/GenerateScriptFromFiltersTest.java +++ b/src/test/java/org/gridsuite/filter/server/GenerateScriptFromFiltersTest.java @@ -9,7 +9,7 @@ import com.powsybl.iidm.network.EnergySource; import org.apache.commons.collections4.map.LinkedMap; -import org.gridsuite.filter.server.dto.*; +import org.gridsuite.filter.server.dto.criteriafilter.*; import org.gridsuite.filter.server.utils.RangeType; import org.junit.Test;