Omaha #2975 optimize lookup of edit areas and gfe configs
Change-Id: Ic89c84e79a27476ebb28573d49f60429424d4c37 Former-commit-id:1b70e053a1
[formerly1b70e053a1
[formerly 860bcc70144d9a8478aef3cc9ebfe84e98b6c4a7]] Former-commit-id:c3648d1989
Former-commit-id:0b2e919eae
This commit is contained in:
parent
fc49d0bd55
commit
98ff4d7cc5
2 changed files with 13 additions and 8 deletions
|
@ -29,6 +29,7 @@ import java.util.Set;
|
|||
import jep.JepException;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.gfe.python.GfePyIncludeUtil;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||
import com.raytheon.uf.common.python.PyUtil;
|
||||
|
@ -48,6 +49,7 @@ import com.raytheon.uf.common.util.FileUtil;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 21, 2010 randerso Initial creation
|
||||
* Jul 08, 2014 3361 njensen Consolidated code
|
||||
* Sep 29, 2014 2975 njensen Only look up files in CAVE_STATIC
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -122,8 +124,8 @@ public class ConfigCatalog {
|
|||
*/
|
||||
public LocalizationFile[] getFiles() {
|
||||
LocalizationFile[] procFiles = PathManagerFactory.getPathManager()
|
||||
.listStaticFiles(GfePyIncludeUtil.CONFIG,
|
||||
new String[] { EXTENSION },
|
||||
.listStaticFiles(LocalizationType.CAVE_STATIC,
|
||||
GfePyIncludeUtil.CONFIG, new String[] { EXTENSION },
|
||||
false, true);
|
||||
return procFiles;
|
||||
}
|
||||
|
@ -149,7 +151,7 @@ public class ConfigCatalog {
|
|||
String fname = GfePyIncludeUtil.CONFIG + File.separator + scriptName
|
||||
+ EXTENSION;
|
||||
LocalizationFile file = PathManagerFactory.getPathManager()
|
||||
.getStaticLocalizationFile(fname);
|
||||
.getStaticLocalizationFile(LocalizationType.CAVE_STATIC, fname);
|
||||
return file;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,8 @@ import com.vividsolutions.jts.geom.Envelope;
|
|||
* 06/21/2013 14983 ryu Added method for synchronous evaluation of query.
|
||||
* 08/06/2013 1561 njensen Use pm.listFiles() instead of pm.listStaticFiles()
|
||||
* 09/30/2013 2361 njensen Use JAXBManager for XML
|
||||
* 09/08/2104 #3592 randerso Changed to use new pm listStaticFiles()
|
||||
* 09/08/2014 #3592 randerso Changed to use new pm listStaticFiles()
|
||||
* 09/29/2014 2975 njensen Only lookup COMMON_STATIC for editAreas
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -776,7 +777,8 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
String filePath = FileUtil.join(EDIT_AREAS_DIR, refSetID.getName()
|
||||
+ ".xml");
|
||||
LocalizationFile lf = PathManagerFactory.getPathManager()
|
||||
.getStaticLocalizationFile(filePath);
|
||||
.getStaticLocalizationFile(LocalizationType.COMMON_STATIC,
|
||||
filePath);
|
||||
|
||||
if (lf != null) {
|
||||
try {
|
||||
|
@ -1666,7 +1668,8 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
String filePath = FileUtil.join(EDIT_AREAS_DIR, refId.getName()
|
||||
+ ".xml");
|
||||
LocalizationFile lf = PathManagerFactory.getPathManager()
|
||||
.getStaticLocalizationFile(filePath);
|
||||
.getStaticLocalizationFile(LocalizationType.COMMON_STATIC,
|
||||
filePath);
|
||||
|
||||
if ((lf != null) && lf.exists()) {
|
||||
changes.add(refId);
|
||||
|
@ -1716,8 +1719,8 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
}
|
||||
|
||||
// find the file anywhere in the hierarchy
|
||||
LocalizationFile lf = pm.getStaticLocalizationFile(message
|
||||
.getFileName());
|
||||
LocalizationFile lf = pm.getStaticLocalizationFile(
|
||||
LocalizationType.COMMON_STATIC, message.getFileName());
|
||||
|
||||
// if it exists, load it
|
||||
if ((lf != null) && lf.exists()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue