Omaha #3974 default to user localization level for damage path

Change-Id: I3ddb145d616fb3f1f38f9b684b6879c049273dcf

Former-commit-id: 3bdf0e235a [formerly 49aba5566017843f1e9281a5424c257c49386d41]
Former-commit-id: 02cb36cfda
This commit is contained in:
Nate Jensen 2015-02-24 13:54:51 -06:00
parent f8635b7395
commit deca98a3c6

View file

@ -75,6 +75,14 @@ public class DamagePathLayer<T extends DamagePathResourceData> extends
private static final String PATH = DIR + IPathManager.SEPARATOR + FILE;
/**
* JVM property to specify the localization level to attempt to save/load
* with. Falls back to USER if not defined.
*/
private static final LocalizationLevel LEVEL_TO_USE = LocalizationLevel
.valueOf(System.getProperty("damage.path.localization.level",
LocalizationLevel.USER.name()));
/*
* TODO: If we support multiple polygons in the future then the jobs will
* need to be smart enough to load/save different files.
@ -185,7 +193,7 @@ public class DamagePathLayer<T extends DamagePathResourceData> extends
private LocalizationContext getContext() {
return PathManagerFactory.getPathManager().getContext(
LocalizationType.COMMON_STATIC, LocalizationLevel.SITE);
LocalizationType.COMMON_STATIC, LEVEL_TO_USE);
}
protected LocalizationFile getDamagePathFile() {