-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
1,321 additions
and
394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/main/java/org/gridsuite/modification/server/dto/BySimpleModificationInfos.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* 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.modification.server.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonTypeName; | ||
import com.powsybl.commons.report.ReportNode; | ||
import com.powsybl.iidm.network.IdentifiableType; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.*; | ||
import lombok.experimental.SuperBuilder; | ||
import org.gridsuite.modification.server.ModificationType; | ||
import org.gridsuite.modification.server.dto.annotation.ModificationErrorTypeName; | ||
import org.gridsuite.modification.server.dto.byfilter.simple.AbstractSimpleModificationInfos; | ||
import org.gridsuite.modification.server.entities.equipment.modification.byfilter.BySimpleModificationEntity; | ||
import org.gridsuite.modification.server.modifications.byfilter.BySimpleModification; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author Thang PHAM <quyet-thang.pham at rte-france.com> | ||
*/ | ||
@SuperBuilder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter | ||
@Setter | ||
@JsonTypeName("BY_SIMPLE_MODIFICATION") | ||
@ModificationErrorTypeName("BY_SIMPLE_MODIFICATION_ERROR") | ||
@ToString(callSuper = true) | ||
@Schema(description = "Modification by simple assignment") | ||
public class BySimpleModificationInfos extends ModificationInfos { | ||
@Schema(description = "Identifiable type") | ||
private IdentifiableType identifiableType; | ||
|
||
@Schema(description = "list of modifications") | ||
private List<? extends AbstractSimpleModificationInfos<?>> simpleModificationInfosList; | ||
|
||
@Override | ||
public BySimpleModificationEntity toEntity() { | ||
return new BySimpleModificationEntity(this); | ||
} | ||
|
||
@Override | ||
public BySimpleModification toModification() { | ||
return new BySimpleModification(this); | ||
} | ||
|
||
@Override | ||
public ReportNode createSubReportNode(ReportNode reportNode) { | ||
return reportNode.newReportNode().withMessageTemplate(ModificationType.BY_FILTER_MODIFICATION.name(), "By filter modification").add(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/org/gridsuite/modification/server/dto/byfilter/DataType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Copyright (c) 2024, RTE (http://www.rte-france.com) | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* 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.modification.server.dto.byfilter; | ||
|
||
/** | ||
* @author Thang PHAM <quyet-thang.pham at rte-france.com> | ||
*/ | ||
public enum DataType { | ||
STRING, | ||
ENUM, | ||
BOOLEAN, | ||
INTEGER, | ||
DOUBLE, | ||
PROPERTY | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/org/gridsuite/modification/server/dto/byfilter/FilterModificationInfos.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.gridsuite.modification.server.dto.byfilter; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import lombok.experimental.SuperBuilder; | ||
import org.gridsuite.modification.server.dto.FilterInfos; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
@SuperBuilder | ||
@NoArgsConstructor | ||
@Data | ||
public class FilterModificationInfos { | ||
@Schema(description = "id") | ||
private UUID id; | ||
|
||
@Schema(description = "List of filters") | ||
private List<FilterInfos> filters; | ||
|
||
@Schema(description = "Edited field") | ||
private String editedField; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.