Skip to content

Upgrade to powsybl-dependencies v2025.0.0 #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</developers>

<properties>
<gridsuite-dependencies.version>37.0.0</gridsuite-dependencies.version>
<gridsuite-dependencies.version>38.1.0-SNAPSHOT</gridsuite-dependencies.version>
<sonar.organization>gridsuite</sonar.organization>
<sonar.projectKey>org.gridsuite:network-modification</sonar.projectKey>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.gridsuite.modification.ModificationType;
import org.gridsuite.modification.dto.annotation.ModificationErrorTypeName;
import org.gridsuite.modification.modifications.AbstractModification;
import org.gridsuite.modification.modifications.BatteryCreation;
Expand Down Expand Up @@ -72,6 +71,6 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(ModificationType.BATTERY_CREATION.name(), "Battery creation ${batteryId}").withUntypedValue("batteryId", this.getEquipmentId()).add();
return reportNode.newReportNode().withMessageTemplate("network.modification.batteryCreation").withUntypedValue("batteryId", this.getEquipmentId()).add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(getType().name(), "Battery modification ${batteryId}").withUntypedValue("batteryId", this.getEquipmentId()).add();
return reportNode.newReportNode()
.withMessageTemplate("network.modification.battery.modification")
.withUntypedValue("batteryId", this.getEquipmentId())
.add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(getType().name(), "By filter deletion").add();
return reportNode.newReportNode().withMessageTemplate("network.modification.byFilter.deletion").add();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.gridsuite.modification.ModificationType;
import org.gridsuite.modification.dto.annotation.ModificationErrorTypeName;
import org.gridsuite.modification.dto.byfilter.formula.FormulaInfos;
import org.gridsuite.modification.modifications.byfilter.ByFormulaModification;
Expand Down Expand Up @@ -51,6 +50,6 @@ public ByFormulaModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(ModificationType.BY_FORMULA_MODIFICATION.name(), "Modification by formula").add();
return reportNode.newReportNode().withMessageTemplate("network.modification.byFormulaModification").add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(getType().name(), "Delete attaching line").add();
return reportNode.newReportNode().withMessageTemplate("network.modification.deleteAttachingLine").add();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(getType().name(), "Delete voltage level on line").add();
return reportNode.newReportNode().withMessageTemplate("network.modification.deleteVoltageLevelOnLine").add();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "${EquipmentType} '${EquipmentId}' change")
.withTypedValue("EquipmentType", equipmentType.name(), TypedValue.UNTYPED)
.withTypedValue("EquipmentId", getEquipmentId(), TypedValue.UNTYPED)
.withMessageTemplate("network.modification.equipmentAttributeModification")
.withTypedValue("EquipmentType", equipmentType.name(), TypedValue.UNTYPED_TYPE)
.withTypedValue("EquipmentId", getEquipmentId(), TypedValue.UNTYPED_TYPE)
.add();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Equipment deletion ${equipmentId}")
.withMessageTemplate("network.modification.equipmentDeletion")
.withUntypedValue("equipmentId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Generation dispatch")
.withMessageTemplate("network.modification.generationDispatch")
.add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Generator creation ${generatorId}")
.withMessageTemplate("network.modification.generator.creation")
.withUntypedValue("generatorId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Generator modification ${generatorId}")
.withMessageTemplate("network.modification.generator.modification")
.withUntypedValue("generatorId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Generator scaling")
.withMessageTemplate("network.modification.generatorScaling")
.add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Apply groovy script")
.withMessageTemplate("network.modification.groovyScript")
.add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Lcc creation ${lccId}")
.withMessageTemplate("network.modification.lcc.creation")
.withUntypedValue("lccId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(getType().name(), "Line attach to voltage level").add();
return reportNode.newReportNode().withMessageTemplate("network.modification.lineAttachToVoltageLevel").add();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Creation of line ${lineId}")
.withMessageTemplate("network.modification.lineCreation")
.withUntypedValue("lineId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Line modification ${lineId}")
.withMessageTemplate("network.modification.line.modification")
.withUntypedValue("lineId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Line split with voltage level")
.withMessageTemplate("network.modification.lineSplitWithVoltageLevel")
.add();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Lines attach to split lines")
.withMessageTemplate("network.modification.linesAttachToSplitLines")
.add();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Load creation ${loadId}")
.withMessageTemplate("network.modification.load.creation")
.withUntypedValue("loadId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Load modification ${loadId}")
.withMessageTemplate("network.modification.load.modification")
.withUntypedValue("loadId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Load Scaling")
.withMessageTemplate("network.modification.loadScaling")
.add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.gridsuite.modification.ModificationType;
import org.gridsuite.modification.dto.annotation.ModificationErrorTypeName;
import org.gridsuite.modification.dto.byfilter.assignment.AssignmentInfos;
import org.gridsuite.modification.modifications.byfilter.ModificationByAssignment;
Expand Down Expand Up @@ -48,6 +47,6 @@ public ModificationByAssignment toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(ModificationType.MODIFICATION_BY_ASSIGNMENT.name(), "Modification by filter").add();
return reportNode.newReportNode().withMessageTemplate("network.modification.modificationByAssignment").add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,10 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
String defaultName = switch (action) {
case LOCKOUT -> "Lockout ${equipmentId}";
case TRIP -> "Trip ${equipmentId}";
case ENERGISE_END_ONE, ENERGISE_END_TWO -> "Energise ${equipmentId}";
case SWITCH_ON -> "Switch on ${equipmentId}";
};
return reportNode.newReportNode().withMessageTemplate(getType().name() + "_" + action, defaultName).withUntypedValue("equipmentId", this.getEquipmentId()).add();
return reportNode.newReportNode()
.withMessageTemplate("network.modification.OPERATING_STATUS_MODIFICATION" + "_" + action)
.withUntypedValue("equipmentId", this.getEquipmentId())
.add();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Shunt compensator creation ${shuntCompensatorId}")
.withMessageTemplate("network.modification.shuntCompensatorCreation")
.withUntypedValue("shuntCompensatorId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Shunt compensator modification ${shuntCompensatorId}")
.withMessageTemplate("network.modification.shuntCompensatorModification.modification")
.withUntypedValue("shuntCompensatorId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import lombok.ToString;
import lombok.experimental.SuperBuilder;

import org.gridsuite.modification.ModificationType;
import org.gridsuite.modification.dto.annotation.ModificationErrorTypeName;
import org.gridsuite.modification.modifications.AbstractModification;
import org.gridsuite.modification.modifications.StaticVarCompensatorCreation;
Expand Down Expand Up @@ -98,7 +97,6 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(ModificationType.STATIC_VAR_COMPENSATOR_CREATION.name(),
"Static var compensator creation ${id}").withUntypedValue("id", this.getEquipmentId()).add();
return reportNode.newReportNode().withMessageTemplate("network.modification.staticVarCompensatorCreation").withUntypedValue("id", this.getEquipmentId()).add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Substation creation ${substationId}")
.withMessageTemplate("network.modification.substation.creation")
.withUntypedValue("substationId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Substation modification ${substationId}")
.withMessageTemplate("network.modification.substation.modification")
.withUntypedValue("substationId", this.getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(ModificationType.TABULAR_CREATION.name(), "Tabular creation")
.withMessageTemplate("network.modification.tabularCreation")
.add();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(ModificationType.TABULAR_CREATION.name(), "Tabular modification")
.withMessageTemplate("network.modification.tabularModification")
.add();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Two windings transformer creation ${twoWindingsTransformerId}")
.withMessageTemplate("network.modification.twoWindingsTransformerCreation")
.withUntypedValue("twoWindingsTransformerId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Two windings transformer modification ${twoWindingsTransformerId}")
.withMessageTemplate("network.modification.twoWindingsTransformerModification.modification")
.withUntypedValue("twoWindingsTransformerId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;
import org.gridsuite.modification.ModificationType;
import org.gridsuite.modification.dto.annotation.ModificationErrorTypeName;
import org.gridsuite.modification.modifications.AbstractModification;
import org.gridsuite.modification.modifications.VoltageInitModification;
Expand Down Expand Up @@ -56,6 +55,6 @@ public AbstractModification toModification() {

@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode().withMessageTemplate(ModificationType.VOLTAGE_INIT_MODIFICATION.name(), "Voltage init modification").add();
return reportNode.newReportNode().withMessageTemplate("network.modification.voltageInitModification").add();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public Map<String, String> getMapMessageValues() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "VoltageLevel creation ${voltageLevelId}")
.withMessageTemplate("network.modification.voltageLevel.creation")
.withUntypedValue("voltageLevelId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "VoltageLevel modification ${voltageLevelId}")
.withMessageTemplate("network.modification.voltageLevel.modification")
.withUntypedValue("voltageLevelId", getEquipmentId())
.add();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public AbstractModification toModification() {
@Override
public ReportNode createSubReportNode(ReportNode reportNode) {
return reportNode.newReportNode()
.withMessageTemplate(getType().name(), "Voltage Level topology modification ${voltageLevelId}")
.withMessageTemplate("network.modification.VOLTAGE_LEVEL_TOPOLOGY_MODIFICATION")
.withUntypedValue("voltageLevelId", getEquipmentId())
.add();
}
Expand Down
Loading
Loading