You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by me...@apache.org on 2010/08/29 19:54:07 UTC
svn commit: r990609 - in /incubator/jspwiki/trunk: ChangeLog
etc/jspwiki.properties src/java/org/apache/wiki/Release.java
src/java/org/apache/wiki/util/TextUtil.java
Author: metskem
Date: Sun Aug 29 17:54:07 2010
New Revision: 990609
URL: http://svn.apache.org/viewvc?rev=990609&view=rev
Log:
* 3.0.0-svn-220
* JSPWIKI-669 Support external properties in WikiEngine (idea from John McKinney)
You can now override individual properties in jspwiki.properties using standard
Java System properties.
Modified:
incubator/jspwiki/trunk/ChangeLog
incubator/jspwiki/trunk/etc/jspwiki.properties
incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
incubator/jspwiki/trunk/src/java/org/apache/wiki/util/TextUtil.java
Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=990609&r1=990608&r2=990609&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sun Aug 29 17:54:07 2010
@@ -1,3 +1,11 @@
+2010-08-29 Harry Metske <me...@apache.org>
+
+ * 3.0.0-svn-220
+
+ * JSPWIKI-669 Support external properties in WikiEngine (idea from John McKinney)
+ You can now override individual properties in jspwiki.properties using standard
+ Java System properties.
+
2010-05-16 Harry Metske <me...@apache.org>
* 3.0.0-svn-219
Modified: incubator/jspwiki/trunk/etc/jspwiki.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/etc/jspwiki.properties?rev=990609&r1=990608&r2=990609&view=diff
==============================================================================
--- incubator/jspwiki/trunk/etc/jspwiki.properties (original)
+++ incubator/jspwiki/trunk/etc/jspwiki.properties Sun Aug 29 17:54:07 2010
@@ -23,6 +23,10 @@
# This is the JSPWiki configuration file. You'll need to edit this
# a bit. The first few lines are the most important ones.
#
+# If you don't want to edit this file, you can override each individual
+# property by specifying the property name as a standard
+# Java System Property.
+#
# Wherever it is said that an option can be "true" or "false", you can
# also use "yes"/"no", or "on/off". Just for some convenience.
#
Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java?rev=990609&r1=990608&r2=990609&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java Sun Aug 29 17:54:07 2010
@@ -77,7 +77,7 @@ public final class Release
* <p>
* If the build identifier is empty, it is not added.
*/
- public static final String BUILD = "219";
+ public static final String BUILD = "220";
/**
* This is the generic version string you should use
Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/util/TextUtil.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/util/TextUtil.java?rev=990609&r1=990608&r2=990609&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/util/TextUtil.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/util/TextUtil.java Sun Aug 29 17:54:07 2010
@@ -32,7 +32,6 @@ import org.apache.wiki.InternalWikiExcep
/**
* Contains a number of static utility methods.
*/
-// FIXME3.0: Move to the "util" package
public final class TextUtil
{
static final String HEX_DIGITS = "0123456789ABCDEF";
@@ -419,7 +418,7 @@ public final class TextUtil
String key,
int defVal )
{
- String val = props.getProperty( key );
+ String val = System.getProperties().getProperty( key, props.getProperty( key ) );
return parseIntParameter( val, defVal );
}
@@ -439,13 +438,12 @@ public final class TextUtil
*
* @since 2.0.11
*/
- public static boolean getBooleanProperty( Properties props,
- String key,
- boolean defval )
+ public static boolean getBooleanProperty( Properties props, String key, boolean defval )
{
- String val = props.getProperty( key );
+ String val = System.getProperties().getProperty( key, props.getProperty( key ) );
- if( val == null ) return defval;
+ if( val == null )
+ return defval;
return isPositive( val );
}
@@ -465,7 +463,7 @@ public final class TextUtil
String key,
String defval )
{
- String val = props.getProperty( key );
+ String val = System.getProperties().getProperty( key, props.getProperty( key ) );
if( val == null ) return defval;
@@ -699,7 +697,7 @@ public final class TextUtil
/**
* Gets the given section (separated with "----") from the page text.
* Note that the first section is always #1. If a page has no section markers,
- * them there is only a single section, #1.
+ * then there is only a single section, #1.
*
* @param pagedata WikiText to parse.
* @param section Which section to get.