Issue #2771 For Data Delivery CAVE now request current id from
the registry EDEX. Added DATA_DELIVERY_ID to environment that is used instead of site id for identification when participating in the federation and subscription identification. Amend: Created common data delivery package com.raytheon.uf.edex.datadelivery. Moved DataDeliveryIdUtil there. Created ClusterIdUtil. DataDeliveryIdUtil uses that utility. It also verifies the id against the awips sites. Changed centralRegistry.sh to set CLUSTER_ID to NCF. Handle cases where site id is HAK or HUS. Check for empty id setting in Cluster ID Util. Return full id for Data Delivery ID. Simplify Data Delivery ID and return Cluster ID. Change-Id: Iee140b5626e1962217cca2deb6d1483ebf265911 Former-commit-id:1d57e9f5f7
[formerly379c0fb46c
] [formerly19460ed0d7
] [formerly1d57e9f5f7
[formerly379c0fb46c
] [formerly19460ed0d7
] [formerlyba4e308328
[formerly19460ed0d7
[formerly d2fa3dfb4a61e8d0fd68654afb1c18e49f063fcb]]]] Former-commit-id:ba4e308328
Former-commit-id:ae35320dd6
[formerly1b76488111
] [formerly eab08c6056f77a408245754e016c16a1db9d08f4 [formerly3be3380944
]] Former-commit-id: 367c8f66061868a52d255ea46c57bb8c2dc11b5f [formerly9aa1cb299e
] Former-commit-id:b0421675ff
This commit is contained in:
parent
8e8e9141e7
commit
e906d71ac4
38 changed files with 321 additions and 76 deletions
|
@ -43,11 +43,11 @@ import com.raytheon.uf.common.status.IUFStatusHandler;
|
|||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.BinOffset;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
|
||||
import com.raytheon.uf.viz.core.rsc.DisplayType;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceType;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
|
||||
import com.raytheon.uf.viz.productbrowser.AbstractRequestableProductBrowserDataDefinition;
|
||||
import com.raytheon.uf.viz.productbrowser.ProductBrowserLabel;
|
||||
import com.raytheon.uf.viz.productbrowser.ProductBrowserPreference;
|
||||
|
@ -74,6 +74,7 @@ import com.raytheon.viz.pointdata.util.PointDataInventory;
|
|||
* Nov 19, 2013 2458 mpduff Only pull subscriptions for the local site
|
||||
* Nov 21, 2013 2554 dhladky Restored ADHOC's to working.
|
||||
* Jan 14, 2014 2459 mpduff Change Subscription status code
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -439,8 +440,8 @@ public class DataDeliveryProductBrowserDataDefinition
|
|||
final ISubscriptionHandler handler = RegistryObjectHandlers
|
||||
.get(ISubscriptionHandler.class);
|
||||
try {
|
||||
subList = handler.getByFilters(null, LocalizationManager
|
||||
.getInstance().getCurrentSite());
|
||||
subList = handler.getByFilters(null,
|
||||
DataDeliveryUtils.getDataDeliveryId());
|
||||
} catch (RegistryHandlerException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
|
|
@ -31,11 +31,11 @@ import com.raytheon.uf.common.status.IUFStatusHandler;
|
|||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.auth.UserController;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.datadelivery.services.DataDeliveryServices;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.ISubscriptionManagerFilter;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.SubscriptionManagerDlg;
|
||||
import com.raytheon.uf.viz.datadelivery.subscription.SubscriptionManagerFilters;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
|
||||
|
||||
/**
|
||||
* Subscription Manager Dialog Action class.
|
||||
|
@ -49,8 +49,9 @@ import com.raytheon.uf.viz.datadelivery.subscription.SubscriptionManagerFilters;
|
|||
* Jan 10, 2012 mpduff Initial creation
|
||||
* Oct 03, 2012 1241 djohnson Use {@link DataDeliveryPermission}.
|
||||
* May 28, 2013 1650 djohnson Allow using filters for the Subscription Manager Dialog.
|
||||
* Jul 26, 2031 2232 mpduff Refactored Data Delivery permissions.
|
||||
* Jul 26, 2031 2232 mpduff Refactored Data Delivery permissions.
|
||||
* Sep 04, 2013 2330 bgonzale execute now filters subscriptions by current site id.
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
|
@ -81,7 +82,7 @@ public class SubscriptionManagerAction extends AbstractHandler {
|
|||
@Override
|
||||
public Object execute(ExecutionEvent arg0) {
|
||||
return loadSubscriptionManager(SubscriptionManagerFilters
|
||||
.getBySiteId(LocalizationManager.getInstance().getCurrentSite()));
|
||||
.getBySiteId(DataDeliveryUtils.getDataDeliveryId()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -48,7 +48,6 @@ import com.raytheon.uf.common.status.IUFStatusHandler;
|
|||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.util.FileUtil;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.core.notification.NotificationMessage;
|
||||
import com.raytheon.uf.viz.datadelivery.common.ui.IDialogClosed;
|
||||
import com.raytheon.uf.viz.datadelivery.common.ui.SortImages.SortDirection;
|
||||
|
@ -57,6 +56,7 @@ import com.raytheon.uf.viz.datadelivery.common.ui.TableComp;
|
|||
import com.raytheon.uf.viz.datadelivery.common.ui.TableCompConfig;
|
||||
import com.raytheon.uf.viz.datadelivery.common.ui.TableDataManager;
|
||||
import com.raytheon.uf.viz.datadelivery.common.ui.ViewDetailsDlg;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils.BrowserColumnNames;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils.TABLE_TYPE;
|
||||
|
||||
|
@ -85,6 +85,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils.TABLE_TYPE;
|
|||
* Feb 15, 2013 1638 mschenke Moved Util.EOL into FileUtil
|
||||
* Apr 10, 2013 1891 djohnson Declare variable as List.
|
||||
* Sep 11, 2013 2352 mpduff Add siteId to getSubscribedToDataSetNames method.
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -627,7 +628,7 @@ public class BrowserTableComp extends TableComp implements IDialogClosed {
|
|||
try {
|
||||
datasetNames = DataDeliveryHandlers.getSubscriptionHandler()
|
||||
.getSubscribedToDataSetNames(
|
||||
LocalizationManager.getInstance().getCurrentSite());
|
||||
DataDeliveryUtils.getDataDeliveryId());
|
||||
} catch (RegistryHandlerException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Unable to retrieve subscription dataset names!", e);
|
||||
|
|
|
@ -97,6 +97,7 @@ import com.raytheon.viz.ui.widgets.duallist.IUpdate;
|
|||
* May 28, 2013 1650 djohnson More information when failing to schedule subscriptions.
|
||||
* Jun 13, 2013 2108 mpduff Refactored DataSizeUtils.
|
||||
* Oct 28, 2013 2292 mpduff Change overlap services.
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
* </pre>
|
||||
*
|
||||
* @author jpiatt
|
||||
|
@ -410,8 +411,7 @@ public class UserSelectComp extends Composite implements IUpdate, IDisplay,
|
|||
subscription.setCoverage(cov);
|
||||
}
|
||||
|
||||
subscription.addOfficeID(LocalizationManager.getInstance()
|
||||
.getCurrentSite());
|
||||
subscription.addOfficeID(DataDeliveryUtils.getDataDeliveryId());
|
||||
if (sizeUtils != null) {
|
||||
subscription.setDataSetSize(sizeUtils
|
||||
.getDataSetSizeInKb(subscription));
|
||||
|
|
|
@ -144,6 +144,7 @@ import com.raytheon.viz.ui.presenter.components.ComboBoxConf;
|
|||
* Nov 07, 2013 2291 skorolev Used showText() method for "Unable to Create Subscription" message.
|
||||
* Nov 08, 2013 2506 bgonzale Removed send notification when a subscription is updated and created.
|
||||
* Jan 14, 2014 2459 mpduff Change Subscription status code
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -471,8 +472,7 @@ public class CreateSubscriptionDlg extends CaveSWTDialog {
|
|||
btn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
String currentSite = LocalizationManager.getInstance()
|
||||
.getCurrentSite();
|
||||
String currentSite = DataDeliveryUtils.getDataDeliveryId();
|
||||
SiteSelectionDlg dlg = new SiteSelectionDlg(shell, currentSite,
|
||||
sharedSites);
|
||||
dlg.setCloseCallback(new ICloseCallback() {
|
||||
|
@ -1030,7 +1030,7 @@ public class CreateSubscriptionDlg extends CaveSWTDialog {
|
|||
subscription = sharedSub;
|
||||
} else {
|
||||
Set<String> officeList = Sets.newHashSet();
|
||||
officeList.add(LocalizationManager.getInstance().getCurrentSite());
|
||||
officeList.add(DataDeliveryUtils.getDataDeliveryId());
|
||||
subscription.setOfficeIDs(officeList);
|
||||
}
|
||||
|
||||
|
@ -1540,8 +1540,7 @@ public class CreateSubscriptionDlg extends CaveSWTDialog {
|
|||
*/
|
||||
private void setSubscriptionId(Subscription sub) {
|
||||
if (sub.getOriginatingSite() == null) {
|
||||
LocalizationManager lm = LocalizationManager.getInstance();
|
||||
sub.setOriginatingSite(lm.getCurrentSite());
|
||||
sub.setOriginatingSite(DataDeliveryUtils.getDataDeliveryId());
|
||||
}
|
||||
String id = RegistryUtil.getRegistryObjectKey(sub);
|
||||
sub.setId(id);
|
||||
|
|
|
@ -41,10 +41,10 @@ import com.raytheon.uf.common.status.IUFStatusHandler;
|
|||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.auth.UserController;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.datadelivery.common.ui.GroupSelectComp;
|
||||
import com.raytheon.uf.viz.datadelivery.common.ui.IGroupAction;
|
||||
import com.raytheon.uf.viz.datadelivery.services.DataDeliveryServices;
|
||||
import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
import com.raytheon.viz.ui.presenter.components.ComboBoxConf;
|
||||
import com.raytheon.viz.ui.presenter.components.WidgetConf;
|
||||
|
@ -67,7 +67,8 @@ import com.raytheon.viz.ui.presenter.components.WidgetConf;
|
|||
* Apr 08, 2013 1826 djohnson Remove delivery options.
|
||||
* May 14, 2013 1040 mpduff Changed to add office Id rather than setting it.
|
||||
* May 21, 2013 2020 mpduff Rename UserSubscription to SiteSubscription.
|
||||
* Nov 08, 2013 2506 bgonzale Removed send notification when a subscription is created.
|
||||
* Nov 08, 2013 2506 bgonzale Removed send notification when a subscription is created.
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -263,8 +264,7 @@ public class GroupAddDlg extends CaveSWTDialog {
|
|||
|
||||
System.out.println("Fix Me: Need to calculate data set size");
|
||||
subscription.setDataSetSize(999);
|
||||
subscription.addOfficeID(LocalizationManager.getInstance()
|
||||
.getCurrentSite());
|
||||
subscription.addOfficeID(DataDeliveryUtils.getDataDeliveryId());
|
||||
|
||||
// TODO: How to do this better? Will shared subscriptions participate in
|
||||
// groups?
|
||||
|
|
|
@ -52,6 +52,7 @@ import com.raytheon.viz.ui.widgets.duallist.DualListConfig;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 29, 2013 1040 mpduff Initial creation
|
||||
* Feb 11, 2014 2771 bgonzale Show all SiteDataTypes in site list.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -153,9 +154,7 @@ public class SiteSelectionDlg extends CaveSWTDialog {
|
|||
|
||||
for (Entry<String, SiteData> entry : siteDataMap.entrySet()) {
|
||||
SiteDataType type = entry.getValue().getType();
|
||||
if (type == SiteDataType.WFO || type == SiteDataType.RFC) {
|
||||
siteList.add(entry.getKey());
|
||||
}
|
||||
siteList.add(entry.getKey());
|
||||
}
|
||||
|
||||
// Remove the current site
|
||||
|
|
|
@ -154,6 +154,7 @@ import com.raytheon.viz.ui.presenter.IDisplay;
|
|||
* Jan 14, 2014 2459 mpduff Change Subscription status code
|
||||
* Feb 04, 2014 2722 mpduff Add auto-refresh task.
|
||||
* Feb 14, 2014 2806 mpduff Disable activate/deactivate buttons when viewing other site's subscriptions
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -191,8 +192,7 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
}
|
||||
|
||||
/** Current site */
|
||||
private final String CURRENT_SITE = LocalizationManager.getInstance()
|
||||
.getCurrentSite();
|
||||
private final String CURRENT_SITE = DataDeliveryUtils.getDataDeliveryId();
|
||||
|
||||
/** The activate button */
|
||||
private Button activateBtn;
|
||||
|
|
|
@ -60,7 +60,6 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.core.auth.UserController;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.core.notification.NotificationMessage;
|
||||
import com.raytheon.uf.viz.core.notification.NotificationMessageContainsType;
|
||||
import com.raytheon.uf.viz.datadelivery.common.ui.IGroupAction;
|
||||
|
@ -112,6 +111,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils.TABLE_TYPE;
|
|||
* Oct 11, 2013 2386 mpduff Refactor DD Front end.
|
||||
* Jan 08, 2014 2642 mpduff Enable/disable menus based on site, allow user to add their site to a shared sub.
|
||||
* Feb 04, 2014 2722 mpduff Add last update time.
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
|
@ -122,8 +122,7 @@ public class SubscriptionTableComp extends TableComp implements IGroupAction {
|
|||
.getHandler(SubscriptionTableComp.class);
|
||||
|
||||
/** Current site constant */
|
||||
private final String CURRENT_SITE = LocalizationManager.getInstance()
|
||||
.getCurrentSite();
|
||||
private final String CURRENT_SITE = DataDeliveryUtils.getDataDeliveryId();
|
||||
|
||||
/** Pop up menu object. */
|
||||
private Menu popupMenu;
|
||||
|
|
|
@ -142,6 +142,7 @@ import com.raytheon.viz.ui.presenter.IDisplay;
|
|||
* Nov 14, 2013 2548 mpduff Set the subscription type (QUERY OR RECURRING)
|
||||
* Jan 14, 2014 2459 mpduff Change Subscription status code
|
||||
* Jan 20, 2014 2538 mpduff Call doesNameExist method to check for dupes
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
|
@ -570,8 +571,7 @@ public abstract class SubsetManagerDlg extends CaveSWTDialog implements
|
|||
|
||||
sub.setOwner((create) ? LocalizationManager.getInstance()
|
||||
.getCurrentUser() : this.subscription.getOwner());
|
||||
sub.setOriginatingSite(LocalizationManager.getInstance()
|
||||
.getCurrentSite());
|
||||
sub.setOriginatingSite(DataDeliveryUtils.getDataDeliveryId());
|
||||
sub.setSubscriptionType(SubscriptionType.RECURRING);
|
||||
|
||||
return setupCommonSubscriptionAttributes(sub, defaultRoute);
|
||||
|
@ -599,7 +599,7 @@ public abstract class SubsetManagerDlg extends CaveSWTDialog implements
|
|||
sub.setRoute(defaultRoute);
|
||||
sub.setName(nameText.getText());
|
||||
if (subscription == null || subscription.getOfficeIDs() == null) {
|
||||
sub.addOfficeID(LocalizationManager.getInstance().getCurrentSite());
|
||||
sub.addOfficeID(DataDeliveryUtils.getDataDeliveryId());
|
||||
} else {
|
||||
sub.setOfficeIDs(subscription.getOfficeIDs());
|
||||
}
|
||||
|
|
|
@ -34,6 +34,9 @@ import org.eclipse.swt.SWT;
|
|||
import org.eclipse.swt.widgets.MessageBox;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.common.auth.resp.SuccessfulExecution;
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest.RequestType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Coverage;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataType;
|
||||
|
@ -43,6 +46,8 @@ import com.raytheon.uf.common.datadelivery.registry.Parameter;
|
|||
import com.raytheon.uf.common.datadelivery.registry.PointTime;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||
import com.raytheon.uf.common.datadelivery.request.DataDeliveryConstants;
|
||||
import com.raytheon.uf.common.serialization.comm.RequestRouter;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.common.util.CollectionUtil;
|
||||
import com.raytheon.uf.common.util.SizeUtil;
|
||||
|
@ -82,8 +87,9 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Jul 26, 2031 2232 mpduff Removed sendAuthorizationRequest method.
|
||||
* Aug 30, 2013 2288 bgonzale Added latency to details display.
|
||||
* Sep 30, 2013 1797 dhladky Time GriddedTime separation
|
||||
* Oct 11, 2013 2386 mpduff Refactor DD Front end.
|
||||
* Nov 07, 2013 2291 skorolev Added showText() method for messages with many lines.
|
||||
* Oct 11, 2013 2386 mpduff Refactor DD Front end.
|
||||
* Nov 07, 2013 2291 skorolev Added showText() method for messages with many lines.
|
||||
* Feb 11, 2014 2771 bgonzale Added Data Delivery ID, getter, and retrieval method.
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
|
@ -121,6 +127,8 @@ public class DataDeliveryUtils {
|
|||
|
||||
public static final String UNABLE_TO_RETRIEVE_PENDING_SUBSCRIPTIONS = "Unable to retrieve pending subscriptions!";
|
||||
|
||||
private static final String dataDeliveryId = retrieveDataDeliveryId();
|
||||
|
||||
/**
|
||||
* TABLE_TYPE enumeration.
|
||||
*/
|
||||
|
@ -832,4 +840,21 @@ public class DataDeliveryUtils {
|
|||
public static int getMaxLatency(GriddedDataSet dataSet) {
|
||||
return getMaxLatency(new ArrayList<Integer>(dataSet.getCycles()));
|
||||
}
|
||||
|
||||
public static String getDataDeliveryId() {
|
||||
return dataDeliveryId;
|
||||
}
|
||||
|
||||
private static String retrieveDataDeliveryId() {
|
||||
IBandwidthRequest request = new IBandwidthRequest();
|
||||
request.setRequestType(RequestType.GET_DATADELIVERY_ID);
|
||||
try {
|
||||
SuccessfulExecution response = (SuccessfulExecution) RequestRouter
|
||||
.route(request, DataDeliveryConstants.DATA_DELIVERY_SERVER);
|
||||
return (String) response.getResponse();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(
|
||||
"Unable to retrieve Data Delivery ID from EDEX.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
### EDEX localization related variables ###
|
||||
export AW_SITE_IDENTIFIER=OAX
|
||||
## Cluster id can be set to the cluster's id (example:tbw for dx1-tbwo)
|
||||
## it will be autogenerated if not set
|
||||
export CLUSTER_ID
|
||||
|
||||
# database names
|
||||
export DC_DB_NAME=dc_ob7oax
|
||||
|
|
|
@ -28,4 +28,5 @@ export MGMT_PORT=9607
|
|||
|
||||
export METADATA_POOL_MIN=10
|
||||
export METADATA_POOL_MAX=25
|
||||
export METADATA_POOL_TIMEOUT=60
|
||||
export METADATA_POOL_TIMEOUT=60
|
||||
export CLUSTER_ID=NCF
|
||||
|
|
|
@ -27,6 +27,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* Dec 06, 2012 1397 djohnson Add GET_BANDWIDTH_GRAPH_DATA.
|
||||
* Jul 18, 2013 1653 mpduff Add GET_SUBSCRIPTION_STATUS.
|
||||
* Oct 2 2013 1797 dhladky generic attempt
|
||||
* Feb 11, 2014 2771 bgonzale Added GET_DATADELIVERY_ID to RequestTypes.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -43,7 +44,11 @@ public class IBandwidthRequest<T extends Time, C extends Coverage> extends Abstr
|
|||
/**
|
||||
* Schedule a subscription.
|
||||
*/
|
||||
SCHEDULE_SUBSCRIPTION, SHOW_BUCKET, SHOW_DEFERRED, GET_BANDWIDTH, FORCE_SET_BANDWIDTH, PROPOSE_SET_BANDWIDTH, PROPOSE_SCHEDULE_SUBSCRIPTION, REINITIALIZE, GET_ESTIMATED_COMPLETION, GET_BANDWIDTH_GRAPH_DATA, GET_SUBSCRIPTION_STATUS
|
||||
SCHEDULE_SUBSCRIPTION, SHOW_BUCKET, SHOW_DEFERRED, GET_BANDWIDTH, FORCE_SET_BANDWIDTH, PROPOSE_SET_BANDWIDTH, PROPOSE_SCHEDULE_SUBSCRIPTION, REINITIALIZE,
|
||||
/**
|
||||
* Request information.
|
||||
*/
|
||||
GET_ESTIMATED_COMPLETION, GET_BANDWIDTH_GRAPH_DATA, GET_SUBSCRIPTION_STATUS, GET_DATADELIVERY_ID
|
||||
}
|
||||
|
||||
@DynamicSerializeElement
|
||||
|
|
|
@ -159,4 +159,5 @@ public interface IBandwidthService<T extends Time, C extends Coverage> {
|
|||
*/
|
||||
SubscriptionStatusSummary getSubscriptionStatusSummary(
|
||||
Subscription<T, C> subscription);
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.common.util;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
|
||||
/**
|
||||
* Utility class that returns the Cluster Id name from the environment or parsed
|
||||
* from the host name.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 13, 2014 2771 bgonzale Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bgonzale
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class ClusterIdUtil {
|
||||
|
||||
private static final String ENV_VAR_NAME = "CLUSTER_ID";
|
||||
|
||||
/**
|
||||
* Return the data delivery for this instance of Data Delivery.
|
||||
*
|
||||
* @return Data Delivery identification.
|
||||
*/
|
||||
public static String getId() {
|
||||
String id = System.getenv(ENV_VAR_NAME);
|
||||
|
||||
if (id == null || id.trim().length() == 0) {
|
||||
try {
|
||||
id = parseClusterNameFromHostname(InetAddress.getLocalHost()
|
||||
.getHostName());
|
||||
} catch (UnknownHostException e) {
|
||||
// no data delivery id set, and unable to parse from host.
|
||||
throw new RuntimeException("No " + ENV_VAR_NAME
|
||||
+ " set in the environment and unable "
|
||||
+ "to determine the name from hostname.", e);
|
||||
}
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
static String parseClusterNameFromHostname(String hostname) {
|
||||
/*
|
||||
* Host names in the format of blah.company.com or dx1-blah.company.com
|
||||
* or dx1-blah where the blah is the name desired.
|
||||
*/
|
||||
int firstDotIndex = hostname.indexOf('.');
|
||||
int endIndex = firstDotIndex == -1 ? hostname.length() : firstDotIndex;
|
||||
int firstHyphenIndex = hostname.indexOf('-');
|
||||
int startIndex = firstHyphenIndex == -1 ? 0 : firstHyphenIndex + 1;
|
||||
// catch cases where a hyphen may be in the company.com part of the
|
||||
// address and not in the blah part
|
||||
startIndex = startIndex > endIndex ? 0 : startIndex;
|
||||
return hostname.substring(startIndex, endIndex);
|
||||
}
|
||||
|
||||
}
|
|
@ -19,4 +19,5 @@ Require-Bundle: com.raytheon.uf.common.datadelivery.bandwidth;bundle-version="1.
|
|||
com.raytheon.uf.common.registry.ebxml;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.datadelivery.service;bundle-version="1.0.0"
|
||||
Import-Package: com.raytheon.edex.site,
|
||||
com.raytheon.uf.common.event
|
||||
com.raytheon.uf.common.event,
|
||||
com.raytheon.uf.edex.datadelivery.util
|
||||
|
|
|
@ -24,12 +24,12 @@ import java.io.IOException;
|
|||
import java.util.List;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.raytheon.edex.site.SiteUtil;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.util.FileUtil;
|
||||
import com.raytheon.uf.common.util.file.FilenameFilters;
|
||||
import com.raytheon.uf.edex.core.EDEXUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.util.DataDeliveryIdUtil;
|
||||
|
||||
/**
|
||||
* The SBN simulator. Reads files from a configured directory, and then places
|
||||
|
@ -43,6 +43,7 @@ import com.raytheon.uf.edex.core.EDEXUtil;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 14, 2013 1648 djohnson Initial creation
|
||||
* Oct 18, 2013 2267 bgonzale Added distribution to and check in site specific directories.
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -99,7 +100,7 @@ public class SbnSimulator {
|
|||
*/
|
||||
public SbnSimulator() {
|
||||
this(new File(System.getProperty("sbn.retrieval.transfer.directory")),
|
||||
new CopyFileToManualIngest(), SiteUtil.getSite());
|
||||
new CopyFileToManualIngest(), DataDeliveryIdUtil.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -46,4 +46,5 @@ Export-Package: com.raytheon.uf.edex.datadelivery.bandwidth,
|
|||
com.raytheon.uf.edex.datadelivery.bandwidth.util
|
||||
Import-Package: com.raytheon.uf.common.datadelivery.event.retrieval,
|
||||
com.raytheon.uf.common.datadelivery.registry,
|
||||
com.raytheon.uf.common.stats
|
||||
com.raytheon.uf.common.stats,
|
||||
com.raytheon.uf.edex.datadelivery.util
|
||||
|
|
|
@ -80,6 +80,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalPlan;
|
|||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalStatus;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.util.DataDeliveryIdUtil;
|
||||
import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
|
||||
|
||||
/**
|
||||
|
@ -144,6 +145,7 @@ import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
|
|||
* Jan 30, 2014 2686 dhladky refactor of retrieval.
|
||||
* Feb 06, 2014 2636 bgonzale fix overwrite of unscheduled subscription list. fix scheduling
|
||||
* of already scheduled BandwidthAllocations.
|
||||
* Feb 11, 2014 2771 bgonzale Added handler for GET_DATADELIVERY_ID request.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -946,6 +948,9 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
|
|||
case GET_BANDWIDTH_GRAPH_DATA:
|
||||
response = getBandwidthGraphData();
|
||||
break;
|
||||
case GET_DATADELIVERY_ID:
|
||||
response = DataDeliveryIdUtil.getId();
|
||||
break;
|
||||
case GET_SUBSCRIPTION_STATUS:
|
||||
Subscription<T, C> sub = null;
|
||||
if (subscriptions.size() != 1
|
||||
|
|
|
@ -41,7 +41,6 @@ import com.google.common.annotations.VisibleForTesting;
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.eventbus.AllowConcurrentEvents;
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
import com.raytheon.edex.site.SiteUtil;
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest.RequestType;
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.ProposeScheduleResponse;
|
||||
|
@ -88,6 +87,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalStatus;
|
|||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.SubscriptionRetrievalFulfilled;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.util.DataDeliveryIdUtil;
|
||||
|
||||
/**
|
||||
* Implementation of {@link BandwidthManager} that isolates EDEX specific
|
||||
|
@ -124,6 +124,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
|
|||
* Feb 06, 2014 2636 bgonzale Added initializeScheduling method that uses the in-memory
|
||||
* bandwidth manager to perform the scheduling initialization
|
||||
* because of efficiency.
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -399,7 +400,7 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
|
|||
if (DataDeliveryRegistryObjectTypes.isRecurringSubscription(objectType)) {
|
||||
if (sub != null) {
|
||||
boolean isApplicableForTheLocalSite = sub.getOfficeIDs()
|
||||
.contains(SiteUtil.getSite());
|
||||
.contains(DataDeliveryIdUtil.getId());
|
||||
if (isApplicableForTheLocalSite) {
|
||||
switch (event.getAction()) {
|
||||
case UPDATE:
|
||||
|
|
|
@ -24,7 +24,6 @@ import java.util.Set;
|
|||
|
||||
import com.google.common.eventbus.AllowConcurrentEvents;
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
import com.raytheon.edex.site.SiteUtil;
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthService;
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.IProposeScheduleResponse;
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.data.BandwidthGraphData;
|
||||
|
@ -44,6 +43,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.dao.IBandwidthDbInit;
|
|||
import com.raytheon.uf.edex.datadelivery.bandwidth.hibernate.IFindSubscriptionsForScheduling;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.util.DataDeliveryIdUtil;
|
||||
|
||||
/**
|
||||
* {@link IEdexBandwidthManagerCreator} for a WFO bandwidth manager.
|
||||
|
@ -69,6 +69,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
|||
* Dec 04, 2013 2566 bgonzale use bandwidthmanager method to retrieve spring files.
|
||||
* Jan 14, 2014 2692 dhladky AdhocSubscription handler
|
||||
* Jan 30, 2014 2636 mpduff Scheduling refactor.
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -136,7 +137,7 @@ public class WfoBandwidthManagerCreator<T extends Time, C extends Coverage>
|
|||
Subscription<T, C> subscription = getRegistryObjectById(
|
||||
getSubscriptionHandler(), event.getId());
|
||||
boolean isLocalOrigination = subscription.getOriginatingSite()
|
||||
.equals(SiteUtil.getSite());
|
||||
.equals(DataDeliveryIdUtil.getId());
|
||||
|
||||
if (isLocalOrigination) {
|
||||
subscriptionUpdated(subscription);
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
**/
|
||||
package com.raytheon.uf.edex.datadelivery.bandwidth.handler;
|
||||
|
||||
import com.raytheon.edex.site.SiteUtil;
|
||||
import com.raytheon.uf.common.datadelivery.registry.SiteSubscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.ebxml.SiteSubscriptionQuery;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.SiteSubscriptionHandler;
|
||||
import com.raytheon.uf.common.registry.handler.IRegistryObjectHandler;
|
||||
import com.raytheon.uf.edex.datadelivery.util.DataDeliveryIdUtil;
|
||||
|
||||
/**
|
||||
* {@link IRegistryObjectHandler} implementation for {@link SiteSubscription}.
|
||||
|
@ -37,6 +37,7 @@ import com.raytheon.uf.common.registry.handler.IRegistryObjectHandler;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 14, 2013 2545 bgonzale Initial creation.
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -51,7 +52,7 @@ public class LocalSiteSubscriptionHandler extends SiteSubscriptionHandler {
|
|||
* Default Constructor.
|
||||
*/
|
||||
public LocalSiteSubscriptionHandler() {
|
||||
this(SiteUtil.getSite());
|
||||
this(DataDeliveryIdUtil.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.raytheon.uf.edex.datadelivery.bandwidth.hibernate;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.raytheon.edex.site.SiteUtil;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Network;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -13,6 +12,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.IBandwidthManager;
|
|||
import com.raytheon.uf.edex.datadelivery.bandwidth.dao.IBandwidthDbInit;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.interfaces.BandwidthInitializer;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
||||
import com.raytheon.uf.edex.datadelivery.util.DataDeliveryIdUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -36,6 +36,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
|||
* registries since the injected FindSubscription handler will be configured now.
|
||||
* Jan 29, 2014 2636 mpduff Scheduling refactor.
|
||||
* Feb 06, 2014 2636 bgonzale Use scheduling initialization method after registry init.
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
* </pre>
|
||||
*
|
||||
* @author djohnson
|
||||
|
@ -57,7 +58,7 @@ public class HibernateBandwidthInitializer implements BandwidthInitializer {
|
|||
*/
|
||||
public HibernateBandwidthInitializer(
|
||||
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
||||
this(findSubscriptionsStrategy, SiteUtil.getSite());
|
||||
this(findSubscriptionsStrategy, DataDeliveryIdUtil.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -101,6 +101,13 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.edex.datadelivery"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.edex.datadelivery.event"
|
||||
download-size="0"
|
||||
|
|
|
@ -27,3 +27,4 @@ Export-Package: com.raytheon.uf.edex.datadelivery.registry.availability,
|
|||
com.raytheon.uf.edex.datadelivery.registry.federation,
|
||||
com.raytheon.uf.edex.datadelivery.registry.replication,
|
||||
com.raytheon.uf.edex.datadelivery.registry.web
|
||||
Import-Package: com.raytheon.uf.edex.datadelivery.util
|
||||
|
|
|
@ -35,6 +35,7 @@ import oasis.names.tc.ebxml.regrep.xsd.rim.v4.TelephoneNumberType;
|
|||
import com.raytheon.uf.common.registry.constants.RegistryObjectTypes;
|
||||
import com.raytheon.uf.common.registry.constants.StatusTypes;
|
||||
import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.util.DataDeliveryIdUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -48,6 +49,7 @@ import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 5/22/2013 1707 bphillip Initial implementation
|
||||
* Feb 11, 2014 2771 bgonzale Removed siteIdentifier field and use Data Delivery ID instead.
|
||||
* </pre>
|
||||
*
|
||||
* @author bphillip
|
||||
|
@ -108,10 +110,6 @@ public class FederationProperties {
|
|||
@XmlElement(required = true)
|
||||
private Duration federationReplicationSyncLatency;
|
||||
|
||||
/** The site identifier of this site */
|
||||
@XmlElement(required = true)
|
||||
private String siteIdentifier;
|
||||
|
||||
/** Description of this site */
|
||||
@XmlElement
|
||||
private String siteDescription = "";
|
||||
|
@ -182,13 +180,14 @@ public class FederationProperties {
|
|||
*/
|
||||
public RegistryType createRegistryObject() {
|
||||
RegistryType registryObj = new RegistryType();
|
||||
registryObj.setId(siteIdentifier + " Registry");
|
||||
registryObj.setId(DataDeliveryIdUtil.getId() + " Registry");
|
||||
registryObj.setLid(registryObj.getId());
|
||||
registryObj.setName(RegistryUtil.getInternationalString(siteIdentifier
|
||||
registryObj.setName(RegistryUtil
|
||||
.getInternationalString(DataDeliveryIdUtil.getId()
|
||||
+ " Registry Specification"));
|
||||
registryObj.setObjectType(RegistryObjectTypes.REGISTRY);
|
||||
registryObj.setDescription(registryObj.getName());
|
||||
registryObj.setOwner(siteIdentifier);
|
||||
registryObj.setOwner(DataDeliveryIdUtil.getId());
|
||||
registryObj.setStatus(StatusTypes.APPROVED);
|
||||
registryObj.setCatalogingLatency(catalogingLatency);
|
||||
registryObj.setConformanceProfile(conformanceProfile);
|
||||
|
@ -212,13 +211,13 @@ public class FederationProperties {
|
|||
phone.setNumber(sitePrimaryContactPhoneNumber);
|
||||
|
||||
PersonType person = new PersonType();
|
||||
person.setId(siteIdentifier + " Primary Contact");
|
||||
person.setId(DataDeliveryIdUtil.getId() + " Primary Contact");
|
||||
person.setLid(person.getId());
|
||||
person.setName(RegistryUtil.getInternationalString(person.getId()));
|
||||
person.setDescription(person.getName());
|
||||
person.setStatus(StatusTypes.APPROVED);
|
||||
person.setObjectType(RegistryObjectTypes.PERSON);
|
||||
person.setOwner(siteIdentifier);
|
||||
person.setOwner(DataDeliveryIdUtil.getId());
|
||||
PersonNameType personName = new PersonNameType();
|
||||
personName.setFirstName(sitePrimaryContactFirstName);
|
||||
personName.setMiddleName(sitePrimaryContactMiddleName);
|
||||
|
@ -237,16 +236,16 @@ public class FederationProperties {
|
|||
*/
|
||||
public OrganizationType createOrganization() {
|
||||
OrganizationType org = new OrganizationType();
|
||||
org.setPrimaryContact(siteIdentifier + " Primary Contact");
|
||||
org.setId(siteIdentifier);
|
||||
org.setPrimaryContact(DataDeliveryIdUtil.getId() + " Primary Contact");
|
||||
org.setId(DataDeliveryIdUtil.getId());
|
||||
org.setLid(org.getId());
|
||||
org.setName(RegistryUtil
|
||||
.getInternationalString("National Weather Service Office: "
|
||||
+ siteIdentifier));
|
||||
+ DataDeliveryIdUtil.getId()));
|
||||
org.setDescription(org.getName());
|
||||
org.setStatus(StatusTypes.APPROVED);
|
||||
org.setObjectType(RegistryObjectTypes.ORGANIZATION);
|
||||
org.setOwner(siteIdentifier);
|
||||
org.setOwner(DataDeliveryIdUtil.getId());
|
||||
TelephoneNumberType phone = new TelephoneNumberType();
|
||||
phone.setAreaCode(sitePhoneAreaCode);
|
||||
phone.setNumber(sitePhoneNumber);
|
||||
|
@ -313,14 +312,6 @@ public class FederationProperties {
|
|||
this.federationReplicationSyncLatency = federationReplicationSyncLatency;
|
||||
}
|
||||
|
||||
public String getSiteIdentifier() {
|
||||
return siteIdentifier;
|
||||
}
|
||||
|
||||
public void setSiteIdentifier(String siteIdentifier) {
|
||||
this.siteIdentifier = siteIdentifier;
|
||||
}
|
||||
|
||||
public String getSiteDescription() {
|
||||
return siteDescription;
|
||||
}
|
||||
|
|
|
@ -109,6 +109,7 @@ import com.raytheon.uf.edex.datadelivery.registry.availability.FederatedRegistry
|
|||
import com.raytheon.uf.edex.datadelivery.registry.replication.NotificationHostConfiguration;
|
||||
import com.raytheon.uf.edex.datadelivery.registry.replication.NotificationServers;
|
||||
import com.raytheon.uf.edex.datadelivery.registry.web.DataDeliveryRESTServices;
|
||||
import com.raytheon.uf.edex.datadelivery.util.DataDeliveryIdUtil;
|
||||
import com.raytheon.uf.edex.registry.ebxml.dao.RegistryDao;
|
||||
import com.raytheon.uf.edex.registry.ebxml.dao.RegistryObjectDao;
|
||||
import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
|
||||
|
@ -157,6 +158,7 @@ import com.raytheon.uf.edex.registry.ebxml.util.EbxmlObjectUtil;
|
|||
* 12/9/2013 2613 bphillip Optimized registry sync function
|
||||
* 1/15/2014 2613 bphillip Added leaveFederation method to prevent inactive registries from participating in the federation unintentionally.
|
||||
* 1/21/2014 2613 bphillip Changed max down time which requires a sync
|
||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||
* </pre>
|
||||
*
|
||||
* @author bphillip
|
||||
|
@ -471,7 +473,7 @@ public class RegistryFederationManager implements RegistryInitializedListener {
|
|||
+ " Federation Membership Association");
|
||||
association.setLid(association.getId());
|
||||
association.setObjectType(RegistryObjectTypes.ASSOCIATION);
|
||||
association.setOwner(federationProperties.getSiteIdentifier());
|
||||
association.setOwner(DataDeliveryIdUtil.getId());
|
||||
association.setType(AssociationTypes.HAS_FEDERATION_MEMBER);
|
||||
association.setStatus(StatusTypes.APPROVED);
|
||||
association.setName(RegistryUtil.getInternationalString(registry
|
||||
|
@ -690,7 +692,7 @@ public class RegistryFederationManager implements RegistryInitializedListener {
|
|||
version.setVersionName("1");
|
||||
version.setUserVersionName("1");
|
||||
sub.setVersionInfo(version);
|
||||
sub.setOwner(federationProperties.getSiteIdentifier());
|
||||
sub.setOwner(DataDeliveryIdUtil.getId());
|
||||
sub.setStatus(StatusTypes.APPROVED);
|
||||
|
||||
sub.setStartTime(EbxmlObjectUtil
|
||||
|
@ -1074,7 +1076,7 @@ public class RegistryFederationManager implements RegistryInitializedListener {
|
|||
.info("Removing remote subscriptions prior to submission of new subscriptions");
|
||||
dataDeliveryRestClient.getRegistryDataAccessService(
|
||||
remoteRegistryBaseURL).removeSubscriptionsForSite(
|
||||
federationProperties.getSiteIdentifier());
|
||||
DataDeliveryIdUtil.getId());
|
||||
statusHandler
|
||||
.info("Generating registry replication subscriptions for registry at ["
|
||||
+ config.getRegistrySiteName()
|
||||
|
@ -1138,8 +1140,7 @@ public class RegistryFederationManager implements RegistryInitializedListener {
|
|||
.getRegistryDataAccessService(
|
||||
remoteRegistryBaseURL)
|
||||
.removeSubscriptionsForSite(
|
||||
federationProperties
|
||||
.getSiteIdentifier());
|
||||
DataDeliveryIdUtil.getId());
|
||||
statusHandler
|
||||
.info("Subscriptions removed from: ["
|
||||
+ remoteRegistryBaseURL + "]");
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<specificationVersion>4.0</specificationVersion>
|
||||
<catalogingLatency>PT0.000S</catalogingLatency>
|
||||
<replicationSyncLatency>PT0.000S</replicationSyncLatency>
|
||||
<siteIdentifier>NCF</siteIdentifier>
|
||||
<siteDescription>AWIPS Network Control Facility</siteDescription>
|
||||
<sitePrimaryContactFirstName>National</sitePrimaryContactFirstName>
|
||||
<sitePrimaryContactMiddleName>Weather</sitePrimaryContactMiddleName>
|
||||
|
|
|
@ -34,3 +34,4 @@ Require-Bundle: com.raytheon.uf.common.auth;bundle-version="1.12.1174",
|
|||
org.geotools;bundle-version="2.6.4",
|
||||
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
|
||||
com.raytheon.edex.common;bundle-version="1.12.1174"
|
||||
Import-Package: com.raytheon.uf.edex.datadelivery.util
|
||||
|
|
|
@ -26,7 +26,6 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.raytheon.edex.site.SiteUtil;
|
||||
import com.raytheon.uf.common.datadelivery.registry.AdhocSubscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.DataType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
|
@ -35,6 +34,7 @@ import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandle
|
|||
import com.raytheon.uf.common.datadelivery.service.subscription.SubscriptionOverlapRequest;
|
||||
import com.raytheon.uf.common.datadelivery.service.subscription.SubscriptionOverlapResponse;
|
||||
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
||||
import com.raytheon.uf.edex.datadelivery.util.DataDeliveryIdUtil;
|
||||
|
||||
/**
|
||||
* Edex handler for subscription overlap requests.
|
||||
|
@ -47,6 +47,7 @@ import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 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.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -63,7 +64,7 @@ public class SubscriptionOverlapHandler implements
|
|||
@Override
|
||||
public Object handleRequest(SubscriptionOverlapRequest request)
|
||||
throws Exception {
|
||||
String siteId = SiteUtil.getSite();
|
||||
String deliveryId = DataDeliveryIdUtil.getId();
|
||||
List<Subscription> subscriptions = request.getSubscriptionList();
|
||||
List<String> duplicateList = new LinkedList<String>();
|
||||
SubscriptionOverlapResponse response = new SubscriptionOverlapResponse();
|
||||
|
@ -89,7 +90,8 @@ public class SubscriptionOverlapHandler implements
|
|||
if (od.isDuplicate()) {
|
||||
// If the subscription is local then it is flagged
|
||||
// as a duplicate, otherwise it is marked as overlap.
|
||||
if (potentialDuplicate.getOfficeIDs().contains(siteId)) {
|
||||
if (potentialDuplicate.getOfficeIDs().contains(
|
||||
deliveryId)) {
|
||||
duplicateList.add(potentialDuplicate.getName());
|
||||
} else {
|
||||
overlappingSubscriptions.add(potentialDuplicate
|
||||
|
|
7
edexOsgi/com.raytheon.uf.edex.datadelivery/.classpath
Normal file
7
edexOsgi/com.raytheon.uf.edex.datadelivery/.classpath
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
28
edexOsgi/com.raytheon.uf.edex.datadelivery/.project
Normal file
28
edexOsgi/com.raytheon.uf.edex.datadelivery/.project
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.raytheon.uf.edex.datadelivery</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,8 @@
|
|||
#Thu Apr 11 12:14:11 CDT 2013
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -0,0 +1,11 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Registry
|
||||
Bundle-SymbolicName: com.raytheon.uf.edex.datadelivery
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Import-Package: com.raytheon.edex.site,
|
||||
com.raytheon.uf.common.site,
|
||||
com.raytheon.uf.common.util
|
||||
Export-Package: com.raytheon.uf.edex.datadelivery.util
|
|
@ -0,0 +1,4 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
1
edexOsgi/com.raytheon.uf.edex.datadelivery/src/.gitignore
vendored
Normal file
1
edexOsgi/com.raytheon.uf.edex.datadelivery/src/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
# Required to keep the empty directory present
|
|
@ -0,0 +1,52 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.edex.datadelivery.util;
|
||||
|
||||
import com.raytheon.uf.common.util.ClusterIdUtil;
|
||||
|
||||
/**
|
||||
* Common Utility class specifically for Data Delivery that currently just
|
||||
* returns the Cluster ID.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 06, 2014 2771 bgonzale Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bgonzale
|
||||
* @version 1.0
|
||||
*/
|
||||
public class DataDeliveryIdUtil {
|
||||
|
||||
/**
|
||||
* Return the Data Delivery ID for this running instance of Data Delivery.
|
||||
*
|
||||
* @return Data Delivery ID.
|
||||
*/
|
||||
public static String getId() {
|
||||
return ClusterIdUtil.getId();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue