Issue #2745 - Don't display fulfilled or cancelled allocations

Former-commit-id: c9b98868d2 [formerly f81772f4be [formerly 7b7f294622e886d7457d7abe0451d3e819568677]]
Former-commit-id: f81772f4be
Former-commit-id: 4d529f5051
This commit is contained in:
Mike Duff 2014-02-03 16:57:03 -06:00
parent ab0609007c
commit 9c70fb3261

View file

@ -44,6 +44,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.dao.BandwidthSubscription;
import com.raytheon.uf.edex.datadelivery.bandwidth.dao.SubscriptionRetrieval;
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalPlan;
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalStatus;
/**
* Adapts the {@link BandwidthManager} formatted data into a GUI usable graphing
@ -64,6 +65,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalPlan;
* Dec 11, 2013 2566 bgonzale handle case when there are no reservations.
* Dec 17, 2013 2636 bgonzale Refactored bucket fill in edex.
* Jan 23, 2014 2636 mpduff Changed download window generation.
* Feb 03, 2014 2745 mpduff Don't display fulfilled or cancelled allocations.
*
* </pre>
*
@ -125,11 +127,15 @@ class BandwidthGraphDataAdapter {
for (BandwidthAllocation allocation : allocationList) {
if (allocation instanceof SubscriptionRetrieval) {
final SubscriptionRetrieval subRetrieval = (SubscriptionRetrieval) allocation;
String subName = subRetrieval.getBandwidthSubscription()
.getName();
subAllocationMapping.addAllocationForSubscription(subName,
allocation);
// Don't display fulfilled or cancelled allocations
if (allocation.getStatus() != RetrievalStatus.FULFILLED
&& allocation.getStatus() != RetrievalStatus.CANCELLED) {
final SubscriptionRetrieval subRetrieval = (SubscriptionRetrieval) allocation;
String subName = subRetrieval
.getBandwidthSubscription().getName();
subAllocationMapping.addAllocationForSubscription(
subName, allocation);
}
}
}
}