From 81aa9ce0cbe50d6c01a114554ee4f63e9b9de491 Mon Sep 17 00:00:00 2001 From: Mike Duff Date: Sun, 26 Jan 2014 18:57:26 -0600 Subject: [PATCH] Issue #2459 - Last change from unscheduled to deactivated. Former-commit-id: 09494558cae046e97ff2126673c5a5c4fd1f0105 --- .../CancelForceApplyAndIncreaseLatencyDisplayText.java | 3 ++- .../viz/datadelivery/subscription/SubscriptionService.java | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/subscription/CancelForceApplyAndIncreaseLatencyDisplayText.java b/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/subscription/CancelForceApplyAndIncreaseLatencyDisplayText.java index a2360cfb8f..5b89c78341 100644 --- a/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/subscription/CancelForceApplyAndIncreaseLatencyDisplayText.java +++ b/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/subscription/CancelForceApplyAndIncreaseLatencyDisplayText.java @@ -40,6 +40,7 @@ import com.raytheon.uf.viz.datadelivery.subscription.SubscriptionService.IForceA * Dec 4, 2012 1286 djohnson Initial creation * May 28, 2013 1650 djohnson More information when failing to schedule subscriptions. * Jan 17, 2014 2459 mpduff Change gui usage of unscheduled to deactivated. + * Jan 26, 2014 2459 mpduff Change unscheduled label to deactivated. * * * @@ -92,7 +93,7 @@ public class CancelForceApplyAndIncreaseLatencyDisplayText implements + " and leave in a Deactivated status"; } return titleCaseActionText + " " + name - + " and unschedule the others"; + + " and deactivate the others"; case EDIT_SUBSCRIPTIONS: return "Edit the " + ((singleSubscription) ? "subscription" : "subscriptions"); diff --git a/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/subscription/SubscriptionService.java b/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/subscription/SubscriptionService.java index 20a5f298bf..203a1a7893 100644 --- a/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/subscription/SubscriptionService.java +++ b/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/subscription/SubscriptionService.java @@ -45,7 +45,9 @@ import com.raytheon.uf.common.datadelivery.registry.GriddedTime; import com.raytheon.uf.common.datadelivery.registry.InitialPendingSubscription; import com.raytheon.uf.common.datadelivery.registry.PendingSubscription; import com.raytheon.uf.common.datadelivery.registry.PointTime; +import com.raytheon.uf.common.datadelivery.registry.RecurringSubscription; import com.raytheon.uf.common.datadelivery.registry.Subscription; +import com.raytheon.uf.common.datadelivery.registry.Subscription.SubscriptionState; import com.raytheon.uf.common.datadelivery.registry.Time; import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers; import com.raytheon.uf.common.datadelivery.registry.handlers.IPendingSubscriptionHandler; @@ -94,6 +96,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils; * Oct 12, 2013 2460 dhladky restored adhoc subscriptions to registry storage. * Oct 22, 2013 2292 mpduff Removed subscriptionOverlapService. * Nov 07, 2013 2291 skorolev Used showText() method for "Shared Subscription" message. + * Jan 26, 2014 2259 mpduff Turn off subs to be deactivated. * * * @@ -768,6 +771,10 @@ public class SubscriptionService implements ISubscriptionService { continue; } unscheduledSub.setUnscheduled(true); + if (unscheduledSub instanceof RecurringSubscription) { + ((RecurringSubscription) unscheduledSub) + .setSubscriptionState(SubscriptionState.OFF); + } subscriptionHandler.update(unscheduledSub); } }