Merge "Issue #2548 - Add a subscription type slot for uniqueness." into development
Former-commit-id:0bb5e2a61e
[formerly14b1e924a1
[formerly dba301df2f593baa951c14b684e7ce4794e32019]] Former-commit-id:14b1e924a1
Former-commit-id:157e739623
This commit is contained in:
commit
979fa16d04
8 changed files with 109 additions and 38 deletions
|
@ -53,6 +53,7 @@ import com.raytheon.uf.common.datadelivery.registry.Network;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.PointDataSet;
|
import com.raytheon.uf.common.datadelivery.registry.PointDataSet;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.SiteSubscription;
|
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.Subscription.SubscriptionType;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||||
import com.raytheon.uf.common.datadelivery.request.DataDeliveryPermission;
|
import com.raytheon.uf.common.datadelivery.request.DataDeliveryPermission;
|
||||||
|
@ -133,9 +134,13 @@ import com.raytheon.viz.ui.presenter.IDisplay;
|
||||||
* Jun 14, 2013 2108 mpduff Refactored DataSizeUtils.
|
* Jun 14, 2013 2108 mpduff Refactored DataSizeUtils.
|
||||||
* Oct 11, 2013 2386 mpduff Refactor DD Front end.
|
* Oct 11, 2013 2386 mpduff Refactor DD Front end.
|
||||||
* Oct 15, 2013 2477 mpduff Remove debug code.
|
* Oct 15, 2013 2477 mpduff Remove debug code.
|
||||||
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
||||||
* Oct 25, 2013 2292 mpduff Move overlap processing to edex.
|
* Oct 25, 2013 2292 mpduff Move overlap processing to edex.
|
||||||
|
<<<<<<< HEAD
|
||||||
* Nov 14, 2013 2538 mpduff Added check for duplicate subscription.
|
* Nov 14, 2013 2538 mpduff Added check for duplicate subscription.
|
||||||
|
=======
|
||||||
|
* Nov 14, 2013 2548 mpduff Set the subscription type (QUERY OR RECURRING)
|
||||||
|
>>>>>>> Issue #2548 - Add a subscription type slot for uniqueness.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author mpduff
|
* @author mpduff
|
||||||
|
@ -525,6 +530,7 @@ public abstract class SubsetManagerDlg extends CaveSWTDialog implements
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
as.setSubscriptionType(SubscriptionType.QUERY);
|
||||||
SubscriptionServiceResult result = subscriptionService.store(
|
SubscriptionServiceResult result = subscriptionService.store(
|
||||||
as, this);
|
as, this);
|
||||||
|
|
||||||
|
@ -562,6 +568,7 @@ public abstract class SubsetManagerDlg extends CaveSWTDialog implements
|
||||||
.getCurrentUser() : this.subscription.getOwner());
|
.getCurrentUser() : this.subscription.getOwner());
|
||||||
sub.setOriginatingSite(LocalizationManager.getInstance()
|
sub.setOriginatingSite(LocalizationManager.getInstance()
|
||||||
.getCurrentSite());
|
.getCurrentSite());
|
||||||
|
sub.setSubscriptionType(SubscriptionType.RECURRING);
|
||||||
|
|
||||||
return setupCommonSubscriptionAttributes(sub, defaultRoute);
|
return setupCommonSubscriptionAttributes(sub, defaultRoute);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
* May 21, 2013 2020 mpduff Rename UserSubscription to SiteSubscription.
|
* May 21, 2013 2020 mpduff Rename UserSubscription to SiteSubscription.
|
||||||
* Oct 2, 2013 1797 dhladky Generics start
|
* Oct 2, 2013 1797 dhladky Generics start
|
||||||
* Oct 11, 2013 2460 dhladky Restored Adhoc's to registryObject store, WFO only
|
* Oct 11, 2013 2460 dhladky Restored Adhoc's to registryObject store, WFO only
|
||||||
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
||||||
|
* Nov 14, 2013 2548 mpduff Add a subscription type slot.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -58,8 +59,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
@XmlAccessorType(XmlAccessType.NONE)
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
@RegistryObject({ Subscription.PROVIDER_NAME_SLOT, Subscription.NAME_SLOT,
|
@RegistryObject({ Subscription.PROVIDER_NAME_SLOT, Subscription.NAME_SLOT,
|
||||||
Subscription.DATA_SET_SLOT, Subscription.OWNER_SLOT, Subscription.ORIGINATING_SITE_SLOT })
|
Subscription.DATA_SET_SLOT, Subscription.OWNER_SLOT,
|
||||||
public class AdhocSubscription<T extends Time, C extends Coverage> extends SiteSubscription<T, C> {
|
Subscription.ORIGINATING_SITE_SLOT, Subscription.SUBSCRIPTION_TYPE_SLOT })
|
||||||
|
public class AdhocSubscription<T extends Time, C extends Coverage> extends
|
||||||
|
SiteSubscription<T, C> {
|
||||||
|
|
||||||
private static final long serialVersionUID = -2200080380095632486L;
|
private static final long serialVersionUID = -2200080380095632486L;
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* Apr 02, 2013 1841 djohnson Initial creation
|
* Apr 02, 2013 1841 djohnson Initial creation
|
||||||
* Sept 30, 2013 1797 dhladky Generics
|
* Sept 30, 2013 1797 dhladky Generics
|
||||||
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
||||||
|
* Nov 14, 2013 2548 mpduff Add a subscription type slot.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -55,9 +56,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
Subscription.NAME_SLOT, Subscription.DATA_SET_SLOT,
|
Subscription.NAME_SLOT, Subscription.DATA_SET_SLOT,
|
||||||
Subscription.OWNER_SLOT,
|
Subscription.OWNER_SLOT,
|
||||||
InitialPendingSubscription.CHANGE_REQUEST_ID_SLOT,
|
InitialPendingSubscription.CHANGE_REQUEST_ID_SLOT,
|
||||||
Subscription.ORIGINATING_SITE_SLOT})
|
Subscription.ORIGINATING_SITE_SLOT, Subscription.SUBSCRIPTION_TYPE_SLOT })
|
||||||
public class InitialPendingSharedSubscription<T extends Time, C extends Coverage> extends SharedSubscription<T, C>
|
public class InitialPendingSharedSubscription<T extends Time, C extends Coverage>
|
||||||
implements InitialPendingSubscription<T, C> {
|
extends SharedSubscription<T, C> implements
|
||||||
|
InitialPendingSubscription<T, C> {
|
||||||
private static final long serialVersionUID = 2779084460608459754L;
|
private static final long serialVersionUID = 2779084460608459754L;
|
||||||
|
|
||||||
/** ID of the user requesting the change */
|
/** ID of the user requesting the change */
|
||||||
|
@ -86,8 +88,8 @@ public class InitialPendingSharedSubscription<T extends Time, C extends Coverage
|
||||||
* @param user
|
* @param user
|
||||||
* user
|
* user
|
||||||
*/
|
*/
|
||||||
public InitialPendingSharedSubscription(SharedSubscription<T, C> subscription,
|
public InitialPendingSharedSubscription(
|
||||||
String user) {
|
SharedSubscription<T, C> subscription, String user) {
|
||||||
super(subscription);
|
super(subscription);
|
||||||
|
|
||||||
this.setChangeReqId(user);
|
this.setChangeReqId(user);
|
||||||
|
|
|
@ -46,6 +46,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* Apr 02, 2013 1841 djohnson InitialPendingSubscription is now InitialPendingUserSubscription.
|
* Apr 02, 2013 1841 djohnson InitialPendingSubscription is now InitialPendingUserSubscription.
|
||||||
* May 21, 2013 2020 mpduff Rename UserSubscription to SiteSubscription.
|
* May 21, 2013 2020 mpduff Rename UserSubscription to SiteSubscription.
|
||||||
* Sept 30, 2013 1797 dhladky Some Generics
|
* Sept 30, 2013 1797 dhladky Some Generics
|
||||||
|
* Nov 14, 2013 2548 mpduff Add a subscription type slot.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -59,8 +60,9 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
Subscription.NAME_SLOT, Subscription.DATA_SET_SLOT,
|
Subscription.NAME_SLOT, Subscription.DATA_SET_SLOT,
|
||||||
Subscription.OWNER_SLOT,
|
Subscription.OWNER_SLOT,
|
||||||
InitialPendingSubscription.CHANGE_REQUEST_ID_SLOT,
|
InitialPendingSubscription.CHANGE_REQUEST_ID_SLOT,
|
||||||
Subscription.ORIGINATING_SITE_SLOT})
|
Subscription.ORIGINATING_SITE_SLOT, Subscription.SUBSCRIPTION_TYPE_SLOT })
|
||||||
public class InitialPendingSiteSubscription<T extends Time, C extends Coverage> extends SiteSubscription<T, C> implements
|
public class InitialPendingSiteSubscription<T extends Time, C extends Coverage>
|
||||||
|
extends SiteSubscription<T, C> implements
|
||||||
InitialPendingSubscription<T, C> {
|
InitialPendingSubscription<T, C> {
|
||||||
private static final long serialVersionUID = 2779084460608459754L;
|
private static final long serialVersionUID = 2779084460608459754L;
|
||||||
|
|
||||||
|
@ -79,18 +81,19 @@ public class InitialPendingSiteSubscription<T extends Time, C extends Coverage>
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
public InitialPendingSiteSubscription() {
|
public InitialPendingSiteSubscription() {
|
||||||
//empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param subscription
|
* @param subscription
|
||||||
* subscription object
|
* subscription object
|
||||||
* @param user
|
* @param user
|
||||||
* user
|
* user
|
||||||
*/
|
*/
|
||||||
public InitialPendingSiteSubscription(SiteSubscription<T, C> subscription, String user) {
|
public InitialPendingSiteSubscription(SiteSubscription<T, C> subscription,
|
||||||
|
String user) {
|
||||||
super(subscription);
|
super(subscription);
|
||||||
|
|
||||||
this.setChangeReqId(user);
|
this.setChangeReqId(user);
|
||||||
|
@ -98,10 +101,9 @@ public class InitialPendingSiteSubscription<T extends Time, C extends Coverage>
|
||||||
this.setId(RegistryUtil.getRegistryObjectKey(this));
|
this.setId(RegistryUtil.getRegistryObjectKey(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param changeReqId the changeReqId to set
|
* @param changeReqId
|
||||||
|
* the changeReqId to set
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setChangeReqId(String changeReqId) {
|
public void setChangeReqId(String changeReqId) {
|
||||||
|
@ -125,7 +127,8 @@ public class InitialPendingSiteSubscription<T extends Time, C extends Coverage>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param changeReason the changeReason to set
|
* @param changeReason
|
||||||
|
* the changeReason to set
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setChangeReason(String changeReason) {
|
public void setChangeReason(String changeReason) {
|
||||||
|
|
|
@ -61,7 +61,8 @@ import com.raytheon.uf.common.time.util.TimeUtil;
|
||||||
* May 21, 2013 2020 mpduff Rename UserSubscription to SiteSubscription.
|
* May 21, 2013 2020 mpduff Rename UserSubscription to SiteSubscription.
|
||||||
* Sept 30,2013 1797 dhladky Generics
|
* Sept 30,2013 1797 dhladky Generics
|
||||||
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
||||||
* Oct 30, 2013 2448 dhladky Fixed pulling data before and after activePeriod starting and ending.
|
* Oct 30, 2013 2448 dhladky Fixed pulling data before and after activePeriod starting and ending.
|
||||||
|
* Nov 14, 2013 2548 mpduff Add a subscription type slot.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -72,8 +73,8 @@ import com.raytheon.uf.common.time.util.TimeUtil;
|
||||||
@XmlSeeAlso({ PendingSiteSubscription.class, PendingSharedSubscription.class,
|
@XmlSeeAlso({ PendingSiteSubscription.class, PendingSharedSubscription.class,
|
||||||
AdhocSubscription.class, SiteSubscription.class,
|
AdhocSubscription.class, SiteSubscription.class,
|
||||||
SharedSubscription.class })
|
SharedSubscription.class })
|
||||||
public abstract class RecurringSubscription<T extends Time, C extends Coverage> implements
|
public abstract class RecurringSubscription<T extends Time, C extends Coverage>
|
||||||
Serializable, Subscription<T, C> {
|
implements Serializable, Subscription<T, C> {
|
||||||
|
|
||||||
private static final long serialVersionUID = -6422673887457060034L;
|
private static final long serialVersionUID = -6422673887457060034L;
|
||||||
|
|
||||||
|
@ -118,6 +119,7 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
|
||||||
this.setLatencyInMinutes(sub.getLatencyInMinutes());
|
this.setLatencyInMinutes(sub.getLatencyInMinutes());
|
||||||
this.setEnsemble(sub.getEnsemble());
|
this.setEnsemble(sub.getEnsemble());
|
||||||
this.setOriginatingSite(sub.getOriginatingSite());
|
this.setOriginatingSite(sub.getOriginatingSite());
|
||||||
|
this.setSubscriptionType(sub.getSubscriptionType());
|
||||||
|
|
||||||
// Set the registry id
|
// Set the registry id
|
||||||
this.setId(RegistryUtil.getRegistryObjectKey(this));
|
this.setId(RegistryUtil.getRegistryObjectKey(this));
|
||||||
|
@ -253,12 +255,17 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
|
||||||
@XmlAttribute
|
@XmlAttribute
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private int latencyInMinutes;
|
private int latencyInMinutes;
|
||||||
|
|
||||||
@XmlAttribute
|
@XmlAttribute
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
@SlotAttribute(Subscription.ORIGINATING_SITE_SLOT)
|
@SlotAttribute(Subscription.ORIGINATING_SITE_SLOT)
|
||||||
private String originatingSite;
|
private String originatingSite;
|
||||||
|
|
||||||
|
@XmlAttribute
|
||||||
|
@DynamicSerializeElement
|
||||||
|
@SlotAttribute(Subscription.SUBSCRIPTION_TYPE_SLOT)
|
||||||
|
private SubscriptionType subscriptionType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get subscription name.
|
* Get subscription name.
|
||||||
*
|
*
|
||||||
|
@ -813,7 +820,8 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return getName() + "::" + getProvider() + "::" + getDataSetName()
|
return getName() + "::" + getProvider() + "::" + getDataSetName()
|
||||||
+ "::" + getOwner()+ "::"+getOriginatingSite();
|
+ "::" + getOwner() + "::" + getOriginatingSite() + "::"
|
||||||
|
+ getSubscriptionType().name();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -877,7 +885,7 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
|
||||||
Calendar.MILLISECOND);
|
Calendar.MILLISECOND);
|
||||||
// add the current year for true comparison
|
// add the current year for true comparison
|
||||||
startCal = TimeUtil.addCurrentYearCalendar(startCal);
|
startCal = TimeUtil.addCurrentYearCalendar(startCal);
|
||||||
|
|
||||||
activePeriodStart = startCal.getTime();
|
activePeriodStart = startCal.getTime();
|
||||||
|
|
||||||
Calendar endCal = TimeUtil.newGmtCalendar();
|
Calendar endCal = TimeUtil.newGmtCalendar();
|
||||||
|
@ -893,14 +901,14 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
|
||||||
|
|
||||||
activePeriodEnd = endCal.getTime();
|
activePeriodEnd = endCal.getTime();
|
||||||
|
|
||||||
// Only concerned with month and day, need to set the
|
// Only concerned with month and day, need to set the
|
||||||
// years on equal footing for comparison sake.
|
// years on equal footing for comparison sake.
|
||||||
Calendar c = TimeUtil.newGmtCalendar();
|
Calendar c = TimeUtil.newGmtCalendar();
|
||||||
c.setTime(checkDate);
|
c.setTime(checkDate);
|
||||||
// set the date to compare with the current date from the start
|
// set the date to compare with the current date from the start
|
||||||
c.set(Calendar.YEAR, startCal.get(Calendar.YEAR));
|
c.set(Calendar.YEAR, startCal.get(Calendar.YEAR));
|
||||||
Date date = c.getTime();
|
Date date = c.getTime();
|
||||||
|
|
||||||
return (activePeriodStart.before(date) && activePeriodEnd
|
return (activePeriodStart.before(date) && activePeriodEnd
|
||||||
.after(date));
|
.after(date));
|
||||||
}
|
}
|
||||||
|
@ -948,12 +956,31 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
|
||||||
public void setEnsemble(Ensemble ensemble) {
|
public void setEnsemble(Ensemble ensemble) {
|
||||||
this.ensemble = ensemble;
|
this.ensemble = ensemble;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setOriginatingSite(String originatingSite) {
|
public void setOriginatingSite(String originatingSite) {
|
||||||
this.originatingSite = originatingSite;
|
this.originatingSite = originatingSite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getOriginatingSite() {
|
public String getOriginatingSite() {
|
||||||
return originatingSite;
|
return originatingSite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the subscriptionType
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SubscriptionType getSubscriptionType() {
|
||||||
|
return subscriptionType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param subscriptionType
|
||||||
|
* the subscriptionType to set
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setSubscriptionType(SubscriptionType subscriptionType) {
|
||||||
|
this.subscriptionType = subscriptionType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
* May 29, 2013 1650 djohnson Add setOwner() so reflection works.
|
* May 29, 2013 1650 djohnson Add setOwner() so reflection works.
|
||||||
* Sept 30, 2013 1797 dhladky Generics
|
* Sept 30, 2013 1797 dhladky Generics
|
||||||
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
||||||
|
* Nov 14, 2013 2548 mpduff Add a subscription type slot.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -50,10 +51,11 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
@XmlAccessorType(XmlAccessType.NONE)
|
||||||
@RegistryObject(value = { Subscription.PROVIDER_NAME_SLOT,
|
@RegistryObject(value = { Subscription.PROVIDER_NAME_SLOT,
|
||||||
Subscription.NAME_SLOT, Subscription.DATA_SET_SLOT,
|
Subscription.NAME_SLOT, Subscription.DATA_SET_SLOT,
|
||||||
Subscription.OWNER_SLOT,
|
Subscription.OWNER_SLOT, Subscription.ORIGINATING_SITE_SLOT,
|
||||||
Subscription.ORIGINATING_SITE_SLOT})
|
Subscription.SUBSCRIPTION_TYPE_SLOT })
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class SharedSubscription<T extends Time, C extends Coverage> extends RecurringSubscription<T, C> {
|
public class SharedSubscription<T extends Time, C extends Coverage> extends
|
||||||
|
RecurringSubscription<T, C> {
|
||||||
|
|
||||||
private static final long serialVersionUID = -7221500266253493273L;
|
private static final long serialVersionUID = -7221500266253493273L;
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* Jun 24, 2013 2106 djohnson Add copy constructor.
|
* Jun 24, 2013 2106 djohnson Add copy constructor.
|
||||||
* Sept 30, 2013 1797 dhladky Some Generics
|
* Sept 30, 2013 1797 dhladky Some Generics
|
||||||
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
||||||
|
* Nov 14, 2013 2548 mpduff Add a subscription type slot.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -74,9 +75,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
@XmlAccessorType(XmlAccessType.NONE)
|
@XmlAccessorType(XmlAccessType.NONE)
|
||||||
@RegistryObject({ Subscription.PROVIDER_NAME_SLOT, Subscription.NAME_SLOT,
|
@RegistryObject({ Subscription.PROVIDER_NAME_SLOT, Subscription.NAME_SLOT,
|
||||||
Subscription.DATA_SET_SLOT, Subscription.OWNER_SLOT,
|
Subscription.DATA_SET_SLOT, Subscription.OWNER_SLOT,
|
||||||
Subscription.ORIGINATING_SITE_SLOT})
|
Subscription.ORIGINATING_SITE_SLOT, Subscription.SUBSCRIPTION_TYPE_SLOT })
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
public class SiteSubscription<T extends Time, C extends Coverage> extends RecurringSubscription<T, C> {
|
public class SiteSubscription<T extends Time, C extends Coverage> extends
|
||||||
|
RecurringSubscription<T, C> {
|
||||||
private static final long serialVersionUID = -6422673887457060034L;
|
private static final long serialVersionUID = -6422673887457060034L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -41,6 +41,7 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
||||||
* Jul 11, 2013 2106 djohnson SubscriptionPriority allows comparison.
|
* Jul 11, 2013 2106 djohnson SubscriptionPriority allows comparison.
|
||||||
* Sept 30,2013 1797 dhladky Abstracted and genericized.
|
* Sept 30,2013 1797 dhladky Abstracted and genericized.
|
||||||
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
||||||
|
* Nov 14, 2013 2548 mpduff Add a subscription type information.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -50,6 +51,11 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
||||||
|
|
||||||
public interface Subscription<T extends Time, C extends Coverage> {
|
public interface Subscription<T extends Time, C extends Coverage> {
|
||||||
|
|
||||||
|
@XmlEnum
|
||||||
|
public enum SubscriptionType {
|
||||||
|
QUERY, RECURRING;
|
||||||
|
}
|
||||||
|
|
||||||
/** Enumeration to use for subscription priorities */
|
/** Enumeration to use for subscription priorities */
|
||||||
@XmlEnum
|
@XmlEnum
|
||||||
public static enum SubscriptionPriority {
|
public static enum SubscriptionPriority {
|
||||||
|
@ -142,10 +148,13 @@ public interface Subscription<T extends Time, C extends Coverage> {
|
||||||
|
|
||||||
/** Route slot */
|
/** Route slot */
|
||||||
String ROUTE_SLOT = "route";
|
String ROUTE_SLOT = "route";
|
||||||
|
|
||||||
/** Originating Site slot */
|
/** Originating Site slot */
|
||||||
String ORIGINATING_SITE_SLOT = "originatingSite";
|
String ORIGINATING_SITE_SLOT = "originatingSite";
|
||||||
|
|
||||||
|
/** Subscription type slot (query, recurring) */
|
||||||
|
String SUBSCRIPTION_TYPE_SLOT = "subscriptionType";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get subscription name.
|
* Get subscription name.
|
||||||
*
|
*
|
||||||
|
@ -618,16 +627,32 @@ public interface Subscription<T extends Time, C extends Coverage> {
|
||||||
* Office Id to add
|
* Office Id to add
|
||||||
*/
|
*/
|
||||||
void addOfficeID(String officeId);
|
void addOfficeID(String officeId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the original site the subscription was created as
|
* Gets the original site the subscription was created as
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getOriginatingSite();
|
String getOriginatingSite();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the originating Site the subscription was created as
|
* Sets the originating Site the subscription was created as
|
||||||
|
*
|
||||||
* @param originatingSite
|
* @param originatingSite
|
||||||
*/
|
*/
|
||||||
void setOriginatingSite(String originatingSite);
|
void setOriginatingSite(String originatingSite);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the subscription type (Recurring or Query)
|
||||||
|
*
|
||||||
|
* @return the SubscriptionType
|
||||||
|
*/
|
||||||
|
SubscriptionType getSubscriptionType();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the subscription type.
|
||||||
|
*
|
||||||
|
* @param subType
|
||||||
|
*/
|
||||||
|
void setSubscriptionType(SubscriptionType subType);
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue