From 05da2121a3463090444e1f7afdc6ba1a4756674c Mon Sep 17 00:00:00 2001 From: pranav-super Date: Thu, 24 Oct 2024 15:15:37 -0700 Subject: [PATCH] remove event overloads on `Plan` --- .../scheduling/procedures/ExternalEventsSimpleGoal.java | 5 ++++- .../gov/nasa/ammos/aerie/procedural/timeline/plan/Plan.kt | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/e2e-tests/src/main/java/gov/nasa/jpl/aerie/e2e/procedural/scheduling/procedures/ExternalEventsSimpleGoal.java b/e2e-tests/src/main/java/gov/nasa/jpl/aerie/e2e/procedural/scheduling/procedures/ExternalEventsSimpleGoal.java index 216cd3faae..93b5e32aa6 100644 --- a/e2e-tests/src/main/java/gov/nasa/jpl/aerie/e2e/procedural/scheduling/procedures/ExternalEventsSimpleGoal.java +++ b/e2e-tests/src/main/java/gov/nasa/jpl/aerie/e2e/procedural/scheduling/procedures/ExternalEventsSimpleGoal.java @@ -4,6 +4,7 @@ import gov.nasa.ammos.aerie.procedural.scheduling.Goal; import gov.nasa.ammos.aerie.procedural.scheduling.plan.EditablePlan; import gov.nasa.ammos.aerie.procedural.timeline.payloads.activities.DirectiveStart; +import gov.nasa.ammos.aerie.procedural.timeline.plan.EventQuery; import gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue; import org.jetbrains.annotations.NotNull; @@ -13,7 +14,9 @@ public record ExternalEventsSimpleGoal() implements Goal { @Override public void run(@NotNull final EditablePlan plan) { - for (final var e: plan.events("TestGroup")) { + EventQuery eventQuery = new EventQuery("TestGroup", null, null); + + for (final var e: plan.events(eventQuery)) { plan.create("BiteBanana", new DirectiveStart.Absolute(e.getInterval().start), Map.of("biteSize", SerializedValue.of(1))); } plan.commit(); diff --git a/procedural/timeline/src/main/kotlin/gov/nasa/ammos/aerie/procedural/timeline/plan/Plan.kt b/procedural/timeline/src/main/kotlin/gov/nasa/ammos/aerie/procedural/timeline/plan/Plan.kt index 0839384d52..4a739b2f11 100644 --- a/procedural/timeline/src/main/kotlin/gov/nasa/ammos/aerie/procedural/timeline/plan/Plan.kt +++ b/procedural/timeline/src/main/kotlin/gov/nasa/ammos/aerie/procedural/timeline/plan/Plan.kt @@ -45,10 +45,6 @@ interface Plan { /** Get external events associated with this plan. */ fun events(query: EventQuery): ExternalEvents - /** Get external events belonging to a given derivation group and external event type associated with this plan. */ - fun events(derivationGroup: String, eventType: String) = events(EventQuery(derivationGroup, eventType, null)) - /** Get external events belonging to a given derivation group associated with this plan. */ - fun events(derivationGroup: String) = events(EventQuery(derivationGroup, null, null)) /** Get all external events across all derivation groups associated with this plan. */ fun events() = events(EventQuery()) }