[New] Added new constants ENV_STROLCH_ENV, ENV_STROLCH_PATH

This commit is contained in:
Robert von Burg 2023-02-09 14:18:03 +01:00
parent 5ef7c800b0
commit 403be1bc73
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
1 changed files with 6 additions and 4 deletions

View File

@ -41,6 +41,8 @@ public class StrolchBootstrapper extends DefaultHandler {
private static final String TEMP = "temp";
public static final String FILE_BOOTSTRAP = "StrolchBootstrap.xml";
public static final String ENV_STROLCH_ENV = "STROLCH_ENV";
public static final String ENV_STROLCH_PATH = "STROLCH_PATH";
public static final String PATH_CONFIG = "config"; //$NON-NLS-1$
public static final String PATH_DATA = "data"; //$NON-NLS-1$
@ -334,8 +336,8 @@ public class StrolchBootstrapper extends DefaultHandler {
if (!this.envFound) {
throw new StrolchConfigurationException(
"Environment " + this.environment + " not configured in bootstrap configuration " + bootstrapFile
.getAbsolutePath());
"Environment " + this.environment + " not configured in bootstrap configuration "
+ bootstrapFile.getAbsolutePath());
}
evaluatePaths();
@ -358,8 +360,8 @@ public class StrolchBootstrapper extends DefaultHandler {
// validate the parsed data
if (!this.defaultAllowed) {
if (StringHelper.isEmpty(this.configS) || StringHelper.isEmpty(this.dataS) || StringHelper
.isEmpty(this.tempS)) {
if (StringHelper.isEmpty(this.configS) || StringHelper.isEmpty(this.dataS) || StringHelper.isEmpty(
this.tempS)) {
String msg = "One element of " + Arrays.toString(new String[] { CONFIG, DATA, TEMP })
+ " is not set and environment " + this.environment + " does not have attribute " + DEFAULT
+ "=\"true\". Either set the value or allow using default values!";