Skip to content

Commit

Permalink
Upgrade to powsyl dependencies 2024.4.0
Browse files Browse the repository at this point in the history
Signed-off-by: Franck LECUYER <franck.lecuyer@rte-france.com>
  • Loading branch information
FranckLecuyer committed Dec 24, 2024
1 parent 7c4a87c commit 598c75e
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,26 +104,20 @@ private void addSimpleModificationImpact(Identifiable<?> identifiable) {
}

@Override
public void onElementRemoved(Identifiable identifiable, String attribute, Object oldValue) {
public void onPropertyRemoved(Identifiable identifiable, String attribute, Object oldValue) {
addSimpleModificationImpact(identifiable);
}

@Override
public void onElementAdded(Identifiable identifiable, String attribute, Object newValue) {
public void onPropertyAdded(Identifiable identifiable, String attribute, Object newValue) {
addSimpleModificationImpact(identifiable);
}

@Override
public void onElementReplaced(Identifiable identifiable, String attribute, Object oldValue, Object newValue) {
public void onPropertyReplaced(Identifiable identifiable, String attribute, Object oldValue, Object newValue) {
addSimpleModificationImpact(identifiable);
}

@Override
public void onUpdate(Identifiable identifiable, String attribute, Object oldValue, Object newValue) {
addSimpleModificationImpact(identifiable);
updateEquipmentIndexation(identifiable, attribute, networkUuid, network.getVariantManager().getWorkingVariantId());
}

@Override
public void onUpdate(Identifiable identifiable, String attribute, String variantId, Object oldValue, Object newValue) {
addSimpleModificationImpact(identifiable);
Expand Down Expand Up @@ -337,8 +331,23 @@ public void onExtensionBeforeRemoval(Extension<?> extension) {
}

@Override
public void onExtensionUpdate(Extension<?> extendable, String attribute, Object oldValue, Object newValue) {
public void onExtensionUpdate(Extension<?> extendable, String attribute, String variantId, Object oldValue, Object newValue) {
Identifiable<?> identifiable = (Identifiable<?>) extendable.getExtendable();
onUpdate(identifiable, attribute, variantId, oldValue, newValue);
}

@Override
public void onVariantCreated(String sourceVariantId, String targetVariantId) {
// FIXME: implement this method
}

@Override
public void onVariantOverwritten(String sourceVariantId, String targetVariantId) {
// FIXME: implement this method
}

@Override
public void onVariantRemoved(String variantId) {
// FIXME: implement this method
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ public void beforeRemoval(Identifiable identifiable) {
public void afterRemoval(String s) {
}

@Override
public void onUpdate(Identifiable identifiable, String attribute, Object oldValue, Object newValue) {
}

@Override
public void onVariantCreated(String sourceVariantId, String targetVariantId) {
// Initial variant modifications are not cloned
Expand All @@ -64,8 +60,13 @@ public void onVariantRemoved(String variantId) {
}

@Override
public void onUpdate(Identifiable<?> identifiable, String attribute, String variantId, Object oldValue,
Object newValue) {
public void onVariantOverwritten(String sourceVariantId, String targetVariantId) {
equipmentInfosService.deleteVariants(networkUuid, List.of(targetVariantId));
onVariantCreated(sourceVariantId, targetVariantId);
}

@Override
public void onUpdate(Identifiable<?> identifiable, String attribute, String variantId, Object oldValue, Object newValue) {
// do nothing
}

Expand All @@ -85,8 +86,22 @@ public void onExtensionBeforeRemoval(Extension<?> extension) {
}

@Override
public void onExtensionUpdate(Extension<?> extendable, String attribute, Object oldValue, Object newValue) {
public void onExtensionUpdate(Extension<?> extendable, String attribute, String variantId, Object oldValue, Object newValue) {
// do nothing
}

@Override
public void onPropertyAdded(Identifiable identifiable, String attribute, Object newValue) {
// do nothing
}

@Override
public void onPropertyReplaced(Identifiable identifiable, String attribute, Object oldValue, Object newValue) {
// do nothing
}

@Override
public void onPropertyRemoved(Identifiable identifiable, String attribute, Object oldValue) {
// do nothing
}
}

0 comments on commit 598c75e

Please sign in to comment.