Issue #3891 Special overlap handling for promotion of sub from site to shared
Change-Id: Ifa8f4be3e9e0f172ee54c5ef7021b912d45c5de2 Former-commit-id:4b7557498f
[formerlye897cb40df
] [formerlyd81e3b0efa
] [formerly4b7557498f
[formerlye897cb40df
] [formerlyd81e3b0efa
] [formerly8796705c6b
[formerlyd81e3b0efa
[formerly 9a31befafe66a677b744fa9ae9ef7e134a758bd9]]]] Former-commit-id:8796705c6b
Former-commit-id:3b279c5c46
[formerlyc57d63dbc5
] [formerly 95be4db4f3feed3848fe1af3c5e26e5143c88aa2 [formerly072c6223ef
]] Former-commit-id: 3ef73265f70d1dfad04feff94e49ab210fdba1fc [formerly475e40f58f
] Former-commit-id:ea9a8900f0
This commit is contained in:
parent
5eedde5382
commit
16367d9714
1 changed files with 18 additions and 3 deletions
|
@ -28,6 +28,8 @@ import java.util.Set;
|
||||||
|
|
||||||
import com.raytheon.uf.common.datadelivery.registry.AdhocSubscription;
|
import com.raytheon.uf.common.datadelivery.registry.AdhocSubscription;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.DataType;
|
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.Subscription;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
|
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
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
|
* Oct 24, 2013 2292 mpduff Initial creation
|
||||||
* Nov 01, 2013 2292 dhladky Don't check against yourself for duplication
|
* Nov 01, 2013 2292 dhladky Don't check against yourself for duplication
|
||||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
* 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>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -80,9 +83,21 @@ public class SubscriptionOverlapHandler implements
|
||||||
DataType dataType = subscription.getDataSetType();
|
DataType dataType = subscription.getDataSetType();
|
||||||
Set<String> overlappingSubscriptions = new HashSet<String>();
|
Set<String> overlappingSubscriptions = new HashSet<String>();
|
||||||
for (Subscription potentialDuplicate : potentialDuplicates) {
|
for (Subscription potentialDuplicate : potentialDuplicates) {
|
||||||
// don't check against yourself
|
// Check for special promotion case
|
||||||
if (potentialDuplicate.getId().equals(subscription.getId())) {
|
if (subscription instanceof SharedSubscription
|
||||||
continue;
|
&& 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(
|
OverlapData od = OverlapDataFactory.getOverlapData(
|
||||||
subscription, potentialDuplicate);
|
subscription, potentialDuplicate);
|
||||||
|
|
Loading…
Add table
Reference in a new issue