Merge branch 'omaha_14.3.1' of ssh://www.awips2omaha.com:29418/AWIPS2_baseline into master_14.3.1

Former-commit-id: 0df83cd043 [formerly 0df83cd043 [formerly ea5b97f1f606210e70bbf616a0c9158f03f67b5e]]
Former-commit-id: 8a4e1ba3ef
Former-commit-id: 07f0918267
This commit is contained in:
Fay.Liang 2014-12-10 08:52:21 -05:00
commit 66aeb50c1b
3 changed files with 18 additions and 3 deletions

Binary file not shown.

View file

@ -28,6 +28,8 @@ import java.util.Set;
import com.raytheon.uf.common.datadelivery.registry.AdhocSubscription;
import com.raytheon.uf.common.datadelivery.registry.DataType;
import com.raytheon.uf.common.datadelivery.registry.SharedSubscription;
import com.raytheon.uf.common.datadelivery.registry.SiteSubscription;
import com.raytheon.uf.common.datadelivery.registry.Subscription;
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
@ -48,6 +50,7 @@ import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
* Oct 24, 2013 2292 mpduff Initial creation
* Nov 01, 2013 2292 dhladky Don't check against yourself for duplication
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
* Dec 08, 2014 3891 dhladky Allow for promotion of site subscriptions to shared.
*
* </pre>
*
@ -80,9 +83,21 @@ public class SubscriptionOverlapHandler implements
DataType dataType = subscription.getDataSetType();
Set<String> overlappingSubscriptions = new HashSet<String>();
for (Subscription potentialDuplicate : potentialDuplicates) {
// don't check against yourself
if (potentialDuplicate.getId().equals(subscription.getId())) {
continue;
// Check for special promotion case
if (subscription instanceof SharedSubscription
&& potentialDuplicate instanceof SiteSubscription) {
// Not as stringent a check as the ID's won't be equal
// but the names still will
if (potentialDuplicate.getName().equals(
subscription.getName())) {
continue;
}
} else {
// Normal sequence, don't check self
if (potentialDuplicate.getId().equals(
subscription.getId())) {
continue;
}
}
OverlapData od = OverlapDataFactory.getOverlapData(
subscription, potentialDuplicate);