X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=source%2Fmir%2Fconfig%2FMirPropertiesConfiguration.java;fp=source%2Fmir%2Fconfig%2FMirPropertiesConfiguration.java;h=2e39bfb935d4fd26c17b4ffa901fc50969a28522;hb=d96e301d3d5b64037f4bd72c12e6ac0f7de69ec7;hp=4d2775bbc153fa3da7f3bb18b52bb3282473036b;hpb=1ba06c565ec314b8e189a25e7aead8b3a4ce3ad5;p=mir.git diff --git a/source/mir/config/MirPropertiesConfiguration.java b/source/mir/config/MirPropertiesConfiguration.java index 4d2775bb..2e39bfb9 100755 --- a/source/mir/config/MirPropertiesConfiguration.java +++ b/source/mir/config/MirPropertiesConfiguration.java @@ -53,16 +53,16 @@ public class MirPropertiesConfiguration extends PropertiesConfiguration { private static ServletContext context; private static String contextPath; - //if one of these properties is not present a new + //if one of these properties is not present a new //property is added with its default value; private static NeededProperty[] neededWithValue = { - new NeededProperty("Producer.DocRoot",""), - new NeededProperty("Producer.ImageRoot",""), - new NeededProperty("Producer.Image.Path",""), - new NeededProperty("Producer.Media.Path",""), - new NeededProperty("Producer.RealMedia.Path",""), - new NeededProperty("Producer.Image.IconPath","") + new NeededProperty("Producer.DocRoot",""), + new NeededProperty("Producer.ImageRoot",""), + new NeededProperty("Producer.Image.Path",""), + new NeededProperty("Producer.Media.Path",""), + new NeededProperty("Producer.RealMedia.Path",""), + new NeededProperty("Producer.Image.IconPath","") }; /** @@ -110,10 +110,10 @@ public class MirPropertiesConfiguration extends PropertiesConfiguration { return context; } - /** - * Returns all properties in a Map - * @return Map - */ + /** + * Returns all properties in a Map + * @return Map + */ public Map allSettings() { Iterator iterator = this.getKeys(); Map returnMap = new HashMap(); @@ -153,11 +153,11 @@ public class MirPropertiesConfiguration extends PropertiesConfiguration { * Checks if one property is missing and adds a default value */ private void checkMissing() { - for (int i = 0; i < neededWithValue.length; i++) { - if (super.getProperty(neededWithValue[i].getKey()) == null) { - addProperty(neededWithValue[i].getKey(), neededWithValue[i].getValue()); - } - } + for (int i = 0; i < neededWithValue.length; i++) { + if (super.getProperty(neededWithValue[i].getKey()) == null) { + addProperty(neededWithValue[i].getKey(), neededWithValue[i].getValue()); + } + } } public File getFile(String key) throws FileNotFoundException { @@ -217,28 +217,28 @@ public class MirPropertiesConfiguration extends PropertiesConfiguration { public PropertiesConfigFailure(String msg, Throwable cause) { super(msg, cause); } - + } - - /** - * A Class for properties to be checked - * @author idefix - */ - private static class NeededProperty { - private String _key; - private String _value; - - public NeededProperty(String key, String value) { - _key = key; - _value = value; - } - - public String getKey() { - return _key; - } - - public String getValue() { - return _value; - } - } + + /** + * A Class for properties to be checked + * @author idefix + */ + private static class NeededProperty { + private String _key; + private String _value; + + public NeededProperty(String key, String value) { + _key = key; + _value = value; + } + + public String getKey() { + return _key; + } + + public String getValue() { + return _value; + } + } }