diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/watch/TPCWatchSrv.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/watch/TPCWatchSrv.java index 844e77ce63..c93225694a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/watch/TPCWatchSrv.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/watch/TPCWatchSrv.java @@ -69,7 +69,7 @@ import com.raytheon.uf.edex.activetable.ActiveTablePyIncludeUtil; * ------------ ---------- ----------- -------------------------- * Oct 03, 2008 njensen Initial creation * Jul 10, 2009 #2590 njensen Added multiple site support - * May 12, 2014 #3157 dgilling Re-factor based on AbstractWatchNotifierSrv. + * May 12, 2014 #3157 dgilling Re-factor based on AbstractWatchNotifierSrv. * Jun 10, 2014 #3268 dgilling Re-factor based on AbstractWatchNotifierSrv. * Oct 08, 2014 #4953 randerso Refactored AbstractWatchNotifierSrv to allow * subclasses to handle all watches if desired. @@ -80,6 +80,7 @@ import com.raytheon.uf.edex.activetable.ActiveTablePyIncludeUtil; * Added call to nwrwavestcv.csh * Added support for sending TCVAdvisory files to * VTEC partners + * Apr 13, 1016 #5577 randerso Add support for pre-TCV * * * @author njensen @@ -99,31 +100,11 @@ public final class TPCWatchSrv extends AbstractWatchNotifierSrv { private static final String DEFAULT_TPC_SITE = "KNHC"; - private static final String ALERT_TXT = "Alert: TCV has arrived from TPC. " + private static final String ALERT_TXT = "Alert: TCV has arrived from NHC. " + "Check for 'red' locks (owned by others) on your Hazard grid and resolve them. " + "If hazards are separated into temporary grids, please run Mergehazards. " + "Next...save Hazards grid. Finally, select PlotTPCEvents from Hazards menu."; - private static final Map phensigMap; - - private static final Map actMap; - - static { - Map phensigMapTemp = new HashMap(5, 1f); - phensigMapTemp.put("HU.A", "Hurricane Watch"); - phensigMapTemp.put("HU.S", "Hurricane Local Statement"); - phensigMapTemp.put("HU.W", "Hurricane Warning"); - phensigMapTemp.put("TR.A", "Tropical Storm Watch"); - phensigMapTemp.put("TR.W", "Tropical Storm Warning"); - phensigMap = Collections.unmodifiableMap(phensigMapTemp); - - Map actMapTemp = new HashMap(3, 1f); - actMapTemp.put("CON", "Continued"); - actMapTemp.put("CAN", "Cancelled"); - actMapTemp.put("NEW", "New"); - actMap = Collections.unmodifiableMap(actMapTemp); - } - private static final ThreadLocal pythonScript = new ThreadLocal() { /* @@ -188,8 +169,8 @@ public final class TPCWatchSrv extends AbstractWatchNotifierSrv { boolean practiceMode = (record instanceof PracticeWarningRecord); String issuingOffice = record.getOfficeid(); - // if it's a TCV - if ("TCV".equals(pil)) { + // if it's a TCV or pre-TCV + if ("TCV".equals(pil) || "PTC".equals(pil)) { super.handleWatch(warningRecs); } @@ -438,7 +419,7 @@ public final class TPCWatchSrv extends AbstractWatchNotifierSrv { private Map loadJSONDictionary(LocalizationFile lf) { if (lf != null) { - PythonScript script = this.pythonScript.get(); + PythonScript script = pythonScript.get(); if (script != null) { Map args = new HashMap(); args.put("localizationType", lf.getContext() @@ -463,7 +444,7 @@ public final class TPCWatchSrv extends AbstractWatchNotifierSrv { private void saveJSONDictionary(LocalizationFile lf, Map dict) { if (lf != null) { - PythonScript script = this.pythonScript.get(); + PythonScript script = pythonScript.get(); if (script != null) { Map args = new HashMap(); args.put("localizationType", lf.getContext() @@ -516,31 +497,6 @@ public final class TPCWatchSrv extends AbstractWatchNotifierSrv { return null; } - // create the message - StringBuilder msg = new StringBuilder(ALERT_TXT); - for (String phensigStorm : phensigStormAct.keySet()) { - Collection acts = phensigStormAct.get(phensigStorm); - String[] splitKey = phensigStorm.split(":"); - String phensig = splitKey[0]; - String storm = splitKey[1]; - - String t1 = phensigMap.get(phensig); - if (t1 == null) { - t1 = phensig; - } - msg.append(t1 + ": #" + storm + "("); - String sep = ""; - for (String a : acts) { - String a1 = actMap.get(a); - if (a1 == null) { - a1 = a; - } - msg.append(sep).append(a1); - sep = ","; - } - msg.append("). "); - } - - return msg.toString(); + return ALERT_TXT; } } \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/notification/gfe-watch.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/notification/gfe-watch.xml index 93f427665d..b88e76f748 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/notification/gfe-watch.xml +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/notification/gfe-watch.xml @@ -21,7 +21,7 @@ - +