1 package de.fhdw.wtf.persistence.utils; 2 3 import java.util.MissingResourceException; 4 5 /** 6 * This class should read internal ".properties" files. At first, use the "getInstance(String propFile)" method to load 7 * all key-value-pairs. 8 * 9 */ 10 public interface PropertiesReader { 11 12 /** 13 * Returns the value to the given key. If it does not exists, the result value will be "". 14 * 15 * @param key 16 * The Key 17 * @return The Value 18 */ 19 String getProperty(final String key); 20 21 /** 22 * Loads all the key-value-pairs from the given file. This could be a ressource file or a file in a given directory. 23 * 24 * @param propFile 25 * The path to the file. 26 * @throws MissingResourceException 27 * Is thrown if the file will not be found. 28 */ 29 void initialize(final String propFile) throws MissingResourceException; 30 31 }