Mercurial > hg > openmind
changeset 21:7af7a18e9573
instance-name configurable in openmind.properties.
author | casties |
---|---|
date | Mon, 30 Nov 2015 17:43:04 +0100 |
parents | 688fd0330bad |
children | 165b1efb85cd |
files | src/main/java/org/mpi/openmind/configuration/ConfigurationService.java |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/org/mpi/openmind/configuration/ConfigurationService.java Mon Nov 30 17:42:33 2015 +0100 +++ b/src/main/java/org/mpi/openmind/configuration/ConfigurationService.java Mon Nov 30 17:43:04 2015 +0100 @@ -1,6 +1,5 @@ package org.mpi.openmind.configuration; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; @@ -9,11 +8,7 @@ import java.util.Map; import java.util.Properties; -import org.apache.log4j.Appender; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.Level; import org.apache.log4j.Logger; -import org.apache.log4j.PatternLayout; import org.mpi.openmind.configuration.ownvalue.OwnValueRule; import org.mpi.openmind.configuration.ownvalue.PrintRule; import org.mpi.openmind.configuration.ownvalue.loader.OwnValueRulesLoader; @@ -35,6 +30,7 @@ //Property's names public static String SCHEDULING_PATH = "scheduling-path"; public static String SCHEDULING_ENABLE = "scheduling-enable"; + public static String INSTANCE_NAME = "instance-name"; public static String DEBUG_MODUS = "debug-modus"; @@ -49,6 +45,7 @@ private Map<String, OwnValueRule> ownValueRules = new HashMap<String, OwnValueRule>(); private List<PrintRule> printRules = new ArrayList<PrintRule>(); private String schedulingPath; + private String instanceName; private boolean schedulingEnable = false; private boolean debugModus = false; @@ -75,6 +72,8 @@ }catch(Exception e){} }else if(SCHEDULING_PATH.equals(key.toString())){ this.schedulingPath = props.getProperty(key.toString()); + }else if(INSTANCE_NAME.equals(key.toString())){ + this.instanceName = props.getProperty(key.toString()); }else if(DEBUG_MODUS.equals(key.toString())){ try{ Boolean b = new Boolean(props.getProperty(key.toString())); @@ -138,10 +137,14 @@ return schedulingPath; } - public boolean isSchedulingEnable() { + public boolean isSchedulingEnable() { return schedulingEnable; } + public String getInstanceName() { + return instanceName; + } + public boolean isDebugModus() { return debugModus; }