Issue #2186 add generic pdo distributor and move the gfe routes to the gfe file; remove config.xml from warngen localization as it breaks things

Change-Id: I025fb4b799193478250b61bc492e5b0dbdfd973d

Former-commit-id: d2e5e7284a [formerly 0470e7531a] [formerly d2e5e7284a [formerly 0470e7531a] [formerly 3939a15ff9 [formerly 894f51376ba69365192ad0b9c5dd19c9cfba4e5c]]]
Former-commit-id: 3939a15ff9
Former-commit-id: 388c2b5b13 [formerly 8bb5a46772]
Former-commit-id: 2003f89be3
This commit is contained in:
Matt Nash 2013-07-10 14:43:54 -05:00
parent 6a0a9400ad
commit caec447a3e
12 changed files with 210 additions and 53 deletions

View file

@ -27,6 +27,16 @@
<constructor-arg ref="smartInitSrvCfg" />
</bean>
<bean factory-bean="pluginNotifier" factory-method="register">
<constructor-arg value="warning" />
<constructor-arg value="jms-warning:queue:edex.spcWatch" />
</bean>
<bean factory-bean="pluginNotifier" factory-method="register">
<constructor-arg value="warning" />
<constructor-arg value="jms-warning:queue:edex.tpcWatch" />
</bean>
<bean id="spcWatch" class="com.raytheon.edex.plugin.gfe.spc.SPCWatchSrv" />
<bean id="tpcWatch" class="com.raytheon.edex.plugin.gfe.tpc.TPCWatchSrv" />
<bean id="wclWatch" class="com.raytheon.edex.plugin.gfe.wcl.WCLWatchSrv" />

View file

@ -19,30 +19,30 @@
<property name="pluginName" value="warning" />
<property name="pluginFQN" value="com.raytheon.edex.plugin.warning" />
<property name="moduleName" value="WarningDecoder" />
<property name="cache" value="true"/>
<property name="cache" value="true" />
<property name="recordClassname"
value="com.raytheon.uf.common.dataplugin.warning.WarningRecord" />
</bean>
<bean id="practiceWarningProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties">
<property name="pluginName" value="practicewarning" />
<property name="pluginFQN" value="com.raytheon.uf.common.dataplugin.warning" />
<property name="record"
value="com.raytheon.uf.common.dataplugin.warning.PracticeWarningRecord" />
<property name="initialRetentionTime" value="144" />
</bean>
<bean factory-bean="pluginRegistry" factory-method="register">
<constructor-arg value="practicewarning" />
<constructor-arg ref="practiceWarningProperties" />
</bean>
<bean id="practiceWarningProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties">
<property name="pluginName" value="practicewarning" />
<property name="pluginFQN" value="com.raytheon.uf.common.dataplugin.warning" />
<property name="record"
value="com.raytheon.uf.common.dataplugin.warning.PracticeWarningRecord" />
<property name="initialRetentionTime" value="144" />
</bean>
<bean id="practiceWarningDecoder" class="com.raytheon.uf.edex.python.decoder.PythonDecoder">
<property name="pluginName" value="practicewarning" />
<property name="pluginFQN" value="com.raytheon.edex.plugin.warning" />
<property name="moduleName" value="WarningDecoder" />
<property name="cache" value="true"/>
<property name="recordClassname"
value="com.raytheon.uf.common.dataplugin.warning.PracticeWarningRecord" />
</bean>
<bean factory-bean="pluginRegistry" factory-method="register">
<constructor-arg value="practicewarning" />
<constructor-arg ref="practiceWarningProperties" />
</bean>
<bean id="practiceWarningDecoder" class="com.raytheon.uf.edex.python.decoder.PythonDecoder">
<property name="pluginName" value="practicewarning" />
<property name="pluginFQN" value="com.raytheon.edex.plugin.warning" />
<property name="moduleName" value="WarningDecoder" />
<property name="cache" value="true" />
<property name="recordClassname"
value="com.raytheon.uf.common.dataplugin.warning.PracticeWarningRecord" />
</bean>
</beans>

View file

@ -68,8 +68,7 @@
<bean ref="index" method="index" />
<multicast parallelProcessing="false">
<to uri="direct-vm:warningIngestAlert" />
<to uri="jms-warning:queue:edex.spcWatch" />
<to uri="jms-warning:queue:edex.tpcWatch" />
<bean ref="pluginNotifier" method="send"/>
<filter>
<method bean="vtecFilter" method="hasVTEC" />
<to uri="jms-warning:queue:activeTablePending?destinationResolver=#qpidDurableResolver" />

View file

@ -154,4 +154,11 @@
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.notification"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.uf.edex.notification</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,11 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Distributor
Bundle-SymbolicName: com.raytheon.uf.edex.notification
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.apache.camel;bundle-version="1.0.0",
com.google.guava;bundle-version="1.0.0",
com.raytheon.uf.edex.core;bundle-version="1.12.1174",
com.raytheon.uf.common.status;bundle-version="1.12.1174"

View file

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

View file

@ -0,0 +1,6 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="pluginNotifier" class="com.raytheon.uf.edex.notification.PluginNotifier" />
</beans>

View file

@ -0,0 +1,107 @@
/**
* 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.notification;
import java.util.ArrayList;
import java.util.List;
import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.camel.RecipientList;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
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.edex.core.EDEXUtil;
import com.raytheon.uf.edex.core.EdexException;
/**
* Plugins can register routes with this and then be generically fired to. Helps
* to reduce dependencies as we no longer need to call a route directly.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 13, 2013 mnash Initial creation
*
* </pre>
*
* @author mnash
* @version 1.0
*/
public class PluginNotifier {
private static final IUFStatusHandler theHandler = UFStatus
.getHandler(PluginNotifier.class);
private static final Multimap<String, String> routes = ArrayListMultimap
.create();
private static final PluginNotifier distributor = new PluginNotifier();
private PluginNotifier() {
}
public PluginNotifier getInstance() {
return distributor;
}
/**
* Normally called from Spring, this allows a set of commands to be
* registered for a specific plugin.
*
* @param name
* @param command
* @return
*/
public PluginNotifier register(String name, String command) {
routes.put(name, command);
return this;
}
/**
* Takes the pluginName, which is what was registered for, and sends to all
* the routes that are registered as that.
*
* @param exchange
* @return
*/
@RecipientList
public List<String> send(Exchange exchange) {
Message in = exchange.getIn();
String name = (String) in.getHeader("pluginName");
List<String> list = new ArrayList<String>();
for (String route : routes.get(name)) {
try {
EDEXUtil.getMessageProducer().sendAsyncUri(route, in.getBody());
} catch (EdexException e) {
theHandler.handle(Priority.PROBLEM,
"Unable to send message to " + route, e);
}
}
return list;
}
}

View file

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!--
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.
-->
<configuration>
<warngenOfficeShort>OMAHA/VALLEY NE</warngenOfficeShort>
<warngenOfficeLoc>OMAHA</warngenOfficeLoc>
<backupCWAs>EAX/KANSAS CITY,DMX/DES MOINES,BOX/BOSTON,LBF/NORTH PLATTE,PQR/PORTLAND</backupCWAs>
<siteNode>OMA</siteNode>
<defaultTemplate>severethunderstorm</defaultTemplate>
<mainWarngenProducts>Flash Flood/ffw,Severe Thunderstorm/severethunderstorm,Tornado/tornado</mainWarngenProducts>
<otherWarngenProducts>Severe Weather Statement/SVS,Flash Flood Statement/ffs,non-convective FFW (Dam Break)/dambreak,non-convective Flash Flood Statement/dambreakffs,Areal Flood Warning/flw,Areal Flood Warning Followup/fls,Areal Flood Advisory/fla,Areal Flood Advisory Followup/flas,Special Marine Warning/smw,Marine Weather Statement (SMW Follow)/smws,Marine Weather Statement standalone/marinestatement,Short Term Forecast/shortterm,Special Weather Statement (zones)/sws</otherWarngenProducts>
<followupListRefreshDelay>5000</followupListRefreshDelay>
</configuration>