Skip to content

Commit

Permalink
fix: post revert fix
Browse files Browse the repository at this point in the history
Signed-off-by: LE SAULNIER Kevin <[email protected]>
  • Loading branch information
LE SAULNIER Kevin committed Sep 9, 2024
1 parent d8bb573 commit b89cf8b
Show file tree
Hide file tree
Showing 40 changed files with 40 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public CompositeModificationEntity(@NonNull CompositeModificationInfos composite
public CompositeModificationInfos toModificationInfos() {
List<ModificationInfos> modificationsInfos = modifications.stream().map(ModificationEntity::toModificationInfos).toList();
return CompositeModificationInfos.builder()
.active(getActive())
.date(getDate())
.uuid(getId())
.stashed(getStashed())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public GroovyScriptInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.script(getScript());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public TabularCreationInfos toModificationInfos() {
.date(getDate())
.uuid(getId())
.stashed(getStashed())
.active(getActive())
.creationType(creationType)
.creations(creationsInfos)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public TabularModificationInfos toModificationInfos() {
.date(getDate())
.uuid(getId())
.stashed(getStashed())
.active(getActive())
.modificationType(modificationType)
.modifications(modificationsInfos)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public BatteryCreationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
// injection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ private void assignAttributes(ConverterStationCreationInfos converterStationCrea
public ConverterStationCreationInfos toConverterStationInfos() {
return ConverterStationCreationInfos.builder()
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
// Injection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public GeneratorCreationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
// injection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public LineCreationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
// branch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public ShuntCompensatorCreationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
// Injection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public SubstationCreationInfos toSubstationCreationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
.country(getCountry())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public TwoWindingsTransformerCreationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
// branch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public VoltageLevelCreationInfos toVoltageLevelCreationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
.substationId(getSubstationId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public VscCreationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(getEquipmentName())
.activePowerSetpoint(getActivePowerSetpoint())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public ByFilterDeletionInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.filters(getFilters().stream()
.map(filter -> new FilterInfos(filter.getFilterId(), filter.getName()))
.collect(Collectors.toList()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public EquipmentDeletionInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentType(getEquipmentType());
if (equipmentInfos != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public BatteryModificationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(AttributeModification.toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.voltageLevelId(AttributeModification.toAttributeModification(getVoltageLevelIdValue(), getVoltageLevelIdOp()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public ByFormulaModificationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.identifiableType(getIdentifiableType())
.formulaInfosList(getFormulaEntities().stream()
.map(FormulaEntity::toFormulaInfos)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public ConverterStationModificationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(AttributeModification.toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.lossFactor(toAttributeModification(getLossFactor()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public DeleteAttachingLineInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.lineToAttachTo1Id(getLineToAttachTo1Id())
.lineToAttachTo2Id(getLineToAttachTo2Id())
.attachedLineId(getAttachedLineId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public DeleteVoltageLevelOnLineInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.lineToAttachTo1Id(getLineToAttachTo1Id())
.lineToAttachTo2Id(getLineToAttachTo2Id())
.replacingLine1Id(getReplacingLine1Id())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public GenerationDispatchInfos toModificationInfos() {
.date(getDate())
.uuid(getId())
.stashed(getStashed())
.active(getActive())
.lossCoefficient(getLossCoefficient())
.defaultOutageRate(getDefaultOutageRate())
.generatorsWithoutOutage(toGeneratorsFilters(generatorsWithoutOutage))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ public GeneratorModificationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(AttributeModification.toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.voltageLevelId(AttributeModification.toAttributeModification(getVoltageLevelIdValue(), getVoltageLevelIdOp()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public GeneratorScalingInfos toModificationInfos() {
.date(getDate())
.uuid(getId())
.stashed(getStashed())
.active(getActive())
.variationType(getVariationType())
.variations(getVariations().stream()
.map(ScalingVariationEntity::toScalingVariationInfos)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public LineAttachToVoltageLevelInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.lineToAttachToId(getLineToAttachToId())
.percent(getPercent())
.attachmentPointId(getAttachmentPointId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public LineModificationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(AttributeModification.toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.connected1(toAttributeModification(getConnected1()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public LineSplitWithVoltageLevelInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.lineToSplitId(getLineToSplitId())
.percent(getPercent())
.mayNewVoltageLevelInfos(mayVoltageLevelCreation == null ? null : mayVoltageLevelCreation.toVoltageLevelCreationInfos())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ private LinesAttachToSplitLinesInfos.LinesAttachToSplitLinesInfosBuilder toLines
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.lineToAttachTo1Id(getLineToAttachTo1Id())
.lineToAttachTo2Id(getLineToAttachTo2Id())
.attachedLineId(getAttachedLineId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public LoadModificationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(AttributeModification.toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.voltageLevelId(AttributeModification.toAttributeModification(getVoltageLevelIdValue(), getVoltageLevelIdOp()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public LoadScalingInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.variationType(getVariationType())
.variations(getVariations().stream()
.map(ScalingVariationEntity::toScalingVariationInfos)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public OperatingStatusModificationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.action(getAction())
.energizedVoltageLevelId(getEnergizedVoltageLevelId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public ShuntCompensatorModificationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.voltageLevelId(AttributeModification.toAttributeModification(getVoltageLevelIdValue(), getVoltageLevelIdOp()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public SubstationModificationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(AttributeModification.toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.country(AttributeModification.toAttributeModification(getCountry(), getCountryOp()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ public TwoWindingsTransformerModificationInfos toModificationInfos() {
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(AttributeModification.toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.connected1(toAttributeModification(getConnected1()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public VoltageInitModificationInfos toModificationInfos() {
.date(getDate())
.uuid(getId())
.stashed(getStashed())
.active(getActive())
.generators(toGeneratorsModification(generators))
.transformers(toTransformersModification(transformers))
.staticVarCompensators(toStaticVarCompensatorsModification(staticVarCompensators))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public VoltageLevelModificationInfos toModificationInfos() {
.equipmentId(getEquipmentId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentName(toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.nominalV(toAttributeModification(getNominalV()))
.lowVoltageLimit(toAttributeModification(getLowVoltageLimit()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ private void assignAttributes(@NonNull VscModificationInfos vscModificationInfos
.uuid(getId())
.date(getDate())
.stashed(getStashed())
.active(getActive())
.equipmentId(getEquipmentId())
.equipmentName(toAttributeModification(getEquipmentNameValue(), getEquipmentNameOp()))
.nominalV(toAttributeModification(getNominalV()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void testEquipmentAttributeModificationInfos() throws Exception {
.equipmentAttributeValue("equipmentAttributeValue")
.equipmentType(IdentifiableType.VOLTAGE_LEVEL)
.build();
assertEquals(String.format("EquipmentAttributeModificationInfos(super=EquipmentModificationInfos(super=ModificationInfos(uuid=%s, type=EQUIPMENT_ATTRIBUTE_MODIFICATION, date=2021-02-19T00:00:00Z, stashed=false, messageType=null, messageValues=null), equipmentId=equipmentId, properties=null), equipmentAttributeName=equipmentAttributeName, equipmentAttributeValue=equipmentAttributeValue, equipmentType=VOLTAGE_LEVEL)", modificationUuid), modificationInfos.toString());
assertEquals(String.format("EquipmentAttributeModificationInfos(super=EquipmentModificationInfos(super=ModificationInfos(uuid=%s, type=EQUIPMENT_ATTRIBUTE_MODIFICATION, date=2021-02-19T00:00:00Z, stashed=false, messageType=null, messageValues=null, active=true), equipmentId=equipmentId, properties=null), equipmentAttributeName=equipmentAttributeName, equipmentAttributeValue=equipmentAttributeValue, equipmentType=VOLTAGE_LEVEL)", modificationUuid), modificationInfos.toString());

EquipmentAttributeModificationInfos switchStatusModificationInfos = EquipmentAttributeModificationInfos.builder()
.stashed(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public void testCreate() throws Exception {
wireMockUtils.verifyGetRequest(stubId, PATH, handleQueryParams(filters.stream().map(AbstractFilter::getId).collect(Collectors.toList())), false);

assertEquals(
String.format("ScalingInfos(super=ModificationInfos(uuid=null, type=GENERATOR_SCALING, date=null, stashed=false, messageType=null, messageValues=null), variations=[ScalingVariationInfos(id=null, filters=[FilterInfos(id=%s, name=filter1)], variationMode=PROPORTIONAL_TO_PMAX, variationValue=50.0, reactiveVariationMode=null), ScalingVariationInfos(id=null, filters=[FilterInfos(id=%s, name=filter2)], variationMode=REGULAR_DISTRIBUTION, variationValue=50.0, reactiveVariationMode=null), ScalingVariationInfos(id=null, filters=[FilterInfos(id=%s, name=filter3)], variationMode=STACKING_UP, variationValue=50.0, reactiveVariationMode=null), ScalingVariationInfos(id=null, filters=[FilterInfos(id=%s, name=filter4)], variationMode=VENTILATION, variationValue=50.0, reactiveVariationMode=null), ScalingVariationInfos(id=null, filters=[FilterInfos(id=%s, name=filter1), FilterInfos(id=%s, name=filter5)], variationMode=PROPORTIONAL, variationValue=50.0, reactiveVariationMode=null)], variationType=DELTA_P)",
String.format("ScalingInfos(super=ModificationInfos(uuid=null, type=GENERATOR_SCALING, date=null, stashed=false, messageType=null, messageValues=null, active=true), variations=[ScalingVariationInfos(id=null, filters=[FilterInfos(id=%s, name=filter1)], variationMode=PROPORTIONAL_TO_PMAX, variationValue=50.0, reactiveVariationMode=null), ScalingVariationInfos(id=null, filters=[FilterInfos(id=%s, name=filter2)], variationMode=REGULAR_DISTRIBUTION, variationValue=50.0, reactiveVariationMode=null), ScalingVariationInfos(id=null, filters=[FilterInfos(id=%s, name=filter3)], variationMode=STACKING_UP, variationValue=50.0, reactiveVariationMode=null), ScalingVariationInfos(id=null, filters=[FilterInfos(id=%s, name=filter4)], variationMode=VENTILATION, variationValue=50.0, reactiveVariationMode=null), ScalingVariationInfos(id=null, filters=[FilterInfos(id=%s, name=filter1), FilterInfos(id=%s, name=filter5)], variationMode=PROPORTIONAL, variationValue=50.0, reactiveVariationMode=null)], variationType=DELTA_P)",
FILTER_ID_1, FILTER_ID_2, FILTER_ID_3, FILTER_ID_4, FILTER_ID_1, FILTER_ID_5),
buildModification().toString()
);
Expand Down
Loading

0 comments on commit b89cf8b

Please sign in to comment.