From 21dc096dd4418b486dc4f8dbc9be0b18a002d97b Mon Sep 17 00:00:00 2001 From: idfx Date: Sun, 9 Mar 2003 22:57:37 +0000 Subject: [PATCH] code formatting --- source/mir/config/MirPropertiesConfiguration.java | 87 +++++++++++------------ 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/source/mir/config/MirPropertiesConfiguration.java b/source/mir/config/MirPropertiesConfiguration.java index 2e39bfb9..eea7bf05 100755 --- a/source/mir/config/MirPropertiesConfiguration.java +++ b/source/mir/config/MirPropertiesConfiguration.java @@ -30,20 +30,21 @@ */ package mir.config; +import multex.Exc; +import multex.Failure; + +import org.apache.commons.configuration.PropertiesConfiguration; + import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; + import java.util.HashMap; import java.util.Iterator; import java.util.Map; import javax.servlet.ServletContext; -import multex.Exc; -import multex.Failure; - -import org.apache.commons.configuration.PropertiesConfiguration; - /** * @author idefix @@ -55,14 +56,14 @@ public class MirPropertiesConfiguration extends PropertiesConfiguration { //if one of these properties is not present a new //property is added with its default value; - private static NeededProperty[] neededWithValue = + 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 +111,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(); @@ -132,7 +133,6 @@ public class MirPropertiesConfiguration extends PropertiesConfiguration { return returnMap; } - /** * Returns a String-property concatenated with the home-dir of the * installation @@ -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,27 @@ 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; + } + } } -- 2.11.0