Merge "Issue #2484 Added originatingSite to id for Subscription registry objects." into development
Former-commit-id: 4b16e5325f63bb7dde3d5a49770fd4c30b69266b
This commit is contained in:
commit
4b19d287ea
9 changed files with 55 additions and 6 deletions
|
@ -141,6 +141,7 @@ import com.raytheon.viz.ui.presenter.components.ComboBoxConf;
|
||||||
* Sept 30, 2013 1797 dhladky separated Time from GriddedTime
|
* Sept 30, 2013 1797 dhladky separated Time from GriddedTime
|
||||||
* Oct 11, 2013 2386 mpduff Refactor DD Front end.
|
* Oct 11, 2013 2386 mpduff Refactor DD Front end.
|
||||||
* Oct 15, 2013 2477 mpduff Fix bug in group settings.
|
* Oct 15, 2013 2477 mpduff Fix bug in group settings.
|
||||||
|
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -1545,6 +1546,10 @@ public class CreateSubscriptionDlg extends CaveSWTDialog {
|
||||||
* The subscription to get the registry id
|
* The subscription to get the registry id
|
||||||
*/
|
*/
|
||||||
private void setSubscriptionId(Subscription sub) {
|
private void setSubscriptionId(Subscription sub) {
|
||||||
|
if (sub.getOriginatingSite() == null) {
|
||||||
|
LocalizationManager lm = LocalizationManager.getInstance();
|
||||||
|
sub.setOriginatingSite(lm.getCurrentSite());
|
||||||
|
}
|
||||||
String id = RegistryUtil.getRegistryObjectKey(sub);
|
String id = RegistryUtil.getRegistryObjectKey(sub);
|
||||||
sub.setId(id);
|
sub.setId(id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,6 +131,7 @@ 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.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author mpduff
|
* @author mpduff
|
||||||
|
@ -539,6 +540,7 @@ public abstract class SubsetManagerDlg extends CaveSWTDialog implements
|
||||||
|
|
||||||
sub.setOwner((create) ? LocalizationManager.getInstance()
|
sub.setOwner((create) ? LocalizationManager.getInstance()
|
||||||
.getCurrentUser() : this.subscription.getOwner());
|
.getCurrentUser() : this.subscription.getOwner());
|
||||||
|
sub.setOriginatingSite(LocalizationManager.getInstance().getCurrentSite());
|
||||||
|
|
||||||
return setupCommonSubscriptionAttributes(sub, defaultRoute);
|
return setupCommonSubscriptionAttributes(sub, defaultRoute);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,7 @@ 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.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,7 +58,7 @@ 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.DATA_SET_SLOT, Subscription.OWNER_SLOT, Subscription.ORIGINATING_SITE_SLOT })
|
||||||
public class AdhocSubscription<T extends Time, C extends Coverage> extends SiteSubscription<T, C> {
|
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;
|
||||||
|
|
|
@ -41,6 +41,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.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -53,7 +54,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
@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,
|
||||||
InitialPendingSubscription.CHANGE_REQUEST_ID_SLOT })
|
InitialPendingSubscription.CHANGE_REQUEST_ID_SLOT,
|
||||||
|
Subscription.ORIGINATING_SITE_SLOT})
|
||||||
public class InitialPendingSharedSubscription<T extends Time, C extends Coverage> extends SharedSubscription<T, C>
|
public class InitialPendingSharedSubscription<T extends Time, C extends Coverage> extends SharedSubscription<T, C>
|
||||||
implements InitialPendingSubscription<T, C> {
|
implements InitialPendingSubscription<T, C> {
|
||||||
private static final long serialVersionUID = 2779084460608459754L;
|
private static final long serialVersionUID = 2779084460608459754L;
|
||||||
|
|
|
@ -58,7 +58,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
@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,
|
||||||
InitialPendingSubscription.CHANGE_REQUEST_ID_SLOT })
|
InitialPendingSubscription.CHANGE_REQUEST_ID_SLOT,
|
||||||
|
Subscription.ORIGINATING_SITE_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;
|
||||||
|
@ -138,4 +139,5 @@ public class InitialPendingSiteSubscription<T extends Time, C extends Coverage>
|
||||||
public Subscription<T, C> subscription() {
|
public Subscription<T, C> subscription() {
|
||||||
return new SiteSubscription<T, C>(this);
|
return new SiteSubscription<T, C>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,7 @@ import com.raytheon.uf.common.time.util.TimeUtil;
|
||||||
* May 15, 2013 1040 mpduff Changed to use Set for office id.
|
* May 15, 2013 1040 mpduff Changed to use Set for office id.
|
||||||
* 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.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -115,6 +116,7 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
|
||||||
this.setRoute(sub.getRoute());
|
this.setRoute(sub.getRoute());
|
||||||
this.setLatencyInMinutes(sub.getLatencyInMinutes());
|
this.setLatencyInMinutes(sub.getLatencyInMinutes());
|
||||||
this.setEnsemble(sub.getEnsemble());
|
this.setEnsemble(sub.getEnsemble());
|
||||||
|
this.setOriginatingSite(sub.getOriginatingSite());
|
||||||
|
|
||||||
// Set the registry id
|
// Set the registry id
|
||||||
this.setId(RegistryUtil.getRegistryObjectKey(this));
|
this.setId(RegistryUtil.getRegistryObjectKey(this));
|
||||||
|
@ -250,6 +252,11 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
|
||||||
@XmlAttribute
|
@XmlAttribute
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private int latencyInMinutes;
|
private int latencyInMinutes;
|
||||||
|
|
||||||
|
@XmlAttribute
|
||||||
|
@DynamicSerializeElement
|
||||||
|
@SlotAttribute(Subscription.ORIGINATING_SITE_SLOT)
|
||||||
|
private String originatingSite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get subscription name.
|
* Get subscription name.
|
||||||
|
@ -783,6 +790,7 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
|
||||||
builder.append(getName(), other.getName());
|
builder.append(getName(), other.getName());
|
||||||
builder.append(getDataSetName(), other.getDataSetName());
|
builder.append(getDataSetName(), other.getDataSetName());
|
||||||
builder.append(getOwner(), other.getOwner());
|
builder.append(getOwner(), other.getOwner());
|
||||||
|
builder.append(getOriginatingSite(), other.getOriginatingSite());
|
||||||
|
|
||||||
return builder.isEquals();
|
return builder.isEquals();
|
||||||
}
|
}
|
||||||
|
@ -796,6 +804,7 @@ public abstract class RecurringSubscription<T extends Time, C extends Coverage>
|
||||||
builder.append(getName());
|
builder.append(getName());
|
||||||
builder.append(getDataSetName());
|
builder.append(getDataSetName());
|
||||||
builder.append(getOwner());
|
builder.append(getOwner());
|
||||||
|
builder.append(getOriginatingSite());
|
||||||
|
|
||||||
return builder.toHashCode();
|
return builder.toHashCode();
|
||||||
}
|
}
|
||||||
|
@ -803,7 +812,7 @@ 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();
|
+ "::" + getOwner()+ "::"+getOriginatingSite();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -931,4 +940,12 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setOriginatingSite(String originatingSite) {
|
||||||
|
this.originatingSite = originatingSite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOriginatingSite() {
|
||||||
|
return originatingSite;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
* May 15, 2013 1040 mpduff Added addOfficeId.
|
* May 15, 2013 1040 mpduff Added addOfficeId.
|
||||||
* 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.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -49,7 +50,8 @@ 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})
|
||||||
@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> {
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* Jun 13, 2013 2095 djohnson Duplicate 13.5.1 change so bandwidth manager deletes subscriptions correctly.
|
* Jun 13, 2013 2095 djohnson Duplicate 13.5.1 change so bandwidth manager deletes subscriptions correctly.
|
||||||
* 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.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -72,7 +73,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
@XmlRootElement
|
@XmlRootElement
|
||||||
@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})
|
||||||
@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;
|
||||||
|
|
|
@ -40,6 +40,7 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
||||||
* May 15, 2013 1040 mpduff Changed officeId to a set.
|
* May 15, 2013 1040 mpduff Changed officeId to a set.
|
||||||
* 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.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -141,6 +142,9 @@ public interface Subscription<T extends Time, C extends Coverage> {
|
||||||
|
|
||||||
/** Route slot */
|
/** Route slot */
|
||||||
String ROUTE_SLOT = "route";
|
String ROUTE_SLOT = "route";
|
||||||
|
|
||||||
|
/** Originating Site slot */
|
||||||
|
String ORIGINATING_SITE_SLOT = "originatingSite";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get subscription name.
|
* Get subscription name.
|
||||||
|
@ -614,4 +618,16 @@ 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
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String getOriginatingSite();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the originating Site the subscription was created as
|
||||||
|
* @param originatingSite
|
||||||
|
*/
|
||||||
|
void setOriginatingSite(String originatingSite);
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue