Merge "Issue #2992 Updated DD list of active registries Change-Id: Iaef7dc76442d1e101cf9865a542a777afe1722ca" into omaha_14.3.1

Former-commit-id: de9eb60629 [formerly 4e6364a24d5f9354946455218cc394fbda4a11ed]
Former-commit-id: 86ddd480c1
This commit is contained in:
Richard Peter 2014-04-30 17:43:50 -05:00 committed by Gerrit Code Review
commit 6ecb5018b6
51 changed files with 285 additions and 187 deletions

View file

@ -35,8 +35,8 @@ 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.bandwidth.BandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest.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;
@ -47,9 +47,8 @@ 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.registry.ebxml.RegistryUtil;
import com.raytheon.uf.common.serialization.comm.RequestRouter;
import com.raytheon.uf.common.site.SiteData;
import com.raytheon.uf.common.site.SiteMap;
import com.raytheon.uf.common.time.util.TimeUtil;
import com.raytheon.uf.common.util.CollectionUtil;
import com.raytheon.uf.common.util.SizeUtil;
@ -93,6 +92,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* 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.
* Apr 2, 2014 2974 dhladky DD ID added to list for dropdowns in DD.
* Apr 22, 2014 2992 dhladky Unique list of all registries with data in this node.
* </pre>
*
* @author mpduff
@ -849,7 +849,7 @@ public class DataDeliveryUtils {
}
private static String retrieveDataDeliveryId() {
IBandwidthRequest request = new IBandwidthRequest();
BandwidthRequest request = new BandwidthRequest();
request.setRequestType(RequestType.GET_DATADELIVERY_ID);
try {
SuccessfulExecution response = (SuccessfulExecution) RequestRouter
@ -865,16 +865,28 @@ public class DataDeliveryUtils {
* Gets the DD id containing site List.
* @return
*/
@SuppressWarnings("unchecked")
public static List<String> getDataDeliverySiteList() {
Map<String, SiteData> siteData = SiteMap.getInstance().getSiteData();
Set<String> sites = siteData.keySet();
List<String> siteList = new ArrayList<String>(sites);
String DDid = DataDeliveryUtils.getDataDeliveryId();
BandwidthRequest request = new BandwidthRequest();
List<String> siteList = null;
request.setRequestType(RequestType.GET_DATADELIVERY_REGISTRIES);
try {
SuccessfulExecution response = (SuccessfulExecution) RequestRouter
.route(request, DataDeliveryConstants.DATA_DELIVERY_SERVER);
siteList = (List<String>) response.getResponse();
} catch (Exception e) {
throw new RuntimeException(
"Unable to retrieve Data Delivery Registry list from EDEX.", e);
}
// Should return itself, but just in case.
String DDid = getDataDeliveryId();
if (!siteList.contains(DDid)) {
siteList.add(DDid);
Collections.sort(siteList);
}
// remove "NCF", CAVE users don't care about things owned by NCF
siteList.remove(RegistryUtil.defaultUser);
return siteList;
}

View file

@ -0,0 +1,12 @@
# README, DO NOT RUN THIS SCRIPT UNLESS YOU READ THIS!!!!!!!!!!!!!!!
# This update needs to be performed with build 14.3.1.
# This update is only for edex servers which have run DD and have subscriptions loaded.
1.) Backup your subscriptions from the Registry Web Interface,
http://$REGISTRY_HOST:8082/registry/RegistryInterface.html.
hit the <Backup All Subscriptions> button.
2.) Then run this update script, updateSubscriptionOwners.sh
3.) If you are satisfied the subs are correct, either clean up the backup files by running
the deleteBackupSubs.sh or move them to a different directory for storage.
3.) After script runs, hit the <Restore Subscriptions> button
That will update the subscriptions will reflect the correct ownership at the registry level.

View file

@ -0,0 +1,9 @@
#!/bin/bash
#
# Deletes the backuped up subscriptions *.bak files
echo ""
echo "Press Enter to perform the updates Ctrl-C to quit."
read done
rm -rf /awips2/edex/data/registrySubscriptionBackup/*.bak

View file

@ -0,0 +1,28 @@
#!/bin/bash
#
# DO NOT RUN THIS SCRIPT UNLESS YOU READ THIS!!!!!!!!!!!!!!!
# This update needs to be performed with build 14.3.1.
# This update is only for edex servers which have run DD and have subscriptions loaded.
# FIRST! Backup your subscriptions from the Registry Web Interface,
# http://$REGISTRY_HOST:8082/registry/RegistryInterface.html. <Backup All Subscriptions>
# Then run this update script, after script runs, <Restore Subscriptions>
# That will update the subscriptions to reflect the correct ownership at the registry level.
echo ""
echo "Press Enter to perform the updates Ctrl-C to quit."
read done
files=`find /awips2/edex/data/registrySubscriptionBackup -iname \*-RECURRING`
if [[ -z "$files" ]]; then
echo "FATAL: Update Subscriptions has Failed, No subscription backup files found!"
exit 1
fi
for f in $files; do
echo Updating $f
bf=$f.bak.`date +%m%d%y`
cp $f $bf
perl updateSubscriptionOwners.pl $f;
done

View file

@ -28,6 +28,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 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.
* Apr 22, 2014 2992 dhladky This is not an interface, changed to be correct naming.
*
* </pre>
*
@ -35,7 +36,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* @version 1.0
*/
@DynamicSerialize
public class IBandwidthRequest<T extends Time, C extends Coverage> extends AbstractPrivilegedRequest {
public class BandwidthRequest<T extends Time, C extends Coverage> extends AbstractPrivilegedRequest {
public static enum RequestType {
// Get the current retrieval plan for the
@ -48,7 +49,7 @@ public class IBandwidthRequest<T extends Time, C extends Coverage> extends Abstr
/**
* Request information.
*/
GET_ESTIMATED_COMPLETION, GET_BANDWIDTH_GRAPH_DATA, GET_SUBSCRIPTION_STATUS, GET_DATADELIVERY_ID
GET_ESTIMATED_COMPLETION, GET_BANDWIDTH_GRAPH_DATA, GET_SUBSCRIPTION_STATUS, GET_DATADELIVERY_ID, GET_DATADELIVERY_REGISTRIES
}
@DynamicSerializeElement

View file

@ -26,7 +26,7 @@ import java.util.List;
import java.util.Set;
import com.raytheon.uf.common.auth.req.BasePrivilegedServerService;
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest.RequestType;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest.RequestType;
import com.raytheon.uf.common.datadelivery.bandwidth.data.BandwidthGraphData;
import com.raytheon.uf.common.datadelivery.bandwidth.data.SubscriptionStatusSummary;
import com.raytheon.uf.common.datadelivery.registry.AdhocSubscription;
@ -57,6 +57,7 @@ import com.raytheon.uf.common.util.LogUtil;
* Oct 2, 2013 1797 dhladky Generics
* Oct 01, 2013 2267 bgonzale Log error response from proposed scheduling.
* Dec 11, 2013 2625 mpduff Fix error handling to not return null.
* Apr 22, 2014 2992 dhladky renamed BandwidthRequest
*
* </pre>
*
@ -64,7 +65,7 @@ import com.raytheon.uf.common.util.LogUtil;
* @version 1.0
*/
public abstract class BandwidthService<T extends Time, C extends Coverage>
extends BasePrivilegedServerService<IBandwidthRequest<T, C>> implements
extends BasePrivilegedServerService<BandwidthRequest<T, C>> implements
IBandwidthService<T, C> {
private static final IUFStatusHandler statusHandler = UFStatus
@ -84,7 +85,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
*/
@Override
public final int getBandwidthForNetworkInKilobytes(Network network) {
IBandwidthRequest<T, C> request = new IBandwidthRequest<T, C>();
BandwidthRequest<T, C> request = new BandwidthRequest<T, C>();
request.setRequestType(RequestType.GET_BANDWIDTH);
request.setNetwork(network);
@ -105,7 +106,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
@SuppressWarnings("unchecked")
public Set<String> proposeBandwidthForNetworkInKilobytes(Network network,
int bandwidth) {
IBandwidthRequest<T, C> request = new IBandwidthRequest<T, C>();
BandwidthRequest<T, C> request = new BandwidthRequest<T, C>();
request.setRequestType(RequestType.PROPOSE_SET_BANDWIDTH);
request.setNetwork(network);
request.setBandwidth(bandwidth);
@ -126,7 +127,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
@Override
public final boolean setBandwidthForNetworkInKilobytes(Network network,
int bandwidth) {
IBandwidthRequest<T, C> request = new IBandwidthRequest<T, C>();
BandwidthRequest<T, C> request = new BandwidthRequest<T, C>();
request.setRequestType(RequestType.FORCE_SET_BANDWIDTH);
request.setNetwork(network);
request.setBandwidth(bandwidth);
@ -161,7 +162,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
*/
@Override
public Set<String> schedule(List<Subscription<T, C>> subscriptions) {
IBandwidthRequest<T, C> request = new IBandwidthRequest<T, C>();
BandwidthRequest<T, C> request = new BandwidthRequest<T, C>();
request.setRequestType(RequestType.SCHEDULE_SUBSCRIPTION);
request.setSubscriptions(subscriptions);
@ -195,7 +196,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
@Override
public IProposeScheduleResponse proposeSchedule(
List<Subscription<T, C>> subscriptions) {
IBandwidthRequest<T, C> request = new IBandwidthRequest<T, C>();
BandwidthRequest<T, C> request = new BandwidthRequest<T, C>();
request.setRequestType(RequestType.PROPOSE_SCHEDULE_SUBSCRIPTION);
request.setSubscriptions(subscriptions);
@ -217,7 +218,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
*/
@Override
public void reinitialize() {
IBandwidthRequest<T, C> request = new IBandwidthRequest<T, C>();
BandwidthRequest<T, C> request = new BandwidthRequest<T, C>();
request.setRequestType(RequestType.REINITIALIZE);
try {
@ -234,7 +235,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
@SuppressWarnings("unchecked")
@Override
public Date getEstimatedCompletionTime(AdhocSubscription<T, C> sub) {
IBandwidthRequest<T, C> request = new IBandwidthRequest<T, C>();
BandwidthRequest<T, C> request = new BandwidthRequest<T, C>();
request.setSubscriptions(Arrays.<Subscription<T, C>> asList(sub));
request.setRequestType(RequestType.GET_ESTIMATED_COMPLETION);
try {
@ -253,7 +254,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
*/
@Override
public BandwidthGraphData getBandwidthGraphData() {
IBandwidthRequest<T, C> request = new IBandwidthRequest<T, C>();
BandwidthRequest<T, C> request = new BandwidthRequest<T, C>();
request.setRequestType(RequestType.GET_BANDWIDTH_GRAPH_DATA);
try {
return sendRequest(request, BandwidthGraphData.class);
@ -268,7 +269,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
@Override
public SubscriptionStatusSummary getSubscriptionStatusSummary(
Subscription<T, C> subscription) {
IBandwidthRequest<T, C> request = new IBandwidthRequest<T, C>();
BandwidthRequest<T, C> request = new BandwidthRequest<T, C>();
request.setSubscriptions(Arrays
.<Subscription<T, C>> asList(subscription));
request.setRequestType(RequestType.GET_SUBSCRIPTION_STATUS);

View file

@ -54,6 +54,7 @@ import com.raytheon.uf.common.registry.ebxml.slots.SlotConverter;
import com.raytheon.uf.common.registry.ebxml.slots.StringSlotConverter;
import com.raytheon.uf.common.serialization.SerializationException;
import com.raytheon.uf.common.time.util.ImmutableDate;
import com.raytheon.uf.common.util.ClusterIdUtil;
import com.raytheon.uf.common.util.CollectionUtil;
import com.raytheon.uf.common.util.ReflectionException;
import com.raytheon.uf.common.util.ReflectionUtil;
@ -79,7 +80,8 @@ import com.raytheon.uf.common.util.ReflectionUtil;
* Jun 03, 2013 2038 djohnson Allow setting the same encoder strategy.
* Jun 24, 2013 2106 djohnson Remove encoder strategy from instance variables.
* Dec 04, 2013 2584 dhladky Versions for Registry objects
* Mar 31, 2014 2889 dhladky Added username for notification center tracking.
* Mar 31, 2014 2889 dhladky Added username for notification center tracking.
* Apr 24, 2014 2992 dhladky fixed all objects in ebxml owned by NCF, bad.
*
* </pre>
*
@ -99,6 +101,8 @@ public final class RegistryUtil {
public static final String registryObjectDefaultVersion = "1.0";
public static final String registryUser = "Registry";
public static final String defaultUser = "NCF";
static {
if (System.getenv("EBXML_REGISTRY_HOST") != null
@ -113,9 +117,9 @@ public final class RegistryUtil {
public static final String CALLING_REGISTRY_SOAP_HEADER_NAME = "Calling_Registry";
/**
* The default internal owner
* The default internal owner is the local registry ID
*/
public static final String DEFAULT_OWNER = "NCF";
public static final String DEFAULT_OWNER = ClusterIdUtil.getId();
// A private mapping of attribute types to slot types, used when storing an
// object to the registry to map QueryableAttributes to SlotConverters.

View file

@ -17,7 +17,8 @@ Require-Bundle: com.raytheon.uf.common.datadelivery.bandwidth;bundle-version="1.
com.google.guava;bundle-version="1.0.0",
com.raytheon.uf.edex.core;bundle-version="1.12.1174",
com.raytheon.uf.common.registry.ebxml;bundle-version="1.0.0",
com.raytheon.uf.common.datadelivery.service;bundle-version="1.0.0"
com.raytheon.uf.common.datadelivery.service;bundle-version="1.0.0",
com.raytheon.uf.edex.registry.ebxml;bundle-version="1.0.0"
Import-Package: com.raytheon.edex.site,
com.raytheon.uf.common.event,
com.raytheon.uf.edex.datadelivery.util
com.raytheon.uf.common.event

View file

@ -33,6 +33,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.registry.ebxml.util.RegistryIdUtil;
/**
* {@link IEdexBandwidthManagerCreator} A bandwidth manager creator for
@ -53,6 +54,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.
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
*
* </pre>
*
@ -85,12 +87,13 @@ public class MonolithicBandwidthManagerCreator<T extends Time, C extends Coverag
IBandwidthDao<T, C> bandwidthDao,
RetrievalManager retrievalManager,
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
RegistryIdUtil idUtil,
IDataSetMetaDataHandler dataSetMetaDataHandler,
ISubscriptionHandler subscriptionHandler,
IAdhocSubscriptionHandler adhocSubscriptionHandler,
ISubscriptionNotificationService subscriptionNotificationService,
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil,
dataSetMetaDataHandler, subscriptionHandler,
adhocSubscriptionHandler, subscriptionNotificationService,
findSubscriptionsStrategy);
@ -110,13 +113,14 @@ public class MonolithicBandwidthManagerCreator<T extends Time, C extends Coverag
public IBandwidthManager<T, C> getBandwidthManager(IBandwidthDbInit dbInit,
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
BandwidthDaoUtil bandwidthDaoUtil,
RegistryIdUtil idUtil,
IDataSetMetaDataHandler dataSetMetaDataHandler,
ISubscriptionHandler subscriptionHandler,
IAdhocSubscriptionHandler adhocSubscriptionHandler,
ISubscriptionNotificationService subscriptionNotificationService,
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
return new MonolithicBandwidthManager(dbInit, bandwidthDao,
retrievalManager, bandwidthDaoUtil, dataSetMetaDataHandler,
retrievalManager, bandwidthDaoUtil, idUtil, dataSetMetaDataHandler,
subscriptionHandler, adhocSubscriptionHandler,
subscriptionNotificationService, findSubscriptionsStrategy);
}

View file

@ -44,6 +44,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.registry.ebxml.util.RegistryIdUtil;
/**
* {@link IEdexBandwidthManagerCreator} for an NCF bandwidth manager.
@ -65,6 +66,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
* Reschedule updated shared subscriptions.
* Dec 04, 2013 2566 bgonzale use bandwidthmanager method to retrieve spring files.
* Jan 14, 2014 2692 dhladky AdhocSubscription handler
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
*
* </pre>
*
@ -97,12 +99,13 @@ public class NcfBandwidthManagerCreator<T extends Time, C extends Coverage>
IBandwidthDao<T, C> bandwidthDao,
RetrievalManager retrievalManager,
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
RegistryIdUtil idUtil,
IDataSetMetaDataHandler dataSetMetaDataHandler,
ISubscriptionHandler subscriptionHandler,
IAdhocSubscriptionHandler adhocSubscriptionHandler,
ISubscriptionNotificationService subscriptionNotificationService,
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil,
dataSetMetaDataHandler, subscriptionHandler,
adhocSubscriptionHandler, subscriptionNotificationService,
findSubscriptionsStrategy);
@ -160,13 +163,14 @@ public class NcfBandwidthManagerCreator<T extends Time, C extends Coverage>
public IBandwidthManager<T, C> getBandwidthManager(IBandwidthDbInit dbInit,
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
BandwidthDaoUtil bandwidthDaoUtil,
RegistryIdUtil idUtil,
IDataSetMetaDataHandler dataSetMetaDataHandler,
ISubscriptionHandler subscriptionHandler,
IAdhocSubscriptionHandler adhocSubscriptionHandler,
ISubscriptionNotificationService subscriptionNotificationService,
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
return new NcfBandwidthManager(dbInit, bandwidthDao, retrievalManager,
bandwidthDaoUtil, dataSetMetaDataHandler, subscriptionHandler,
bandwidthDaoUtil, idUtil, dataSetMetaDataHandler, subscriptionHandler,
adhocSubscriptionHandler, subscriptionNotificationService,
findSubscriptionsStrategy);
}

View file

@ -29,7 +29,7 @@ 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;
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
/**
* The SBN simulator. Reads files from a configured directory, and then places
@ -103,7 +103,7 @@ public class SbnSimulator {
*/
public SbnSimulator() {
this(new File(System.getProperty("sbn.retrieval.transfer.directory")),
new CopyFileToManualIngest(), DataDeliveryIdUtil.getId());
new CopyFileToManualIngest(), RegistryIdUtil.getId());
}
/**

View file

@ -45,5 +45,4 @@ 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.edex.datadelivery.util
com.raytheon.uf.common.stats

View file

@ -31,7 +31,7 @@
<bean id="bandwidthMapConfigFile" factory-bean="bandwidthContextFactory"
factory-method="getBandwidthMapConfigFile" />
<bean id="bandwidthManager" factory-bean="bandwidthContextFactory"
factory-method="getBandwidthManager" depends-on="bandwidthUtil"
init-method="init">
@ -39,10 +39,11 @@
<constructor-arg ref="bandwidthDao" />
<constructor-arg ref="retrievalManager" />
<constructor-arg ref="bandwidthDaoUtil" />
<constructor-arg ref="registryIdUtil" />
<property name="aggregator" ref="aggregator" />
<property name="initializer" ref="bandwidthInitializer" />
</bean>
<bean id="bandwidthUtil"
class="com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil"
factory-method="getInstance" depends-on="registerDataDeliveryHandlers">

View file

@ -7,7 +7,7 @@
<bean factory-bean="bandwidthHandlerRegistry" factory-method="register">
<constructor-arg
value="com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest" />
value="com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest" />
<constructor-arg ref="bandwidthManager" />
</bean>

View file

@ -22,8 +22,8 @@ import com.google.common.collect.Sets;
import com.raytheon.edex.util.Util;
import com.raytheon.uf.common.auth.exception.AuthorizationException;
import com.raytheon.uf.common.auth.user.IUser;
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest.RequestType;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest.RequestType;
import com.raytheon.uf.common.datadelivery.bandwidth.IProposeScheduleResponse;
import com.raytheon.uf.common.datadelivery.bandwidth.ProposeScheduleResponse;
import com.raytheon.uf.common.datadelivery.bandwidth.data.BandwidthGraphData;
@ -80,8 +80,8 @@ 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;
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
/**
* Abstract {@link IBandwidthManager} implementation which provides core
@ -148,6 +148,7 @@ import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
* Feb 11, 2014 2771 bgonzale Added handler for GET_DATADELIVERY_ID request.
* Feb 10, 2014 2636 mpduff Changed how retrieval plan is updated over time.
* Apr 02, 2014 2810 dhladky Priority sorting of subscriptions.
* Apr 22, 2014 2992 dhladky Ability to get list of all registry nodes containing data.
*
* </pre>
*
@ -155,13 +156,16 @@ import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
* @version 1.0
*/
public abstract class BandwidthManager<T extends Time, C extends Coverage>
extends AbstractPrivilegedRequestHandler<IBandwidthRequest<T, C>>
extends AbstractPrivilegedRequestHandler<BandwidthRequest<T, C>>
implements IBandwidthManager<T, C> {
protected static final IUFStatusHandler statusHandler = UFStatus
.getHandler(BandwidthManager.class);
private static final Pattern RES_PATTERN = Pattern.compile("^res");
/** used to query for registry subscription object owners **/
private static final String objectType = "'urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:com.raytheon.uf.common.datadelivery.registry.%Subscription'";
// Requires package access so it can be accessed from the maintenance task
final IBandwidthDao<T, C> bandwidthDao;
@ -173,6 +177,8 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
protected final BandwidthDaoUtil<T, C> bandwidthDaoUtil;
private final IBandwidthDbInit dbInit;
private final RegistryIdUtil idUtil;
// Instance variable and not static, because there are multiple child
// implementation classes which should each have a unique prefix
@ -185,11 +191,13 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
public BandwidthManager(IBandwidthDbInit dbInit,
IBandwidthDao<T, C> bandwidthDao,
RetrievalManager retrievalManager,
BandwidthDaoUtil<T, C> bandwidthDaoUtil) {
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
RegistryIdUtil idUtil) {
this.dbInit = dbInit;
this.bandwidthDao = bandwidthDao;
this.retrievalManager = retrievalManager;
this.bandwidthDaoUtil = bandwidthDaoUtil;
this.idUtil = idUtil;
}
/**
@ -878,7 +886,7 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
* {@inheritDoc}
*/
@Override
public Object handleRequest(IBandwidthRequest<T, C> request)
public Object handleRequest(BandwidthRequest<T, C> request)
throws Exception {
ITimer timer = TimeUtil.getTimer();
@ -982,7 +990,10 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
response = getBandwidthGraphData();
break;
case GET_DATADELIVERY_ID:
response = DataDeliveryIdUtil.getId();
response = RegistryIdUtil.getId();
break;
case GET_DATADELIVERY_REGISTRIES:
response = idUtil.getUniqueRegistries(objectType);
break;
case GET_SUBSCRIPTION_STATUS:
Subscription<T, C> sub = null;
@ -1440,7 +1451,7 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
*/
@Override
public AuthorizationResponse authorized(IUser user,
IBandwidthRequest request) throws AuthorizationException {
BandwidthRequest request) throws AuthorizationException {
return new AuthorizationResponse(true);
}

View file

@ -41,6 +41,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.hibernate.IFindSubscriptionsF
import com.raytheon.uf.edex.datadelivery.bandwidth.interfaces.BandwidthInitializer;
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
/**
* {@link BandwidthContextFactory} for running in EDEX. Intentionally
@ -59,6 +60,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
* Nov 07, 2013 2506 bgonzale Added notification handler to bandwidth context.
* Jan 14, 2014 2692 dhladky AdhocSubscription handler
* Jan 30, 2014 2636 mpduff Scheduling refactor.
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
*
* </pre>
*
@ -81,6 +83,7 @@ public class EdexBandwidthContextFactory<T extends Time, C extends Coverage>
* @param bandwidthDao
* @param retrievalManager
* @param bandwidthDaoUtil
* @param idUtil
* @param dataSetMetaDataHandler
* @param subscriptionHandler
* @return the bandwidth manager
@ -89,6 +92,7 @@ public class EdexBandwidthContextFactory<T extends Time, C extends Coverage>
IBandwidthDao<T, C> bandwidthDao,
RetrievalManager retrievalManager,
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
RegistryIdUtil idUtil,
IDataSetMetaDataHandler dataSetMetaDataHandler,
ISubscriptionHandler subscriptionHandler,
IAdhocSubscriptionHandler adhocSubscriptionHandler,
@ -253,9 +257,9 @@ public class EdexBandwidthContextFactory<T extends Time, C extends Coverage>
@Override
public IBandwidthManager<T, C> getBandwidthManager(IBandwidthDbInit dbInit,
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
BandwidthDaoUtil bandwidthDaoUtil) {
BandwidthDaoUtil bandwidthDaoUtil,RegistryIdUtil idUtil) {
return bandwidthManagerCreator.getBandwidthManager(dbInit,
bandwidthDao, retrievalManager, bandwidthDaoUtil,
bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil,
dataSetMetaDataHandler, subscriptionHandler,
adhocSubscriptionHandler, notificationService,
findSubscriptionsStrategy);

View file

@ -40,8 +40,8 @@ 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.uf.common.datadelivery.bandwidth.IBandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest.RequestType;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest.RequestType;
import com.raytheon.uf.common.datadelivery.bandwidth.ProposeScheduleResponse;
import com.raytheon.uf.common.datadelivery.registry.AdhocSubscription;
import com.raytheon.uf.common.datadelivery.registry.Coverage;
@ -87,7 +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;
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
/**
* Implementation of {@link BandwidthManager} that isolates EDEX specific
@ -128,6 +128,7 @@ import com.raytheon.uf.edex.datadelivery.util.DataDeliveryIdUtil;
* Feb 10, 2014 2636 mpduff Pass Network map to be scheduled.
* Feb 21, 2014, 2636 dhladky Try catch to keep MaintTask from dying.
* Mar 31, 2014 2889 dhladky Added username for notification center tracking.
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
* </pre>
*
* @author djohnson
@ -177,12 +178,13 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
IBandwidthDao<T, C> bandwidthDao,
RetrievalManager retrievalManager,
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
RegistryIdUtil idUtil,
IDataSetMetaDataHandler dataSetMetaDataHandler,
ISubscriptionHandler subscriptionHandler,
IAdhocSubscriptionHandler adhocSubscriptionHandler,
ISubscriptionNotificationService subscriptionNotificationService,
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil);
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil);
this.dataSetMetaDataHandler = dataSetMetaDataHandler;
this.subscriptionHandler = subscriptionHandler;
@ -401,7 +403,7 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
if (DataDeliveryRegistryObjectTypes.isRecurringSubscription(objectType)) {
if (sub != null) {
boolean isApplicableForTheLocalSite = sub.getOfficeIDs()
.contains(DataDeliveryIdUtil.getId());
.contains(RegistryIdUtil.getId());
if (isApplicableForTheLocalSite) {
switch (event.getAction()) {
case UPDATE:
@ -798,7 +800,7 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
* reinitialize operation.
*/
private void bandwidthMapConfigurationUpdated() {
IBandwidthRequest<T, C> request = new IBandwidthRequest<T, C>();
BandwidthRequest<T, C> request = new BandwidthRequest<T, C>();
request.setRequestType(RequestType.REINITIALIZE);
try {

View file

@ -33,6 +33,7 @@ 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.bandwidth.util.BandwidthDaoUtil;
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
/**
* Implementation of {@link BandwidthContextFactory} that returns DAO classes
@ -47,6 +48,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
* ------------ ---------- ----------- --------------------------
* Oct 24, 2012 1286 djohnson Initial creation
* Jun 24, 2013 2106 djohnson Add {@link #getBandwidthBucketDao()}.
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
*
* </pre>
*
@ -123,9 +125,9 @@ class InMemoryBandwidthContextFactory implements BandwidthContextFactory {
@Override
public IBandwidthManager getBandwidthManager(IBandwidthDbInit dbInit,
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
BandwidthDaoUtil bandwidthDaoUtil) {
BandwidthDaoUtil bandwidthDaoUtil, RegistryIdUtil idUtil) {
return new InMemoryBandwidthManager(dbInit, bandwidthDao,
retrievalManager, bandwidthDaoUtil);
retrievalManager, bandwidthDaoUtil, idUtil);
}
/**

View file

@ -38,6 +38,7 @@ 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.bandwidth.util.BandwidthDaoUtil;
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
/**
* An in-memory {@link IBandwidthManager} that does not communicate with an
@ -59,6 +60,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
* Dec 04, 2013 2566 bgonzale use bandwidthmanager method to retrieve spring files.
* Feb 06, 2014 2636 bgonzale added initializeScheduling method.
* Feb 12, 2014 2636 mpduff Override getSubscriptionsToSchedule
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
*
* </pre>
*
@ -122,11 +124,12 @@ class InMemoryBandwidthManager<T extends Time, C extends Coverage> extends
* @param bandwidthDao
* @param retrievalManager
* @param bandwidthDaoUtil
* @param IdUtil
*/
public InMemoryBandwidthManager(IBandwidthDbInit dbInit,
IBandwidthDao<T, C> bandwidthDao,
RetrievalManager retrievalManager, BandwidthDaoUtil bandwidthDaoUtil) {
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil);
RetrievalManager retrievalManager, BandwidthDaoUtil bandwidthDaoUtil, RegistryIdUtil idUtil) {
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil);
}
/**

View file

@ -43,7 +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;
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
/**
* {@link IEdexBandwidthManagerCreator} for a WFO bandwidth manager.
@ -70,6 +70,7 @@ import com.raytheon.uf.edex.datadelivery.util.DataDeliveryIdUtil;
* 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.
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
*
* </pre>
*
@ -99,6 +100,7 @@ public class WfoBandwidthManagerCreator<T extends Time, C extends Coverage>
* @param bandwidthDao
* @param retrievalManager
* @param bandwidthDaoUtil
* @param idUtil
* @param dataSetMetaDataHandler
* @param subscriptionHandler
* @param adhocSubscriptionHandler
@ -110,12 +112,13 @@ public class WfoBandwidthManagerCreator<T extends Time, C extends Coverage>
IBandwidthDao bandwidthDao,
RetrievalManager retrievalManager,
BandwidthDaoUtil bandwidthDaoUtil,
RegistryIdUtil idUtil,
IDataSetMetaDataHandler dataSetMetaDataHandler,
ISubscriptionHandler subscriptionHandler,
IAdhocSubscriptionHandler adhocSubscriptionHandler,
ISubscriptionNotificationService subscriptionNotificationService,
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil,
dataSetMetaDataHandler, subscriptionHandler,
adhocSubscriptionHandler, subscriptionNotificationService,
findSubscriptionsStrategy);
@ -137,7 +140,7 @@ public class WfoBandwidthManagerCreator<T extends Time, C extends Coverage>
Subscription<T, C> subscription = getRegistryObjectById(
getSubscriptionHandler(), event.getId());
boolean isLocalOrigination = subscription.getOriginatingSite()
.equals(DataDeliveryIdUtil.getId());
.equals(RegistryIdUtil.getId());
if (isLocalOrigination) {
subscriptionUpdated(subscription);
@ -204,13 +207,14 @@ public class WfoBandwidthManagerCreator<T extends Time, C extends Coverage>
public IBandwidthManager<T, C> getBandwidthManager(IBandwidthDbInit dbInit,
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
BandwidthDaoUtil bandwidthDaoUtil,
RegistryIdUtil idUtil,
IDataSetMetaDataHandler dataSetMetaDataHandler,
ISubscriptionHandler subscriptionHandler,
IAdhocSubscriptionHandler adhocSubscriptionHandler,
ISubscriptionNotificationService subscriptionNotificationService,
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
return new WfoBandwidthManager<T, C>(dbInit, bandwidthDao,
retrievalManager, bandwidthDaoUtil, dataSetMetaDataHandler,
retrievalManager, bandwidthDaoUtil, idUtil, dataSetMetaDataHandler,
subscriptionHandler, adhocSubscriptionHandler,
subscriptionNotificationService, findSubscriptionsStrategy);
}

View file

@ -28,6 +28,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.hibernate.HibernateBandwidthD
import com.raytheon.uf.edex.datadelivery.bandwidth.interfaces.BandwidthInitializer;
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
/**
* Factory used to produce contextual differences in the
@ -44,6 +45,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
* ------------ ---------- ----------- --------------------------
* Oct 24, 2012 1286 djohnson Initial creation
* Jun 24, 2013 2106 djohnson Add {@link #getBandwidthBucketDao()}.
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
*
* </pre>
*
@ -98,9 +100,10 @@ public interface BandwidthContextFactory {
* the retrieval manager
* @param bandwidthDaoUtil
* the dao util instance
* @param RegistryIdUtil finds DD server nodes
* @return the {@link BandwidthManager} reference
*/
IBandwidthManager getBandwidthManager(IBandwidthDbInit dbInit,
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
BandwidthDaoUtil bandwidthDaoUtil);
BandwidthDaoUtil bandwidthDaoUtil, RegistryIdUtil idUtil);
}

View file

@ -23,7 +23,7 @@ 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;
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
/**
* {@link IRegistryObjectHandler} implementation for {@link SiteSubscription}.
@ -52,7 +52,7 @@ public class LocalSiteSubscriptionHandler extends SiteSubscriptionHandler {
* Default Constructor.
*/
public LocalSiteSubscriptionHandler() {
this(DataDeliveryIdUtil.getId());
this(RegistryIdUtil.getId());
}
/**

View file

@ -13,7 +13,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;
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
/**
*
@ -60,7 +60,7 @@ public class HibernateBandwidthInitializer implements BandwidthInitializer {
*/
public HibernateBandwidthInitializer(
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
this(findSubscriptionsStrategy, DataDeliveryIdUtil.getId());
this(findSubscriptionsStrategy, RegistryIdUtil.getId());
}
/**

View file

@ -88,13 +88,6 @@
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"

View file

@ -27,4 +27,3 @@ 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

View file

@ -38,7 +38,7 @@ import com.raytheon.uf.common.registry.constants.AssociationTypes;
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;
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
/**
*
@ -187,14 +187,14 @@ public class FederationProperties {
*/
public RegistryType createRegistryObject() {
RegistryType registryObj = new RegistryType();
registryObj.setId(DataDeliveryIdUtil.getId() + REGISTRY_SUFFIX);
registryObj.setId(RegistryIdUtil.getId() + REGISTRY_SUFFIX);
registryObj.setLid(registryObj.getId());
registryObj.setName(RegistryUtil
.getInternationalString(DataDeliveryIdUtil.getId()
.getInternationalString(RegistryIdUtil.getId()
+ " Registry Specification"));
registryObj.setObjectType(RegistryObjectTypes.REGISTRY);
registryObj.setDescription(registryObj.getName());
registryObj.setOwner(DataDeliveryIdUtil.getId());
registryObj.setOwner(RegistryIdUtil.getId());
registryObj.setStatus(StatusTypes.APPROVED);
registryObj.setCatalogingLatency(catalogingLatency);
registryObj.setConformanceProfile(conformanceProfile);
@ -218,13 +218,13 @@ public class FederationProperties {
phone.setNumber(sitePrimaryContactPhoneNumber);
PersonType person = new PersonType();
person.setId(DataDeliveryIdUtil.getId() + " Primary Contact");
person.setId(RegistryIdUtil.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(DataDeliveryIdUtil.getId());
person.setOwner(RegistryIdUtil.getId());
PersonNameType personName = new PersonNameType();
personName.setFirstName(sitePrimaryContactFirstName);
personName.setMiddleName(sitePrimaryContactMiddleName);
@ -243,16 +243,16 @@ public class FederationProperties {
*/
public OrganizationType createOrganization() {
OrganizationType org = new OrganizationType();
org.setPrimaryContact(DataDeliveryIdUtil.getId() + " Primary Contact");
org.setId(DataDeliveryIdUtil.getId());
org.setPrimaryContact(RegistryIdUtil.getId() + " Primary Contact");
org.setId(RegistryIdUtil.getId());
org.setLid(org.getId());
org.setName(RegistryUtil
.getInternationalString("National Weather Service Office: "
+ DataDeliveryIdUtil.getId()));
+ RegistryIdUtil.getId()));
org.setDescription(org.getName());
org.setStatus(StatusTypes.APPROVED);
org.setObjectType(RegistryObjectTypes.ORGANIZATION);
org.setOwner(DataDeliveryIdUtil.getId());
org.setOwner(RegistryIdUtil.getId());
TelephoneNumberType phone = new TelephoneNumberType();
phone.setAreaCode(sitePhoneAreaCode);
phone.setNumber(sitePhoneNumber);
@ -285,7 +285,7 @@ public class FederationProperties {
+ " Federation Membership Association");
association.setLid(association.getId());
association.setObjectType(RegistryObjectTypes.ASSOCIATION);
association.setOwner(DataDeliveryIdUtil.getId());
association.setOwner(RegistryIdUtil.getId());
association.setType(AssociationTypes.HAS_FEDERATION_MEMBER);
association.setStatus(StatusTypes.APPROVED);
association.setName(RegistryUtil.getInternationalString(registry

View file

@ -99,7 +99,6 @@ import com.raytheon.uf.edex.datadelivery.registry.availability.FederatedRegistry
import com.raytheon.uf.edex.datadelivery.registry.dao.ReplicationEventDao;
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.DbInit;
import com.raytheon.uf.edex.registry.ebxml.dao.RegistryDao;
import com.raytheon.uf.edex.registry.ebxml.dao.RegistryObjectDao;
@ -107,6 +106,7 @@ import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
import com.raytheon.uf.edex.registry.ebxml.init.RegistryInitializedListener;
import com.raytheon.uf.edex.registry.ebxml.services.query.QueryConstants;
import com.raytheon.uf.edex.registry.ebxml.services.query.RegistryQueryUtil;
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
import com.raytheon.uf.edex.registry.ebxml.util.EbxmlObjectUtil;
import com.raytheon.uf.edex.registry.events.CreateAuditTrailEvent;
@ -411,7 +411,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
submitObjectsRequest
.getSlot()
.add(new SlotType(EbxmlObjectUtil.EVENT_SOURCE_SLOT,
new StringValueType(DataDeliveryIdUtil.getId())));
new StringValueType(RegistryIdUtil.getId())));
try {
statusHandler
.info("Submitting federation registration objects to local registry...");
@ -687,7 +687,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
@GET
@Path("dataDeliveryId")
public String dataDeliveryId() {
return DataDeliveryIdUtil.getId();
return RegistryIdUtil.getId();
}
@GET
@ -747,7 +747,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
+ registry.getId() + "]", e);
continue;
}
if (remoteReplicatingTo.contains(DataDeliveryIdUtil.getId())) {
if (remoteReplicatingTo.contains(RegistryIdUtil.getId())) {
registrySet.add(registry.getId().replace(
FederationProperties.REGISTRY_SUFFIX, ""));
}
@ -765,7 +765,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
RegistryType remoteRegistry = getRegistry(registryId);
dataDeliveryRestClient.getRegistryFederationManager(
remoteRegistry.getBaseURL()).addReplicationServer(
DataDeliveryIdUtil.getId());
RegistryIdUtil.getId());
statusHandler.info("Established replication with [" + registryId + "]");
}
@ -779,7 +779,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
RegistryType remoteRegistry = getRegistry(registryId);
dataDeliveryRestClient.getRegistryFederationManager(
remoteRegistry.getBaseURL()).removeReplicationServer(
DataDeliveryIdUtil.getId());
RegistryIdUtil.getId());
statusHandler
.info("Disconnected replication with [" + registryId + "]");
}
@ -1044,7 +1044,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
request.setUsername(RegistryUtil.registryUser);
request.getSlot().add(
new SlotType(EbxmlObjectUtil.EVENT_SOURCE_SLOT,
new StringValueType(DataDeliveryIdUtil
new StringValueType(RegistryIdUtil
.getId())));
try {
if (!request.getRegistryObjects().isEmpty()) {
@ -1068,7 +1068,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
refList, false, true, DeletionScope.DELETE_ALL);
request.getSlot().add(
new SlotType(EbxmlObjectUtil.EVENT_SOURCE_SLOT,
new StringValueType(DataDeliveryIdUtil
new StringValueType(RegistryIdUtil
.getId())));
try {
if (!refList.getObjectRef().isEmpty()) {
@ -1145,7 +1145,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
String replicatingTo = dataDeliveryRestClient
.getRegistryFederationManager(remoteRegistry.getBaseURL())
.getReplicatingTo();
if (replicatingTo.contains(DataDeliveryIdUtil.getId())) {
if (replicatingTo.contains(RegistryIdUtil.getId())) {
statusHandler.info("Successfully verified replication with ["
+ registryId + "]");
} else {

View file

@ -34,4 +34,3 @@ 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

View file

@ -34,7 +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;
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
/**
* Edex handler for subscription overlap requests.
@ -64,7 +64,7 @@ public class SubscriptionOverlapHandler implements
@Override
public Object handleRequest(SubscriptionOverlapRequest request)
throws Exception {
String deliveryId = DataDeliveryIdUtil.getId();
String deliveryId = RegistryIdUtil.getId();
List<Subscription> subscriptions = request.getSubscriptionList();
List<String> duplicateList = new LinkedList<String>();
SubscriptionOverlapResponse response = new SubscriptionOverlapResponse();

View file

@ -1,7 +0,0 @@
<?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>

View file

@ -1,28 +0,0 @@
<?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>

View file

@ -1,8 +0,0 @@
#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

View file

@ -1,11 +0,0 @@
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

View file

@ -1,4 +0,0 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -1 +0,0 @@
# Required to keep the empty directory present

View file

@ -56,5 +56,12 @@
</bean>
<bean id="registryNamespaceMapper" class="com.raytheon.uf.common.registry.RegistryNamespaceMapper"/>
<!-- Util to get the IDS of the Registry server nodes -->
<bean id="registryIdUtil"
class="com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil">
<constructor-arg ref="registryObjectDao" />
</bean>
</beans>

View file

@ -35,7 +35,7 @@ import org.springframework.transaction.annotation.Transactional;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 5/21/2013 2022 bphillip Initial implementation
* </pre>
* </pre>
*
* @author bphillip
* @version 1

View file

@ -45,6 +45,7 @@ import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
* 8/1/2013 1693 bphillip Added methods to facilitate implementation of the lifecyclemanager according to the 4.0 spec
* 2/13/2014 2769 bphillip Added read only flags to query methods
* 4/11/2014 3011 bphillip Changed merge to not delete unused slots
* 4/21/2014 2992 dhladky General list of Registry server nodes.
*
* </pre>
*
@ -57,6 +58,9 @@ public class RegistryObjectDao extends
/** Delete object type parameterized statement */
private static final String GET_IDS_BY_OBJECT_TYPE = "SELECT regObj.id FROM RegistryObjectType regObj WHERE regObj.objectType=:objectType";
/** Get the unique list of registry nodes with subscriptions **/
private static final String QUERY_UNIQUE_REGISTRIES = "SELECT DISTINCT regObj.owner FROM RegistryObjectType regObj WHERE regObj.objectType LIKE ";
/** Query to determine if an object id exists in the registry */
private static final String ID_EXISTS_QUERY = "select count(obj.id) from RegistryObjectType obj where id=:id";
@ -66,6 +70,8 @@ public class RegistryObjectDao extends
/** Query to get all sub versions beneath the given version */
private static String GET_SUB_VERSION_QUERY = "select obj.versionInfo.versionName from RegistryObjectType obj where obj.lid=:lid and obj.versionInfo.versionName like :version";
private SlotTypeDao slotDao;
/**
* Creates a new RegistryObjectDao
*/
@ -191,4 +197,18 @@ public class RegistryObjectDao extends
return RegistryObjectType.class;
}
public void setSlotDao(SlotTypeDao slotDao) {
this.slotDao = slotDao;
}
/**
* Gets a list of unique registry ID's with data on this node for this objectType.
* @param objectType
* @return
*/
@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
public List<String> getUniqueRegistries(String objectType) {
return this.executeHQLQuery(QUERY_UNIQUE_REGISTRIES+" "+objectType);
}
}

View file

@ -17,12 +17,15 @@
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.datadelivery.util;
package com.raytheon.uf.edex.registry.ebxml.util;
import java.util.List;
import com.raytheon.uf.common.util.ClusterIdUtil;
import com.raytheon.uf.edex.registry.ebxml.dao.RegistryObjectDao;
/**
* Common Utility class specifically for Data Delivery that currently just
* Common Utility class specifically for Registry that currently just
* returns the Cluster ID.
*
* <pre>
@ -32,21 +35,43 @@ import com.raytheon.uf.common.util.ClusterIdUtil;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 06, 2014 2771 bgonzale Initial creation
* Apr 23, 2014 2992 dhladky General way to get all registries.
*
* </pre>
*
* @author bgonzale
* @version 1.0
*/
public class DataDeliveryIdUtil {
public class RegistryIdUtil {
// connection to the registry DAO object
private RegistryObjectDao rdo;
// public constructor
public RegistryIdUtil() {
}
// public spring constructor
public RegistryIdUtil(RegistryObjectDao rdo) {
this.rdo = rdo;
}
/**
* Return the Data Delivery ID for this running instance of Data Delivery.
* Return the Registry ID for this running instance of Registry.
*
* @return Data Delivery ID.
* @return Registry ID.
*/
public static String getId() {
return ClusterIdUtil.getId();
}
/**
* Gets the list of unique registry nodes that have data in this node.
* @return
*/
public List<String> getUniqueRegistries(String objectType) {
return rdo.getUniqueRegistries(objectType);
}
}

View file

@ -162,5 +162,6 @@
<classpathentry kind="lib" path="lib/jetty-security-7.6.14.v20131031.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.raytheon.edex.plugin.taf"/>
<classpathentry combineaccessrules="false" kind="src" path="/com.raytheon.uf.common.dataplugin.redbook"/>
<classpathentry kind="src" path="/com.raytheon.uf.edex.datadelivery"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -31,6 +31,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;
/**
* A WFO {@link IBandwidthManager} that runs as an integration test, outside of
@ -76,12 +77,13 @@ public class IntegrationTestWfoBandwidthManager extends WfoBandwidthManager {
public IntegrationTestWfoBandwidthManager(IBandwidthDbInit dbInit,
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
BandwidthDaoUtil bandwidthDaoUtil,
DataDeliveryIdUtil idUtil,
IDataSetMetaDataHandler dataSetMetaDataHandler,
ISubscriptionHandler subscriptionHandler,
IAdhocSubscriptionHandler adhocSubscriptionHandler,
ISubscriptionNotificationService subscriptionNotificationService,
IFindSubscriptionsForScheduling findSubscriptionStrategy) {
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil,
dataSetMetaDataHandler, subscriptionHandler,
adhocSubscriptionHandler, subscriptionNotificationService,
findSubscriptionStrategy);

View file

@ -29,6 +29,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;
/**
* Creates {@link IntegrationTestWfoBandwidthManager} instances.
@ -60,13 +61,14 @@ public class IntegrationTestWfoBandwidthManagerCreator implements
public IBandwidthManager getBandwidthManager(IBandwidthDbInit dbInit,
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
BandwidthDaoUtil bandwidthDaoUtil,
DataDeliveryIdUtil idUtil,
IDataSetMetaDataHandler dataSetMetaDataHandler,
ISubscriptionHandler subscriptionHandler,
IAdhocSubscriptionHandler adhocSubscriptionHandler,
ISubscriptionNotificationService subscriptionNotificationService,
IFindSubscriptionsForScheduling findSubscriptionStrategy) {
return new IntegrationTestWfoBandwidthManager(dbInit, bandwidthDao,
retrievalManager, bandwidthDaoUtil, dataSetMetaDataHandler,
retrievalManager, bandwidthDaoUtil, idUtil, dataSetMetaDataHandler,
subscriptionHandler, adhocSubscriptionHandler,
subscriptionNotificationService, findSubscriptionStrategy);
}

View file

@ -21,8 +21,8 @@ package com.raytheon.uf.edex.datadelivery.bandwidth;
import org.junit.Test;
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest.RequestType;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest.RequestType;
import com.raytheon.uf.common.datadelivery.registry.Network;
import com.raytheon.uf.common.datadelivery.registry.Subscription;
@ -80,7 +80,7 @@ public class WfoBandwidthManagerIntTest extends
@Test
public void testReinitializeUsesCorrectSpringFiles() throws Exception {
final IBandwidthRequest request = new IBandwidthRequest();
final BandwidthRequest request = new BandwidthRequest();
request.setRequestType(RequestType.REINITIALIZE);
bandwidthManager.handleRequest(request);

View file

@ -31,8 +31,8 @@ import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest.RequestType;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest.RequestType;
import com.raytheon.uf.common.datadelivery.registry.Network;
import com.raytheon.uf.common.datadelivery.registry.Subscription;
import com.raytheon.uf.common.datadelivery.request.DataDeliveryConstants;
@ -101,7 +101,7 @@ public class WfoNcfBandwidthManagerIntTest extends
public Object route(IServerRequest request)
throws Exception {
return ncfBandwidthManager
.handleRequest((IBandwidthRequest) request);
.handleRequest((BandwidthRequest) request);
}
});
} catch (RegistryException e) {
@ -217,7 +217,7 @@ public class WfoNcfBandwidthManagerIntTest extends
*/
private void scheduleSbnSubscription(Subscription subscription,
RequestType requestType) throws Exception {
IBandwidthRequest request = new IBandwidthRequest();
BandwidthRequest request = new BandwidthRequest();
request.setRequestType(requestType);
request.setNetwork(subscription.getRoute());
request.setSubscriptions(Arrays.asList(subscription));

View file

@ -32,6 +32,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.hibernate.IFindSubscriptionsF
import com.raytheon.uf.edex.datadelivery.bandwidth.ncf.NcfBandwidthManagerCreator.NcfBandwidthManager;
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;
/**
* An NCF {@link IBandwidthManager} that runs as an integration test, outside of
@ -76,12 +77,13 @@ public class IntegrationTestNcfBandwidthManager extends NcfBandwidthManager {
public IntegrationTestNcfBandwidthManager(IBandwidthDbInit dbInit,
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
BandwidthDaoUtil bandwidthDaoUtil,
DataDeliveryIdUtil idUtil,
IDataSetMetaDataHandler dataSetMetaDataHandler,
ISubscriptionHandler subscriptionHandler,
IAdhocSubscriptionHandler adhocSubscriptionHandler,
ISubscriptionNotificationService subscriptionNotificationService,
IFindSubscriptionsForScheduling findSubscriptionStrategy) {
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil,
dataSetMetaDataHandler, subscriptionHandler,
adhocSubscriptionHandler, subscriptionNotificationService,
findSubscriptionStrategy);

View file

@ -30,6 +30,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;
/**
* Creates {@link IntegrationTestNcfBandwidthManager} instances.
@ -61,13 +62,14 @@ public class IntegrationTestNcfBandwidthManagerCreator implements
public IBandwidthManager getBandwidthManager(IBandwidthDbInit dbInit,
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
BandwidthDaoUtil bandwidthDaoUtil,
DataDeliveryIdUtil idUtil,
IDataSetMetaDataHandler dataSetMetaDataHandler,
ISubscriptionHandler subscriptionHandler,
IAdhocSubscriptionHandler adhocSubscriptionHandler,
ISubscriptionNotificationService subscriptionNotificationService,
IFindSubscriptionsForScheduling findSubscriptionStrategy) {
return new IntegrationTestNcfBandwidthManager(dbInit, bandwidthDao,
retrievalManager, bandwidthDaoUtil, dataSetMetaDataHandler,
retrievalManager, bandwidthDaoUtil, idUtil, dataSetMetaDataHandler,
subscriptionHandler, adhocSubscriptionHandler,
subscriptionNotificationService, findSubscriptionStrategy);
}

View file

@ -22,8 +22,8 @@ package com.raytheon.uf.edex.datadelivery.bandwidth.ncf;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest.RequestType;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest.RequestType;
import com.raytheon.uf.common.datadelivery.registry.Network;
import com.raytheon.uf.common.datadelivery.registry.Subscription;
import com.raytheon.uf.common.util.SpringFiles;
@ -82,7 +82,7 @@ public class NcfBandwidthManagerIntTest extends AbstractBandwidthManagerIntTest
@Test
public void testReinitializeUsesCorrectSpringFiles() throws Exception {
final IBandwidthRequest request = new IBandwidthRequest();
final BandwidthRequest request = new BandwidthRequest();
request.setRequestType(RequestType.REINITIALIZE);
bandwidthManager.handleRequest(request);

View file

@ -25,7 +25,7 @@ import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import com.raytheon.uf.common.comm.CommunicationException;
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest;
import com.raytheon.uf.common.localization.msgs.GetServersRequest;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler.ServerPrivilegedRequest;
@ -48,7 +48,7 @@ import com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler.ServerPrivil
*/
public class RemoteServerRequestRouterTest {
private static final IBandwidthRequest PRIVILEGED_REQUEST = new IBandwidthRequest();
private static final BandwidthRequest PRIVILEGED_REQUEST = new BandwidthRequest();
private static final GetServersRequest UNPRIVILEGED_REQUEST = new GetServersRequest();

View file

@ -27,7 +27,7 @@ import static org.mockito.Mockito.when;
import org.junit.Before;
import org.junit.Test;
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest;
import com.raytheon.uf.common.localization.msgs.GetServersRequest;
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
import com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler;
@ -54,7 +54,7 @@ public class ServerRequestRouterTest {
private static final ServerRequestRouter ROUTER = new ServerRequestRouter();
private static final IBandwidthRequest PRIVILEGED_REQUEST = new IBandwidthRequest();
private static final BandwidthRequest PRIVILEGED_REQUEST = new BandwidthRequest();
private static final GetServersRequest UNPRIVILEGED_REQUEST = new GetServersRequest();

View file

@ -31,7 +31,7 @@ import org.junit.Before;
import org.junit.Test;
import com.raytheon.uf.common.auth.resp.SuccessfulExecution;
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest;
import com.raytheon.uf.common.localization.msgs.GetServersRequest;
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
import com.raytheon.uf.common.serialization.comm.IServerRequest;
@ -58,7 +58,7 @@ import com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler.ServerPrivil
@SuppressWarnings({ "unchecked", "rawtypes" })
public class ServerPrivilegedRequestHandlerTest {
private static final IBandwidthRequest BANDWIDTH_REQUEST = new IBandwidthRequest();
private static final BandwidthRequest BANDWIDTH_REQUEST = new BandwidthRequest();
private final HandlerRegistry registry = mock(HandlerRegistry.class);
@ -72,7 +72,7 @@ public class ServerPrivilegedRequestHandlerTest {
RemoteRequestServer.getInstance().setRegistry(registry);
when(
registry.getRequestHandler(IBandwidthRequest.class
registry.getRequestHandler(BandwidthRequest.class
.getCanonicalName())).thenReturn(bandwidthHandler);
}

View file

@ -58,7 +58,7 @@ public class MockGridMetaDataAdapter extends GridMetadataAdapter {
/**
* {@inheritDoc}
*/
@Override
GridCoverage getCoverageFromCache(GridCoverage coverage) {
return GriddedCoverageFixture.INSTANCE.get().getGridCoverage();
}