Merge branch 'unidata_20.3.2-dev' of github.com:tiffanycmeyer13/awips2-20.3.2 into unidata_20.3.2-dev
This commit is contained in:
commit
8d4cc2498f
11 changed files with 26 additions and 81 deletions
|
@ -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 04, 2018 7484 randerso Changed to use AV_ADMIN for internal errors
|
||||||
* Oct 08, 2018 7515 randerso Adjusted priorities of AlertViz internal
|
* Oct 08, 2018 7515 randerso Adjusted priorities of AlertViz internal
|
||||||
* errors.
|
* errors.
|
||||||
|
* Sep 01, 2022 srcarter Remove workstation and set site to default
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -91,9 +92,6 @@ public class ConfigurationManager {
|
||||||
public static final ConfigContext DEFAULT_SITE_CONFIG = new ConfigContext(
|
public static final ConfigContext DEFAULT_SITE_CONFIG = new ConfigContext(
|
||||||
ConfigContext.DEFAULT_NAME, LocalizationLevel.SITE);
|
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
|
private static final String CONFIG_DIR = ConfigContext.ALERTVIZ_DIR
|
||||||
+ IPathManager.SEPARATOR + ConfigContext.DEFAULT_SUBDIR;
|
+ IPathManager.SEPARATOR + ConfigContext.DEFAULT_SUBDIR;
|
||||||
|
|
||||||
|
@ -165,32 +163,13 @@ public class ConfigurationManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get default WORKSTATION configuration file for host machine. When it does
|
* Get default config (SITE)
|
||||||
* not exist create from Default SITE or BASE.
|
|
||||||
*
|
*
|
||||||
* @return hostContext
|
* @return hostContext
|
||||||
*/
|
*/
|
||||||
private ConfigContext getDefaultHostContext() {
|
private ConfigContext getDefaultHostContext() {
|
||||||
ConfigContext workstationContext = DEFAULT_WORKSTATION_CONFIG;
|
ConfigContext siteContext = DEFAULT_SITE_CONFIG;
|
||||||
|
return siteContext;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigContext[] getConfigurations() {
|
public ConfigContext[] getConfigurations() {
|
||||||
|
@ -278,7 +257,7 @@ public class ConfigurationManager {
|
||||||
}
|
}
|
||||||
if (configurationMap.containsKey(context)) {
|
if (configurationMap.containsKey(context)) {
|
||||||
if (current.equals(context)) {
|
if (current.equals(context)) {
|
||||||
loadAsCurrent(DEFAULT_WORKSTATION_CONFIG);
|
loadAsCurrent(DEFAULT_SITE_CONFIG);
|
||||||
}
|
}
|
||||||
ILocalizationFile file = getLocalizationFile(context);
|
ILocalizationFile file = getLocalizationFile(context);
|
||||||
try {
|
try {
|
||||||
|
@ -566,8 +545,7 @@ public class ConfigurationManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isDefaultConfig(ConfigContext context) {
|
public static boolean isDefaultConfig(ConfigContext context) {
|
||||||
return DEFAULT_WORKSTATION_CONFIG.equals(context)
|
return DEFAULT_SITE_CONFIG.equals(context)
|
||||||
|| DEFAULT_SITE_CONFIG.equals(context)
|
|
||||||
|| DEFAULT_BASE_CONFIG.equals(context);
|
|| DEFAULT_BASE_CONFIG.equals(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,7 @@ import com.raytheon.uf.viz.core.notification.jobs.NotificationManagerJob;
|
||||||
* errors.
|
* errors.
|
||||||
* Oct 12, 2018 7515 randerso Implemented AlertVizStatusHandlerFactory to
|
* Oct 12, 2018 7515 randerso Implemented AlertVizStatusHandlerFactory to
|
||||||
* handle internal AlertViz errors properly.
|
* handle internal AlertViz errors properly.
|
||||||
|
* Sep 01, 2022 srcarter Remove extra levels during initialization
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -227,7 +228,6 @@ public class AlertVizApplication implements IStandaloneComponent {
|
||||||
protected void initializeLocalization() throws Exception {
|
protected void initializeLocalization() throws Exception {
|
||||||
PathManagerFactory.setAdapter(new CAVELocalizationAdapter());
|
PathManagerFactory.setAdapter(new CAVELocalizationAdapter());
|
||||||
new LocalizationInitializer(true, false).run();
|
new LocalizationInitializer(true, false).run();
|
||||||
AlertVizLocalizationConfigurer.registerExtraLevels();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class TextWorkstationConstants {
|
||||||
IPathManager pm = PathManagerFactory.getPathManager();
|
IPathManager pm = PathManagerFactory.getPathManager();
|
||||||
ILocalizationFile lf = pm.getLocalizationFile(
|
ILocalizationFile lf = pm.getLocalizationFile(
|
||||||
pm.getContext(LocalizationType.CAVE_STATIC,
|
pm.getContext(LocalizationType.CAVE_STATIC,
|
||||||
LocalizationLevel.WORKSTATION),
|
LocalizationLevel.SITE),
|
||||||
LocalizationUtil.join("textWs", "textws.prefs"));
|
LocalizationUtil.join("textWs", "textws.prefs"));
|
||||||
|
|
||||||
return lf;
|
return lf;
|
||||||
|
|
|
@ -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.
|
||||||
* 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.
|
|
||||||
*/
|
*/
|
||||||
public static AAPACombined loadSiteAlarms(
|
public static AAPACombined loadSiteAlarms(ILocalizationFileObserver listener) {
|
||||||
ILocalizationFileObserver listener) {
|
|
||||||
LocalizationFile workstationFile = getFile(
|
|
||||||
initLocalization(LocalizationLevel.WORKSTATION), SITE_FILE);
|
|
||||||
AAPACombined aapaCombined = null;
|
AAPACombined aapaCombined = null;
|
||||||
|
|
||||||
if (workstationFile == null || !workstationFile.exists()) {
|
LocalizationFile siteFile = getFile(initSiteLocalization(), SITE_FILE);
|
||||||
// no workstation file found. try the site file
|
if (siteFile == null) {
|
||||||
LocalizationFile siteFile = getFile(initSiteLocalization(),
|
aapaCombined = createDefaultAAPACombined();
|
||||||
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 {
|
|
||||||
try {
|
try {
|
||||||
aapaCombined = loadFile(workstationFile.getFile());
|
aapaCombined = loadFile(siteFile.getFile());
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
aapaCombined = createDefaultAAPACombined();
|
aapaCombined = createDefaultAAPACombined();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (workstationFile != null) {
|
|
||||||
workstationFile.addFileUpdatedObserver(listener);
|
|
||||||
}
|
|
||||||
return aapaCombined;
|
return aapaCombined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
# 12/08/2014 #4953 randerso Made for generic allowing specification of LocalizationLevel
|
# 12/08/2014 #4953 randerso Made for generic allowing specification of LocalizationLevel
|
||||||
# Re-exported Java enums for easier use.
|
# Re-exported Java enums for easier use.
|
||||||
# Apr 25, 2015 4952 njensen Updated for new JEP API
|
# 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
|
COMMON_STATIC = LocalizationType.COMMON_STATIC
|
||||||
|
|
||||||
BASE = LocalizationLevel.BASE
|
BASE = LocalizationLevel.BASE
|
||||||
REGION = LocalizationLevel.REGION
|
|
||||||
CONFIGURED = LocalizationLevel.CONFIGURED
|
CONFIGURED = LocalizationLevel.CONFIGURED
|
||||||
SITE = LocalizationLevel.SITE
|
SITE = LocalizationLevel.SITE
|
||||||
WORKSTATION = LocalizationLevel.WORKSTATION
|
|
||||||
USER = LocalizationLevel.USER
|
USER = LocalizationLevel.USER
|
||||||
|
|
||||||
def getLocalizationFile(loctype, loclevel, contextname, filename):
|
def getLocalizationFile(loctype, loclevel, contextname, filename):
|
||||||
|
|
|
@ -76,6 +76,7 @@ import com.raytheon.uf.common.status.UFStatus;
|
||||||
* Apr 11, 2016 5564 bsteffen Move localization files to common_static
|
* Apr 11, 2016 5564 bsteffen Move localization files to common_static
|
||||||
* Apr 15, 2016 5182 tjensen Changed processorMap population to be done
|
* Apr 15, 2016 5182 tjensen Changed processorMap population to be done
|
||||||
* during processing instead of up front.
|
* during processing instead of up front.
|
||||||
|
* Sep 01, 2022 srcarter Remove region localization level
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -317,8 +318,8 @@ public class GribPostProcessor {
|
||||||
private synchronized void initProcessorMap() {
|
private synchronized void initProcessorMap() {
|
||||||
IPathManager pathMgr = PathManagerFactory.getPathManager();
|
IPathManager pathMgr = PathManagerFactory.getPathManager();
|
||||||
LocalizationLevel[] levels = new LocalizationLevel[] {
|
LocalizationLevel[] levels = new LocalizationLevel[] {
|
||||||
LocalizationLevel.BASE, LocalizationLevel.REGION,
|
LocalizationLevel.BASE, LocalizationLevel.CONFIGURED,
|
||||||
LocalizationLevel.CONFIGURED, LocalizationLevel.SITE };
|
LocalizationLevel.SITE };
|
||||||
|
|
||||||
Map<LocalizationLevel, ? extends ILocalizationFile> files = pathMgr
|
Map<LocalizationLevel, ? extends ILocalizationFile> files = pathMgr
|
||||||
.getTieredLocalizationFile(LocalizationType.COMMON_STATIC,
|
.getTieredLocalizationFile(LocalizationType.COMMON_STATIC,
|
||||||
|
|
|
@ -68,6 +68,7 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao;
|
||||||
* ------------- -------- --------- -----------------------------------------
|
* ------------- -------- --------- -----------------------------------------
|
||||||
* Sep 28, 2015 3756 nabowle Initial creation
|
* Sep 28, 2015 3756 nabowle Initial creation
|
||||||
* Apr 11, 2016 5564 bsteffen Move localization files to common_static
|
* Apr 11, 2016 5564 bsteffen Move localization files to common_static
|
||||||
|
* Sep 01, 2022 srcarter Remove region localization level
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -438,8 +439,8 @@ public class PrecipAccumPostProcessor extends DecoderPostProcessor {
|
||||||
|
|
||||||
IPathManager pathMgr = PathManagerFactory.getPathManager();
|
IPathManager pathMgr = PathManagerFactory.getPathManager();
|
||||||
LocalizationLevel[] levels = new LocalizationLevel[] {
|
LocalizationLevel[] levels = new LocalizationLevel[] {
|
||||||
LocalizationLevel.BASE, LocalizationLevel.REGION,
|
LocalizationLevel.BASE, LocalizationLevel.CONFIGURED,
|
||||||
LocalizationLevel.CONFIGURED, LocalizationLevel.SITE };
|
LocalizationLevel.SITE };
|
||||||
|
|
||||||
Map<LocalizationLevel, ? extends ILocalizationFile> files = pathMgr
|
Map<LocalizationLevel, ? extends ILocalizationFile> files = pathMgr
|
||||||
.getTieredLocalizationFile(LocalizationType.COMMON_STATIC,
|
.getTieredLocalizationFile(LocalizationType.COMMON_STATIC,
|
||||||
|
|
|
@ -52,7 +52,6 @@ Import-Package: com.raytheon.uf.common.activetable,
|
||||||
com.raytheon.uf.common.gridcoverage,
|
com.raytheon.uf.common.gridcoverage,
|
||||||
com.raytheon.uf.common.localization,
|
com.raytheon.uf.common.localization,
|
||||||
com.raytheon.uf.common.localization.exception,
|
com.raytheon.uf.common.localization.exception,
|
||||||
com.raytheon.uf.common.localization.region,
|
|
||||||
com.raytheon.uf.common.message,
|
com.raytheon.uf.common.message,
|
||||||
com.raytheon.uf.common.pointdata,
|
com.raytheon.uf.common.pointdata,
|
||||||
com.raytheon.uf.common.python,
|
com.raytheon.uf.common.python,
|
||||||
|
|
|
@ -66,6 +66,7 @@ import com.raytheon.uf.common.util.FileUtil;
|
||||||
* gfe/python
|
* gfe/python
|
||||||
* Feb 20, 2018 6602 dgilling Updated for consolidated text utilities.
|
* Feb 20, 2018 6602 dgilling Updated for consolidated text utilities.
|
||||||
* May 05, 2020 8151 randerso Include EDEX site in getCommonGfeIncludePath
|
* May 05, 2020 8151 randerso Include EDEX site in getCommonGfeIncludePath
|
||||||
|
* Sep 01, 2022 srcarter Change for Workstation and Region removal
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -426,7 +427,6 @@ public class GfePyIncludeUtil extends PythonIncludePathUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getVCModUtilsIncludePath() {
|
public static String getVCModUtilsIncludePath() {
|
||||||
return getPath(PATH_MANAGER.getContext(LocalizationType.COMMON_STATIC,
|
return buildIncludePath(LocalizationType.COMMON_STATIC, VCMOD_UTILS, true);
|
||||||
LocalizationLevel.BASE), VCMOD_UTILS);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,6 @@ import com.raytheon.uf.common.localization.LocalizationUtil;
|
||||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||||
import com.raytheon.uf.common.localization.SaveableOutputStream;
|
import com.raytheon.uf.common.localization.SaveableOutputStream;
|
||||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
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.protectedfiles.ProtectedFileLookup;
|
||||||
import com.raytheon.uf.common.serialization.SerializationException;
|
import com.raytheon.uf.common.serialization.SerializationException;
|
||||||
import com.raytheon.uf.common.serialization.SingleTypeJAXBManager;
|
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
|
* Aug 07, 2017 6379 njensen Use ProtectedFileLookup
|
||||||
* Jul 31, 2017 6342 randerso Added save and delete edit area methods.
|
* Jul 31, 2017 6342 randerso Added save and delete edit area methods.
|
||||||
* Code cleanup.
|
* Code cleanup.
|
||||||
|
* Sep 13, 2022 srcarter@ucar Remove REGION level.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -433,8 +433,6 @@ public class ReferenceMgr {
|
||||||
private LocalizationContext[] getSiteSearchContexts() {
|
private LocalizationContext[] getSiteSearchContexts() {
|
||||||
String siteId = dbGridLocation.getSiteId();
|
String siteId = dbGridLocation.getSiteId();
|
||||||
|
|
||||||
String regionName = RegionLookup.getWfoRegion(siteId);
|
|
||||||
|
|
||||||
IPathManager pm = PathManagerFactory.getPathManager();
|
IPathManager pm = PathManagerFactory.getPathManager();
|
||||||
LocalizationContext[] searchContexts = pm
|
LocalizationContext[] searchContexts = pm
|
||||||
.getLocalSearchHierarchy(LocalizationType.COMMON_STATIC);
|
.getLocalSearchHierarchy(LocalizationType.COMMON_STATIC);
|
||||||
|
@ -447,13 +445,6 @@ public class ReferenceMgr {
|
||||||
if (((level.equals(LocalizationLevel.SITE))
|
if (((level.equals(LocalizationLevel.SITE))
|
||||||
|| (level.equals(LocalizationLevel.CONFIGURED)))) {
|
|| (level.equals(LocalizationLevel.CONFIGURED)))) {
|
||||||
ctx.setContextName(siteId);
|
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);
|
fixedContexts.add(ctx);
|
||||||
|
|
|
@ -31,8 +31,7 @@
|
||||||
# 03/12/13 bkowal Initial Creation.
|
# 03/12/13 bkowal Initial Creation.
|
||||||
# 02/17/14 2712 bkowal Provide a default value for localization site.
|
# 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.
|
# 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
|
from dynamicserialize.dstypes.com.raytheon.uf.common.localization.stream import LocalizationStreamGetRequest
|
||||||
|
|
||||||
BUFFER_SIZE = 512 * 1024
|
BUFFER_SIZE = 512 * 1024
|
||||||
availableLevels = ['BASE', 'REGION', 'CONFIGURED', 'SITE', 'USER']
|
availableLevels = ['BASE', 'CONFIGURED', 'SITE', 'USER']
|
||||||
|
|
||||||
def importModule(name, localizationHost, localizationPort, localizedSite=None, localizationUser=None,
|
def importModule(name, localizationHost, localizationPort, localizedSite=None, localizationUser=None,
|
||||||
loctype='COMMON_STATIC', level=None):
|
loctype='COMMON_STATIC', level=None):
|
||||||
|
|
Loading…
Add table
Reference in a new issue