Merge branch 'development' into development_on_RHEL6
Conflicts: rpms/build/i386/build.sh rpms/build/x86_64/build.sh Former-commit-id: 038cc7fd8c8dd54a67183f9c726b3c41d0c4e638
This commit is contained in:
commit
86dd200844
83 changed files with 968 additions and 292 deletions
|
@ -38,7 +38,6 @@ import com.raytheon.uf.common.localization.LocalizationFile;
|
|||
import com.raytheon.uf.common.localization.PathManager;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
|
||||
/**
|
||||
|
@ -57,6 +56,7 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
* Aug 06, 2013 2210 njensen Moved colormaps to common_static
|
||||
* Sep 18, 2013 2421 bsteffen Moved some listing capabilities into
|
||||
* ColorMapTree.
|
||||
* Nov 11, 2013 2361 njensen Use ColorMap.JAXB for XML processing
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -263,8 +263,8 @@ public class ColorMapLoader {
|
|||
private static IColorMap loadColorMap(String name,
|
||||
LocalizationFile colorMapFile) throws SerializationException {
|
||||
if (colorMapFile != null) {
|
||||
ColorMap cm = SerializationUtil.jaxbUnmarshalFromXmlFile(
|
||||
ColorMap.class, colorMapFile.getFile().getAbsolutePath());
|
||||
ColorMap cm = ColorMap.JAXB.unmarshalFromXmlFile(colorMapFile
|
||||
.getFile().getAbsolutePath());
|
||||
cm.setName(name);
|
||||
cm.setChanged(false);
|
||||
return cm;
|
||||
|
|
|
@ -143,6 +143,7 @@ import com.raytheon.viz.ui.presenter.components.ComboBoxConf;
|
|||
* Oct 23, 2013 2484 dhladky Unique ID for subscriptions updated.
|
||||
* Oct 21, 2013 2292 mpduff Close dialog on OK.
|
||||
* Nov 07, 2013 2291 skorolev Used showText() method for "Unable to Create Subscription" message.
|
||||
* Nov 08, 2013 2506 bgonzale Removed send notification when a subscription is updated and created.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1179,12 +1180,7 @@ public class CreateSubscriptionDlg extends CaveSWTDialog {
|
|||
public void done(final IJobChangeEvent event) {
|
||||
try {
|
||||
final IStatus status = event.getResult();
|
||||
|
||||
final boolean subscriptionCreated = status.isOK();
|
||||
if (subscriptionCreated) {
|
||||
sendSubscriptionNotification(subscription,
|
||||
username);
|
||||
}
|
||||
|
||||
if (!Strings.isNullOrEmpty(status.getMessage())) {
|
||||
guiThreadTaskExecutor.runAsync(new Runnable() {
|
||||
|
@ -1286,10 +1282,6 @@ public class CreateSubscriptionDlg extends CaveSWTDialog {
|
|||
return false;
|
||||
}
|
||||
|
||||
subscriptionNotificationService
|
||||
.sendUpdatedSubscriptionNotification(subscription,
|
||||
username);
|
||||
|
||||
} catch (RegistryHandlerException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Unable to update subscription.", e);
|
||||
|
|
|
@ -67,6 +67,7 @@ import com.raytheon.viz.ui.presenter.components.WidgetConf;
|
|||
* Apr 08, 2013 1826 djohnson Remove delivery options.
|
||||
* May 14, 2013 1040 mpduff Changed to add office Id rather than setting it.
|
||||
* May 21, 2013 2020 mpduff Rename UserSubscription to SiteSubscription.
|
||||
* Nov 08, 2013 2506 bgonzale Removed send notification when a subscription is created.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -279,9 +280,6 @@ public class GroupAddDlg extends CaveSWTDialog {
|
|||
return false;
|
||||
}
|
||||
|
||||
subscriptionNotificationService.sendCreatedSubscriptionNotification(
|
||||
subscription, username);
|
||||
|
||||
// refresh table
|
||||
callback.handleRefresh();
|
||||
|
||||
|
|
|
@ -142,6 +142,7 @@ import com.raytheon.viz.ui.presenter.IDisplay;
|
|||
* Sep 25. 2013 2409 mpduff Add check for widget disposed after calling configuration.
|
||||
* Oct 25, 2013 2292 mpduff Move overlap checks to edex.
|
||||
* Nov 06, 2013 2358 mpduff Resurrected file management code.
|
||||
* Nov 08, 2013 2506 bgonzale Removed send notification when a subscription is deleted.
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
|
@ -1330,12 +1331,6 @@ public class SubscriptionManagerDlg extends CaveSWTDialog implements
|
|||
.get(ISubscriptionHandler.class);
|
||||
try {
|
||||
handler.delete(username, subscriptions);
|
||||
|
||||
for (Subscription subscription : subscriptions) {
|
||||
subscriptionNotificationService
|
||||
.sendDeletedSubscriptionNotification(subscription,
|
||||
username);
|
||||
}
|
||||
} catch (RegistryHandlerException e) {
|
||||
exceptions.add(e);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,6 @@ import com.raytheon.uf.common.colormap.ColorMap;
|
|||
import com.raytheon.uf.common.colormap.IColorMap;
|
||||
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.viz.ui.dialogs.colordialog.ColorData;
|
||||
import com.raytheon.viz.ui.dialogs.colordialog.ColorEditComposite;
|
||||
import com.raytheon.viz.ui.dialogs.colordialog.IColorEditCompCallback;
|
||||
|
@ -52,6 +51,7 @@ import com.raytheon.viz.ui.dialogs.colordialog.IColorEditCompCallback;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 18, 2010 mschenke Initial creation
|
||||
* Nov 11, 2013 2361 njensen Use ColorMap.JAXB for XML processing
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -161,8 +161,7 @@ public class ColorMapEditor extends EditorPart implements
|
|||
IFileEditorInput fei = (IFileEditorInput) input;
|
||||
File file = fei.getFile().getRawLocation().toFile();
|
||||
try {
|
||||
IColorMap cmap = (IColorMap) SerializationUtil
|
||||
.jaxbUnmarshalFromXmlFile(file);
|
||||
IColorMap cmap = ColorMap.JAXB.unmarshalFromXmlFile(file);
|
||||
fakeParameters = new ColorMapParameters();
|
||||
fakeParameters.setColorMap(cmap);
|
||||
fakeParameters.setColorMapMin(0);
|
||||
|
|
|
@ -30,12 +30,9 @@ import org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart;
|
|||
|
||||
import com.raytheon.uf.common.colormap.ColorMap;
|
||||
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.status.StatusConstants;
|
||||
import com.raytheon.viz.ui.UiPlugin;
|
||||
import com.raytheon.viz.ui.dialogs.colordialog.ColorData;
|
||||
import com.raytheon.viz.ui.dialogs.colordialog.IColorEditCompCallback;
|
||||
|
||||
|
@ -50,7 +47,8 @@ import com.raytheon.viz.ui.dialogs.colordialog.IColorEditCompCallback;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 18, 2010 mschenke Initial creation
|
||||
* Nov 18, 2010 mschenke Initial creation
|
||||
* Nov 11, 2013 2361 njensen Use ColorMap.JAXB for XML processing
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -61,7 +59,8 @@ import com.raytheon.viz.ui.dialogs.colordialog.IColorEditCompCallback;
|
|||
@SuppressWarnings("restriction")
|
||||
public class ColorMapMultiPageEditorPart extends XMLMultiPageEditorPart
|
||||
implements IColorEditCompCallback {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(ColorMapMultiPageEditorPart.class);
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ColorMapMultiPageEditorPart.class);
|
||||
|
||||
private ColorMapEditor editor;
|
||||
|
||||
|
@ -103,7 +102,7 @@ public class ColorMapMultiPageEditorPart extends XMLMultiPageEditorPart
|
|||
}
|
||||
if (editor != null) {
|
||||
try {
|
||||
String newXml = SerializationUtil
|
||||
String newXml = ColorMap.JAXB
|
||||
.marshalToXml((ColorMap) getColorMapParameters()
|
||||
.getColorMap());
|
||||
IDocument document = editor.getDocumentProvider().getDocument(
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.osgi.framework.Constants;
|
|||
* has been started
|
||||
* Mar 05, 2013 1754 djohnson Catch exceptions and allow as much of the Spring container to boot as possible.
|
||||
* May 23, 2013 2005 njensen Added springSuccess flag
|
||||
* Nov 12, 2013 2361 njensen Print out time spent on each spring context
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -153,10 +154,11 @@ public class Activator implements BundleActivator {
|
|||
}
|
||||
|
||||
try {
|
||||
long t0 = System.currentTimeMillis();
|
||||
if (parentContexts.size() > 0) {
|
||||
// Context with parent context
|
||||
appCtx = new OSGIXmlApplicationContext(
|
||||
new OSGIGroupApplicationContext(
|
||||
new OSGIGroupApplicationContext(bundle,
|
||||
parentContexts),
|
||||
files.toArray(new String[0]), bundle);
|
||||
} else {
|
||||
|
@ -164,6 +166,9 @@ public class Activator implements BundleActivator {
|
|||
appCtx = new OSGIXmlApplicationContext(
|
||||
files.toArray(new String[0]), bundle);
|
||||
}
|
||||
System.out.println("Bundle " + bundle.getSymbolicName()
|
||||
+ " spring init took: "
|
||||
+ (System.currentTimeMillis() - t0));
|
||||
} catch (Throwable t) {
|
||||
// No access to the statusHandler yet, so print the
|
||||
// stack trace to the console. By catching this, we also
|
||||
|
|
|
@ -21,6 +21,7 @@ package com.raytheon.uf.viz.spring.dm;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
|
@ -35,7 +36,8 @@ import org.springframework.context.support.GenericApplicationContext;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 1, 2012 mschenke Initial creation
|
||||
* Nov 01, 2012 mschenke Initial creation
|
||||
* Nov 12, 2013 2361 njensen call setDisplayName()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -45,8 +47,9 @@ import org.springframework.context.support.GenericApplicationContext;
|
|||
|
||||
public class OSGIGroupApplicationContext extends GenericApplicationContext {
|
||||
|
||||
public OSGIGroupApplicationContext(
|
||||
public OSGIGroupApplicationContext(Bundle child,
|
||||
List<OSGIXmlApplicationContext> contextGroup) {
|
||||
this.setDisplayName("parent of " + child.getSymbolicName());
|
||||
refresh(); // refresh first to avoid recreating bean definitions
|
||||
DefaultListableBeanFactory factory = getDefaultListableBeanFactory();
|
||||
// Register all bean definitions from other contexts into our factory
|
||||
|
|
|
@ -34,7 +34,8 @@ import org.springframework.context.support.AbstractXmlApplicationContext;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 30, 2012 mschenke Initial creation
|
||||
* Oct 30, 2012 mschenke Initial creation
|
||||
* Nov 12, 2013 2361 njensen call setDisplayName()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -53,6 +54,7 @@ public class OSGIXmlApplicationContext extends AbstractXmlApplicationContext {
|
|||
super(parent);
|
||||
setClassLoader(new OSGIXmlClassLoader(bundle, getClassLoader()));
|
||||
setConfigLocations(configLocations);
|
||||
this.setDisplayName(bundle.getSymbolicName());
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ import com.raytheon.uf.common.localization.LocalizationFile;
|
|||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationOpFailedException;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.util.FileUtil;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
|
||||
|
@ -54,6 +53,7 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
* Aug 20, 2008 dglazesk Updated for the new ColorMap interface
|
||||
* and for the JiBX to JaXB transition
|
||||
* Aug 06, 2013 2210 njensen Moved colormaps to common_static
|
||||
* Nov 11, 2013 2361 njensen Use ColorMap.JAXB for XML processing
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -181,7 +181,7 @@ public class ColorUtil {
|
|||
}
|
||||
|
||||
try {
|
||||
SerializationUtil.jaxbMarshalToXmlFile(aColorMap, path.toString());
|
||||
ColorMap.JAXB.marshalToXmlFile(aColorMap, path.toString());
|
||||
} catch (SerializationException e) {
|
||||
throw new VizException("Unable to serialize ColorMap "
|
||||
+ aColorMap.getName(), e);
|
||||
|
@ -250,7 +250,7 @@ public class ColorUtil {
|
|||
String xml;
|
||||
try {
|
||||
// JAXB marshaling
|
||||
xml = SerializationUtil.marshalToXml(aColorMap);
|
||||
xml = ColorMap.JAXB.marshalToXml(aColorMap);
|
||||
} catch (JAXBException e1) {
|
||||
throw new LocalizationOpFailedException(
|
||||
"Unable to Marshal colormap " + aColorMap.getName(), e1);
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="javax.el-2.1.0.v201105211819.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="javax.servlet.jsp-2.1.0.v201105211820.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="org.apache.jasper.glassfish-2.1.0.v201110031002.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jetty-client-7.6.9.v20130131.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jetty-continuation-7.6.9.v20130131.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jetty-http-7.6.9.v20130131.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jetty-io-7.6.9.v20130131.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jetty-jmx-7.6.9.v20130131.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jetty-security-7.6.9.v20130131.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jetty-server-7.6.9.v20130131.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jetty-servlet-7.6.9.v20130131.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jetty-servlets-7.6.9.v20130131.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jetty-util-7.6.9.v20130131.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jetty-webapp-7.6.9.v20130131.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="jetty-xml-7.6.9.v20130131.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="servlet-api-2.5.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="javax.el-2.1.0.v201105211819.jar"/>
|
||||
<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="lib" path="jetty-client-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="jetty-continuation-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="jetty-http-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="jetty-io-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="jetty-jmx-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="jetty-security-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="jetty-server-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="jetty-servlet-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="jetty-servlets-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="jetty-util-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="jetty-webapp-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="jetty-xml-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="servlet-api-2.5.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
|
@ -4,8 +4,12 @@ Bundle-Name: Eclipse Jetty
|
|||
Bundle-SymbolicName: org.eclipse.jetty
|
||||
Bundle-Version: 7.6.9.v20130131
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Export-Package: javax.servlet,
|
||||
Export-Package: javax.el,
|
||||
javax.servlet,
|
||||
javax.servlet.http,
|
||||
javax.servlet.jsp,
|
||||
javax.servlet.jsp.el,
|
||||
javax.servlet.jsp.tagext,
|
||||
org.eclipse.jetty.client,
|
||||
org.eclipse.jetty.client.security,
|
||||
org.eclipse.jetty.client.webdav,
|
||||
|
@ -46,19 +50,18 @@ Export-Package: javax.servlet,
|
|||
org.eclipse.jetty.util.thread,
|
||||
org.eclipse.jetty.webapp,
|
||||
org.eclipse.jetty.xml
|
||||
Bundle-ClassPath: jetty-client-7.6.9.v20130131.jar,
|
||||
jetty-continuation-7.6.9.v20130131.jar,
|
||||
jetty-http-7.6.9.v20130131.jar,
|
||||
jetty-io-7.6.9.v20130131.jar,
|
||||
jetty-jmx-7.6.9.v20130131.jar,
|
||||
jetty-security-7.6.9.v20130131.jar,
|
||||
jetty-server-7.6.9.v20130131.jar,
|
||||
jetty-servlet-7.6.9.v20130131.jar,
|
||||
jetty-servlets-7.6.9.v20130131.jar,
|
||||
jetty-util-7.6.9.v20130131.jar,
|
||||
jetty-webapp-7.6.9.v20130131.jar,
|
||||
jetty-xml-7.6.9.v20130131.jar,
|
||||
Bundle-ClassPath: jetty-client-7.6.14.v20131031.jar,
|
||||
jetty-continuation-7.6.14.v20131031.jar,
|
||||
jetty-http-7.6.14.v20131031.jar,
|
||||
jetty-io-7.6.14.v20131031.jar,
|
||||
jetty-jmx-7.6.14.v20131031.jar,
|
||||
jetty-security-7.6.14.v20131031.jar,
|
||||
jetty-server-7.6.14.v20131031.jar,
|
||||
jetty-servlet-7.6.14.v20131031.jar,
|
||||
jetty-servlets-7.6.14.v20131031.jar,
|
||||
jetty-util-7.6.14.v20131031.jar,
|
||||
jetty-webapp-7.6.14.v20131031.jar,
|
||||
jetty-xml-7.6.14.v20131031.jar,
|
||||
servlet-api-2.5.jar,
|
||||
org.apache.jasper.glassfish-2.1.0.v201110031002.jar,
|
||||
javax.servlet.jsp-2.1.0.v201105211820.jar,
|
||||
javax.el-2.1.0.v201105211819.jar
|
||||
javax.el-2.1.0.v201105211819.jar,
|
||||
javax.servlet.jsp-2.1.0.v201105211820.jar
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
jetty-client-7.6.9.v20130131.jar,\
|
||||
jetty-continuation-7.6.9.v20130131.jar,\
|
||||
jetty-http-7.6.9.v20130131.jar,\
|
||||
jetty-io-7.6.9.v20130131.jar,\
|
||||
jetty-jmx-7.6.9.v20130131.jar,\
|
||||
jetty-security-7.6.9.v20130131.jar,\
|
||||
jetty-server-7.6.9.v20130131.jar,\
|
||||
jetty-servlet-7.6.9.v20130131.jar,\
|
||||
jetty-servlets-7.6.9.v20130131.jar,\
|
||||
jetty-util-7.6.9.v20130131.jar,\
|
||||
jetty-webapp-7.6.9.v20130131.jar,\
|
||||
jetty-xml-7.6.9.v20130131.jar,\
|
||||
jetty-client-7.6.14.v20131031.jar,\
|
||||
jetty-continuation-7.6.14.v20131031.jar,\
|
||||
jetty-http-7.6.14.v20131031.jar,\
|
||||
jetty-io-7.6.14.v20131031.jar,\
|
||||
jetty-jmx-7.6.14.v20131031.jar,\
|
||||
jetty-security-7.6.14.v20131031.jar,\
|
||||
jetty-server-7.6.14.v20131031.jar,\
|
||||
jetty-servlet-7.6.14.v20131031.jar,\
|
||||
jetty-servlets-7.6.14.v20131031.jar,\
|
||||
jetty-util-7.6.14.v20131031.jar,\
|
||||
jetty-webapp-7.6.14.v20131031.jar,\
|
||||
jetty-xml-7.6.14.v20131031.jar,\
|
||||
servlet-api-2.5.jar,\
|
||||
org.apache.jasper.glassfish-2.1.0.v201110031002.jar,\
|
||||
javax.servlet.jsp-2.1.0.v201105211820.jar,\
|
||||
javax.el-2.1.0.v201105211819.jar
|
||||
javax.el-2.1.0.v201105211819.jar,\
|
||||
javax.servlet.jsp-2.1.0.v201105211820.jar
|
||||
|
|
BIN
cots/org.eclipse.jetty/jetty-client-7.6.14.v20131031.jar
Normal file
BIN
cots/org.eclipse.jetty/jetty-client-7.6.14.v20131031.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.eclipse.jetty/jetty-servlet-7.6.14.v20131031.jar
Normal file
BIN
cots/org.eclipse.jetty/jetty-servlet-7.6.14.v20131031.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
cots/org.eclipse.jetty/jetty-servlets-7.6.14.v20131031.jar
Normal file
BIN
cots/org.eclipse.jetty/jetty-servlets-7.6.14.v20131031.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
cots/org.eclipse.jetty/jetty-xml-7.6.14.v20131031.jar
Normal file
BIN
cots/org.eclipse.jetty/jetty-xml-7.6.14.v20131031.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -36,7 +36,6 @@ import com.raytheon.uf.common.localization.IPathManager;
|
|||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
@ -55,6 +54,7 @@ import com.raytheon.uf.common.util.FileUtil;
|
|||
* Feb 15, 2013 1638 mschenke Moved IndexColorModel creation to common.colormap utility
|
||||
* Mar 14, 2013 1794 djohnson FileUtil.listFiles now returns List.
|
||||
* Aug 06, 2013 2210 njensen Moved colormaps to common_static
|
||||
* Nov 11, 2013 2361 njensen Use ColorMap.JAXB for XML processing
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -113,8 +113,7 @@ public class ColorMapManager {
|
|||
if (baseFile.exists()) {
|
||||
|
||||
try {
|
||||
map = (ColorMap) SerializationUtil
|
||||
.jaxbUnmarshalFromXmlFile(baseFilePath);
|
||||
map = ColorMap.JAXB.unmarshalFromXmlFile(baseFilePath);
|
||||
} catch (SerializationException e) {
|
||||
throw new ColorTableException("Exception during serialization "
|
||||
+ baseFilePath, e);
|
||||
|
|
|
@ -34,15 +34,13 @@ import java.util.Set;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import com.raytheon.edex.exception.DecoderException;
|
||||
import com.raytheon.edex.plugin.taf.common.ChangeGroup;
|
||||
import com.raytheon.edex.plugin.taf.common.TafPeriod;
|
||||
import com.raytheon.edex.plugin.taf.common.TafRecord;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.common.time.TimeRange;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||
import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
||||
|
||||
|
@ -55,6 +53,7 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 20, 2008 1515 jkorman Initial implementation to
|
||||
* add 30 Hour tafs.
|
||||
* Nov 12, 2013 2546 bclement added check for legacy valid time
|
||||
* </pre>
|
||||
*
|
||||
* @author jkorman
|
||||
|
@ -90,6 +89,9 @@ public class TAFChangeGroupFactory {
|
|||
|
||||
private final Pattern PAT_VALID_TIME = Pattern.compile(VALID_TIME);
|
||||
|
||||
private static final Pattern PAT_LEGACY_VALID_TIME = Pattern.compile("\\s"
|
||||
+ DAY + HOUR + HOUR + "\\s");
|
||||
|
||||
private final Pattern PAT_PROB = Pattern.compile(PROB);
|
||||
|
||||
private final Pattern PAT_TEMPO = Pattern.compile(TEMPO);
|
||||
|
@ -100,8 +102,6 @@ public class TAFChangeGroupFactory {
|
|||
|
||||
private final Pattern PAT_FM = Pattern.compile(FM);
|
||||
|
||||
private final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private Calendar issueTime = null;
|
||||
|
||||
private String issueTimeString = null;
|
||||
|
@ -165,17 +165,19 @@ public class TAFChangeGroupFactory {
|
|||
if (locations.size() > 2) {
|
||||
stopPos = locations.get(0);
|
||||
}
|
||||
String firstChunk = tafData.substring(startPos, stopPos);
|
||||
Matcher m = PAT_VALID_TIME
|
||||
.matcher(tafData.substring(startPos, stopPos));
|
||||
.matcher(firstChunk);
|
||||
if (m.find()) {
|
||||
startPos = m.start();
|
||||
stopPos = m.end();
|
||||
locations.add(0, stopPos);
|
||||
locations.add(0, startPos);
|
||||
}
|
||||
|
||||
return locations;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param tafData
|
||||
|
@ -288,10 +290,12 @@ public class TAFChangeGroupFactory {
|
|||
* @param tafData
|
||||
* @return
|
||||
*/
|
||||
private List<TAFSubGroup> parse30HourTaf(String tafData)
|
||||
private List<TAFSubGroup> parse30HourTaf(WMOHeader wmo, String tafData)
|
||||
throws DecoderException {
|
||||
|
||||
List<TAFSubGroup> groups = null;
|
||||
|
||||
tafData = checkForLegacyFormat(wmo, tafData);
|
||||
|
||||
List<Integer> locations = findPositions(new StringBuilder(tafData));
|
||||
|
||||
|
@ -331,6 +335,57 @@ public class TAFChangeGroupFactory {
|
|||
}
|
||||
return groups;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert from legacy TAF format for valid times (DDHHHH) to the current
|
||||
* extended format for valid times (DDHH/DDHH) if needed.
|
||||
*
|
||||
* @param wmo
|
||||
* @param tafData
|
||||
* @return
|
||||
*/
|
||||
protected String checkForLegacyFormat(WMOHeader wmo, String tafData) {
|
||||
Matcher m = PAT_LEGACY_VALID_TIME.matcher(tafData);
|
||||
boolean isLegacy = m.find();
|
||||
if (!isLegacy) {
|
||||
return tafData;
|
||||
}
|
||||
StringBuilder rval = new StringBuilder();
|
||||
int last = 0;
|
||||
do {
|
||||
int day1 = Integer.parseInt(m.group(1));
|
||||
int day2 = day1;
|
||||
int hr1 = Integer.parseInt(m.group(4));
|
||||
int hr2 = Integer.parseInt(m.group(7));
|
||||
if (hr2 == 24) {
|
||||
// legacy format uses 00 for valid start but 24 for valid end
|
||||
hr2 = 00;
|
||||
}
|
||||
if (hr2 <= hr1) {
|
||||
// valid time crosses midnight
|
||||
Calendar cal = wmo.getHeaderDate();
|
||||
if (cal == null) {
|
||||
// no month information in header, assume this month
|
||||
cal = TimeUtil.newCalendar(TimeUtil.GMT_TIME_ZONE);
|
||||
}
|
||||
// cal may be set to a day different than the valid start
|
||||
cal.set(Calendar.DAY_OF_MONTH, day1);
|
||||
// handles month roll over
|
||||
cal.add(Calendar.DAY_OF_MONTH, 1);
|
||||
day2 = cal.get(Calendar.DAY_OF_MONTH);
|
||||
}
|
||||
// +1 to include preceding white space
|
||||
rval.append(tafData.substring(last, m.start() + 1));
|
||||
rval.append(String
|
||||
.format("%02d%02d/%02d%02d", day1, hr1, day2,
|
||||
hr2));
|
||||
// -1 to include following white space
|
||||
last = m.end() - 1;
|
||||
} while (m.find());
|
||||
// handle tail
|
||||
rval.append(tafData.substring(last));
|
||||
return rval.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This processes the initial taf group containing the taf issue time, any
|
||||
|
@ -449,7 +504,7 @@ public class TAFChangeGroupFactory {
|
|||
String testData = tafParts.getTafHeader() + tafParts.getTafBody();
|
||||
// *********************
|
||||
|
||||
List<TAFSubGroup> groups = parse30HourTaf(testData);
|
||||
List<TAFSubGroup> groups = parse30HourTaf(wmoHeader, testData);
|
||||
if (groups != null) {
|
||||
List<ChangeGroup> changeGroups = null;
|
||||
|
||||
|
@ -547,4 +602,5 @@ public class TAFChangeGroupFactory {
|
|||
|
||||
return record;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
com.raytheon.uf.common.colormap.ColorMap
|
||||
com.raytheon.uf.common.colormap.prefs.ColorMapParameters
|
||||
|
|
|
@ -33,7 +33,7 @@ import javax.xml.bind.annotation.XmlElement;
|
|||
import javax.xml.bind.annotation.XmlElements;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
|
||||
|
||||
/**
|
||||
* Implementation of a colormap
|
||||
|
@ -51,6 +51,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
|
|||
* usable
|
||||
* Jan 10, 2013 15648 ryu Added removeDuplicates() method.
|
||||
* Apr 18, 2013 1920 mpduff Default changed to true.
|
||||
* Nov 11, 2013 2361 njensen Added JAXB
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -59,7 +60,10 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
|
|||
*/
|
||||
@XmlRootElement(name = "colorMap")
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class ColorMap extends AbstractColorMap implements ISerializableObject {
|
||||
public class ColorMap extends AbstractColorMap {
|
||||
|
||||
public static final SingleTypeJAXBManager<ColorMap> JAXB = SingleTypeJAXBManager
|
||||
.createWithoutException(ColorMap.class);
|
||||
|
||||
@XmlElements({ @XmlElement(name = "color", type = Color.class) })
|
||||
List<Color> colors;
|
||||
|
@ -71,7 +75,7 @@ public class ColorMap extends AbstractColorMap implements ISerializableObject {
|
|||
private boolean changed = true;
|
||||
|
||||
/**
|
||||
* Constructor used by JiBX
|
||||
* Constructor
|
||||
*/
|
||||
public ColorMap() {
|
||||
this.colors = new ArrayList<Color>();
|
||||
|
|
|
@ -34,6 +34,7 @@ import com.raytheon.uf.common.registry.ebxml.RegistryUtil;
|
|||
* Dec 11, 2012 1403 djohnson Adhoc subscriptions no longer go to the registry.
|
||||
* May 21, 2013 2020 mpduff Rename UserSubscription to SiteSubscription.
|
||||
* Oct 11, 2013 2460 dhladky Restored Adhoc to registry store, WFO only.
|
||||
* Nov 12, 2013 2506 bgonzale Added is recurring subscription method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -65,4 +66,19 @@ public final class DataDeliveryRegistryObjectTypes {
|
|||
|
||||
public static final String PROVIDER = RegistryUtil
|
||||
.getObjectType(Provider.class);
|
||||
|
||||
/**
|
||||
* Is the object type a recurring subscription type, excluding adhoc
|
||||
* subscriptions.
|
||||
*
|
||||
* @param objectType
|
||||
* @return true if the objectType is a recurring subscription type; false
|
||||
* otherwise.
|
||||
*/
|
||||
public static final boolean isRecurringSubscription(String objectType) {
|
||||
return DataDeliveryRegistryObjectTypes.SHARED_SUBSCRIPTION
|
||||
.equals(objectType)
|
||||
|| DataDeliveryRegistryObjectTypes.SITE_SUBSCRIPTION
|
||||
.equals(objectType);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,11 +49,12 @@ import com.raytheon.uf.common.util.FileUtil;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 07, 2013 2000 djohnson Initial creation
|
||||
* May 07, 2013 2000 djohnson Initial creation
|
||||
* Jun 04, 2013 223 mpduff Get base file if site doesn't exist.
|
||||
* Sept 23, 2013 2283 dhladky Updated for multiple configs
|
||||
* Oct 03, 2013 2386 mpduff Moved the subscription overlap rules files into the rules directory.
|
||||
* Oct 25, 2013 2292 mpduff Move overlap checks to edex.
|
||||
* Nov 12, 2013 2361 njensen Made JAXBManager static and initialized on first use
|
||||
* </pre>
|
||||
*
|
||||
* @author djohnson
|
||||
|
@ -62,6 +63,7 @@ import com.raytheon.uf.common.util.FileUtil;
|
|||
|
||||
public class SubscriptionOverlapService<T extends Time, C extends Coverage>
|
||||
implements ISubscriptionOverlapService<T, C> {
|
||||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(SubscriptionOverlapService.class);
|
||||
|
||||
|
@ -73,7 +75,22 @@ public class SubscriptionOverlapService<T extends Time, C extends Coverage>
|
|||
private static final String SUBSCRIPTION_OVERLAP_CONFIG_FILE_PATH = FileUtil
|
||||
.join("datadelivery", "systemManagement", "rules", File.separator);
|
||||
|
||||
private final JAXBManager jaxbManager;
|
||||
private static JAXBManager jaxbManager;
|
||||
|
||||
private static synchronized JAXBManager getJaxbManager() {
|
||||
if (jaxbManager == null) {
|
||||
try {
|
||||
Class<?>[] clazzes = new Class<?>[] {
|
||||
SubscriptionOverlapConfig.class,
|
||||
GridSubscriptionOverlapConfig.class,
|
||||
PointSubscriptionOverlapConfig.class };
|
||||
jaxbManager = new JAXBManager(clazzes);
|
||||
} catch (JAXBException e) {
|
||||
throw new ExceptionInInitializerError(e);
|
||||
}
|
||||
}
|
||||
return jaxbManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
@ -81,15 +98,7 @@ public class SubscriptionOverlapService<T extends Time, C extends Coverage>
|
|||
* @param duplicateChecker
|
||||
*/
|
||||
public SubscriptionOverlapService() {
|
||||
try {
|
||||
@SuppressWarnings("rawtypes")
|
||||
Class[] clazzes = new Class[] { SubscriptionOverlapConfig.class,
|
||||
GridSubscriptionOverlapConfig.class,
|
||||
PointSubscriptionOverlapConfig.class };
|
||||
jaxbManager = new JAXBManager(clazzes);
|
||||
} catch (JAXBException e) {
|
||||
throw new ExceptionInInitializerError(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -119,7 +128,7 @@ public class SubscriptionOverlapService<T extends Time, C extends Coverage>
|
|||
|
||||
final LocalizationFile configFile = pathManager.getLocalizationFile(
|
||||
context, fileName);
|
||||
configFile.jaxbMarshal(config, jaxbManager);
|
||||
configFile.jaxbMarshal(config, getJaxbManager());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -148,11 +157,11 @@ public class SubscriptionOverlapService<T extends Time, C extends Coverage>
|
|||
|
||||
if (type == DataType.GRID) {
|
||||
config = localizationFile.jaxbUnmarshal(
|
||||
GridSubscriptionOverlapConfig.class, jaxbManager);
|
||||
GridSubscriptionOverlapConfig.class, getJaxbManager());
|
||||
|
||||
} else if (type == DataType.POINT) {
|
||||
config = localizationFile.jaxbUnmarshal(
|
||||
PointSubscriptionOverlapConfig.class, jaxbManager);
|
||||
PointSubscriptionOverlapConfig.class, getJaxbManager());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -9,3 +9,4 @@ Export-Package: com.raytheon.uf.common.registry.event
|
|||
Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.event;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.stats;bundle-version="1.0.0"
|
||||
Import-Package: oasis.names.tc.ebxml.regrep.xsd.rim.v4
|
||||
|
|
|
@ -20,6 +20,8 @@ package com.raytheon.uf.common.registry.event;
|
|||
* further licensing information.
|
||||
**/
|
||||
|
||||
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.RegistryObjectType;
|
||||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
|
||||
/**
|
||||
|
@ -33,7 +35,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 16, 2012 jsanchez Initial creation
|
||||
* Nov 08, 2013 2506 bgonzale Added constructors.
|
||||
* Nov 08, 2013 2506 bgonzale Added constructors. Added object deleted field.
|
||||
* Added RegistryObjectType field.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -47,13 +50,17 @@ public class RemoveRegistryEvent extends RegistryEvent {
|
|||
|
||||
private String username;
|
||||
|
||||
private RegistryObjectType removedObject;
|
||||
|
||||
public RemoveRegistryEvent() {
|
||||
|
||||
}
|
||||
|
||||
public RemoveRegistryEvent(String username, String id) {
|
||||
public RemoveRegistryEvent(String username, String id,
|
||||
RegistryObjectType removedObject) {
|
||||
super(id, null, null, Action.DELETE);
|
||||
this.username = username;
|
||||
this.removedObject = removedObject;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
|
@ -64,6 +71,21 @@ public class RemoveRegistryEvent extends RegistryEvent {
|
|||
this.username = username;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the removedObject
|
||||
*/
|
||||
public RegistryObjectType getRemovedObject() {
|
||||
return removedObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param removedObject
|
||||
* the removedObject to set
|
||||
*/
|
||||
public void setRemovedObject(RegistryObjectType removedObject) {
|
||||
this.removedObject = removedObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Remove " + super.toString();
|
||||
|
|
|
@ -16,5 +16,6 @@ Require-Bundle: com.raytheon.uf.common.datadelivery.bandwidth;bundle-version="1.
|
|||
com.raytheon.uf.common.status;bundle-version="1.12.1174",
|
||||
com.google.guava;bundle-version="1.0.0",
|
||||
com.raytheon.uf.edex.core;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.registry.ebxml;bundle-version="1.0.0"
|
||||
com.raytheon.uf.common.registry.ebxml;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.datadelivery.service;bundle-version="1.0.0"
|
||||
Import-Package: com.raytheon.edex.site
|
||||
|
|
|
@ -28,6 +28,7 @@ import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
|||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetMetaDataHandler;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.util.JarUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.BandwidthManager;
|
||||
|
@ -54,6 +55,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
|||
* May 15, 2013 2000 djohnson Include daos.
|
||||
* Jul 10, 2013 2106 djohnson Dependency inject registry handlers.
|
||||
* Oct 3 2013 1797 dhladky Generics added
|
||||
* Nov 08, 2013 2506 bgonzale Added subscription notification service to bandwidth manager.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -88,9 +90,11 @@ public class NcfBandwidthManagerCreator<T extends Time, C extends Coverage> impl
|
|||
IBandwidthDao<T, C> bandwidthDao, RetrievalManager retrievalManager,
|
||||
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
|
||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||
ISubscriptionHandler subscriptionHandler) {
|
||||
ISubscriptionHandler subscriptionHandler,
|
||||
ISubscriptionNotificationService subscriptionNotificationService) {
|
||||
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
|
||||
dataSetMetaDataHandler, subscriptionHandler);
|
||||
dataSetMetaDataHandler, subscriptionHandler,
|
||||
subscriptionNotificationService);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -125,9 +129,11 @@ public class NcfBandwidthManagerCreator<T extends Time, C extends Coverage> impl
|
|||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||
BandwidthDaoUtil bandwidthDaoUtil,
|
||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||
ISubscriptionHandler subscriptionHandler) {
|
||||
ISubscriptionHandler subscriptionHandler,
|
||||
ISubscriptionNotificationService subscriptionNotificationService) {
|
||||
return new NcfBandwidthManager(dbInit, bandwidthDao, retrievalManager,
|
||||
bandwidthDaoUtil, dataSetMetaDataHandler, subscriptionHandler);
|
||||
bandwidthDaoUtil, dataSetMetaDataHandler, subscriptionHandler,
|
||||
subscriptionNotificationService);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,8 @@ Require-Bundle: com.raytheon.uf.common.status;bundle-version="1.12.1174",
|
|||
com.raytheon.uf.common.plugin.nwsauth;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.util,
|
||||
com.raytheon.uf.common.datadelivery.request;bundle-version="1.0.0",
|
||||
com.raytheon.uf.edex.registry.ebxml;bundle-version="1.0.0"
|
||||
com.raytheon.uf.edex.registry.ebxml;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.datadelivery.service;bundle-version="1.0.0"
|
||||
Export-Package: com.raytheon.uf.edex.datadelivery.bandwidth,
|
||||
com.raytheon.uf.edex.datadelivery.bandwidth.dao,
|
||||
com.raytheon.uf.edex.datadelivery.bandwidth.interfaces,
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
<!-- Registry handlers required for EdexBandwidthManager -->
|
||||
<constructor-arg ref="DataSetMetaDataHandler" />
|
||||
<constructor-arg ref="SubscriptionHandler" />
|
||||
<constructor-arg ref="subscriptionNotificationService" />
|
||||
</bean>
|
||||
|
||||
<bean id="dataSetAvailabilityCalculator"
|
||||
|
|
|
@ -25,6 +25,7 @@ import com.raytheon.uf.common.datadelivery.registry.Coverage;
|
|||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetMetaDataHandler;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
||||
|
@ -52,7 +53,8 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
|||
* Oct 24, 2012 1286 djohnson Initial creation
|
||||
* Feb 20, 2013 1543 djohnson Add IEdexBandwidthManagerCreator.
|
||||
* Jul 10, 2013 2106 djohnson Dependency inject registry handlers.
|
||||
* Oct 3, 2013 1797 dhladky Some generics
|
||||
* Oct 03, 2013 1797 dhladky Some generics
|
||||
* Nov 07, 2013 2506 bgonzale Added notification handler to bandwidth context.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -82,7 +84,8 @@ public class EdexBandwidthContextFactory<T extends Time, C extends Coverage> imp
|
|||
IBandwidthDao<T, C> bandwidthDao, RetrievalManager retrievalManager,
|
||||
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
|
||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||
ISubscriptionHandler subscriptionHandler);
|
||||
ISubscriptionHandler subscriptionHandler,
|
||||
ISubscriptionNotificationService notificationService);
|
||||
}
|
||||
|
||||
private static EdexBandwidthManager instance;
|
||||
|
@ -101,6 +104,8 @@ public class EdexBandwidthContextFactory<T extends Time, C extends Coverage> imp
|
|||
|
||||
private final ISubscriptionHandler subscriptionHandler;
|
||||
|
||||
private final ISubscriptionNotificationService notificationService;
|
||||
|
||||
/**
|
||||
* Intentionally package-private constructor, as it is created from Spring
|
||||
* which is able to reflectively instantiate.
|
||||
|
@ -112,6 +117,7 @@ public class EdexBandwidthContextFactory<T extends Time, C extends Coverage> imp
|
|||
* @param dbInit
|
||||
* @param dataSetMetaDataHandler
|
||||
* @param subscriptionHandler
|
||||
* @param notificationService
|
||||
*/
|
||||
EdexBandwidthContextFactory(IBandwidthDao<T, C> bandwidthDao,
|
||||
IBandwidthBucketDao bandwidthBucketDao,
|
||||
|
@ -119,7 +125,8 @@ public class EdexBandwidthContextFactory<T extends Time, C extends Coverage> imp
|
|||
IEdexBandwidthManagerCreator<T, C> bandwidthManagerCreator,
|
||||
IBandwidthDbInit dbInit,
|
||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||
ISubscriptionHandler subscriptionHandler) {
|
||||
ISubscriptionHandler subscriptionHandler,
|
||||
ISubscriptionNotificationService notificationService) {
|
||||
this.bandwidthDao = bandwidthDao;
|
||||
this.bandwidthBucketDao = bandwidthBucketDao;
|
||||
this.bandwidthInitializer = bandwidthInitializer;
|
||||
|
@ -127,6 +134,8 @@ public class EdexBandwidthContextFactory<T extends Time, C extends Coverage> imp
|
|||
this.dbInit = dbInit;
|
||||
this.dataSetMetaDataHandler = dataSetMetaDataHandler;
|
||||
this.subscriptionHandler = subscriptionHandler;
|
||||
this.notificationService = notificationService;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -138,7 +147,7 @@ public class EdexBandwidthContextFactory<T extends Time, C extends Coverage> imp
|
|||
* the {@link BandwidthManager} instance
|
||||
*/
|
||||
EdexBandwidthContextFactory(EdexBandwidthManager<T, C> instance) {
|
||||
this(null, null, null, null, null, null, null);
|
||||
this(null, null, null, null, null, null, null, null);
|
||||
EdexBandwidthContextFactory.instance = instance;
|
||||
}
|
||||
|
||||
|
@ -229,6 +238,8 @@ public class EdexBandwidthContextFactory<T extends Time, C extends Coverage> imp
|
|||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||
BandwidthDaoUtil bandwidthDaoUtil) {
|
||||
return bandwidthManagerCreator.getBandwidthManager(dbInit,
|
||||
bandwidthDao, retrievalManager, bandwidthDaoUtil, dataSetMetaDataHandler, subscriptionHandler);
|
||||
bandwidthDao, retrievalManager, bandwidthDaoUtil,
|
||||
dataSetMetaDataHandler, subscriptionHandler,
|
||||
notificationService);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
**/
|
||||
package com.raytheon.uf.edex.datadelivery.bandwidth;
|
||||
|
||||
import static com.raytheon.uf.common.registry.ebxml.encoder.RegistryEncoders.Type.JAXB;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
@ -37,6 +39,7 @@ import com.google.common.annotations.VisibleForTesting;
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.eventbus.AllowConcurrentEvents;
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
import com.raytheon.edex.site.SiteUtil;
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest;
|
||||
import com.raytheon.uf.common.datadelivery.bandwidth.IBandwidthRequest.RequestType;
|
||||
import com.raytheon.uf.common.datadelivery.registry.AdhocSubscription;
|
||||
|
@ -51,9 +54,13 @@ import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
|||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetMetaDataHandler;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.common.event.EventBus;
|
||||
import com.raytheon.uf.common.registry.ebxml.encoder.RegistryEncoders;
|
||||
import com.raytheon.uf.common.registry.event.InsertRegistryEvent;
|
||||
import com.raytheon.uf.common.registry.event.RegistryEvent;
|
||||
import com.raytheon.uf.common.registry.event.RemoveRegistryEvent;
|
||||
import com.raytheon.uf.common.registry.event.UpdateRegistryEvent;
|
||||
import com.raytheon.uf.common.registry.handler.IRegistryObjectHandler;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
|
@ -98,6 +105,8 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
|
|||
* Oct 10, 2013 1797 bgonzale Refactored registry Time objects.
|
||||
* 10/23/2013 2385 bphillip Change schedule method to scheduleAdhoc
|
||||
* Nov 04, 2013 2506 bgonzale Added removeBandwidthSubscriptions method.
|
||||
* Added subscriptionNotificationService field.
|
||||
* Send notifications.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -116,6 +125,8 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
|
|||
|
||||
private final ScheduledExecutorService scheduler;
|
||||
|
||||
private final ISubscriptionNotificationService subscriptionNotificationService;
|
||||
|
||||
@VisibleForTesting
|
||||
final Runnable watchForConfigFileChanges = new Runnable() {
|
||||
|
||||
|
@ -136,17 +147,20 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
|
|||
* @param bandwidthDao
|
||||
* @param retrievalManager
|
||||
* @param bandwidthDaoUtil
|
||||
* @param subscriptionNotificationService
|
||||
*/
|
||||
public EdexBandwidthManager(IBandwidthDbInit dbInit,
|
||||
IBandwidthDao<T, C> bandwidthDao,
|
||||
RetrievalManager retrievalManager,
|
||||
BandwidthDaoUtil<T, C> bandwidthDaoUtil,
|
||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||
ISubscriptionHandler subscriptionHandler) {
|
||||
ISubscriptionHandler subscriptionHandler,
|
||||
ISubscriptionNotificationService subscriptionNotificationService) {
|
||||
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil);
|
||||
|
||||
this.dataSetMetaDataHandler = dataSetMetaDataHandler;
|
||||
this.subscriptionHandler = subscriptionHandler;
|
||||
this.subscriptionNotificationService = subscriptionNotificationService;
|
||||
|
||||
// schedule maintenance tasks
|
||||
scheduler = Executors.newScheduledThreadPool(1);
|
||||
|
@ -317,6 +331,18 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
|
|||
.info("Received Subscription removal notification for Subscription ["
|
||||
+ event.getId() + "]");
|
||||
removeBandwidthSubscriptions(event.getId());
|
||||
|
||||
try {
|
||||
Subscription<T, C> sub = (Subscription<T, C>) RegistryEncoders
|
||||
.ofType(JAXB).decodeObject(
|
||||
((RemoveRegistryEvent) event).getRemovedObject());
|
||||
sendSubscriptionNotificationEvent(event, sub);
|
||||
} catch (SerializationException e) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"Failed to retrieve deleted object from RemoveRegistryEvent",
|
||||
e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -359,7 +385,59 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
|
|||
statusHandler.error("No DataSetMetaData found for id [" + id
|
||||
+ "]");
|
||||
}
|
||||
}
|
||||
Subscription<T, C> sub = getRegistryObjectById(subscriptionHandler,
|
||||
re.getId());
|
||||
sendSubscriptionNotificationEvent(re, sub);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a hook into the EDEX Notification sub-system to receive
|
||||
* UpdateRegistryEvents. Filter for subscription specific events.
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
@Subscribe
|
||||
@AllowConcurrentEvents
|
||||
public void registryEventListener(UpdateRegistryEvent event) {
|
||||
Subscription<T, C> sub = getRegistryObjectById(subscriptionHandler,
|
||||
event.getId());
|
||||
sendSubscriptionNotificationEvent(event, sub);
|
||||
}
|
||||
|
||||
private void sendSubscriptionNotificationEvent(RegistryEvent event,
|
||||
Subscription<T, C> sub) {
|
||||
final String objectType = event.getObjectType();
|
||||
|
||||
if (DataDeliveryRegistryObjectTypes.isRecurringSubscription(objectType)) {
|
||||
if (sub != null) {
|
||||
boolean isApplicableForTheLocalSite = sub.getOfficeIDs()
|
||||
.contains(SiteUtil.getSite());
|
||||
if (isApplicableForTheLocalSite) {
|
||||
switch (event.getAction()) {
|
||||
case UPDATE:
|
||||
subscriptionNotificationService
|
||||
.sendUpdatedSubscriptionNotification(sub,
|
||||
sub.getOwner());
|
||||
break;
|
||||
case INSERT:
|
||||
subscriptionNotificationService
|
||||
.sendCreatedSubscriptionNotification(sub,
|
||||
sub.getOwner());
|
||||
break;
|
||||
case DELETE:
|
||||
subscriptionNotificationService
|
||||
.sendDeletedSubscriptionNotification(sub,
|
||||
sub.getOwner());
|
||||
break;
|
||||
default:
|
||||
statusHandler.handle(
|
||||
Priority.PROBLEM,
|
||||
"Invalid RegistryEvent action: "
|
||||
+ event.getAction());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
|||
import com.raytheon.uf.common.datadelivery.registry.Time;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetMetaDataHandler;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.util.JarUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.EdexBandwidthContextFactory.IEdexBandwidthManagerCreator;
|
||||
|
@ -53,6 +54,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
|||
* Jul 10, 2013 2106 djohnson Dependency inject registry handlers.
|
||||
* Oct 2, 2013 1797 dhladky Generics
|
||||
* Oct 28, 2013 2506 bgonzale SBN (Shared) Scheduled at the central registry.
|
||||
* Added subscription notification service to bandwidth manager.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -85,14 +87,17 @@ public class WfoBandwidthManagerCreator<T extends Time, C extends Coverage> impl
|
|||
* @param bandwidthDao
|
||||
* @param retrievalManager
|
||||
* @param bandwidthDaoUtil
|
||||
* @param subscriptionNotificationService
|
||||
*/
|
||||
public WfoBandwidthManager(IBandwidthDbInit dbInit,
|
||||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||
BandwidthDaoUtil bandwidthDaoUtil,
|
||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||
ISubscriptionHandler subscriptionHandler) {
|
||||
ISubscriptionHandler subscriptionHandler,
|
||||
ISubscriptionNotificationService subscriptionNotificationService) {
|
||||
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
|
||||
dataSetMetaDataHandler, subscriptionHandler);
|
||||
dataSetMetaDataHandler, subscriptionHandler,
|
||||
subscriptionNotificationService);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -139,9 +144,11 @@ public class WfoBandwidthManagerCreator<T extends Time, C extends Coverage> impl
|
|||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||
BandwidthDaoUtil bandwidthDaoUtil,
|
||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||
ISubscriptionHandler subscriptionHandler) {
|
||||
return new WfoBandwidthManager<T, C>(dbInit, bandwidthDao, retrievalManager,
|
||||
bandwidthDaoUtil, dataSetMetaDataHandler, subscriptionHandler);
|
||||
ISubscriptionHandler subscriptionHandler,
|
||||
ISubscriptionNotificationService subscriptionNotificationService) {
|
||||
return new WfoBandwidthManager<T, C>(dbInit, bandwidthDao,
|
||||
retrievalManager, bandwidthDaoUtil, dataSetMetaDataHandler,
|
||||
subscriptionHandler, subscriptionNotificationService);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -72,6 +72,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalStatus;
|
|||
* Oct 10, 2013 1797 bgonzale Refactored registry Time objects.
|
||||
* Oct 30, 2013 2448 dhladky Fixed pulling data before and after activePeriod starting and ending.
|
||||
* Nov 5, 2013 2521 dhladky Fixed DataSetMetaData update failures for URL's in pointdata.
|
||||
* Nov 12, 2013 2448 dhladky Fixed stop/start subscription scheduling problem.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -236,6 +237,7 @@ public class BandwidthDaoUtil<T extends Time, C extends Coverage> {
|
|||
subscriptionStart.set(Calendar.HOUR_OF_DAY, cycle);
|
||||
for (Integer minute : minutes) {
|
||||
subscriptionStart.set(Calendar.MINUTE, minute);
|
||||
// Check for nonsense
|
||||
if (subscriptionStart.after(subscriptionEnd)) {
|
||||
break outerloop;
|
||||
}
|
||||
|
@ -243,14 +245,25 @@ public class BandwidthDaoUtil<T extends Time, C extends Coverage> {
|
|||
Calendar time = TimeUtil.newCalendar();
|
||||
time.setTimeInMillis(subscriptionStart
|
||||
.getTimeInMillis());
|
||||
// Last check for time window, this checks fine grain by hour and minute
|
||||
if (activePeriodStart != null && activePeriodEnd != null) {
|
||||
if (time.after(activePeriodEnd) || time.before(activePeriodStart)) {
|
||||
// discard this retrieval time, outside activePeriod window
|
||||
/**
|
||||
* Fine grain check by hour and minute, for subscription(start/end),
|
||||
* activePeriod(start/end)
|
||||
**/
|
||||
// Subscription Start and End time first
|
||||
if (subscriptionStart != null && subscriptionEnd != null) {
|
||||
if (time.after(subscriptionEnd) || time.before(subscriptionStart)) {
|
||||
// don't schedule this retrieval time, outside subscription window
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Check Active Period Second
|
||||
if (activePeriodStart != null && activePeriodEnd != null) {
|
||||
if (time.after(activePeriodEnd) || time.before(activePeriodStart)) {
|
||||
// don't schedule this retrieval time, outside activePeriod window
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
subscriptionTimes.add(time);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import java.io.File;
|
|||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.raytheon.edex.colormap.ColorMapManager;
|
||||
import com.raytheon.uf.common.comm.ProxyConfiguration;
|
||||
import com.raytheon.uf.common.comm.ProxyUtil;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
|
@ -47,6 +46,7 @@ import dods.dap.DConnect;
|
|||
* Apr 01, 2013 1786 mpduff Pulled proxy settings out to util class.
|
||||
* May 12, 2013 753 dhladky Expanded for use with other connection types
|
||||
* Aug 30, 2013 2314 mpduff Added null checks.
|
||||
* Nov 12, 2013 * dhladky Fixed copy paste error
|
||||
* </pre>
|
||||
*
|
||||
* @author djohnson
|
||||
|
@ -54,8 +54,9 @@ import dods.dap.DConnect;
|
|||
*/
|
||||
|
||||
public class ConnectionUtil {
|
||||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ColorMapManager.class);
|
||||
.getHandler(ConnectionUtil.class);
|
||||
|
||||
private static final String PROXY_PROPERTIES_FILE = "datadelivery"
|
||||
+ File.separator + "proxy.properties";
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
<bean id="groupDefinitionServiceHandler"
|
||||
class="com.raytheon.uf.edex.datadelivery.service.services.GroupDefinitionServiceHandler">
|
||||
<constructor-arg ref="subscriptionNotificationService" />
|
||||
</bean>
|
||||
|
||||
<bean factory-bean="handlerRegistry" factory-method="register">
|
||||
|
|
|
@ -29,7 +29,6 @@ import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
|||
import com.raytheon.uf.common.datadelivery.registry.handlers.DataDeliveryHandlers;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.service.IGroupDefinitionService;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
import com.raytheon.uf.common.util.CollectionUtil;
|
||||
import com.raytheon.uf.edex.auth.req.AbstractPrivilegedRequestHandler;
|
||||
|
@ -45,6 +44,7 @@ import com.raytheon.uf.edex.auth.resp.AuthorizationResponse;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 18, 2013 1441 djohnson Initial creation
|
||||
* Nov 12, 2013 2506 bgonzale Refactored out notification service.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -55,17 +55,13 @@ import com.raytheon.uf.edex.auth.resp.AuthorizationResponse;
|
|||
public class GroupDefinitionServiceHandler extends
|
||||
AbstractPrivilegedRequestHandler<GroupDefinitionServiceRequest> {
|
||||
|
||||
private final ISubscriptionNotificationService notificationService;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param notificationService
|
||||
* the subscription notification service
|
||||
*/
|
||||
public GroupDefinitionServiceHandler(
|
||||
ISubscriptionNotificationService notificationService) {
|
||||
this.notificationService = notificationService;
|
||||
public GroupDefinitionServiceHandler() {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -104,14 +100,6 @@ public class GroupDefinitionServiceHandler extends
|
|||
for (Subscription sub : subsForGroup) {
|
||||
sub.setGroupName(GroupDefinition.NO_GROUP);
|
||||
handler.update(sub);
|
||||
|
||||
// TODO: Would be nice to use a subset of the
|
||||
// SubscriptionService functionality here so we didn't have to
|
||||
// manually send the subscription updated notification
|
||||
String username = user != null ? user.uniqueId().toString()
|
||||
: "none";
|
||||
notificationService.sendUpdatedSubscriptionNotification(sub,
|
||||
username);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,9 +17,10 @@
|
|||
[Enter License Description here.]
|
||||
</license>
|
||||
|
||||
<requires>
|
||||
<import feature="com.raytheon.uf.edex.datadelivery.core.feature" version="0.0.0"/>
|
||||
</requires>
|
||||
<requires>
|
||||
<import feature="com.raytheon.uf.edex.datadelivery.core.feature" version="0.0.0"/>
|
||||
<import feature="com.raytheon.uf.common.base.feature" version="0.0.0"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.edex.ogc.registry"
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.edex.ogc.common.http;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Parses Accept-Encoding headers for HTTP requests
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 8, 2013 2539 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class AcceptHeaderParser implements Iterable<AcceptHeaderValue> {
|
||||
|
||||
private static final Pattern ENCODING_PATTERN = Pattern
|
||||
.compile("([^;, \\t]+)\\s*(;\\s*(q\\s*=\\s*([0-9.]+)))?");
|
||||
|
||||
private final String input;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public AcceptHeaderParser(String input) {
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Iterable#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<AcceptHeaderValue> iterator() {
|
||||
final Matcher matcher = ENCODING_PATTERN.matcher(input);
|
||||
return new Iterator<AcceptHeaderValue>() {
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return matcher.find();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AcceptHeaderValue next() {
|
||||
String enc = matcher.group(1);
|
||||
String qvalStr = matcher.group(4);
|
||||
if (qvalStr == null) {
|
||||
return new AcceptHeaderValue(enc);
|
||||
} else {
|
||||
return new AcceptHeaderValue(enc,
|
||||
Double.parseDouble(qvalStr));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException(
|
||||
"Remove not supported for " + this.getClass());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.edex.ogc.common.http;
|
||||
|
||||
/**
|
||||
* Represents a single HTTP accept(-encoding) header encoding with weight value
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 8, 2013 2539 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class AcceptHeaderValue {
|
||||
|
||||
private final String encoding;
|
||||
|
||||
private final double qvalue;
|
||||
|
||||
public AcceptHeaderValue(String encoding, double qvalue) {
|
||||
this.encoding = encoding;
|
||||
if (qvalue < 0 || qvalue > 1.0) {
|
||||
throw new IllegalArgumentException(
|
||||
"qvalue must be between 0 and 1.0");
|
||||
}
|
||||
this.qvalue = qvalue;
|
||||
}
|
||||
|
||||
public AcceptHeaderValue(String encoding) {
|
||||
this(encoding, 1.0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the encoding
|
||||
*/
|
||||
public String getEncoding() {
|
||||
return encoding;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the qvalue
|
||||
*/
|
||||
public double getQvalue() {
|
||||
return qvalue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if encoding is acceptable
|
||||
*/
|
||||
public boolean isAcceptable(){
|
||||
return qvalue != 0;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.edex.ogc.common.http;
|
||||
|
||||
/**
|
||||
* Exception for when an OGC request fails at the HTTP level. Contains HTTP
|
||||
* error code for response.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 11, 2013 2539 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class OgcHttpErrorException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = -452797331391106559L;
|
||||
|
||||
private final int code;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public OgcHttpErrorException(int code) {
|
||||
super();
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message
|
||||
* @param cause
|
||||
*/
|
||||
public OgcHttpErrorException(int code, String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message
|
||||
*/
|
||||
public OgcHttpErrorException(int code, String message) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cause
|
||||
*/
|
||||
public OgcHttpErrorException(int code, Throwable cause) {
|
||||
super(cause);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the error status code
|
||||
*/
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
}
|
|
@ -22,11 +22,15 @@
|
|||
*/
|
||||
package com.raytheon.uf.edex.ogc.common.http;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.Writer;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.ws.rs.core.Response.Status;
|
||||
import javax.xml.stream.XMLInputFactory;
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
|
@ -42,6 +46,7 @@ import com.raytheon.uf.edex.ogc.common.OgcResponse;
|
|||
import com.raytheon.uf.edex.ogc.common.OgcResponse.TYPE;
|
||||
import com.raytheon.uf.edex.ogc.common.output.IOgcHttpResponse;
|
||||
import com.raytheon.uf.edex.ogc.common.output.OgcResponseOutput;
|
||||
import com.raytheon.uf.edex.ogc.common.output.ServletOgcResponse;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -53,7 +58,8 @@ import com.raytheon.uf.edex.ogc.common.output.OgcResponseOutput;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2011 bclement Initial creation
|
||||
* 2011 bclement Initial creation
|
||||
* Nov 11, 2013 2539 bclement added accept encoding parsing
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -72,6 +78,8 @@ public abstract class OgcHttpHandler {
|
|||
|
||||
public static final String ACCEPT_VERSIONS_HEADER = "acceptversions";
|
||||
|
||||
public static final String ACCEPT_ENC_HEADER = "accept-encoding";
|
||||
|
||||
public abstract void handle(OgcHttpRequest request);
|
||||
|
||||
private IUFStatusHandler log = UFStatus.getHandler(this.getClass());
|
||||
|
@ -285,4 +293,67 @@ public abstract class OgcHttpHandler {
|
|||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if accept encoding header is present and modify response
|
||||
* accordingly.
|
||||
*
|
||||
* @param headers
|
||||
* @param response
|
||||
* @throws OgcException
|
||||
* on internal server error
|
||||
* @throws OgcHttpErrorException
|
||||
* on HTTP protocol error condition
|
||||
*/
|
||||
protected void acceptEncodingCheck(Map<String, Object> headers,
|
||||
ServletOgcResponse response) throws OgcException,
|
||||
OgcHttpErrorException {
|
||||
Object obj = headers.get(ACCEPT_ENC_HEADER);
|
||||
if (obj == null) {
|
||||
// omitted accept encoding signifies that they accept anything
|
||||
return;
|
||||
}
|
||||
if (!(obj instanceof String)) {
|
||||
log.error("Unsupported header type encountered: " + obj.getClass());
|
||||
throw new OgcException(Code.InternalServerError);
|
||||
}
|
||||
String encoding = (String) obj;
|
||||
boolean gzipAcceptable = false;
|
||||
boolean anyAcceptable = false;
|
||||
for (AcceptHeaderValue value : new AcceptHeaderParser(encoding)) {
|
||||
if (value.getEncoding().toLowerCase().contains("gzip")
|
||||
&& value.isAcceptable()) {
|
||||
gzipAcceptable = true;
|
||||
} else if (value.getEncoding().trim().equals("*")) {
|
||||
anyAcceptable = true;
|
||||
}
|
||||
}
|
||||
if (gzipAcceptable) {
|
||||
response.enableGzip();
|
||||
} else if (!anyAcceptable) {
|
||||
throw new OgcHttpErrorException(406);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Output HTTP protocol error
|
||||
*
|
||||
* @param response
|
||||
* @param errorCode
|
||||
* @throws IOException
|
||||
*/
|
||||
protected void outputHttpError(ServletOgcResponse response, int errorCode)
|
||||
throws IOException {
|
||||
response.setStatus(errorCode);
|
||||
response.setContentType("text/plain");
|
||||
Writer writer = null;
|
||||
try {
|
||||
writer = new OutputStreamWriter(response.getOutputStream());
|
||||
writer.write(Status.fromStatusCode(errorCode).toString());
|
||||
} finally {
|
||||
if (writer != null) {
|
||||
writer.flush();
|
||||
writer.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ package com.raytheon.uf.edex.ogc.common.output;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
|
@ -24,6 +25,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 7, 2013 bclement Initial creation
|
||||
* Nov 11, 2013 2539 bclement added GZIP support
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -32,8 +34,14 @@ import javax.servlet.http.HttpServletResponse;
|
|||
*/
|
||||
public class ServletOgcResponse implements IOgcHttpResponse {
|
||||
|
||||
public static final String CONTENT_ENC_HEADER = "Content-Encoding";
|
||||
|
||||
private final HttpServletResponse response;
|
||||
|
||||
private boolean gzip = false;
|
||||
|
||||
private volatile OutputStream out = null;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -46,7 +54,13 @@ public class ServletOgcResponse implements IOgcHttpResponse {
|
|||
*/
|
||||
@Override
|
||||
public OutputStream getOutputStream() throws IOException {
|
||||
return response.getOutputStream();
|
||||
if (out == null) {
|
||||
out = response.getOutputStream();
|
||||
if (gzip) {
|
||||
out = new GZIPOutputStream(out);
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -73,4 +87,20 @@ public class ServletOgcResponse implements IOgcHttpResponse {
|
|||
response.setCharacterEncoding(encoding);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if response Content-Encoding is GZIP
|
||||
*/
|
||||
public boolean isGzip() {
|
||||
return gzip;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn on GZIP Content Encoding
|
||||
*
|
||||
*/
|
||||
public void enableGzip() {
|
||||
response.addHeader(CONTENT_ENC_HEADER, "gzip");
|
||||
this.gzip = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -60,7 +60,8 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 02/17/2009 1981 dhladky Initial Creation.
|
||||
* 01/07/2013 DR 15647 gzhang Use logger.warn for null earlyVilURI/earlyCZURI.
|
||||
* 01/07/2013 DR 15647 gzhang Use logger.warn for null earlyVilURI/earlyCZURI.
|
||||
* 11/11/2013 2377 bclement setRadarRecords returns bool for success
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -346,8 +347,10 @@ public class QPFConfig {
|
|||
*
|
||||
* @param vilmap
|
||||
* @param czMap
|
||||
* @return false if previous data for QPF is missing
|
||||
* @throws Exception
|
||||
*/
|
||||
private void setRadarRecords(HashMap<Date, String> vilmap,
|
||||
private boolean setRadarRecords(HashMap<Date, String> vilmap,
|
||||
HashMap<Date, String> czMap) throws Exception {
|
||||
|
||||
// find similar time stamp
|
||||
|
@ -373,8 +376,7 @@ public class QPFConfig {
|
|||
|
||||
if (earlyVilURI == null || earlyCZURI == null) {
|
||||
qpfgen.logger.warn("QPFConfig: No previous data for QPF. Check the RADAR OP Mode.");// DR 15647
|
||||
//throw new Exception("QPFConfig " + icao
|
||||
//+ ": Radar Record request failed, no previous data.");
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -387,6 +389,7 @@ public class QPFConfig {
|
|||
throw new Exception("QPFConfig " + icao
|
||||
+ ": Radar Record request failed. ", e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -514,9 +517,8 @@ public class QPFConfig {
|
|||
+ "\' and reftime < \'"
|
||||
+ getFarInterval(currentCzuTime).toString() + "\'";
|
||||
|
||||
setRadarRecords(getDataVolumeTimes(vilsql),
|
||||
return setRadarRecords(getDataVolumeTimes(vilsql),
|
||||
getDataVolumeTimes(czsql));
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
qpfgen.logger
|
||||
.error("QPFConfig: Some RadarRecords cannot be created: "
|
||||
|
|
|
@ -65,6 +65,7 @@ import com.raytheon.uf.common.registry.event.InsertRegistryEvent;
|
|||
import com.raytheon.uf.common.registry.event.RegistryEvent.Action;
|
||||
import com.raytheon.uf.common.registry.event.RegistryStatisticsEvent;
|
||||
import com.raytheon.uf.common.registry.event.RemoveRegistryEvent;
|
||||
import com.raytheon.uf.common.registry.event.UpdateRegistryEvent;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
|
@ -103,6 +104,8 @@ import com.raytheon.uf.edex.registry.ebxml.util.xpath.RegistryXPathProcessor;
|
|||
* 8/1/2013 1693 bphillip Added check references and refactored submit objects to conform to EBXML 4.0 spec
|
||||
* 9/11/2013 2254 bphillip Cleaned up creation of auditable events
|
||||
* 10/23/2013 1538 bphillip Changed QueryRequest constructor call
|
||||
* Nov 08, 2013 2506 bgonzale Added RegistryObjectType to RemoveRegistryEvent.
|
||||
* Separate update from create notifications.
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
|
@ -300,7 +303,7 @@ public class LifecycleManagerImpl implements LifecycleManager {
|
|||
if (objectType != null
|
||||
&& !objectType.equals(RegistryObjectTypes.ASSOCIATION)) {
|
||||
RemoveRegistryEvent event = new RemoveRegistryEvent(
|
||||
request.getUsername(), obj.getId());
|
||||
request.getUsername(), obj.getId(), obj);
|
||||
event.setAction(Action.DELETE);
|
||||
event.setLid(obj.getLid());
|
||||
event.setObjectType(objectType);
|
||||
|
@ -485,10 +488,9 @@ public class LifecycleManagerImpl implements LifecycleManager {
|
|||
|
||||
// gives a close estimate to amount taken on each object
|
||||
// individually, this will be millis in most cases, hopefully
|
||||
long avTimePerRecord = 0;
|
||||
if (!objs.isEmpty()) {
|
||||
avTimePerRecord = totalTime / objs.size();
|
||||
for (RegistryObjectType obj : objs) {
|
||||
long avTimePerRecord = objs.isEmpty() ? 0 : totalTime / objs.size();
|
||||
if (!objsCreated.isEmpty()) {
|
||||
for (RegistryObjectType obj : objsCreated) {
|
||||
EventBus.publish(new InsertRegistryEvent(obj.getId(), obj
|
||||
.getLid(), obj.getObjectType()));
|
||||
EventBus.publish(new RegistryStatisticsEvent(obj
|
||||
|
@ -496,6 +498,15 @@ public class LifecycleManagerImpl implements LifecycleManager {
|
|||
avTimePerRecord));
|
||||
}
|
||||
}
|
||||
if (!objsUpdated.isEmpty()) {
|
||||
for (RegistryObjectType obj : objsUpdated) {
|
||||
EventBus.publish(new UpdateRegistryEvent(obj.getId(), obj
|
||||
.getLid(), obj.getObjectType()));
|
||||
EventBus.publish(new RegistryStatisticsEvent(obj
|
||||
.getObjectType(), obj.getStatus(), obj.getOwner(),
|
||||
avTimePerRecord));
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
|
|
@ -45,9 +45,9 @@ import com.raytheon.uf.edex.ogc.common.OgcException.Code;
|
|||
import com.raytheon.uf.edex.ogc.common.OgcResponse;
|
||||
import com.raytheon.uf.edex.ogc.common.Version;
|
||||
import com.raytheon.uf.edex.ogc.common.http.EndpointInfo;
|
||||
import com.raytheon.uf.edex.ogc.common.http.OgcHttpErrorException;
|
||||
import com.raytheon.uf.edex.ogc.common.http.OgcHttpHandler;
|
||||
import com.raytheon.uf.edex.ogc.common.http.OgcHttpRequest;
|
||||
import com.raytheon.uf.edex.ogc.common.output.IOgcHttpResponse;
|
||||
import com.raytheon.uf.edex.ogc.common.output.OgcResponseOutput;
|
||||
import com.raytheon.uf.edex.ogc.common.output.ServletOgcResponse;
|
||||
|
||||
|
@ -106,7 +106,8 @@ public class WfsHttpHandler extends OgcHttpHandler {
|
|||
|
||||
protected void handleInternal(OgcHttpRequest req) throws Exception {
|
||||
Map<String, Object> headers = req.getHeaders();
|
||||
IOgcHttpResponse response = new ServletOgcResponse(req.getResponse());
|
||||
ServletOgcResponse response = new ServletOgcResponse(req.getResponse());
|
||||
|
||||
HttpServletRequest httpReq = req.getRequest();
|
||||
int port = httpReq.getLocalPort();
|
||||
String host = httpReq.getServerName();
|
||||
|
@ -114,6 +115,13 @@ public class WfsHttpHandler extends OgcHttpHandler {
|
|||
// TODO dynamic path and protocol
|
||||
EndpointInfo info = new EndpointInfo(host, port, path);
|
||||
try {
|
||||
try {
|
||||
acceptEncodingCheck(headers, response);
|
||||
} catch (OgcHttpErrorException e) {
|
||||
// there was a problem with the acceptable encodings
|
||||
outputHttpError(response, e.getCode());
|
||||
return;
|
||||
}
|
||||
if (req.isPost()) {
|
||||
InputStream is = req.getInputStream();
|
||||
BufferedInputStream bufin = new BufferedInputStream(is);
|
||||
|
|
|
@ -11,6 +11,7 @@ package com.raytheon.uf.edex.wfs.provider;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
@ -27,9 +28,16 @@ import com.raytheon.uf.edex.ogc.common.OgcBoundingBox;
|
|||
import com.raytheon.uf.edex.ogc.common.OgcException;
|
||||
import com.raytheon.uf.edex.ogc.common.OgcNamespace;
|
||||
import com.raytheon.uf.edex.ogc.common.OgcPrefix;
|
||||
import com.raytheon.uf.edex.ogc.common.OgcResponse;
|
||||
import com.raytheon.uf.edex.ogc.common.OgcTimeRange;
|
||||
import com.raytheon.uf.edex.ogc.common.http.MimeType;
|
||||
import com.raytheon.uf.edex.ogc.common.http.OgcHttpHandler;
|
||||
import com.raytheon.uf.edex.ogc.common.output.IOgcHttpResponse;
|
||||
import com.raytheon.uf.edex.ogc.common.output.OgcResponseOutput;
|
||||
import com.raytheon.uf.edex.wfs.IWfsProvider;
|
||||
import com.raytheon.uf.edex.wfs.WfsException;
|
||||
import com.raytheon.uf.edex.wfs.WfsException.Code;
|
||||
import com.raytheon.uf.edex.wfs.reg.WfsRegistryImpl;
|
||||
import com.raytheon.uf.edex.wfs.request.QualifiedName;
|
||||
import com.raytheon.uf.edex.wfs.request.SortBy;
|
||||
import com.raytheon.uf.edex.wfs.request.SortBy.Order;
|
||||
|
@ -45,6 +53,7 @@ import com.raytheon.uf.edex.wfs.request.SortBy.Order;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 25, 2012 bclement Initial creation
|
||||
* Nov 11, 2013 2539 bclement moved registry/marshal from children
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -122,6 +131,17 @@ public abstract class AbstractWfsProvider implements IWfsProvider {
|
|||
|
||||
};
|
||||
|
||||
protected final WfsRegistryImpl registry;
|
||||
|
||||
protected final IUFStatusHandler log = UFStatus.getHandler(this.getClass());
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public AbstractWfsProvider(WfsRegistryImpl registry) {
|
||||
this.registry = registry;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param nsmap
|
||||
* @param string
|
||||
|
@ -270,4 +290,44 @@ public abstract class AbstractWfsProvider implements IWfsProvider {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Marshal object through response. Response cannot be reused after this
|
||||
* method is called.
|
||||
*
|
||||
* @param jaxbobject
|
||||
* @param mimeType
|
||||
* @param response
|
||||
* @throws Exception
|
||||
* on unrecoverable error attempting to send response
|
||||
*/
|
||||
protected void marshalResponse(Object jaxbobject, MimeType mimeType,
|
||||
IOgcHttpResponse response) throws Exception {
|
||||
OutputStream out = null;
|
||||
try {
|
||||
out = response.getOutputStream();
|
||||
response.setContentType(mimeType.toString());
|
||||
registry.marshal(jaxbobject, out);
|
||||
} catch (Exception e) {
|
||||
log.error("Unable to marshal WFS response", e);
|
||||
OgcResponse err = getError(new WfsException(
|
||||
Code.OperationProcessingFailed), null);
|
||||
OgcResponseOutput.sendText(err, response, out);
|
||||
} finally {
|
||||
if (out != null) {
|
||||
out.flush();
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an error response
|
||||
*
|
||||
* @param e
|
||||
* @param exceptionFormat
|
||||
* @return
|
||||
*/
|
||||
public abstract OgcResponse getError(WfsException e,
|
||||
MimeType exceptionFormat);
|
||||
|
||||
}
|
||||
|
|
|
@ -45,8 +45,6 @@ import org.opengis.feature.simple.SimpleFeature;
|
|||
import org.springframework.context.ApplicationContext;
|
||||
import org.w3.xmlschema.Schema;
|
||||
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.edex.core.EDEXUtil;
|
||||
import com.raytheon.uf.edex.ogc.common.OgcException;
|
||||
import com.raytheon.uf.edex.ogc.common.OgcOperationInfo;
|
||||
|
@ -89,6 +87,7 @@ import com.raytheon.uf.edex.wfs.soap2_0_0.util.DescribeFeatureTypeResponseType;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 22, 2011 bclement Initial creation
|
||||
* Nov 11, 2013 2539 bclement moved registry/marshal to parent
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -97,14 +96,10 @@ import com.raytheon.uf.edex.wfs.soap2_0_0.util.DescribeFeatureTypeResponseType;
|
|||
*/
|
||||
public class Wfs1_1_0Provider extends AbstractWfsProvider {
|
||||
|
||||
protected final IUFStatusHandler log = UFStatus.getHandler(this.getClass());
|
||||
|
||||
public static final String version = "1.1.0";
|
||||
|
||||
public static final MimeType GML_MIME = GmlUtils.GML311_OLD_TYPE;
|
||||
|
||||
protected final WfsRegistryImpl registry;
|
||||
|
||||
protected final Capabilities capabilities;
|
||||
|
||||
protected final Gml31FeatureFetcher features;
|
||||
|
@ -116,18 +111,21 @@ public class Wfs1_1_0Provider extends AbstractWfsProvider {
|
|||
protected final ObjectFactory wfsFactory = new ObjectFactory();
|
||||
|
||||
public Wfs1_1_0Provider(WfsRegistryImpl registry) {
|
||||
super(registry);
|
||||
this.capabilities = new Capabilities(registry);
|
||||
this.features = new Gml31FeatureFetcher(registry);
|
||||
this.describer = new FeatureDescriber(registry, this);
|
||||
this.registry = registry;
|
||||
this.transactor = new Transactor();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unit tests
|
||||
*/
|
||||
protected Wfs1_1_0Provider() {
|
||||
super(null);
|
||||
this.capabilities = null;
|
||||
this.features = null;
|
||||
this.describer = null;
|
||||
this.registry = null;
|
||||
this.transactor = null;
|
||||
}
|
||||
|
||||
|
@ -338,35 +336,6 @@ public class Wfs1_1_0Provider extends AbstractWfsProvider {
|
|||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marshal object through response. Response cannot be reused after this
|
||||
* method is called.
|
||||
*
|
||||
* @param jaxbobject
|
||||
* @param mimeType
|
||||
* @param response
|
||||
* @throws Exception
|
||||
* on unrecoverable error attempting to send response
|
||||
*/
|
||||
protected void marshalResponse(Object jaxbobject, MimeType mimeType,
|
||||
IOgcHttpResponse response) throws Exception {
|
||||
OutputStream out = null;
|
||||
try {
|
||||
out = response.getOutputStream();
|
||||
response.setContentType(mimeType.toString());
|
||||
registry.marshal(jaxbobject, response.getOutputStream());
|
||||
} catch (Exception e) {
|
||||
log.error("Unable to marshal WFS response", e);
|
||||
OgcResponse err = getError(new WfsException(
|
||||
Code.OperationProcessingFailed), null);
|
||||
OgcResponseOutput.sendText(err, response, out);
|
||||
} finally {
|
||||
if (out != null) {
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get features as JAXB object
|
||||
*
|
||||
|
|
|
@ -67,8 +67,6 @@ import org.w3.xmlschema.Schema;
|
|||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.edex.core.EDEXUtil;
|
||||
import com.raytheon.uf.edex.ogc.common.OgcException;
|
||||
import com.raytheon.uf.edex.ogc.common.OgcOperationInfo;
|
||||
|
@ -119,6 +117,7 @@ import com.raytheon.uf.edex.wfs.util.XMLGregorianCalendarConverter;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 17, 2012 bclement Initial creation
|
||||
* Sep 18, 2013 #411 skorolev Added required RESPONSE METADATA
|
||||
* Nov 11, 2013 2539 bclement moved registry/marshal to parent
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -128,14 +127,10 @@ import com.raytheon.uf.edex.wfs.util.XMLGregorianCalendarConverter;
|
|||
public class Wfs2_0_0Provider extends AbstractWfsProvider implements
|
||||
IStoredQueryCallback {
|
||||
|
||||
protected final IUFStatusHandler log = UFStatus.getHandler(this.getClass());
|
||||
|
||||
public static final String version = "2.0.0";
|
||||
|
||||
public static final MimeType GML_MIME = GmlUtils.GML32_TYPE;
|
||||
|
||||
protected WfsRegistryImpl registry;
|
||||
|
||||
protected final Capabilities capabilities;
|
||||
|
||||
protected final Gml32FeatureFetcher features;
|
||||
|
@ -151,10 +146,10 @@ public class Wfs2_0_0Provider extends AbstractWfsProvider implements
|
|||
protected final NamespaceContext nsContext;
|
||||
|
||||
public Wfs2_0_0Provider(WfsRegistryImpl registry) {
|
||||
super(registry);
|
||||
this.capabilities = new Capabilities(registry);
|
||||
this.features = new Gml32FeatureFetcher(registry);
|
||||
this.describer = new FeatureDescriber(registry, this);
|
||||
this.registry = registry;
|
||||
// this name must match preloaded store in utility directory
|
||||
this.queryStore = new FileSystemQueryStore(registry, "wfsQueryStore");
|
||||
Map<String, Object> reverseNsMap = new HashMap<String, Object>(
|
||||
|
@ -169,10 +164,10 @@ public class Wfs2_0_0Provider extends AbstractWfsProvider implements
|
|||
* Unit tests
|
||||
*/
|
||||
protected Wfs2_0_0Provider() {
|
||||
super(null);
|
||||
this.capabilities = null;
|
||||
this.features = null;
|
||||
this.describer = null;
|
||||
this.registry = null;
|
||||
this.queryStore = null;
|
||||
this.nsContext = null;
|
||||
}
|
||||
|
@ -384,34 +379,7 @@ public class Wfs2_0_0Provider extends AbstractWfsProvider implements
|
|||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marshal object through response. Response cannot be reused after this
|
||||
* method is called.
|
||||
*
|
||||
* @param jaxbobject
|
||||
* @param mimeType
|
||||
* @param response
|
||||
* @throws Exception
|
||||
* on unrecoverable error attempting to send response
|
||||
*/
|
||||
protected void marshalResponse(Object jaxbobject, MimeType mimeType,
|
||||
IOgcHttpResponse response) throws Exception {
|
||||
OutputStream out = null;
|
||||
try {
|
||||
out = response.getOutputStream();
|
||||
response.setContentType(mimeType.toString());
|
||||
registry.marshal(jaxbobject, response.getOutputStream());
|
||||
} catch (Exception e) {
|
||||
log.error("Unable to marshal WFS response", e);
|
||||
OgcResponse err = getError(new WfsException(
|
||||
Code.OperationProcessingFailed), null);
|
||||
OgcResponseOutput.sendText(err, response, out);
|
||||
} finally {
|
||||
if (out != null) {
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get features as JAXB object
|
||||
|
|
|
@ -21,7 +21,6 @@ import com.raytheon.uf.common.localization.LocalizationFile;
|
|||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.localization.exception.LocalizationOpFailedException;
|
||||
import com.raytheon.uf.common.serialization.SerializationException;
|
||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
|
||||
/**
|
||||
|
@ -43,6 +42,7 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
* load/check for locked colormaps.
|
||||
* 04/10/2013 #958 qzhou Added SolarImage in getColorMapCategories.
|
||||
* 08/06/2013 2210 njensen Moved colormaps to common_static
|
||||
* Nov 11, 2013 2361 njensen Use ColorMap.JAXB for XML processing
|
||||
* </pre>
|
||||
*
|
||||
* @author Q. Zhou
|
||||
|
@ -77,8 +77,8 @@ public class ColorMapUtil {
|
|||
+ cmapCat + File.separator + name + ".cmap");
|
||||
|
||||
if (f != null) {
|
||||
ColorMap cm = (ColorMap) SerializationUtil
|
||||
.jaxbUnmarshalFromXmlFile(f.getAbsolutePath());
|
||||
ColorMap cm = ColorMap.JAXB.unmarshalFromXmlFile(f
|
||||
.getAbsolutePath());
|
||||
|
||||
cm.setName(name);
|
||||
return cm;
|
||||
|
@ -179,8 +179,8 @@ public class ColorMapUtil {
|
|||
File cmapFile = lclFile.getFile();
|
||||
|
||||
try {
|
||||
SerializationUtil.jaxbMarshalToXmlFile(colorMap,
|
||||
cmapFile.getAbsolutePath());
|
||||
ColorMap.JAXB
|
||||
.marshalToXmlFile(colorMap, cmapFile.getAbsolutePath());
|
||||
|
||||
lclFile.save();
|
||||
|
||||
|
@ -299,8 +299,8 @@ public class ColorMapUtil {
|
|||
if (files.containsKey(LocalizationLevel.SITE)) {
|
||||
f = files.get(LocalizationLevel.SITE).getFile();
|
||||
}
|
||||
ColorMap cm = (ColorMap) SerializationUtil
|
||||
.jaxbUnmarshalFromXmlFile(f.getAbsolutePath());
|
||||
ColorMap cm = ColorMap.JAXB.unmarshalFromXmlFile(f
|
||||
.getAbsolutePath());
|
||||
cm.setName(name);
|
||||
return cm;
|
||||
} else {
|
||||
|
|
|
@ -153,6 +153,7 @@ if [ "${1}" = "-postgres" ]; then
|
|||
fi
|
||||
|
||||
if [ "${1}" = "-delta" ]; then
|
||||
buildRPM "awips2"
|
||||
buildRPM "awips2-common-base"
|
||||
buildCAVE
|
||||
if [ $? -ne 0 ]; then
|
||||
|
@ -168,10 +169,8 @@ if [ "${1}" = "-delta" ]; then
|
|||
buildRPM "awips2-ncep-database"
|
||||
buildRPM "awips2-gfesuite-client"
|
||||
buildRPM "awips2-gfesuite-server"
|
||||
buildRPM "awips2-python"
|
||||
buildRPM "awips2-python-dynamicserialize"
|
||||
buildRPM "awips2-python-ufpy"
|
||||
buildRPM "awips2-python-qpid"
|
||||
|
||||
buildRPM "awips2-adapt-native"
|
||||
buildRPM "awips2-aviation-shared"
|
||||
|
|
|
@ -214,6 +214,7 @@ if [ "${1}" = "-postgres" ]; then
|
|||
fi
|
||||
|
||||
if [ "${1}" = "-delta" ]; then
|
||||
buildRPM "awips2"
|
||||
buildRPM "awips2-common-base"
|
||||
buildCAVE
|
||||
if [ $? -ne 0 ]; then
|
||||
|
@ -224,22 +225,32 @@ if [ "${1}" = "-delta" ]; then
|
|||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildRPM "awips2-ncep-database"
|
||||
buildRPM "awips2-gfesuite-client"
|
||||
buildRPM "awips2-gfesuite-server"
|
||||
buildRPM "awips2-python-dynamicserialize"
|
||||
buildRPM "awips2-python-ufpy"
|
||||
|
||||
buildRPM "awips2-aviation-shared"
|
||||
buildRPM "awips2-cli"
|
||||
buildRPM "awips2-database"
|
||||
buildRPM "awips2-database-server-configuration"
|
||||
buildRPM "awips2-database-standalone-configuration"
|
||||
buildRPM "awips2-data.hdf5-gfe.climo"
|
||||
buildRPM "awips2-gfesuite-client"
|
||||
buildRPM "awips2-gfesuite-server"
|
||||
buildRPM "awips2-localapps-environment"
|
||||
buildRPM "awips2-maps-database"
|
||||
buildRPM "awips2-notification"
|
||||
buildRPM "awips2-pypies"
|
||||
buildRPM "awips2-data.hdf5-topo"
|
||||
buildRPM "awips2-data.gfe"
|
||||
buildRPM "awips2"
|
||||
buildRPM "awips2-rcm"
|
||||
buildLocalizationRPMs
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
buildRPM "awips2-edex-environment"
|
||||
buildRPM "awips2-notification"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -152,5 +152,15 @@
|
|||
<classpathentry kind="lib" path="lib/org.eclipse.jface_3.8.0.v20120912-135020.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/org.apache.commons.configuration"/>
|
||||
<classpathentry kind="src" path="/com.raytheon.uf.edex.datadelivery.retrieval.wfs"/>
|
||||
<classpathentry kind="lib" path="lib/javax.servlet.source_2.5.0.v200910301333.jar"/>
|
||||
<classpathentry kind="lib" path="lib/javax.servlet.jsp-2.1.0.v201105211820.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jetty-http-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jetty-server-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jetty-servlet-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jetty-servlets-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jetty-util-7.6.14.v20131031.jar"/>
|
||||
<classpathentry kind="lib" path="lib/servlet-api-2.5.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 kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
|
@ -107,6 +107,7 @@ import com.raytheon.uf.edex.datadelivery.retrieval.RetrievalManagerNotifyEvent;
|
|||
* Sept 25, 2013 1797 dhladky separated time from gridded time
|
||||
* Oct 10, 2013 1797 bgonzale Refactored registry Time objects.
|
||||
* Oct 21, 2013 2292 mpduff Implement multiple data types
|
||||
* Nov 08, 2013 2506 bgonzale Added RegistryObjectType to RemoveRegistryEvent.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1000,7 +1001,7 @@ public class BandwidthManagerIntTest extends AbstractWfoBandwidthManagerIntTest
|
|||
|
||||
private void sendDeletedSubscriptionEvent(Subscription subscription) {
|
||||
RemoveRegistryEvent event = new RemoveRegistryEvent(
|
||||
subscription.getOwner(), subscription.getId());
|
||||
subscription.getOwner(), subscription.getId(), null);
|
||||
event.setObjectType(DataDeliveryRegistryObjectTypes.SITE_SUBSCRIPTION);
|
||||
bandwidthManager.subscriptionRemoved(event);
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.io.File;
|
|||
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetMetaDataHandler;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.dao.BandwidthContextFactory;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.dao.IBandwidthBucketDao;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.dao.IBandwidthDao;
|
||||
|
@ -41,6 +42,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.dao.IBandwidthDbInit;
|
|||
* Feb 20, 2013 1543 djohnson Pass additional super-class constructor arguments.
|
||||
* Jun 25, 2013 2106 djohnson Add {@link IBandwidthBucketDao}.
|
||||
* Jul 10, 2013 2106 djohnson Dependency inject registry handlers.
|
||||
* Nov 07, 2013 2506 bgonzale Added notification handler to bandwidth context.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -68,11 +70,12 @@ public class IntegrationTestBandwidthContextFactory extends
|
|||
IEdexBandwidthManagerCreator bandwidthManagerCreator,
|
||||
IBandwidthDbInit dbInit,
|
||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||
ISubscriptionHandler subscriptionHandler) {
|
||||
ISubscriptionHandler subscriptionHandler,
|
||||
ISubscriptionNotificationService notificationService) {
|
||||
super(bandwidthDao, bandwidthBucketsDao,
|
||||
new IntegrationTestBandwidthInitializer(),
|
||||
bandwidthManagerCreator, dbInit, dataSetMetaDataHandler,
|
||||
subscriptionHandler);
|
||||
subscriptionHandler, notificationService);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -90,6 +93,6 @@ public class IntegrationTestBandwidthContextFactory extends
|
|||
*/
|
||||
public static File getIntegrationTestBandwidthMapConfigFile() {
|
||||
return new IntegrationTestBandwidthContextFactory(null, null, null,
|
||||
null, null, null).getBandwidthMapConfigFile();
|
||||
null, null, null, null).getBandwidthMapConfigFile();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ package com.raytheon.uf.edex.datadelivery.bandwidth;
|
|||
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetMetaDataHandler;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.common.util.JarUtil;
|
||||
import com.raytheon.uf.common.util.SpringFiles;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.WfoBandwidthManagerCreator.WfoBandwidthManager;
|
||||
|
@ -43,6 +44,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
|||
* Feb 27, 2013 1644 djohnson Extends WFO bandwidth manager.
|
||||
* May 15, 2013 2000 djohnson Include daos.
|
||||
* Jul 10, 2013 2106 djohnson Dependency inject registry handlers.
|
||||
* Nov 08, 2013 2506 bgonzale Added notification service to bandwidth manager.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -71,9 +73,11 @@ public class IntegrationTestWfoBandwidthManager extends WfoBandwidthManager {
|
|||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||
BandwidthDaoUtil bandwidthDaoUtil,
|
||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||
ISubscriptionHandler subscriptionHandler) {
|
||||
ISubscriptionHandler subscriptionHandler,
|
||||
ISubscriptionNotificationService subscriptionNotificationService) {
|
||||
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
|
||||
dataSetMetaDataHandler, subscriptionHandler);
|
||||
dataSetMetaDataHandler, subscriptionHandler,
|
||||
subscriptionNotificationService);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,7 @@ package com.raytheon.uf.edex.datadelivery.bandwidth;
|
|||
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetMetaDataHandler;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.EdexBandwidthContextFactory.IEdexBandwidthManagerCreator;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.dao.IBandwidthDao;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.dao.IBandwidthDbInit;
|
||||
|
@ -38,6 +39,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 20, 2013 1543 djohnson Initial creation
|
||||
* Jul 10, 2013 2106 djohnson Dependency inject registry handlers.
|
||||
* Nov 08, 2013 2506 bgonzale Added notification service to bandwidth manager.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -55,9 +57,10 @@ public class IntegrationTestWfoBandwidthManagerCreator implements
|
|||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||
BandwidthDaoUtil bandwidthDaoUtil,
|
||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||
ISubscriptionHandler subscriptionHandler) {
|
||||
ISubscriptionHandler subscriptionHandler,
|
||||
ISubscriptionNotificationService subscriptionNotificationService) {
|
||||
return new IntegrationTestWfoBandwidthManager(dbInit, bandwidthDao,
|
||||
retrievalManager, bandwidthDaoUtil, dataSetMetaDataHandler,
|
||||
subscriptionHandler);
|
||||
subscriptionHandler, subscriptionNotificationService);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ package com.raytheon.uf.edex.datadelivery.bandwidth.ncf;
|
|||
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetMetaDataHandler;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.common.util.JarUtil;
|
||||
import com.raytheon.uf.common.util.SpringFiles;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.IBandwidthManager;
|
||||
|
@ -43,6 +44,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
|||
* Feb 18, 2013 1543 djohnson Initial creation
|
||||
* Feb 27, 2013 1644 djohnson Extend NCF bandwidth manager.
|
||||
* Jul 10, 2013 2106 djohnson Dependency inject registry handlers.
|
||||
* Nov 08, 2013 2506 bgonzale Added notification service to bandwidth manager.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -71,9 +73,11 @@ public class IntegrationTestNcfBandwidthManager extends NcfBandwidthManager {
|
|||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||
BandwidthDaoUtil bandwidthDaoUtil,
|
||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||
ISubscriptionHandler subscriptionHandler) {
|
||||
ISubscriptionHandler subscriptionHandler,
|
||||
ISubscriptionNotificationService subscriptionNotificationService) {
|
||||
super(dbInit, bandwidthDao, retrievalManager, bandwidthDaoUtil,
|
||||
dataSetMetaDataHandler, subscriptionHandler);
|
||||
dataSetMetaDataHandler, subscriptionHandler,
|
||||
subscriptionNotificationService);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,7 @@ package com.raytheon.uf.edex.datadelivery.bandwidth.ncf;
|
|||
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.IDataSetMetaDataHandler;
|
||||
import com.raytheon.uf.common.datadelivery.registry.handlers.ISubscriptionHandler;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.EdexBandwidthContextFactory.IEdexBandwidthManagerCreator;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.IBandwidthManager;
|
||||
import com.raytheon.uf.edex.datadelivery.bandwidth.dao.IBandwidthDao;
|
||||
|
@ -39,6 +40,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthDaoUtil;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 20, 2013 1543 djohnson Initial creation
|
||||
* Jul 10, 2013 2106 djohnson Dependency inject registry handlers.
|
||||
* Nov 08, 2013 2506 bgonzale Added notification service to bandwidth manager.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -56,9 +58,10 @@ public class IntegrationTestNcfBandwidthManagerCreator implements
|
|||
IBandwidthDao bandwidthDao, RetrievalManager retrievalManager,
|
||||
BandwidthDaoUtil bandwidthDaoUtil,
|
||||
IDataSetMetaDataHandler dataSetMetaDataHandler,
|
||||
ISubscriptionHandler subscriptionHandler) {
|
||||
ISubscriptionHandler subscriptionHandler,
|
||||
ISubscriptionNotificationService subscriptionNotificationService) {
|
||||
return new IntegrationTestNcfBandwidthManager(dbInit, bandwidthDao,
|
||||
retrievalManager, bandwidthDaoUtil, dataSetMetaDataHandler,
|
||||
subscriptionHandler);
|
||||
subscriptionHandler, subscriptionNotificationService);
|
||||
}
|
||||
}
|
||||
|
|
BIN
tests/lib/javax.servlet.jsp-2.1.0.v201105211820.jar
Normal file
BIN
tests/lib/javax.servlet.jsp-2.1.0.v201105211820.jar
Normal file
Binary file not shown.
BIN
tests/lib/jetty-http-7.6.14.v20131031.jar
Normal file
BIN
tests/lib/jetty-http-7.6.14.v20131031.jar
Normal file
Binary file not shown.
BIN
tests/lib/jetty-security-7.6.14.v20131031.jar
Normal file
BIN
tests/lib/jetty-security-7.6.14.v20131031.jar
Normal file
Binary file not shown.
BIN
tests/lib/jetty-server-7.6.14.v20131031.jar
Normal file
BIN
tests/lib/jetty-server-7.6.14.v20131031.jar
Normal file
Binary file not shown.
BIN
tests/lib/jetty-servlet-7.6.14.v20131031.jar
Normal file
BIN
tests/lib/jetty-servlet-7.6.14.v20131031.jar
Normal file
Binary file not shown.
BIN
tests/lib/jetty-servlets-7.6.14.v20131031.jar
Normal file
BIN
tests/lib/jetty-servlets-7.6.14.v20131031.jar
Normal file
Binary file not shown.
BIN
tests/lib/jetty-util-7.6.14.v20131031.jar
Normal file
BIN
tests/lib/jetty-util-7.6.14.v20131031.jar
Normal file
Binary file not shown.
BIN
tests/lib/servlet-api-2.5.jar
Normal file
BIN
tests/lib/servlet-api-2.5.jar
Normal file
Binary file not shown.
|
@ -245,8 +245,8 @@ public class HttpProxiedValidClientCredentialsTest {
|
|||
|
||||
private Time getTime() throws ParseException {
|
||||
|
||||
String startDateString = "2013-08-30T12:40:00.000";
|
||||
String endDateString = "2013-08-30T14:15:00.000";
|
||||
String startDateString = "2013-11-12T18:00:00.000";
|
||||
String endDateString = "2013-11-12T19:00:00.000";
|
||||
|
||||
PointTime time = new PointTime();
|
||||
time.setFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
|
||||
|
|
|
@ -53,7 +53,7 @@ public class HttpProxyTestConstants extends HttpTestConstants {
|
|||
|
||||
public static final String HOST = "dev11";
|
||||
|
||||
public static final String REMOTE_HOST = "dev11";
|
||||
public static final String REMOTE_HOST = "stormy";
|
||||
|
||||
public static final int HTTP_PORT = 8085;
|
||||
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.edex.plugin.taf.decoder;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.raytheon.edex.esb.Headers;
|
||||
import com.raytheon.uf.edex.decodertools.core.DecoderTools;
|
||||
import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* TAF change group parsing test
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 13, 2013 bclement Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bclement
|
||||
* @version 1.0
|
||||
*/
|
||||
public class TAFChangeGroupFactoryTest {
|
||||
|
||||
|
||||
/**
|
||||
* Test conversion from legacy valid time format to extended TAF format
|
||||
*/
|
||||
@Test
|
||||
public void testValidTimeReformat() {
|
||||
final String input = "TAF SKCC 121000Z 121212 00000KT 9999 SCT018 SCT090\n"
|
||||
+ " TEMPO 121213 8000 MIFG SCT017\n"
|
||||
+ " TEMPO 300024 36007KT SCT023 PROB40 1219/1221 8000 DZRA\n"
|
||||
+ " SCT018TCU\n" + " TEMPO 1300/1302 VCSH SCT017TCU\n"
|
||||
+ " TEMPO 1310/1312 5000 BCFG SCT015 TX31/1218Z TN23/1311Z=";
|
||||
|
||||
final String expected = "TAF SKCC 121000Z 1212/1312 00000KT 9999 SCT018 SCT090\n"
|
||||
+ " TEMPO 1212/1213 8000 MIFG SCT017\n"
|
||||
+ " TEMPO 3000/0100 36007KT SCT023 PROB40 1219/1221 8000 DZRA\n"
|
||||
+ " SCT018TCU\n"
|
||||
+ " TEMPO 1300/1302 VCSH SCT017TCU\n"
|
||||
+ " TEMPO 1310/1312 5000 BCFG SCT015 TX31/1218Z TN23/1311Z=";
|
||||
|
||||
TAFChangeGroupFactory factory = new TAFChangeGroupFactory();
|
||||
final Headers headers = new Headers();
|
||||
headers.put(DecoderTools.INGEST_FILE_NAME, "/tmp/sbn/manual/nctext/20131112/11/FTXX99_KWBC_121100_20738883.2013111211");
|
||||
String result = factory.checkForLegacyFormat(new WMOHeader(
|
||||
"FTXX99 KWBC 121100".getBytes(), headers), input);
|
||||
Assert.assertEquals(expected, result);
|
||||
}
|
||||
|
||||
}
|
|
@ -23,11 +23,6 @@ import static org.hamcrest.CoreMatchers.is;
|
|||
import static org.hamcrest.Matchers.emptyCollectionOf;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Matchers.anyString;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
|
@ -40,7 +35,6 @@ import com.raytheon.uf.common.datadelivery.registry.SiteSubscription;
|
|||
import com.raytheon.uf.common.datadelivery.registry.Subscription;
|
||||
import com.raytheon.uf.common.datadelivery.registry.SubscriptionBuilder;
|
||||
import com.raytheon.uf.common.datadelivery.service.GroupDefinitionService;
|
||||
import com.raytheon.uf.common.datadelivery.service.ISubscriptionNotificationService;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryHandlerException;
|
||||
import com.raytheon.uf.common.registry.handler.RegistryObjectHandlersUtil;
|
||||
import com.raytheon.uf.edex.datadelivery.service.services.GroupDefinitionServiceHandler;
|
||||
|
@ -58,6 +52,7 @@ import com.raytheon.uf.edex.datadelivery.service.services.GroupDefinitionService
|
|||
* Feb 26, 2013 1643 djohnson Change exception type thrown.
|
||||
* Mar 28, 2013 1841 djohnson Subscription is now UserSubscription.
|
||||
* Jun 24, 2013 2106 djohnson RegistryManager is gone.
|
||||
* Nov 12, 2013 2506 bgonzale Refactored out notification service.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -73,14 +68,11 @@ public class GroupDefinitionServiceTest {
|
|||
|
||||
private IGroupDefinitionHandler groupHandler;
|
||||
|
||||
private final ISubscriptionNotificationService subscriptionNotificationService = mock(ISubscriptionNotificationService.class);
|
||||
|
||||
private final GroupDefinitionService service = new GroupDefinitionService() {
|
||||
@Override
|
||||
protected Object getResponseFromServer(
|
||||
GroupDefinitionServiceRequest request) throws Exception {
|
||||
return new GroupDefinitionServiceHandler(
|
||||
subscriptionNotificationService).handleRequest(request);
|
||||
return new GroupDefinitionServiceHandler().handleRequest(request);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -116,16 +108,6 @@ public class GroupDefinitionServiceTest {
|
|||
is(emptyCollectionOf(Subscription.class)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void deletingAGroupNotifiesOfSubscriptionUpdates()
|
||||
throws RemoteException, RegistryHandlerException {
|
||||
service.deleteGroupDefinition(group);
|
||||
|
||||
verify(subscriptionNotificationService, times(2))
|
||||
.sendUpdatedSubscriptionNotification(any(Subscription.class),
|
||||
anyString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void deletingAGroupDeletesTheGroup() throws RemoteException,
|
||||
RegistryHandlerException {
|
||||
|
|
Loading…
Add table
Reference in a new issue