diff --git a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/ConfigurationManager.java b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/ConfigurationManager.java index 4da6d0eeb5..6bae5c0c08 100644 --- a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/ConfigurationManager.java +++ b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/ConfigurationManager.java @@ -76,6 +76,7 @@ import com.raytheon.uf.viz.alertviz.config.Source; * Oct 04, 2018 7484 randerso Changed to use AV_ADMIN for internal errors * Oct 08, 2018 7515 randerso Adjusted priorities of AlertViz internal * errors. + * Sep 01, 2022 srcarter Remove workstation and set site to default * * * @@ -91,9 +92,6 @@ public class ConfigurationManager { public static final ConfigContext DEFAULT_SITE_CONFIG = new ConfigContext( ConfigContext.DEFAULT_NAME, LocalizationLevel.SITE); - public static final ConfigContext DEFAULT_WORKSTATION_CONFIG = new ConfigContext( - ConfigContext.DEFAULT_NAME, LocalizationLevel.WORKSTATION); - private static final String CONFIG_DIR = ConfigContext.ALERTVIZ_DIR + IPathManager.SEPARATOR + ConfigContext.DEFAULT_SUBDIR; @@ -165,32 +163,13 @@ public class ConfigurationManager { } /** - * Get default WORKSTATION configuration file for host machine. When it does - * not exist create from Default SITE or BASE. + * Get default config (SITE) * * @return hostContext */ private ConfigContext getDefaultHostContext() { - ConfigContext workstationContext = DEFAULT_WORKSTATION_CONFIG; - - try { - ILocalizationFile file = getLocalizationFile(workstationContext); - - if (file == null || !file.exists()) { - ConfigContext sourceContext = DEFAULT_SITE_CONFIG; - file = getLocalizationFile(sourceContext); - - if (file == null || !file.exists()) { - sourceContext = DEFAULT_BASE_CONFIG; - } - Configuration config = retrieveConfiguration(sourceContext); - saveToFile(workstationContext, config); - } - } catch (Exception ex) { - statusHandler.fatal( - "Unable to load configuration context " + context, ex); - } - return workstationContext; + ConfigContext siteContext = DEFAULT_SITE_CONFIG; + return siteContext; } public ConfigContext[] getConfigurations() { @@ -278,7 +257,7 @@ public class ConfigurationManager { } if (configurationMap.containsKey(context)) { if (current.equals(context)) { - loadAsCurrent(DEFAULT_WORKSTATION_CONFIG); + loadAsCurrent(DEFAULT_SITE_CONFIG); } ILocalizationFile file = getLocalizationFile(context); try { @@ -566,8 +545,7 @@ public class ConfigurationManager { } public static boolean isDefaultConfig(ConfigContext context) { - return DEFAULT_WORKSTATION_CONFIG.equals(context) - || DEFAULT_SITE_CONFIG.equals(context) + return DEFAULT_SITE_CONFIG.equals(context) || DEFAULT_BASE_CONFIG.equals(context); } } diff --git a/cave/com.raytheon.uf.viz.product.alertviz/src/com/raytheon/uf/viz/product/alertviz/AlertVizApplication.java b/cave/com.raytheon.uf.viz.product.alertviz/src/com/raytheon/uf/viz/product/alertviz/AlertVizApplication.java index 3946796aa3..f4f84478ee 100644 --- a/cave/com.raytheon.uf.viz.product.alertviz/src/com/raytheon/uf/viz/product/alertviz/AlertVizApplication.java +++ b/cave/com.raytheon.uf.viz.product.alertviz/src/com/raytheon/uf/viz/product/alertviz/AlertVizApplication.java @@ -76,6 +76,7 @@ import com.raytheon.uf.viz.core.notification.jobs.NotificationManagerJob; * errors. * Oct 12, 2018 7515 randerso Implemented AlertVizStatusHandlerFactory to * handle internal AlertViz errors properly. + * Sep 01, 2022 srcarter Remove extra levels during initialization * * * @@ -227,7 +228,6 @@ public class AlertVizApplication implements IStandaloneComponent { protected void initializeLocalization() throws Exception { PathManagerFactory.setAdapter(new CAVELocalizationAdapter()); new LocalizationInitializer(true, false).run(); - AlertVizLocalizationConfigurer.registerExtraLevels(); } } diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/TextWorkstationConstants.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/TextWorkstationConstants.java index 764b8ee4dc..6f1327ed76 100644 --- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/TextWorkstationConstants.java +++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/TextWorkstationConstants.java @@ -104,7 +104,7 @@ public class TextWorkstationConstants { IPathManager pm = PathManagerFactory.getPathManager(); ILocalizationFile lf = pm.getLocalizationFile( pm.getContext(LocalizationType.CAVE_STATIC, - LocalizationLevel.WORKSTATION), + LocalizationLevel.SITE), LocalizationUtil.join("textWs", "textws.prefs")); return lf; diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/util/AlarmAlertFunctions.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/util/AlarmAlertFunctions.java index 5c243bacad..e00d996f92 100644 --- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/util/AlarmAlertFunctions.java +++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/alarmalert/util/AlarmAlertFunctions.java @@ -667,44 +667,21 @@ public class AlarmAlertFunctions { } /* - * Try to load the workstation file. If there is no workstation file then - * try to load the site file and create a new workstation file from it. If - * there is no site file, then create a new default workstation file. + * Try to load the site file. */ - public static AAPACombined loadSiteAlarms( - ILocalizationFileObserver listener) { - LocalizationFile workstationFile = getFile( - initLocalization(LocalizationLevel.WORKSTATION), SITE_FILE); + public static AAPACombined loadSiteAlarms(ILocalizationFileObserver listener) { AAPACombined aapaCombined = null; - if (workstationFile == null || !workstationFile.exists()) { - // no workstation file found. try the site file - LocalizationFile siteFile = getFile(initSiteLocalization(), - SITE_FILE); - if (siteFile == null) { - aapaCombined = createDefaultAAPACombined(); - } else { - try { - aapaCombined = loadFile(siteFile.getFile()); - } catch (FileNotFoundException e) { - aapaCombined = createDefaultAAPACombined(); - } - } - // save work file - if (workstationFile != null) { - saveAlarms(aapaCombined, workstationFile); - } - } else { + LocalizationFile siteFile = getFile(initSiteLocalization(), SITE_FILE); + if (siteFile == null) { + aapaCombined = createDefaultAAPACombined(); try { - aapaCombined = loadFile(workstationFile.getFile()); + aapaCombined = loadFile(siteFile.getFile()); } catch (FileNotFoundException e) { aapaCombined = createDefaultAAPACombined(); } } - if (workstationFile != null) { - workstationFile.addFileUpdatedObserver(listener); - } return aapaCombined; } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/python/LocalizationSupport.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/python/LocalizationSupport.py index f1fe2b6cc7..4f60ad29a4 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/python/LocalizationSupport.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/common_static/base/gfe/python/LocalizationSupport.py @@ -28,6 +28,7 @@ # 12/08/2014 #4953 randerso Made for generic allowing specification of LocalizationLevel # Re-exported Java enums for easier use. # Apr 25, 2015 4952 njensen Updated for new JEP API +# Sep 01, 2022 srcarter Remove workstation and region references ## ## @@ -48,10 +49,8 @@ CAVE_CONFIG = LocalizationType.CAVE_CONFIG COMMON_STATIC = LocalizationType.COMMON_STATIC BASE = LocalizationLevel.BASE -REGION = LocalizationLevel.REGION CONFIGURED = LocalizationLevel.CONFIGURED SITE = LocalizationLevel.SITE -WORKSTATION = LocalizationLevel.WORKSTATION USER = LocalizationLevel.USER def getLocalizationFile(loctype, loclevel, contextname, filename): diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/GribPostProcessor.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/GribPostProcessor.java index f5feac3fd0..b342a45a5a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/GribPostProcessor.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/GribPostProcessor.java @@ -76,6 +76,7 @@ import com.raytheon.uf.common.status.UFStatus; * Apr 11, 2016 5564 bsteffen Move localization files to common_static * Apr 15, 2016 5182 tjensen Changed processorMap population to be done * during processing instead of up front. + * Sep 01, 2022 srcarter Remove region localization level * * * @@ -317,8 +318,8 @@ public class GribPostProcessor { private synchronized void initProcessorMap() { IPathManager pathMgr = PathManagerFactory.getPathManager(); LocalizationLevel[] levels = new LocalizationLevel[] { - LocalizationLevel.BASE, LocalizationLevel.REGION, - LocalizationLevel.CONFIGURED, LocalizationLevel.SITE }; + LocalizationLevel.BASE, LocalizationLevel.CONFIGURED, + LocalizationLevel.SITE }; Map files = pathMgr .getTieredLocalizationFile(LocalizationType.COMMON_STATIC, diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/precipitation/PrecipAccumPostProcessor.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/precipitation/PrecipAccumPostProcessor.java index 25d3141cef..d58c4c0c5b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/precipitation/PrecipAccumPostProcessor.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/decoderpostprocessors/precipitation/PrecipAccumPostProcessor.java @@ -68,6 +68,7 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao; * ------------- -------- --------- ----------------------------------------- * Sep 28, 2015 3756 nabowle Initial creation * Apr 11, 2016 5564 bsteffen Move localization files to common_static + * Sep 01, 2022 srcarter Remove region localization level * * * @@ -438,8 +439,8 @@ public class PrecipAccumPostProcessor extends DecoderPostProcessor { IPathManager pathMgr = PathManagerFactory.getPathManager(); LocalizationLevel[] levels = new LocalizationLevel[] { - LocalizationLevel.BASE, LocalizationLevel.REGION, - LocalizationLevel.CONFIGURED, LocalizationLevel.SITE }; + LocalizationLevel.BASE, LocalizationLevel.CONFIGURED, + LocalizationLevel.SITE }; Map files = pathMgr .getTieredLocalizationFile(LocalizationType.COMMON_STATIC, diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/META-INF/MANIFEST.MF index cad6ffc6e6..8d5e5fcdbe 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/META-INF/MANIFEST.MF @@ -52,7 +52,6 @@ Import-Package: com.raytheon.uf.common.activetable, com.raytheon.uf.common.gridcoverage, com.raytheon.uf.common.localization, com.raytheon.uf.common.localization.exception, - com.raytheon.uf.common.localization.region, com.raytheon.uf.common.message, com.raytheon.uf.common.pointdata, com.raytheon.uf.common.python, diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/python/GfePyIncludeUtil.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/python/GfePyIncludeUtil.java index d5c8eac6aa..29656dfc18 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/python/GfePyIncludeUtil.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/python/GfePyIncludeUtil.java @@ -66,6 +66,7 @@ import com.raytheon.uf.common.util.FileUtil; * gfe/python * Feb 20, 2018 6602 dgilling Updated for consolidated text utilities. * May 05, 2020 8151 randerso Include EDEX site in getCommonGfeIncludePath + * Sep 01, 2022 srcarter Change for Workstation and Region removal * * * @@ -426,7 +427,6 @@ public class GfePyIncludeUtil extends PythonIncludePathUtil { } public static String getVCModUtilsIncludePath() { - return getPath(PATH_MANAGER.getContext(LocalizationType.COMMON_STATIC, - LocalizationLevel.BASE), VCMOD_UTILS); + return buildIncludePath(LocalizationType.COMMON_STATIC, VCMOD_UTILS, true); } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/reference/ReferenceMgr.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/reference/ReferenceMgr.java index 787933e502..e32308acd0 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/reference/ReferenceMgr.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/reference/ReferenceMgr.java @@ -42,7 +42,6 @@ import com.raytheon.uf.common.localization.LocalizationUtil; import com.raytheon.uf.common.localization.PathManagerFactory; import com.raytheon.uf.common.localization.SaveableOutputStream; import com.raytheon.uf.common.localization.exception.LocalizationException; -import com.raytheon.uf.common.localization.region.RegionLookup; import com.raytheon.uf.common.protectedfiles.ProtectedFileLookup; import com.raytheon.uf.common.serialization.SerializationException; import com.raytheon.uf.common.serialization.SingleTypeJAXBManager; @@ -74,6 +73,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority; * Aug 07, 2017 6379 njensen Use ProtectedFileLookup * Jul 31, 2017 6342 randerso Added save and delete edit area methods. * Code cleanup. + * Sep 13, 2022 srcarter@ucar Remove REGION level. * * * @@ -433,8 +433,6 @@ public class ReferenceMgr { private LocalizationContext[] getSiteSearchContexts() { String siteId = dbGridLocation.getSiteId(); - String regionName = RegionLookup.getWfoRegion(siteId); - IPathManager pm = PathManagerFactory.getPathManager(); LocalizationContext[] searchContexts = pm .getLocalSearchHierarchy(LocalizationType.COMMON_STATIC); @@ -447,13 +445,6 @@ public class ReferenceMgr { if (((level.equals(LocalizationLevel.SITE)) || (level.equals(LocalizationLevel.CONFIGURED)))) { ctx.setContextName(siteId); - } else if (level.equals(LocalizationLevel.REGION)) { - if (regionName == null) { - // Don't include REGION context if no regionName - continue; - } else { - ctx.setContextName(regionName); - } } fixedContexts.add(ctx); diff --git a/edexOsgi/com.raytheon.uf.common.localization.python/utility/common_static/base/python/PythonOverriderPure.py b/edexOsgi/com.raytheon.uf.common.localization.python/utility/common_static/base/python/PythonOverriderPure.py index c497c38fa3..904921b0e9 100644 --- a/edexOsgi/com.raytheon.uf.common.localization.python/utility/common_static/base/python/PythonOverriderPure.py +++ b/edexOsgi/com.raytheon.uf.common.localization.python/utility/common_static/base/python/PythonOverriderPure.py @@ -31,8 +31,7 @@ # 03/12/13 bkowal Initial Creation. # 02/17/14 2712 bkowal Provide a default value for localization site. # 03/19/14 2929 bkowal 'REGION' is now recognized as a valid localization level. -# -# +# 02/04/19 mjames@ucar Removed REGION. # # @@ -53,7 +52,7 @@ from dynamicserialize.dstypes.com.raytheon.uf.common.localization import Localiz from dynamicserialize.dstypes.com.raytheon.uf.common.localization.stream import LocalizationStreamGetRequest BUFFER_SIZE = 512 * 1024 -availableLevels = ['BASE', 'REGION', 'CONFIGURED', 'SITE', 'USER'] +availableLevels = ['BASE', 'CONFIGURED', 'SITE', 'USER'] def importModule(name, localizationHost, localizationPort, localizedSite=None, localizationUser=None, loctype='COMMON_STATIC', level=None):