Issue #2992 Updated DD list of active registries
Change-Id: Iaef7dc76442d1e101cf9865a542a777afe1722ca Former-commit-id:a14cb8c45f
[formerlye2a4bb6755
] [formerlyc352643c79
] [formerly3b00ae03cc
[formerlyc352643c79
[formerly a34955102d1316135c4151210daba0e5807ff6c9]]] Former-commit-id:3b00ae03cc
Former-commit-id: 271120a82cffba35438f0b9830c3a47c736fcb73 [formerlybf42c8d740
] Former-commit-id:ea791b5ca5
This commit is contained in:
parent
3c2ff2733b
commit
5fc17cf3b8
51 changed files with 285 additions and 187 deletions
|
@ -35,8 +35,8 @@ import org.eclipse.swt.widgets.MessageBox;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
import com.raytheon.uf.common.auth.resp.SuccessfulExecution;
|
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.datadelivery.bandwidth.IBandwidthRequest.RequestType;
|
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest.RequestType;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.Coverage;
|
import com.raytheon.uf.common.datadelivery.registry.Coverage;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
|
import com.raytheon.uf.common.datadelivery.registry.DataLevelType;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.DataType;
|
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.Subscription;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||||
import com.raytheon.uf.common.datadelivery.request.DataDeliveryConstants;
|
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.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.time.util.TimeUtil;
|
||||||
import com.raytheon.uf.common.util.CollectionUtil;
|
import com.raytheon.uf.common.util.CollectionUtil;
|
||||||
import com.raytheon.uf.common.util.SizeUtil;
|
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.
|
* 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.
|
* 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 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>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author mpduff
|
* @author mpduff
|
||||||
|
@ -849,7 +849,7 @@ public class DataDeliveryUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String retrieveDataDeliveryId() {
|
private static String retrieveDataDeliveryId() {
|
||||||
IBandwidthRequest request = new IBandwidthRequest();
|
BandwidthRequest request = new BandwidthRequest();
|
||||||
request.setRequestType(RequestType.GET_DATADELIVERY_ID);
|
request.setRequestType(RequestType.GET_DATADELIVERY_ID);
|
||||||
try {
|
try {
|
||||||
SuccessfulExecution response = (SuccessfulExecution) RequestRouter
|
SuccessfulExecution response = (SuccessfulExecution) RequestRouter
|
||||||
|
@ -865,16 +865,28 @@ public class DataDeliveryUtils {
|
||||||
* Gets the DD id containing site List.
|
* Gets the DD id containing site List.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public static List<String> getDataDeliverySiteList() {
|
public static List<String> getDataDeliverySiteList() {
|
||||||
|
|
||||||
Map<String, SiteData> siteData = SiteMap.getInstance().getSiteData();
|
BandwidthRequest request = new BandwidthRequest();
|
||||||
Set<String> sites = siteData.keySet();
|
List<String> siteList = null;
|
||||||
List<String> siteList = new ArrayList<String>(sites);
|
request.setRequestType(RequestType.GET_DATADELIVERY_REGISTRIES);
|
||||||
String DDid = DataDeliveryUtils.getDataDeliveryId();
|
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)) {
|
if (!siteList.contains(DDid)) {
|
||||||
siteList.add(DDid);
|
siteList.add(DDid);
|
||||||
Collections.sort(siteList);
|
Collections.sort(siteList);
|
||||||
}
|
}
|
||||||
|
// remove "NCF", CAVE users don't care about things owned by NCF
|
||||||
|
siteList.remove(RegistryUtil.defaultUser);
|
||||||
|
|
||||||
return siteList;
|
return siteList;
|
||||||
}
|
}
|
||||||
|
|
12
deltaScripts/14.3.1/datadelivery/README
Normal file
12
deltaScripts/14.3.1/datadelivery/README
Normal 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.
|
9
deltaScripts/14.3.1/datadelivery/deleteBackupSubs.sh
Normal file
9
deltaScripts/14.3.1/datadelivery/deleteBackupSubs.sh
Normal 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
|
28
deltaScripts/14.3.1/datadelivery/updateSubscriptionOwners.sh
Normal file
28
deltaScripts/14.3.1/datadelivery/updateSubscriptionOwners.sh
Normal 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
|
||||||
|
|
|
@ -28,6 +28,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* Jul 18, 2013 1653 mpduff Add GET_SUBSCRIPTION_STATUS.
|
* Jul 18, 2013 1653 mpduff Add GET_SUBSCRIPTION_STATUS.
|
||||||
* Oct 2 2013 1797 dhladky generic attempt
|
* Oct 2 2013 1797 dhladky generic attempt
|
||||||
* Feb 11, 2014 2771 bgonzale Added GET_DATADELIVERY_ID to RequestTypes.
|
* 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>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -35,7 +36,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
@DynamicSerialize
|
@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 {
|
public static enum RequestType {
|
||||||
// Get the current retrieval plan for the
|
// Get the current retrieval plan for the
|
||||||
|
@ -48,7 +49,7 @@ public class IBandwidthRequest<T extends Time, C extends Coverage> extends Abstr
|
||||||
/**
|
/**
|
||||||
* Request information.
|
* 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
|
@DynamicSerializeElement
|
|
@ -26,7 +26,7 @@ import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import com.raytheon.uf.common.auth.req.BasePrivilegedServerService;
|
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.BandwidthGraphData;
|
||||||
import com.raytheon.uf.common.datadelivery.bandwidth.data.SubscriptionStatusSummary;
|
import com.raytheon.uf.common.datadelivery.bandwidth.data.SubscriptionStatusSummary;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.AdhocSubscription;
|
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 2, 2013 1797 dhladky Generics
|
||||||
* Oct 01, 2013 2267 bgonzale Log error response from proposed scheduling.
|
* Oct 01, 2013 2267 bgonzale Log error response from proposed scheduling.
|
||||||
* Dec 11, 2013 2625 mpduff Fix error handling to not return null.
|
* Dec 11, 2013 2625 mpduff Fix error handling to not return null.
|
||||||
|
* Apr 22, 2014 2992 dhladky renamed BandwidthRequest
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -64,7 +65,7 @@ import com.raytheon.uf.common.util.LogUtil;
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
public abstract class BandwidthService<T extends Time, C extends Coverage>
|
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> {
|
IBandwidthService<T, C> {
|
||||||
|
|
||||||
private static final IUFStatusHandler statusHandler = UFStatus
|
private static final IUFStatusHandler statusHandler = UFStatus
|
||||||
|
@ -84,7 +85,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public final int getBandwidthForNetworkInKilobytes(Network network) {
|
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.setRequestType(RequestType.GET_BANDWIDTH);
|
||||||
request.setNetwork(network);
|
request.setNetwork(network);
|
||||||
|
|
||||||
|
@ -105,7 +106,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public Set<String> proposeBandwidthForNetworkInKilobytes(Network network,
|
public Set<String> proposeBandwidthForNetworkInKilobytes(Network network,
|
||||||
int bandwidth) {
|
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.setRequestType(RequestType.PROPOSE_SET_BANDWIDTH);
|
||||||
request.setNetwork(network);
|
request.setNetwork(network);
|
||||||
request.setBandwidth(bandwidth);
|
request.setBandwidth(bandwidth);
|
||||||
|
@ -126,7 +127,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
|
||||||
@Override
|
@Override
|
||||||
public final boolean setBandwidthForNetworkInKilobytes(Network network,
|
public final boolean setBandwidthForNetworkInKilobytes(Network network,
|
||||||
int bandwidth) {
|
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.setRequestType(RequestType.FORCE_SET_BANDWIDTH);
|
||||||
request.setNetwork(network);
|
request.setNetwork(network);
|
||||||
request.setBandwidth(bandwidth);
|
request.setBandwidth(bandwidth);
|
||||||
|
@ -161,7 +162,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Set<String> schedule(List<Subscription<T, C>> subscriptions) {
|
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.setRequestType(RequestType.SCHEDULE_SUBSCRIPTION);
|
||||||
request.setSubscriptions(subscriptions);
|
request.setSubscriptions(subscriptions);
|
||||||
|
|
||||||
|
@ -195,7 +196,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
|
||||||
@Override
|
@Override
|
||||||
public IProposeScheduleResponse proposeSchedule(
|
public IProposeScheduleResponse proposeSchedule(
|
||||||
List<Subscription<T, C>> subscriptions) {
|
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.setRequestType(RequestType.PROPOSE_SCHEDULE_SUBSCRIPTION);
|
||||||
request.setSubscriptions(subscriptions);
|
request.setSubscriptions(subscriptions);
|
||||||
|
|
||||||
|
@ -217,7 +218,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void reinitialize() {
|
public void reinitialize() {
|
||||||
IBandwidthRequest<T, C> request = new IBandwidthRequest<T, C>();
|
BandwidthRequest<T, C> request = new BandwidthRequest<T, C>();
|
||||||
request.setRequestType(RequestType.REINITIALIZE);
|
request.setRequestType(RequestType.REINITIALIZE);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -234,7 +235,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public Date getEstimatedCompletionTime(AdhocSubscription<T, C> sub) {
|
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.setSubscriptions(Arrays.<Subscription<T, C>> asList(sub));
|
||||||
request.setRequestType(RequestType.GET_ESTIMATED_COMPLETION);
|
request.setRequestType(RequestType.GET_ESTIMATED_COMPLETION);
|
||||||
try {
|
try {
|
||||||
|
@ -253,7 +254,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public BandwidthGraphData getBandwidthGraphData() {
|
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);
|
request.setRequestType(RequestType.GET_BANDWIDTH_GRAPH_DATA);
|
||||||
try {
|
try {
|
||||||
return sendRequest(request, BandwidthGraphData.class);
|
return sendRequest(request, BandwidthGraphData.class);
|
||||||
|
@ -268,7 +269,7 @@ public abstract class BandwidthService<T extends Time, C extends Coverage>
|
||||||
@Override
|
@Override
|
||||||
public SubscriptionStatusSummary getSubscriptionStatusSummary(
|
public SubscriptionStatusSummary getSubscriptionStatusSummary(
|
||||||
Subscription<T, C> subscription) {
|
Subscription<T, C> subscription) {
|
||||||
IBandwidthRequest<T, C> request = new IBandwidthRequest<T, C>();
|
BandwidthRequest<T, C> request = new BandwidthRequest<T, C>();
|
||||||
request.setSubscriptions(Arrays
|
request.setSubscriptions(Arrays
|
||||||
.<Subscription<T, C>> asList(subscription));
|
.<Subscription<T, C>> asList(subscription));
|
||||||
request.setRequestType(RequestType.GET_SUBSCRIPTION_STATUS);
|
request.setRequestType(RequestType.GET_SUBSCRIPTION_STATUS);
|
||||||
|
|
|
@ -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.registry.ebxml.slots.StringSlotConverter;
|
||||||
import com.raytheon.uf.common.serialization.SerializationException;
|
import com.raytheon.uf.common.serialization.SerializationException;
|
||||||
import com.raytheon.uf.common.time.util.ImmutableDate;
|
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.CollectionUtil;
|
||||||
import com.raytheon.uf.common.util.ReflectionException;
|
import com.raytheon.uf.common.util.ReflectionException;
|
||||||
import com.raytheon.uf.common.util.ReflectionUtil;
|
import com.raytheon.uf.common.util.ReflectionUtil;
|
||||||
|
@ -80,6 +81,7 @@ import com.raytheon.uf.common.util.ReflectionUtil;
|
||||||
* Jun 24, 2013 2106 djohnson Remove encoder strategy from instance variables.
|
* Jun 24, 2013 2106 djohnson Remove encoder strategy from instance variables.
|
||||||
* Dec 04, 2013 2584 dhladky Versions for Registry objects
|
* 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>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -100,6 +102,8 @@ public final class RegistryUtil {
|
||||||
|
|
||||||
public static final String registryUser = "Registry";
|
public static final String registryUser = "Registry";
|
||||||
|
|
||||||
|
public static final String defaultUser = "NCF";
|
||||||
|
|
||||||
static {
|
static {
|
||||||
if (System.getenv("EBXML_REGISTRY_HOST") != null
|
if (System.getenv("EBXML_REGISTRY_HOST") != null
|
||||||
&& System.getenv("EBXML_REGISTRY_WEBSERVER_PORT") != null) {
|
&& System.getenv("EBXML_REGISTRY_WEBSERVER_PORT") != null) {
|
||||||
|
@ -113,9 +117,9 @@ public final class RegistryUtil {
|
||||||
public static final String CALLING_REGISTRY_SOAP_HEADER_NAME = "Calling_Registry";
|
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
|
// A private mapping of attribute types to slot types, used when storing an
|
||||||
// object to the registry to map QueryableAttributes to SlotConverters.
|
// object to the registry to map QueryableAttributes to SlotConverters.
|
||||||
|
|
|
@ -17,7 +17,8 @@ Require-Bundle: com.raytheon.uf.common.datadelivery.bandwidth;bundle-version="1.
|
||||||
com.google.guava;bundle-version="1.0.0",
|
com.google.guava;bundle-version="1.0.0",
|
||||||
com.raytheon.uf.edex.core;bundle-version="1.12.1174",
|
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.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,
|
Import-Package: com.raytheon.edex.site,
|
||||||
com.raytheon.uf.common.event,
|
com.raytheon.uf.common.event
|
||||||
com.raytheon.uf.edex.datadelivery.util
|
|
||||||
|
|
|
@ -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.hibernate.IFindSubscriptionsForScheduling;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
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
|
* {@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.
|
* Dec 04, 2013 2566 bgonzale use bandwidthmanager method to retrieve spring files.
|
||||||
* Jan 14, 2014 2692 dhladky AdhocSubscription handler
|
* Jan 14, 2014 2692 dhladky AdhocSubscription handler
|
||||||
* Jan 30, 2014 2636 mpduff Scheduling refactor.
|
* Jan 30, 2014 2636 mpduff Scheduling refactor.
|
||||||
|
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -85,12 +87,13 @@ public class MonolithicBandwidthManagerCreator<T extends Time, C extends Coverag
|
||||||
IBandwidthDao<T, C> bandwidthDao,
|
IBandwidthDao<T, C> bandwidthDao,
|
||||||
RetrievalManager retrievalManager,
|
RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
|
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
|
||||||
|
RegistryIdUtil idUtil,
|
||||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||||
ISubscriptionHandler subscriptionHandler,
|
ISubscriptionHandler subscriptionHandler,
|
||||||
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
||||||
ISubscriptionNotificationService subscriptionNotificationService,
|
ISubscriptionNotificationService subscriptionNotificationService,
|
||||||
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
||||||
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
|
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil,
|
||||||
dataSetMetaDataHandler, subscriptionHandler,
|
dataSetMetaDataHandler, subscriptionHandler,
|
||||||
adhocSubscriptionHandler, subscriptionNotificationService,
|
adhocSubscriptionHandler, subscriptionNotificationService,
|
||||||
findSubscriptionsStrategy);
|
findSubscriptionsStrategy);
|
||||||
|
@ -110,13 +113,14 @@ public class MonolithicBandwidthManagerCreator<T extends Time, C extends Coverag
|
||||||
public IBandwidthManager<T, C> getBandwidthManager(IBandwidthDbInit dbInit,
|
public IBandwidthManager<T, C> getBandwidthManager(IBandwidthDbInit dbInit,
|
||||||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil bandwidthDaoUtil,
|
BandwidthDaoUtil bandwidthDaoUtil,
|
||||||
|
RegistryIdUtil idUtil,
|
||||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||||
ISubscriptionHandler subscriptionHandler,
|
ISubscriptionHandler subscriptionHandler,
|
||||||
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
||||||
ISubscriptionNotificationService subscriptionNotificationService,
|
ISubscriptionNotificationService subscriptionNotificationService,
|
||||||
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
||||||
return new MonolithicBandwidthManager(dbInit, bandwidthDao,
|
return new MonolithicBandwidthManager(dbInit, bandwidthDao,
|
||||||
retrievalManager, bandwidthDaoUtil, dataSetMetaDataHandler,
|
retrievalManager, bandwidthDaoUtil, idUtil, dataSetMetaDataHandler,
|
||||||
subscriptionHandler, adhocSubscriptionHandler,
|
subscriptionHandler, adhocSubscriptionHandler,
|
||||||
subscriptionNotificationService, findSubscriptionsStrategy);
|
subscriptionNotificationService, findSubscriptionsStrategy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.hibernate.IFindSubscriptionsForScheduling;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
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.
|
* {@link IEdexBandwidthManagerCreator} for an NCF bandwidth manager.
|
||||||
|
@ -65,6 +66,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
||||||
* Reschedule updated shared subscriptions.
|
* Reschedule updated shared subscriptions.
|
||||||
* Dec 04, 2013 2566 bgonzale use bandwidthmanager method to retrieve spring files.
|
* Dec 04, 2013 2566 bgonzale use bandwidthmanager method to retrieve spring files.
|
||||||
* Jan 14, 2014 2692 dhladky AdhocSubscription handler
|
* Jan 14, 2014 2692 dhladky AdhocSubscription handler
|
||||||
|
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -97,12 +99,13 @@ public class NcfBandwidthManagerCreator<T extends Time, C extends Coverage>
|
||||||
IBandwidthDao<T, C> bandwidthDao,
|
IBandwidthDao<T, C> bandwidthDao,
|
||||||
RetrievalManager retrievalManager,
|
RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
|
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
|
||||||
|
RegistryIdUtil idUtil,
|
||||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||||
ISubscriptionHandler subscriptionHandler,
|
ISubscriptionHandler subscriptionHandler,
|
||||||
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
||||||
ISubscriptionNotificationService subscriptionNotificationService,
|
ISubscriptionNotificationService subscriptionNotificationService,
|
||||||
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
||||||
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
|
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil,
|
||||||
dataSetMetaDataHandler, subscriptionHandler,
|
dataSetMetaDataHandler, subscriptionHandler,
|
||||||
adhocSubscriptionHandler, subscriptionNotificationService,
|
adhocSubscriptionHandler, subscriptionNotificationService,
|
||||||
findSubscriptionsStrategy);
|
findSubscriptionsStrategy);
|
||||||
|
@ -160,13 +163,14 @@ public class NcfBandwidthManagerCreator<T extends Time, C extends Coverage>
|
||||||
public IBandwidthManager<T, C> getBandwidthManager(IBandwidthDbInit dbInit,
|
public IBandwidthManager<T, C> getBandwidthManager(IBandwidthDbInit dbInit,
|
||||||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil bandwidthDaoUtil,
|
BandwidthDaoUtil bandwidthDaoUtil,
|
||||||
|
RegistryIdUtil idUtil,
|
||||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||||
ISubscriptionHandler subscriptionHandler,
|
ISubscriptionHandler subscriptionHandler,
|
||||||
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
||||||
ISubscriptionNotificationService subscriptionNotificationService,
|
ISubscriptionNotificationService subscriptionNotificationService,
|
||||||
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
||||||
return new NcfBandwidthManager(dbInit, bandwidthDao, retrievalManager,
|
return new NcfBandwidthManager(dbInit, bandwidthDao, retrievalManager,
|
||||||
bandwidthDaoUtil, dataSetMetaDataHandler, subscriptionHandler,
|
bandwidthDaoUtil, idUtil, dataSetMetaDataHandler, subscriptionHandler,
|
||||||
adhocSubscriptionHandler, subscriptionNotificationService,
|
adhocSubscriptionHandler, subscriptionNotificationService,
|
||||||
findSubscriptionsStrategy);
|
findSubscriptionsStrategy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.common.util.FileUtil;
|
import com.raytheon.uf.common.util.FileUtil;
|
||||||
import com.raytheon.uf.common.util.file.FilenameFilters;
|
import com.raytheon.uf.common.util.file.FilenameFilters;
|
||||||
import com.raytheon.uf.edex.core.EDEXUtil;
|
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
|
* The SBN simulator. Reads files from a configured directory, and then places
|
||||||
|
@ -103,7 +103,7 @@ public class SbnSimulator {
|
||||||
*/
|
*/
|
||||||
public SbnSimulator() {
|
public SbnSimulator() {
|
||||||
this(new File(System.getProperty("sbn.retrieval.transfer.directory")),
|
this(new File(System.getProperty("sbn.retrieval.transfer.directory")),
|
||||||
new CopyFileToManualIngest(), DataDeliveryIdUtil.getId());
|
new CopyFileToManualIngest(), RegistryIdUtil.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -45,5 +45,4 @@ Export-Package: com.raytheon.uf.edex.datadelivery.bandwidth,
|
||||||
com.raytheon.uf.edex.datadelivery.bandwidth.util
|
com.raytheon.uf.edex.datadelivery.bandwidth.util
|
||||||
Import-Package: com.raytheon.uf.common.datadelivery.event.retrieval,
|
Import-Package: com.raytheon.uf.common.datadelivery.event.retrieval,
|
||||||
com.raytheon.uf.common.datadelivery.registry,
|
com.raytheon.uf.common.datadelivery.registry,
|
||||||
com.raytheon.uf.common.stats,
|
com.raytheon.uf.common.stats
|
||||||
com.raytheon.uf.edex.datadelivery.util
|
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
<constructor-arg ref="bandwidthDao" />
|
<constructor-arg ref="bandwidthDao" />
|
||||||
<constructor-arg ref="retrievalManager" />
|
<constructor-arg ref="retrievalManager" />
|
||||||
<constructor-arg ref="bandwidthDaoUtil" />
|
<constructor-arg ref="bandwidthDaoUtil" />
|
||||||
|
<constructor-arg ref="registryIdUtil" />
|
||||||
<property name="aggregator" ref="aggregator" />
|
<property name="aggregator" ref="aggregator" />
|
||||||
<property name="initializer" ref="bandwidthInitializer" />
|
<property name="initializer" ref="bandwidthInitializer" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
<bean factory-bean="bandwidthHandlerRegistry" factory-method="register">
|
<bean factory-bean="bandwidthHandlerRegistry" factory-method="register">
|
||||||
<constructor-arg
|
<constructor-arg
|
||||||
value="com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest" />
|
value="com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest" />
|
||||||
<constructor-arg ref="bandwidthManager" />
|
<constructor-arg ref="bandwidthManager" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@ import com.google.common.collect.Sets;
|
||||||
import com.raytheon.edex.util.Util;
|
import com.raytheon.edex.util.Util;
|
||||||
import com.raytheon.uf.common.auth.exception.AuthorizationException;
|
import com.raytheon.uf.common.auth.exception.AuthorizationException;
|
||||||
import com.raytheon.uf.common.auth.user.IUser;
|
import com.raytheon.uf.common.auth.user.IUser;
|
||||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
|
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest;
|
||||||
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.IProposeScheduleResponse;
|
import com.raytheon.uf.common.datadelivery.bandwidth.IProposeScheduleResponse;
|
||||||
import com.raytheon.uf.common.datadelivery.bandwidth.ProposeScheduleResponse;
|
import com.raytheon.uf.common.datadelivery.bandwidth.ProposeScheduleResponse;
|
||||||
import com.raytheon.uf.common.datadelivery.bandwidth.data.BandwidthGraphData;
|
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.retrieval.RetrievalStatus;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
|
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.exception.EbxmlRegistryException;
|
||||||
|
import com.raytheon.uf.edex.registry.ebxml.util.RegistryIdUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract {@link IBandwidthManager} implementation which provides core
|
* 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 11, 2014 2771 bgonzale Added handler for GET_DATADELIVERY_ID request.
|
||||||
* Feb 10, 2014 2636 mpduff Changed how retrieval plan is updated over time.
|
* Feb 10, 2014 2636 mpduff Changed how retrieval plan is updated over time.
|
||||||
* Apr 02, 2014 2810 dhladky Priority sorting of subscriptions.
|
* 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>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -155,7 +156,7 @@ import com.raytheon.uf.edex.registry.ebxml.exception.EbxmlRegistryException;
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
public abstract class BandwidthManager<T extends Time, C extends Coverage>
|
public abstract class BandwidthManager<T extends Time, C extends Coverage>
|
||||||
extends AbstractPrivilegedRequestHandler<IBandwidthRequest<T, C>>
|
extends AbstractPrivilegedRequestHandler<BandwidthRequest<T, C>>
|
||||||
implements IBandwidthManager<T, C> {
|
implements IBandwidthManager<T, C> {
|
||||||
|
|
||||||
protected static final IUFStatusHandler statusHandler = UFStatus
|
protected static final IUFStatusHandler statusHandler = UFStatus
|
||||||
|
@ -163,6 +164,9 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
|
||||||
|
|
||||||
private static final Pattern RES_PATTERN = Pattern.compile("^res");
|
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
|
// Requires package access so it can be accessed from the maintenance task
|
||||||
final IBandwidthDao<T, C> bandwidthDao;
|
final IBandwidthDao<T, C> bandwidthDao;
|
||||||
|
|
||||||
|
@ -174,6 +178,8 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
|
||||||
|
|
||||||
private final IBandwidthDbInit dbInit;
|
private final IBandwidthDbInit dbInit;
|
||||||
|
|
||||||
|
private final RegistryIdUtil idUtil;
|
||||||
|
|
||||||
// Instance variable and not static, because there are multiple child
|
// Instance variable and not static, because there are multiple child
|
||||||
// implementation classes which should each have a unique prefix
|
// implementation classes which should each have a unique prefix
|
||||||
private final IPerformanceStatusHandler performanceHandler = PerformanceStatus
|
private final IPerformanceStatusHandler performanceHandler = PerformanceStatus
|
||||||
|
@ -185,11 +191,13 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
|
||||||
public BandwidthManager(IBandwidthDbInit dbInit,
|
public BandwidthManager(IBandwidthDbInit dbInit,
|
||||||
IBandwidthDao<T, C> bandwidthDao,
|
IBandwidthDao<T, C> bandwidthDao,
|
||||||
RetrievalManager retrievalManager,
|
RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil<T, C> bandwidthDaoUtil) {
|
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
|
||||||
|
RegistryIdUtil idUtil) {
|
||||||
this.dbInit = dbInit;
|
this.dbInit = dbInit;
|
||||||
this.bandwidthDao = bandwidthDao;
|
this.bandwidthDao = bandwidthDao;
|
||||||
this.retrievalManager = retrievalManager;
|
this.retrievalManager = retrievalManager;
|
||||||
this.bandwidthDaoUtil = bandwidthDaoUtil;
|
this.bandwidthDaoUtil = bandwidthDaoUtil;
|
||||||
|
this.idUtil = idUtil;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -878,7 +886,7 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object handleRequest(IBandwidthRequest<T, C> request)
|
public Object handleRequest(BandwidthRequest<T, C> request)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
ITimer timer = TimeUtil.getTimer();
|
ITimer timer = TimeUtil.getTimer();
|
||||||
|
@ -982,7 +990,10 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
|
||||||
response = getBandwidthGraphData();
|
response = getBandwidthGraphData();
|
||||||
break;
|
break;
|
||||||
case GET_DATADELIVERY_ID:
|
case GET_DATADELIVERY_ID:
|
||||||
response = DataDeliveryIdUtil.getId();
|
response = RegistryIdUtil.getId();
|
||||||
|
break;
|
||||||
|
case GET_DATADELIVERY_REGISTRIES:
|
||||||
|
response = idUtil.getUniqueRegistries(objectType);
|
||||||
break;
|
break;
|
||||||
case GET_SUBSCRIPTION_STATUS:
|
case GET_SUBSCRIPTION_STATUS:
|
||||||
Subscription<T, C> sub = null;
|
Subscription<T, C> sub = null;
|
||||||
|
@ -1440,7 +1451,7 @@ public abstract class BandwidthManager<T extends Time, C extends Coverage>
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AuthorizationResponse authorized(IUser user,
|
public AuthorizationResponse authorized(IUser user,
|
||||||
IBandwidthRequest request) throws AuthorizationException {
|
BandwidthRequest request) throws AuthorizationException {
|
||||||
return new AuthorizationResponse(true);
|
return new AuthorizationResponse(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.interfaces.BandwidthInitializer;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
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
|
* {@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.
|
* Nov 07, 2013 2506 bgonzale Added notification handler to bandwidth context.
|
||||||
* Jan 14, 2014 2692 dhladky AdhocSubscription handler
|
* Jan 14, 2014 2692 dhladky AdhocSubscription handler
|
||||||
* Jan 30, 2014 2636 mpduff Scheduling refactor.
|
* Jan 30, 2014 2636 mpduff Scheduling refactor.
|
||||||
|
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -81,6 +83,7 @@ public class EdexBandwidthContextFactory<T extends Time, C extends Coverage>
|
||||||
* @param bandwidthDao
|
* @param bandwidthDao
|
||||||
* @param retrievalManager
|
* @param retrievalManager
|
||||||
* @param bandwidthDaoUtil
|
* @param bandwidthDaoUtil
|
||||||
|
* @param idUtil
|
||||||
* @param dataSetMetaDataHandler
|
* @param dataSetMetaDataHandler
|
||||||
* @param subscriptionHandler
|
* @param subscriptionHandler
|
||||||
* @return the bandwidth manager
|
* @return the bandwidth manager
|
||||||
|
@ -89,6 +92,7 @@ public class EdexBandwidthContextFactory<T extends Time, C extends Coverage>
|
||||||
IBandwidthDao<T, C> bandwidthDao,
|
IBandwidthDao<T, C> bandwidthDao,
|
||||||
RetrievalManager retrievalManager,
|
RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
|
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
|
||||||
|
RegistryIdUtil idUtil,
|
||||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||||
ISubscriptionHandler subscriptionHandler,
|
ISubscriptionHandler subscriptionHandler,
|
||||||
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
||||||
|
@ -253,9 +257,9 @@ public class EdexBandwidthContextFactory<T extends Time, C extends Coverage>
|
||||||
@Override
|
@Override
|
||||||
public IBandwidthManager<T, C> getBandwidthManager(IBandwidthDbInit dbInit,
|
public IBandwidthManager<T, C> getBandwidthManager(IBandwidthDbInit dbInit,
|
||||||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil bandwidthDaoUtil) {
|
BandwidthDaoUtil bandwidthDaoUtil,RegistryIdUtil idUtil) {
|
||||||
return bandwidthManagerCreator.getBandwidthManager(dbInit,
|
return bandwidthManagerCreator.getBandwidthManager(dbInit,
|
||||||
bandwidthDao, retrievalManager, bandwidthDaoUtil,
|
bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil,
|
||||||
dataSetMetaDataHandler, subscriptionHandler,
|
dataSetMetaDataHandler, subscriptionHandler,
|
||||||
adhocSubscriptionHandler, notificationService,
|
adhocSubscriptionHandler, notificationService,
|
||||||
findSubscriptionsStrategy);
|
findSubscriptionsStrategy);
|
||||||
|
|
|
@ -40,8 +40,8 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.eventbus.AllowConcurrentEvents;
|
import com.google.common.eventbus.AllowConcurrentEvents;
|
||||||
import com.google.common.eventbus.Subscribe;
|
import com.google.common.eventbus.Subscribe;
|
||||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
|
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest;
|
||||||
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.ProposeScheduleResponse;
|
import com.raytheon.uf.common.datadelivery.bandwidth.ProposeScheduleResponse;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.AdhocSubscription;
|
import com.raytheon.uf.common.datadelivery.registry.AdhocSubscription;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.Coverage;
|
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.retrieval.SubscriptionRetrievalFulfilled;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
|
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
|
* 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 10, 2014 2636 mpduff Pass Network map to be scheduled.
|
||||||
* Feb 21, 2014, 2636 dhladky Try catch to keep MaintTask from dying.
|
* Feb 21, 2014, 2636 dhladky Try catch to keep MaintTask from dying.
|
||||||
* Mar 31, 2014 2889 dhladky Added username for notification center tracking.
|
* Mar 31, 2014 2889 dhladky Added username for notification center tracking.
|
||||||
|
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author djohnson
|
* @author djohnson
|
||||||
|
@ -177,12 +178,13 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
|
||||||
IBandwidthDao<T, C> bandwidthDao,
|
IBandwidthDao<T, C> bandwidthDao,
|
||||||
RetrievalManager retrievalManager,
|
RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
|
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
|
||||||
|
RegistryIdUtil idUtil,
|
||||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||||
ISubscriptionHandler subscriptionHandler,
|
ISubscriptionHandler subscriptionHandler,
|
||||||
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
||||||
ISubscriptionNotificationService subscriptionNotificationService,
|
ISubscriptionNotificationService subscriptionNotificationService,
|
||||||
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
||||||
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil);
|
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil);
|
||||||
|
|
||||||
this.dataSetMetaDataHandler = dataSetMetaDataHandler;
|
this.dataSetMetaDataHandler = dataSetMetaDataHandler;
|
||||||
this.subscriptionHandler = subscriptionHandler;
|
this.subscriptionHandler = subscriptionHandler;
|
||||||
|
@ -401,7 +403,7 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
|
||||||
if (DataDeliveryRegistryObjectTypes.isRecurringSubscription(objectType)) {
|
if (DataDeliveryRegistryObjectTypes.isRecurringSubscription(objectType)) {
|
||||||
if (sub != null) {
|
if (sub != null) {
|
||||||
boolean isApplicableForTheLocalSite = sub.getOfficeIDs()
|
boolean isApplicableForTheLocalSite = sub.getOfficeIDs()
|
||||||
.contains(DataDeliveryIdUtil.getId());
|
.contains(RegistryIdUtil.getId());
|
||||||
if (isApplicableForTheLocalSite) {
|
if (isApplicableForTheLocalSite) {
|
||||||
switch (event.getAction()) {
|
switch (event.getAction()) {
|
||||||
case UPDATE:
|
case UPDATE:
|
||||||
|
@ -798,7 +800,7 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
|
||||||
* reinitialize operation.
|
* reinitialize operation.
|
||||||
*/
|
*/
|
||||||
private void bandwidthMapConfigurationUpdated() {
|
private void bandwidthMapConfigurationUpdated() {
|
||||||
IBandwidthRequest<T, C> request = new IBandwidthRequest<T, C>();
|
BandwidthRequest<T, C> request = new BandwidthRequest<T, C>();
|
||||||
request.setRequestType(RequestType.REINITIALIZE);
|
request.setRequestType(RequestType.REINITIALIZE);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -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.interfaces.BandwidthInitializer;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
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
|
* 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
|
* Oct 24, 2012 1286 djohnson Initial creation
|
||||||
* Jun 24, 2013 2106 djohnson Add {@link #getBandwidthBucketDao()}.
|
* Jun 24, 2013 2106 djohnson Add {@link #getBandwidthBucketDao()}.
|
||||||
|
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -123,9 +125,9 @@ class InMemoryBandwidthContextFactory implements BandwidthContextFactory {
|
||||||
@Override
|
@Override
|
||||||
public IBandwidthManager getBandwidthManager(IBandwidthDbInit dbInit,
|
public IBandwidthManager getBandwidthManager(IBandwidthDbInit dbInit,
|
||||||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil bandwidthDaoUtil) {
|
BandwidthDaoUtil bandwidthDaoUtil, RegistryIdUtil idUtil) {
|
||||||
return new InMemoryBandwidthManager(dbInit, bandwidthDao,
|
return new InMemoryBandwidthManager(dbInit, bandwidthDao,
|
||||||
retrievalManager, bandwidthDaoUtil);
|
retrievalManager, bandwidthDaoUtil, idUtil);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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.interfaces.BandwidthInitializer;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
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
|
* 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.
|
* Dec 04, 2013 2566 bgonzale use bandwidthmanager method to retrieve spring files.
|
||||||
* Feb 06, 2014 2636 bgonzale added initializeScheduling method.
|
* Feb 06, 2014 2636 bgonzale added initializeScheduling method.
|
||||||
* Feb 12, 2014 2636 mpduff Override getSubscriptionsToSchedule
|
* Feb 12, 2014 2636 mpduff Override getSubscriptionsToSchedule
|
||||||
|
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -122,11 +124,12 @@ class InMemoryBandwidthManager<T extends Time, C extends Coverage> extends
|
||||||
* @param bandwidthDao
|
* @param bandwidthDao
|
||||||
* @param retrievalManager
|
* @param retrievalManager
|
||||||
* @param bandwidthDaoUtil
|
* @param bandwidthDaoUtil
|
||||||
|
* @param IdUtil
|
||||||
*/
|
*/
|
||||||
public InMemoryBandwidthManager(IBandwidthDbInit dbInit,
|
public InMemoryBandwidthManager(IBandwidthDbInit dbInit,
|
||||||
IBandwidthDao<T, C> bandwidthDao,
|
IBandwidthDao<T, C> bandwidthDao,
|
||||||
RetrievalManager retrievalManager, BandwidthDaoUtil bandwidthDaoUtil) {
|
RetrievalManager retrievalManager, BandwidthDaoUtil bandwidthDaoUtil, RegistryIdUtil idUtil) {
|
||||||
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil);
|
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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.hibernate.IFindSubscriptionsForScheduling;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
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.
|
* {@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 14, 2014 2692 dhladky AdhocSubscription handler
|
||||||
* Jan 30, 2014 2636 mpduff Scheduling refactor.
|
* Jan 30, 2014 2636 mpduff Scheduling refactor.
|
||||||
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
|
||||||
|
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -99,6 +100,7 @@ public class WfoBandwidthManagerCreator<T extends Time, C extends Coverage>
|
||||||
* @param bandwidthDao
|
* @param bandwidthDao
|
||||||
* @param retrievalManager
|
* @param retrievalManager
|
||||||
* @param bandwidthDaoUtil
|
* @param bandwidthDaoUtil
|
||||||
|
* @param idUtil
|
||||||
* @param dataSetMetaDataHandler
|
* @param dataSetMetaDataHandler
|
||||||
* @param subscriptionHandler
|
* @param subscriptionHandler
|
||||||
* @param adhocSubscriptionHandler
|
* @param adhocSubscriptionHandler
|
||||||
|
@ -110,12 +112,13 @@ public class WfoBandwidthManagerCreator<T extends Time, C extends Coverage>
|
||||||
IBandwidthDao bandwidthDao,
|
IBandwidthDao bandwidthDao,
|
||||||
RetrievalManager retrievalManager,
|
RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil bandwidthDaoUtil,
|
BandwidthDaoUtil bandwidthDaoUtil,
|
||||||
|
RegistryIdUtil idUtil,
|
||||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||||
ISubscriptionHandler subscriptionHandler,
|
ISubscriptionHandler subscriptionHandler,
|
||||||
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
||||||
ISubscriptionNotificationService subscriptionNotificationService,
|
ISubscriptionNotificationService subscriptionNotificationService,
|
||||||
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
||||||
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
|
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil,
|
||||||
dataSetMetaDataHandler, subscriptionHandler,
|
dataSetMetaDataHandler, subscriptionHandler,
|
||||||
adhocSubscriptionHandler, subscriptionNotificationService,
|
adhocSubscriptionHandler, subscriptionNotificationService,
|
||||||
findSubscriptionsStrategy);
|
findSubscriptionsStrategy);
|
||||||
|
@ -137,7 +140,7 @@ public class WfoBandwidthManagerCreator<T extends Time, C extends Coverage>
|
||||||
Subscription<T, C> subscription = getRegistryObjectById(
|
Subscription<T, C> subscription = getRegistryObjectById(
|
||||||
getSubscriptionHandler(), event.getId());
|
getSubscriptionHandler(), event.getId());
|
||||||
boolean isLocalOrigination = subscription.getOriginatingSite()
|
boolean isLocalOrigination = subscription.getOriginatingSite()
|
||||||
.equals(DataDeliveryIdUtil.getId());
|
.equals(RegistryIdUtil.getId());
|
||||||
|
|
||||||
if (isLocalOrigination) {
|
if (isLocalOrigination) {
|
||||||
subscriptionUpdated(subscription);
|
subscriptionUpdated(subscription);
|
||||||
|
@ -204,13 +207,14 @@ public class WfoBandwidthManagerCreator<T extends Time, C extends Coverage>
|
||||||
public IBandwidthManager<T, C> getBandwidthManager(IBandwidthDbInit dbInit,
|
public IBandwidthManager<T, C> getBandwidthManager(IBandwidthDbInit dbInit,
|
||||||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil bandwidthDaoUtil,
|
BandwidthDaoUtil bandwidthDaoUtil,
|
||||||
|
RegistryIdUtil idUtil,
|
||||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||||
ISubscriptionHandler subscriptionHandler,
|
ISubscriptionHandler subscriptionHandler,
|
||||||
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
||||||
ISubscriptionNotificationService subscriptionNotificationService,
|
ISubscriptionNotificationService subscriptionNotificationService,
|
||||||
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
||||||
return new WfoBandwidthManager<T, C>(dbInit, bandwidthDao,
|
return new WfoBandwidthManager<T, C>(dbInit, bandwidthDao,
|
||||||
retrievalManager, bandwidthDaoUtil, dataSetMetaDataHandler,
|
retrievalManager, bandwidthDaoUtil, idUtil, dataSetMetaDataHandler,
|
||||||
subscriptionHandler, adhocSubscriptionHandler,
|
subscriptionHandler, adhocSubscriptionHandler,
|
||||||
subscriptionNotificationService, findSubscriptionsStrategy);
|
subscriptionNotificationService, findSubscriptionsStrategy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.interfaces.BandwidthInitializer;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
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
|
* 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
|
* Oct 24, 2012 1286 djohnson Initial creation
|
||||||
* Jun 24, 2013 2106 djohnson Add {@link #getBandwidthBucketDao()}.
|
* Jun 24, 2013 2106 djohnson Add {@link #getBandwidthBucketDao()}.
|
||||||
|
* Apr 22, 2014 2992 dhladky Added IdUtil for siteList
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -98,9 +100,10 @@ public interface BandwidthContextFactory {
|
||||||
* the retrieval manager
|
* the retrieval manager
|
||||||
* @param bandwidthDaoUtil
|
* @param bandwidthDaoUtil
|
||||||
* the dao util instance
|
* the dao util instance
|
||||||
|
* @param RegistryIdUtil finds DD server nodes
|
||||||
* @return the {@link BandwidthManager} reference
|
* @return the {@link BandwidthManager} reference
|
||||||
*/
|
*/
|
||||||
IBandwidthManager getBandwidthManager(IBandwidthDbInit dbInit,
|
IBandwidthManager getBandwidthManager(IBandwidthDbInit dbInit,
|
||||||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil bandwidthDaoUtil);
|
BandwidthDaoUtil bandwidthDaoUtil, RegistryIdUtil idUtil);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.ebxml.SiteSubscriptionQuery;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.handlers.SiteSubscriptionHandler;
|
import com.raytheon.uf.common.datadelivery.registry.handlers.SiteSubscriptionHandler;
|
||||||
import com.raytheon.uf.common.registry.handler.IRegistryObjectHandler;
|
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}.
|
* {@link IRegistryObjectHandler} implementation for {@link SiteSubscription}.
|
||||||
|
@ -52,7 +52,7 @@ public class LocalSiteSubscriptionHandler extends SiteSubscriptionHandler {
|
||||||
* Default Constructor.
|
* Default Constructor.
|
||||||
*/
|
*/
|
||||||
public LocalSiteSubscriptionHandler() {
|
public LocalSiteSubscriptionHandler() {
|
||||||
this(DataDeliveryIdUtil.getId());
|
this(RegistryIdUtil.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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.dao.IBandwidthDbInit;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.interfaces.BandwidthInitializer;
|
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.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(
|
public HibernateBandwidthInitializer(
|
||||||
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
IFindSubscriptionsForScheduling findSubscriptionsStrategy) {
|
||||||
this(findSubscriptionsStrategy, DataDeliveryIdUtil.getId());
|
this(findSubscriptionsStrategy, RegistryIdUtil.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -88,13 +88,6 @@
|
||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="com.raytheon.uf.edex.datadelivery"
|
|
||||||
download-size="0"
|
|
||||||
install-size="0"
|
|
||||||
version="0.0.0"
|
|
||||||
unpack="false"/>
|
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="com.raytheon.uf.edex.datadelivery.event"
|
id="com.raytheon.uf.edex.datadelivery.event"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
|
|
|
@ -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.federation,
|
||||||
com.raytheon.uf.edex.datadelivery.registry.replication,
|
com.raytheon.uf.edex.datadelivery.registry.replication,
|
||||||
com.raytheon.uf.edex.datadelivery.registry.web
|
com.raytheon.uf.edex.datadelivery.registry.web
|
||||||
Import-Package: com.raytheon.uf.edex.datadelivery.util
|
|
||||||
|
|
|
@ -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.RegistryObjectTypes;
|
||||||
import com.raytheon.uf.common.registry.constants.StatusTypes;
|
import com.raytheon.uf.common.registry.constants.StatusTypes;
|
||||||
import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
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() {
|
public RegistryType createRegistryObject() {
|
||||||
RegistryType registryObj = new RegistryType();
|
RegistryType registryObj = new RegistryType();
|
||||||
registryObj.setId(DataDeliveryIdUtil.getId() + REGISTRY_SUFFIX);
|
registryObj.setId(RegistryIdUtil.getId() + REGISTRY_SUFFIX);
|
||||||
registryObj.setLid(registryObj.getId());
|
registryObj.setLid(registryObj.getId());
|
||||||
registryObj.setName(RegistryUtil
|
registryObj.setName(RegistryUtil
|
||||||
.getInternationalString(DataDeliveryIdUtil.getId()
|
.getInternationalString(RegistryIdUtil.getId()
|
||||||
+ " Registry Specification"));
|
+ " Registry Specification"));
|
||||||
registryObj.setObjectType(RegistryObjectTypes.REGISTRY);
|
registryObj.setObjectType(RegistryObjectTypes.REGISTRY);
|
||||||
registryObj.setDescription(registryObj.getName());
|
registryObj.setDescription(registryObj.getName());
|
||||||
registryObj.setOwner(DataDeliveryIdUtil.getId());
|
registryObj.setOwner(RegistryIdUtil.getId());
|
||||||
registryObj.setStatus(StatusTypes.APPROVED);
|
registryObj.setStatus(StatusTypes.APPROVED);
|
||||||
registryObj.setCatalogingLatency(catalogingLatency);
|
registryObj.setCatalogingLatency(catalogingLatency);
|
||||||
registryObj.setConformanceProfile(conformanceProfile);
|
registryObj.setConformanceProfile(conformanceProfile);
|
||||||
|
@ -218,13 +218,13 @@ public class FederationProperties {
|
||||||
phone.setNumber(sitePrimaryContactPhoneNumber);
|
phone.setNumber(sitePrimaryContactPhoneNumber);
|
||||||
|
|
||||||
PersonType person = new PersonType();
|
PersonType person = new PersonType();
|
||||||
person.setId(DataDeliveryIdUtil.getId() + " Primary Contact");
|
person.setId(RegistryIdUtil.getId() + " Primary Contact");
|
||||||
person.setLid(person.getId());
|
person.setLid(person.getId());
|
||||||
person.setName(RegistryUtil.getInternationalString(person.getId()));
|
person.setName(RegistryUtil.getInternationalString(person.getId()));
|
||||||
person.setDescription(person.getName());
|
person.setDescription(person.getName());
|
||||||
person.setStatus(StatusTypes.APPROVED);
|
person.setStatus(StatusTypes.APPROVED);
|
||||||
person.setObjectType(RegistryObjectTypes.PERSON);
|
person.setObjectType(RegistryObjectTypes.PERSON);
|
||||||
person.setOwner(DataDeliveryIdUtil.getId());
|
person.setOwner(RegistryIdUtil.getId());
|
||||||
PersonNameType personName = new PersonNameType();
|
PersonNameType personName = new PersonNameType();
|
||||||
personName.setFirstName(sitePrimaryContactFirstName);
|
personName.setFirstName(sitePrimaryContactFirstName);
|
||||||
personName.setMiddleName(sitePrimaryContactMiddleName);
|
personName.setMiddleName(sitePrimaryContactMiddleName);
|
||||||
|
@ -243,16 +243,16 @@ public class FederationProperties {
|
||||||
*/
|
*/
|
||||||
public OrganizationType createOrganization() {
|
public OrganizationType createOrganization() {
|
||||||
OrganizationType org = new OrganizationType();
|
OrganizationType org = new OrganizationType();
|
||||||
org.setPrimaryContact(DataDeliveryIdUtil.getId() + " Primary Contact");
|
org.setPrimaryContact(RegistryIdUtil.getId() + " Primary Contact");
|
||||||
org.setId(DataDeliveryIdUtil.getId());
|
org.setId(RegistryIdUtil.getId());
|
||||||
org.setLid(org.getId());
|
org.setLid(org.getId());
|
||||||
org.setName(RegistryUtil
|
org.setName(RegistryUtil
|
||||||
.getInternationalString("National Weather Service Office: "
|
.getInternationalString("National Weather Service Office: "
|
||||||
+ DataDeliveryIdUtil.getId()));
|
+ RegistryIdUtil.getId()));
|
||||||
org.setDescription(org.getName());
|
org.setDescription(org.getName());
|
||||||
org.setStatus(StatusTypes.APPROVED);
|
org.setStatus(StatusTypes.APPROVED);
|
||||||
org.setObjectType(RegistryObjectTypes.ORGANIZATION);
|
org.setObjectType(RegistryObjectTypes.ORGANIZATION);
|
||||||
org.setOwner(DataDeliveryIdUtil.getId());
|
org.setOwner(RegistryIdUtil.getId());
|
||||||
TelephoneNumberType phone = new TelephoneNumberType();
|
TelephoneNumberType phone = new TelephoneNumberType();
|
||||||
phone.setAreaCode(sitePhoneAreaCode);
|
phone.setAreaCode(sitePhoneAreaCode);
|
||||||
phone.setNumber(sitePhoneNumber);
|
phone.setNumber(sitePhoneNumber);
|
||||||
|
@ -285,7 +285,7 @@ public class FederationProperties {
|
||||||
+ " Federation Membership Association");
|
+ " Federation Membership Association");
|
||||||
association.setLid(association.getId());
|
association.setLid(association.getId());
|
||||||
association.setObjectType(RegistryObjectTypes.ASSOCIATION);
|
association.setObjectType(RegistryObjectTypes.ASSOCIATION);
|
||||||
association.setOwner(DataDeliveryIdUtil.getId());
|
association.setOwner(RegistryIdUtil.getId());
|
||||||
association.setType(AssociationTypes.HAS_FEDERATION_MEMBER);
|
association.setType(AssociationTypes.HAS_FEDERATION_MEMBER);
|
||||||
association.setStatus(StatusTypes.APPROVED);
|
association.setStatus(StatusTypes.APPROVED);
|
||||||
association.setName(RegistryUtil.getInternationalString(registry
|
association.setName(RegistryUtil.getInternationalString(registry
|
||||||
|
|
|
@ -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.dao.ReplicationEventDao;
|
||||||
import com.raytheon.uf.edex.datadelivery.registry.replication.NotificationServers;
|
import com.raytheon.uf.edex.datadelivery.registry.replication.NotificationServers;
|
||||||
import com.raytheon.uf.edex.datadelivery.registry.web.DataDeliveryRESTServices;
|
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.DbInit;
|
||||||
import com.raytheon.uf.edex.registry.ebxml.dao.RegistryDao;
|
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.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.init.RegistryInitializedListener;
|
||||||
import com.raytheon.uf.edex.registry.ebxml.services.query.QueryConstants;
|
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.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.ebxml.util.EbxmlObjectUtil;
|
||||||
import com.raytheon.uf.edex.registry.events.CreateAuditTrailEvent;
|
import com.raytheon.uf.edex.registry.events.CreateAuditTrailEvent;
|
||||||
|
|
||||||
|
@ -411,7 +411,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
|
||||||
submitObjectsRequest
|
submitObjectsRequest
|
||||||
.getSlot()
|
.getSlot()
|
||||||
.add(new SlotType(EbxmlObjectUtil.EVENT_SOURCE_SLOT,
|
.add(new SlotType(EbxmlObjectUtil.EVENT_SOURCE_SLOT,
|
||||||
new StringValueType(DataDeliveryIdUtil.getId())));
|
new StringValueType(RegistryIdUtil.getId())));
|
||||||
try {
|
try {
|
||||||
statusHandler
|
statusHandler
|
||||||
.info("Submitting federation registration objects to local registry...");
|
.info("Submitting federation registration objects to local registry...");
|
||||||
|
@ -687,7 +687,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
|
||||||
@GET
|
@GET
|
||||||
@Path("dataDeliveryId")
|
@Path("dataDeliveryId")
|
||||||
public String dataDeliveryId() {
|
public String dataDeliveryId() {
|
||||||
return DataDeliveryIdUtil.getId();
|
return RegistryIdUtil.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
|
@ -747,7 +747,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
|
||||||
+ registry.getId() + "]", e);
|
+ registry.getId() + "]", e);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (remoteReplicatingTo.contains(DataDeliveryIdUtil.getId())) {
|
if (remoteReplicatingTo.contains(RegistryIdUtil.getId())) {
|
||||||
registrySet.add(registry.getId().replace(
|
registrySet.add(registry.getId().replace(
|
||||||
FederationProperties.REGISTRY_SUFFIX, ""));
|
FederationProperties.REGISTRY_SUFFIX, ""));
|
||||||
}
|
}
|
||||||
|
@ -765,7 +765,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
|
||||||
RegistryType remoteRegistry = getRegistry(registryId);
|
RegistryType remoteRegistry = getRegistry(registryId);
|
||||||
dataDeliveryRestClient.getRegistryFederationManager(
|
dataDeliveryRestClient.getRegistryFederationManager(
|
||||||
remoteRegistry.getBaseURL()).addReplicationServer(
|
remoteRegistry.getBaseURL()).addReplicationServer(
|
||||||
DataDeliveryIdUtil.getId());
|
RegistryIdUtil.getId());
|
||||||
statusHandler.info("Established replication with [" + registryId + "]");
|
statusHandler.info("Established replication with [" + registryId + "]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -779,7 +779,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
|
||||||
RegistryType remoteRegistry = getRegistry(registryId);
|
RegistryType remoteRegistry = getRegistry(registryId);
|
||||||
dataDeliveryRestClient.getRegistryFederationManager(
|
dataDeliveryRestClient.getRegistryFederationManager(
|
||||||
remoteRegistry.getBaseURL()).removeReplicationServer(
|
remoteRegistry.getBaseURL()).removeReplicationServer(
|
||||||
DataDeliveryIdUtil.getId());
|
RegistryIdUtil.getId());
|
||||||
statusHandler
|
statusHandler
|
||||||
.info("Disconnected replication with [" + registryId + "]");
|
.info("Disconnected replication with [" + registryId + "]");
|
||||||
}
|
}
|
||||||
|
@ -1044,7 +1044,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
|
||||||
request.setUsername(RegistryUtil.registryUser);
|
request.setUsername(RegistryUtil.registryUser);
|
||||||
request.getSlot().add(
|
request.getSlot().add(
|
||||||
new SlotType(EbxmlObjectUtil.EVENT_SOURCE_SLOT,
|
new SlotType(EbxmlObjectUtil.EVENT_SOURCE_SLOT,
|
||||||
new StringValueType(DataDeliveryIdUtil
|
new StringValueType(RegistryIdUtil
|
||||||
.getId())));
|
.getId())));
|
||||||
try {
|
try {
|
||||||
if (!request.getRegistryObjects().isEmpty()) {
|
if (!request.getRegistryObjects().isEmpty()) {
|
||||||
|
@ -1068,7 +1068,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
|
||||||
refList, false, true, DeletionScope.DELETE_ALL);
|
refList, false, true, DeletionScope.DELETE_ALL);
|
||||||
request.getSlot().add(
|
request.getSlot().add(
|
||||||
new SlotType(EbxmlObjectUtil.EVENT_SOURCE_SLOT,
|
new SlotType(EbxmlObjectUtil.EVENT_SOURCE_SLOT,
|
||||||
new StringValueType(DataDeliveryIdUtil
|
new StringValueType(RegistryIdUtil
|
||||||
.getId())));
|
.getId())));
|
||||||
try {
|
try {
|
||||||
if (!refList.getObjectRef().isEmpty()) {
|
if (!refList.getObjectRef().isEmpty()) {
|
||||||
|
@ -1145,7 +1145,7 @@ public class RegistryFederationManager implements IRegistryFederationManager,
|
||||||
String replicatingTo = dataDeliveryRestClient
|
String replicatingTo = dataDeliveryRestClient
|
||||||
.getRegistryFederationManager(remoteRegistry.getBaseURL())
|
.getRegistryFederationManager(remoteRegistry.getBaseURL())
|
||||||
.getReplicatingTo();
|
.getReplicatingTo();
|
||||||
if (replicatingTo.contains(DataDeliveryIdUtil.getId())) {
|
if (replicatingTo.contains(RegistryIdUtil.getId())) {
|
||||||
statusHandler.info("Successfully verified replication with ["
|
statusHandler.info("Successfully verified replication with ["
|
||||||
+ registryId + "]");
|
+ registryId + "]");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -34,4 +34,3 @@ Require-Bundle: com.raytheon.uf.common.auth;bundle-version="1.12.1174",
|
||||||
org.geotools;bundle-version="2.6.4",
|
org.geotools;bundle-version="2.6.4",
|
||||||
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
|
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
|
||||||
com.raytheon.edex.common;bundle-version="1.12.1174"
|
com.raytheon.edex.common;bundle-version="1.12.1174"
|
||||||
Import-Package: com.raytheon.uf.edex.datadelivery.util
|
|
||||||
|
|
|
@ -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.SubscriptionOverlapRequest;
|
||||||
import com.raytheon.uf.common.datadelivery.service.subscription.SubscriptionOverlapResponse;
|
import com.raytheon.uf.common.datadelivery.service.subscription.SubscriptionOverlapResponse;
|
||||||
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
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.
|
* Edex handler for subscription overlap requests.
|
||||||
|
@ -64,7 +64,7 @@ public class SubscriptionOverlapHandler implements
|
||||||
@Override
|
@Override
|
||||||
public Object handleRequest(SubscriptionOverlapRequest request)
|
public Object handleRequest(SubscriptionOverlapRequest request)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
String deliveryId = DataDeliveryIdUtil.getId();
|
String deliveryId = RegistryIdUtil.getId();
|
||||||
List<Subscription> subscriptions = request.getSubscriptionList();
|
List<Subscription> subscriptions = request.getSubscriptionList();
|
||||||
List<String> duplicateList = new LinkedList<String>();
|
List<String> duplicateList = new LinkedList<String>();
|
||||||
SubscriptionOverlapResponse response = new SubscriptionOverlapResponse();
|
SubscriptionOverlapResponse response = new SubscriptionOverlapResponse();
|
||||||
|
|
|
@ -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>
|
|
|
@ -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>
|
|
|
@ -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
|
|
|
@ -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
|
|
|
@ -1,4 +0,0 @@
|
||||||
source.. = src/
|
|
||||||
output.. = bin/
|
|
||||||
bin.includes = META-INF/,\
|
|
||||||
.
|
|
|
@ -1 +0,0 @@
|
||||||
# Required to keep the empty directory present
|
|
|
@ -57,4 +57,11 @@
|
||||||
|
|
||||||
<bean id="registryNamespaceMapper" class="com.raytheon.uf.common.registry.RegistryNamespaceMapper"/>
|
<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>
|
</beans>
|
||||||
|
|
|
@ -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
|
* 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
|
* 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/11/2014 3011 bphillip Changed merge to not delete unused slots
|
||||||
|
* 4/21/2014 2992 dhladky General list of Registry server nodes.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,6 +58,9 @@ public class RegistryObjectDao extends
|
||||||
/** Delete object type parameterized statement */
|
/** Delete object type parameterized statement */
|
||||||
private static final String GET_IDS_BY_OBJECT_TYPE = "SELECT regObj.id FROM RegistryObjectType regObj WHERE regObj.objectType=:objectType";
|
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 */
|
/** 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";
|
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 */
|
/** 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 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
|
* Creates a new RegistryObjectDao
|
||||||
*/
|
*/
|
||||||
|
@ -191,4 +197,18 @@ public class RegistryObjectDao extends
|
||||||
return RegistryObjectType.class;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,12 +17,15 @@
|
||||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
* further licensing information.
|
* 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.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.
|
* returns the Cluster ID.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
|
@ -32,21 +35,43 @@ import com.raytheon.uf.common.util.ClusterIdUtil;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Feb 06, 2014 2771 bgonzale Initial creation
|
* Feb 06, 2014 2771 bgonzale Initial creation
|
||||||
|
* Apr 23, 2014 2992 dhladky General way to get all registries.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author bgonzale
|
* @author bgonzale
|
||||||
* @version 1.0
|
* @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() {
|
public static String getId() {
|
||||||
return ClusterIdUtil.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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -162,5 +162,6 @@
|
||||||
<classpathentry kind="lib" path="lib/jetty-security-7.6.14.v20131031.jar"/>
|
<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.edex.plugin.taf"/>
|
||||||
<classpathentry combineaccessrules="false" kind="src" path="/com.raytheon.uf.common.dataplugin.redbook"/>
|
<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"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -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.hibernate.IFindSubscriptionsForScheduling;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
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
|
* 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,
|
public IntegrationTestWfoBandwidthManager(IBandwidthDbInit dbInit,
|
||||||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil bandwidthDaoUtil,
|
BandwidthDaoUtil bandwidthDaoUtil,
|
||||||
|
DataDeliveryIdUtil idUtil,
|
||||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||||
ISubscriptionHandler subscriptionHandler,
|
ISubscriptionHandler subscriptionHandler,
|
||||||
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
||||||
ISubscriptionNotificationService subscriptionNotificationService,
|
ISubscriptionNotificationService subscriptionNotificationService,
|
||||||
IFindSubscriptionsForScheduling findSubscriptionStrategy) {
|
IFindSubscriptionsForScheduling findSubscriptionStrategy) {
|
||||||
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
|
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil,
|
||||||
dataSetMetaDataHandler, subscriptionHandler,
|
dataSetMetaDataHandler, subscriptionHandler,
|
||||||
adhocSubscriptionHandler, subscriptionNotificationService,
|
adhocSubscriptionHandler, subscriptionNotificationService,
|
||||||
findSubscriptionStrategy);
|
findSubscriptionStrategy);
|
||||||
|
|
|
@ -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.hibernate.IFindSubscriptionsForScheduling;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
||||||
|
import com.raytheon.uf.edex.datadelivery.util.DataDeliveryIdUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates {@link IntegrationTestWfoBandwidthManager} instances.
|
* Creates {@link IntegrationTestWfoBandwidthManager} instances.
|
||||||
|
@ -60,13 +61,14 @@ public class IntegrationTestWfoBandwidthManagerCreator implements
|
||||||
public IBandwidthManager getBandwidthManager(IBandwidthDbInit dbInit,
|
public IBandwidthManager getBandwidthManager(IBandwidthDbInit dbInit,
|
||||||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil bandwidthDaoUtil,
|
BandwidthDaoUtil bandwidthDaoUtil,
|
||||||
|
DataDeliveryIdUtil idUtil,
|
||||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||||
ISubscriptionHandler subscriptionHandler,
|
ISubscriptionHandler subscriptionHandler,
|
||||||
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
||||||
ISubscriptionNotificationService subscriptionNotificationService,
|
ISubscriptionNotificationService subscriptionNotificationService,
|
||||||
IFindSubscriptionsForScheduling findSubscriptionStrategy) {
|
IFindSubscriptionsForScheduling findSubscriptionStrategy) {
|
||||||
return new IntegrationTestWfoBandwidthManager(dbInit, bandwidthDao,
|
return new IntegrationTestWfoBandwidthManager(dbInit, bandwidthDao,
|
||||||
retrievalManager, bandwidthDaoUtil, dataSetMetaDataHandler,
|
retrievalManager, bandwidthDaoUtil, idUtil, dataSetMetaDataHandler,
|
||||||
subscriptionHandler, adhocSubscriptionHandler,
|
subscriptionHandler, adhocSubscriptionHandler,
|
||||||
subscriptionNotificationService, findSubscriptionStrategy);
|
subscriptionNotificationService, findSubscriptionStrategy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,8 @@ package com.raytheon.uf.edex.datadelivery.bandwidth;
|
||||||
|
|
||||||
import org.junit.Test;
|
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.datadelivery.bandwidth.IBandwidthRequest.RequestType;
|
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest.RequestType;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.Network;
|
import com.raytheon.uf.common.datadelivery.registry.Network;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ public class WfoBandwidthManagerIntTest extends
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testReinitializeUsesCorrectSpringFiles() throws Exception {
|
public void testReinitializeUsesCorrectSpringFiles() throws Exception {
|
||||||
final IBandwidthRequest request = new IBandwidthRequest();
|
final BandwidthRequest request = new BandwidthRequest();
|
||||||
request.setRequestType(RequestType.REINITIALIZE);
|
request.setRequestType(RequestType.REINITIALIZE);
|
||||||
bandwidthManager.handleRequest(request);
|
bandwidthManager.handleRequest(request);
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@ import org.junit.Test;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||||
|
|
||||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
|
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest;
|
||||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest.RequestType;
|
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest.RequestType;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.Network;
|
import com.raytheon.uf.common.datadelivery.registry.Network;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||||
import com.raytheon.uf.common.datadelivery.request.DataDeliveryConstants;
|
import com.raytheon.uf.common.datadelivery.request.DataDeliveryConstants;
|
||||||
|
@ -101,7 +101,7 @@ public class WfoNcfBandwidthManagerIntTest extends
|
||||||
public Object route(IServerRequest request)
|
public Object route(IServerRequest request)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
return ncfBandwidthManager
|
return ncfBandwidthManager
|
||||||
.handleRequest((IBandwidthRequest) request);
|
.handleRequest((BandwidthRequest) request);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (RegistryException e) {
|
} catch (RegistryException e) {
|
||||||
|
@ -217,7 +217,7 @@ public class WfoNcfBandwidthManagerIntTest extends
|
||||||
*/
|
*/
|
||||||
private void scheduleSbnSubscription(Subscription subscription,
|
private void scheduleSbnSubscription(Subscription subscription,
|
||||||
RequestType requestType) throws Exception {
|
RequestType requestType) throws Exception {
|
||||||
IBandwidthRequest request = new IBandwidthRequest();
|
BandwidthRequest request = new BandwidthRequest();
|
||||||
request.setRequestType(requestType);
|
request.setRequestType(requestType);
|
||||||
request.setNetwork(subscription.getRoute());
|
request.setNetwork(subscription.getRoute());
|
||||||
request.setSubscriptions(Arrays.asList(subscription));
|
request.setSubscriptions(Arrays.asList(subscription));
|
||||||
|
|
|
@ -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.ncf.NcfBandwidthManagerCreator.NcfBandwidthManager;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
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
|
* 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,
|
public IntegrationTestNcfBandwidthManager(IBandwidthDbInit dbInit,
|
||||||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil bandwidthDaoUtil,
|
BandwidthDaoUtil bandwidthDaoUtil,
|
||||||
|
DataDeliveryIdUtil idUtil,
|
||||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||||
ISubscriptionHandler subscriptionHandler,
|
ISubscriptionHandler subscriptionHandler,
|
||||||
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
||||||
ISubscriptionNotificationService subscriptionNotificationService,
|
ISubscriptionNotificationService subscriptionNotificationService,
|
||||||
IFindSubscriptionsForScheduling findSubscriptionStrategy) {
|
IFindSubscriptionsForScheduling findSubscriptionStrategy) {
|
||||||
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
|
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil, idUtil,
|
||||||
dataSetMetaDataHandler, subscriptionHandler,
|
dataSetMetaDataHandler, subscriptionHandler,
|
||||||
adhocSubscriptionHandler, subscriptionNotificationService,
|
adhocSubscriptionHandler, subscriptionNotificationService,
|
||||||
findSubscriptionStrategy);
|
findSubscriptionStrategy);
|
||||||
|
|
|
@ -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.hibernate.IFindSubscriptionsForScheduling;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalManager;
|
||||||
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
||||||
|
import com.raytheon.uf.edex.datadelivery.util.DataDeliveryIdUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates {@link IntegrationTestNcfBandwidthManager} instances.
|
* Creates {@link IntegrationTestNcfBandwidthManager} instances.
|
||||||
|
@ -61,13 +62,14 @@ public class IntegrationTestNcfBandwidthManagerCreator implements
|
||||||
public IBandwidthManager getBandwidthManager(IBandwidthDbInit dbInit,
|
public IBandwidthManager getBandwidthManager(IBandwidthDbInit dbInit,
|
||||||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||||
BandwidthDaoUtil bandwidthDaoUtil,
|
BandwidthDaoUtil bandwidthDaoUtil,
|
||||||
|
DataDeliveryIdUtil idUtil,
|
||||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||||
ISubscriptionHandler subscriptionHandler,
|
ISubscriptionHandler subscriptionHandler,
|
||||||
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
IAdhocSubscriptionHandler adhocSubscriptionHandler,
|
||||||
ISubscriptionNotificationService subscriptionNotificationService,
|
ISubscriptionNotificationService subscriptionNotificationService,
|
||||||
IFindSubscriptionsForScheduling findSubscriptionStrategy) {
|
IFindSubscriptionsForScheduling findSubscriptionStrategy) {
|
||||||
return new IntegrationTestNcfBandwidthManager(dbInit, bandwidthDao,
|
return new IntegrationTestNcfBandwidthManager(dbInit, bandwidthDao,
|
||||||
retrievalManager, bandwidthDaoUtil, dataSetMetaDataHandler,
|
retrievalManager, bandwidthDaoUtil, idUtil, dataSetMetaDataHandler,
|
||||||
subscriptionHandler, adhocSubscriptionHandler,
|
subscriptionHandler, adhocSubscriptionHandler,
|
||||||
subscriptionNotificationService, findSubscriptionStrategy);
|
subscriptionNotificationService, findSubscriptionStrategy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,8 @@ package com.raytheon.uf.edex.datadelivery.bandwidth.ncf;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
|
||||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
|
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest;
|
||||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest.RequestType;
|
import com.raytheon.uf.common.datadelivery.bandwidth.BandwidthRequest.RequestType;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.Network;
|
import com.raytheon.uf.common.datadelivery.registry.Network;
|
||||||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||||
import com.raytheon.uf.common.util.SpringFiles;
|
import com.raytheon.uf.common.util.SpringFiles;
|
||||||
|
@ -82,7 +82,7 @@ public class NcfBandwidthManagerIntTest extends AbstractBandwidthManagerIntTest
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testReinitializeUsesCorrectSpringFiles() throws Exception {
|
public void testReinitializeUsesCorrectSpringFiles() throws Exception {
|
||||||
final IBandwidthRequest request = new IBandwidthRequest();
|
final BandwidthRequest request = new BandwidthRequest();
|
||||||
request.setRequestType(RequestType.REINITIALIZE);
|
request.setRequestType(RequestType.REINITIALIZE);
|
||||||
bandwidthManager.handleRequest(request);
|
bandwidthManager.handleRequest(request);
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ import static org.junit.Assert.assertNotNull;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import com.raytheon.uf.common.comm.CommunicationException;
|
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.localization.msgs.GetServersRequest;
|
||||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||||
import com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler.ServerPrivilegedRequest;
|
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 {
|
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();
|
private static final GetServersRequest UNPRIVILEGED_REQUEST = new GetServersRequest();
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ import static org.mockito.Mockito.when;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
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.localization.msgs.GetServersRequest;
|
||||||
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
||||||
import com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler;
|
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 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();
|
private static final GetServersRequest UNPRIVILEGED_REQUEST = new GetServersRequest();
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import com.raytheon.uf.common.auth.resp.SuccessfulExecution;
|
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.localization.msgs.GetServersRequest;
|
||||||
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
import com.raytheon.uf.common.serialization.comm.IRequestHandler;
|
||||||
import com.raytheon.uf.common.serialization.comm.IServerRequest;
|
import com.raytheon.uf.common.serialization.comm.IServerRequest;
|
||||||
|
@ -58,7 +58,7 @@ import com.raytheon.uf.edex.auth.req.ServerPrivilegedRequestHandler.ServerPrivil
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
public class ServerPrivilegedRequestHandlerTest {
|
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);
|
private final HandlerRegistry registry = mock(HandlerRegistry.class);
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ public class ServerPrivilegedRequestHandlerTest {
|
||||||
RemoteRequestServer.getInstance().setRegistry(registry);
|
RemoteRequestServer.getInstance().setRegistry(registry);
|
||||||
|
|
||||||
when(
|
when(
|
||||||
registry.getRequestHandler(IBandwidthRequest.class
|
registry.getRequestHandler(BandwidthRequest.class
|
||||||
.getCanonicalName())).thenReturn(bandwidthHandler);
|
.getCanonicalName())).thenReturn(bandwidthHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class MockGridMetaDataAdapter extends GridMetadataAdapter {
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
GridCoverage getCoverageFromCache(GridCoverage coverage) {
|
GridCoverage getCoverageFromCache(GridCoverage coverage) {
|
||||||
return GriddedCoverageFixture.INSTANCE.get().getGridCoverage();
|
return GriddedCoverageFixture.INSTANCE.get().getGridCoverage();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue