Settings Realease-Notes Author: Manfred Duchrow Copyright (c) 2002-2014, by Manfred Duchrow. All rights reserved. ======================================================================= ----------------------------------------------------------------------- VERSION 3.0.0 (21/06/2014) * Upgraded to Java 6 ----------------------------------------------------------------------- VERSION 2.1 ( November 10, 2010 ) * IniReaderWriter now supports escaping characters: \\ -> backslash \; -> semicolon \t -> tab \r -> carriage return \n -> newline All other characters preceeded by a backslash will be used unchanged but without the backslash. > Added methods - public boolean isSupportingEscaping() { return supportEscaping ; } - public void setSupportEscaping( boolean newValue ) { supportEscaping = newValue ; } ----------------------------------------------------------------------- VERSION 2.0 ( January 8, 2009 ) * AbstractSettingsFileReaderWriter > Added - public Settings loadSettingsFrom( String content ) - public Settings loadSettingsFrom( String content, Class settingsClass ) These methods allow to parse settings from a string rather than from a file. * BUGFIX: Using the following methods on a ManifestReaderWriter will not cause a ClassCastException anymore. > public Settings loadSettings( Class settingsClass ) > public Settings loadSettingsFrom( ClasspathElement classpathElement ) * ManifestReaderWriter > Added - public static final String RELATIVE_MANIFEST_PATH = "META-INF/MANIFEST.MF" ----------------------------------------------------------------------- VERSION 1.9 ( March 25, 2006 ) * AbstractSettingsFileReaderWriter > Added - inst-var 'encoding' with public getter/setter - public Settings loadSettingsFrom( ClasspathElement classpathElement, Class settingsClass ) - public Settings loadSettingsFrom( ClasspathElement classpathElement ) * The following reader now support different encoding when reading or writing > IniReaderWriter > PropertiesReaderWriter * IniReaderWriter > Added - public IniReaderWriter( String filename, String charsetName ) - public IniReaderWriter( FileLocator locator, String charsetName ) > Now supports method - public boolean storeSettings( Settings settings ) * PropertiesReaderWriter > Added - public PropertiesReaderWriter(FileLocator locator, String charsetName ) - public PropertiesReaderWriter( String filename, String charsetName ) ----------------------------------------------------------------------- VERSION 1.8 ( March 18, 2005 ) * PropertiesReaderWriter > Added methods - public static Settings loadSettings(FileLocator locator, Class settingsClass) > Added constructor - public PropertiesReaderWriter(FileLocator locator) * IniReaderWriter > Added constructor - public IniReaderWriter( FileLocator locator ) * ManifestReaderWriter > Added constructor - public ManifestReaderWriter( FileLocator locator ) > Added methods - public Manifest readManifestFrom( InputStream stream ) > Changed (fixed) method - public static Manifest readManifestFrom( String filename ) to really look up the file on the classpath as stated in the comment * HttpdConfReaderWriter > Added constructor - public HttpdConfReaderWriter( FileLocator locator ) * ReloadableSettings > Added method - public void startReloading( long checkInterval ) - public void stopReloading() ----------------------------------------------------------------------- VERSION 1.7 ( September 17, 2004 ) * PropertiesReaderWriter > Added methods to influence the reader whether or not it should treat backslashes in the file as escape character. - public boolean getBackslashIsEscapeChar() - public void setBackslashIsEscapeChar( boolean newValue ) ----------------------------------------------------------------------- VERSION 1.6 ( June 4, 2004 ) * PropertiesReaderWriter > Implemented storeSettings() ----------------------------------------------------------------------- VERSION 1.5.1 ( March 6, 2004 ) * BUGFIX: ReloadableSettings public ReloadableSettings( long checkInterval, SettingsFileReader reader, boolean mustExist ) Eliminated potential NullPointerException. ----------------------------------------------------------------------- VERSION 1.5 ( July 26, 2003 ) * Added new interface MultiValueSettings * Refactored SettingsImpl, category and KeyValuePair to support new interface MultiValueSettings. Renamed class Category to SingleValueCategory New classes: - GenericCategory - GenericNamedObject - GenericSettingsImpl - MultiValueCategory - NamedValues * Added new class MultiValueSettingsImpl * New class HttpdConfReaderWriter ----------------------------------------------------------------------- VERSION 1.4.2 ( January 15, 2003 ) * BUGFIX: SettingsImpl now again preserves order of category and key names. ----------------------------------------------------------------------- VERSION 1.4.1 ( January 11, 2003 ) * New interface CaseSensitivity * Changed setCaseSensitive() in SettingsImpl to propagate the new caseSensitive definition to all categories and all key/value pairs. ----------------------------------------------------------------------- VERSION 1.4 ( December 18, 2002 ) * Changed IniReaderWriter.stripComment() Uses now StringUtil.upTo() instead of StringUtil.cutTail() because of changed result of that method. * Extended interface ReadOnlySettings - getName() - setName() - getDefaults() - setDefaults() - getSettingsNameOf() * Implemented all new methods introduced by ReadOnlySettings in SettingsImpl * New interface SettingsFileReader * AbstractSettingsFileReaderWriter implements new interface SettingsFileReader * PropertiesReaderWriter, ManifestReaderWriter and IniReaderWriter now set the filename as the name of the Settings object after reading in the data. * Changed ReloadableSettings to extend java.util.Observable that implements an event mechanism that notifies listeners after new settings have been reloaded. * Changed ReloadableSettings - to support all new methods defined in ReadOnlySettings - to support files that don't exist * Created 21 Unit-Tests for SettingsImpl (SettingsImplTest) ----------------------------------------------------------------------- VERSION 1.3.1 ( August 06, 2002 ) * FIX: IniReaderWriter.readLines() Check line for null now to avoid NullPointerExceptions with some VMs (e.g. IBM JDK 1.3.0) ----------------------------------------------------------------------- VERSION 1.3 ( June 15, 2002 ) * Moved all read methods fron interface Settings to new interface ReadOnlySettings and made Settings a subinterface of it * New class ReloadableSettings that automatically checks, if the settings file has changed and than reads it in again. ----------------------------------------------------------------------- VERSION 1.2 ( May 30, 2002 ) * New class IniReaderWriter * Created new abstract class AbstractSettingsFileReaderWriter to be superclass of ManifestReaderWriter, PropertiesReaderWriter and IniReaderWriter ----------------------------------------------------------------------- VERSION 1.1 ( May 26, 2002 ) * Reader for properties updated: - Can now convert properties to settinngs - The default category is used for properties now - Using org.pf.file.FileLocator and org.pf.file.FileFinder to get files from the classpath and from archives. * Renamed SettingsCategory to Category * Renamed SettingsSetting to KeyValuePair * Implemented Category.removeKey() * Implemented Settings.removeKey() * Implemented full suport for default category ( category name is null or "" ) * made Settings an interface and moved the original implementation to org.pf.settings.impl.SettingsImpl ----------------------------------------------------------------------- VERSION 1.0 ( Jan 10, 1999 ) * Category and key/value pair based settings * Reader for Java properties -----------------------------------------------------------------------