You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by gs...@apache.org on 2007/10/15 23:23:31 UTC

svn commit: r584925 [24/34] - in /wicket/trunk/jdk-1.4/wicket/src: main/java/org/apache/wicket/ main/java/org/apache/wicket/ajax/ main/java/org/apache/wicket/ajax/calldecorator/ main/java/org/apache/wicket/ajax/form/ main/java/org/apache/wicket/ajax/ma...

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/string/Strings.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/string/Strings.java?rev=584925&r1=584924&r2=584925&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/string/Strings.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/string/Strings.java Mon Oct 15 14:21:25 2007
@@ -30,24 +30,22 @@
 /**
  * A variety of static String utility methods.
  * <p>
- * The escapeMarkup() and toMultilineMarkup() methods are useful for turning
- * normal Java Strings into HTML strings.
+ * The escapeMarkup() and toMultilineMarkup() methods are useful for turning normal Java Strings
+ * into HTML strings.
  * <p>
  * The lastPathComponent(), firstPathComponent(), afterFirstPathComponent() and
- * beforeLastPathComponent() methods can chop up a String into path components
- * using a separator character. If the separator cannot be found the original
- * String is returned.
+ * beforeLastPathComponent() methods can chop up a String into path components using a separator
+ * character. If the separator cannot be found the original String is returned.
  * <p>
- * Similarly, the beforeLast(), beforeFirst(), afterFirst() and afterLast()
- * methods return sections before and after a separator character. But if the
- * separator cannot be found, an empty string is returned.
+ * Similarly, the beforeLast(), beforeFirst(), afterFirst() and afterLast() methods return sections
+ * before and after a separator character. But if the separator cannot be found, an empty string is
+ * returned.
  * <p>
- * Some other miscellaneous methods will strip a given ending off a String if it
- * can be found (stripEnding()), replace all occurrences of one String with
- * another (replaceAll), do type conversions (toBoolean(), toChar(),
- * toString()), check a String for emptiness (isEmpty()), convert a Throwable to
- * a String (toString(Throwable)) or capitalize a String (capitalize()).
- *
+ * Some other miscellaneous methods will strip a given ending off a String if it can be found
+ * (stripEnding()), replace all occurrences of one String with another (replaceAll), do type
+ * conversions (toBoolean(), toChar(), toString()), check a String for emptiness (isEmpty()),
+ * convert a Throwable to a String (toString(Throwable)) or capitalize a String (capitalize()).
+ * 
  * @author Jonathan Locke
  */
 public final class Strings
@@ -75,15 +73,14 @@
 	}
 
 	/**
-	 * Returns everything after the first occurrence of the given character in
-	 * s.
-	 *
+	 * Returns everything after the first occurrence of the given character in s.
+	 * 
 	 * @param s
 	 *            The string
 	 * @param c
 	 *            The character
-	 * @return Everything after the first occurrence of the given character in
-	 *         s. If the character cannot be found, an empty string is returned.
+	 * @return Everything after the first occurrence of the given character in s. If the character
+	 *         cannot be found, an empty string is returned.
 	 */
 	public static String afterFirst(final String s, final char c)
 	{
@@ -102,12 +99,12 @@
 	}
 
 	/**
-	 * Gets everything after the first path component of a path using a given
-	 * separator. If the separator cannot be found, an empty String is returned.
+	 * Gets everything after the first path component of a path using a given separator. If the
+	 * separator cannot be found, an empty String is returned.
 	 * <p>
-	 * For example, afterFirstPathComponent("foo.bar.baz", '.') would return
-	 * "bar.baz" and afterFirstPathComponent("foo", '.') would return "".
-	 *
+	 * For example, afterFirstPathComponent("foo.bar.baz", '.') would return "bar.baz" and
+	 * afterFirstPathComponent("foo", '.') would return "".
+	 * 
 	 * @param path
 	 *            The path to parse
 	 * @param separator
@@ -121,13 +118,13 @@
 
 	/**
 	 * Returns everything after the last occurrence of the given character in s.
-	 *
+	 * 
 	 * @param s
 	 *            The string
 	 * @param c
 	 *            The character
-	 * @return Everything after the last occurrence of the given character in s.
-	 *         If the character cannot be found, an empty string is returned.
+	 * @return Everything after the last occurrence of the given character in s. If the character
+	 *         cannot be found, an empty string is returned.
 	 */
 	public static String afterLast(final String s, final char c)
 	{
@@ -146,15 +143,14 @@
 	}
 
 	/**
-	 * Returns everything before the first occurrence of the given character in
-	 * s.
-	 *
+	 * Returns everything before the first occurrence of the given character in s.
+	 * 
 	 * @param s
 	 *            The string
 	 * @param c
 	 *            The character
-	 * @return Everything before the first occurrence of the given character in
-	 *         s. If the character cannot be found, an empty string is returned.
+	 * @return Everything before the first occurrence of the given character in s. If the character
+	 *         cannot be found, an empty string is returned.
 	 */
 	public static String beforeFirst(final String s, final char c)
 	{
@@ -173,15 +169,14 @@
 	}
 
 	/**
-	 * Returns everything before the last occurrence of the given character in
-	 * s.
-	 *
+	 * Returns everything before the last occurrence of the given character in s.
+	 * 
 	 * @param s
 	 *            The string
 	 * @param c
 	 *            The character
-	 * @return Everything before the last occurrence of the given character in
-	 *         s. If the character cannot be found, an empty string is returned.
+	 * @return Everything before the last occurrence of the given character in s. If the character
+	 *         cannot be found, an empty string is returned.
 	 */
 	public static String beforeLast(final String s, final char c)
 	{
@@ -200,12 +195,12 @@
 	}
 
 	/**
-	 * Gets everything before the last path component of a path using a given
-	 * separator. If the separator cannot be found, the path itself is returned.
+	 * Gets everything before the last path component of a path using a given separator. If the
+	 * separator cannot be found, the path itself is returned.
 	 * <p>
-	 * For example, beforeLastPathComponent("foo.bar.baz", '.') would return
-	 * "foo.bar" and beforeLastPathComponent("foo", '.') would return "".
-	 *
+	 * For example, beforeLastPathComponent("foo.bar.baz", '.') would return "foo.bar" and
+	 * beforeLastPathComponent("foo", '.') would return "".
+	 * 
 	 * @param path
 	 *            The path to parse
 	 * @param separator
@@ -219,7 +214,7 @@
 
 	/**
 	 * Capitalizes a string.
-	 *
+	 * 
 	 * @param s
 	 *            The string
 	 * @return The capitalized string
@@ -241,9 +236,9 @@
 	}
 
 	/**
-	 * Converts a Java String to an HTML markup string, but does not convert
-	 * normal spaces to non-breaking space entities (&lt;nbsp&gt;).
-	 *
+	 * Converts a Java String to an HTML markup string, but does not convert normal spaces to
+	 * non-breaking space entities (&lt;nbsp&gt;).
+	 * 
 	 * @param s
 	 *            The string to escape
 	 * @see Strings#escapeMarkup(String, boolean)
@@ -255,12 +250,11 @@
 	}
 
 	/**
-	 * Converts a Java String to an HTML markup String by replacing illegal
-	 * characters with HTML entities where appropriate. Spaces are converted to
-	 * non-breaking spaces (&lt;nbsp&gt;) if escapeSpaces is true, tabs are
-	 * converted to four non-breaking spaces, less than signs are converted to
-	 * &amp;lt; entities and greater than signs to &amp;gt; entities.
-	 *
+	 * Converts a Java String to an HTML markup String by replacing illegal characters with HTML
+	 * entities where appropriate. Spaces are converted to non-breaking spaces (&lt;nbsp&gt;) if
+	 * escapeSpaces is true, tabs are converted to four non-breaking spaces, less than signs are
+	 * converted to &amp;lt; entities and greater than signs to &amp;gt; entities.
+	 * 
 	 * @param s
 	 *            The string to escape
 	 * @param escapeSpaces
@@ -273,12 +267,11 @@
 	}
 
 	/**
-	 * Converts a Java String to an HTML markup String by replacing illegal
-	 * characters with HTML entities where appropriate. Spaces are converted to
-	 * non-breaking spaces (&lt;nbsp&gt;) if escapeSpaces is true, tabs are
-	 * converted to four non-breaking spaces, less than signs are converted to
-	 * &amp;lt; entities and greater than signs to &amp;gt; entities.
-	 *
+	 * Converts a Java String to an HTML markup String by replacing illegal characters with HTML
+	 * entities where appropriate. Spaces are converted to non-breaking spaces (&lt;nbsp&gt;) if
+	 * escapeSpaces is true, tabs are converted to four non-breaking spaces, less than signs are
+	 * converted to &amp;lt; entities and greater than signs to &amp;gt; entities.
+	 * 
 	 * @param s
 	 *            The string to escape
 	 * @param escapeSpaces
@@ -392,18 +385,17 @@
 	}
 
 	/**
-	 * Gets the first path component of a path using a given separator. If the
-	 * separator cannot be found, the path itself is returned.
+	 * Gets the first path component of a path using a given separator. If the separator cannot be
+	 * found, the path itself is returned.
 	 * <p>
 	 * For example, firstPathComponent("foo.bar", '.') would return "foo" and
 	 * firstPathComponent("foo", '.') would return "foo".
-	 *
+	 * 
 	 * @param path
 	 *            The path to parse
 	 * @param separator
 	 *            The path separator character
-	 * @return The first component in the path or path itself if no separator
-	 *         characters exist.
+	 * @return The first component in the path or path itself if no separator characters exist.
 	 */
 	public static String firstPathComponent(final String path, final char separator)
 	{
@@ -422,12 +414,12 @@
 	}
 
 	/**
-	 * Converts encoded &#92;uxxxx to unicode chars and changes special saved
-	 * chars to their original forms.
-	 *
+	 * Converts encoded &#92;uxxxx to unicode chars and changes special saved chars to their
+	 * original forms.
+	 * 
 	 * @param escapedUnicodeString
 	 *            escaped unicode string, like '\u4F60\u597D'.
-	 *
+	 * 
 	 * @return The actual unicode. Can be used for instance with message bundles
 	 */
 	public static String fromEscapedUnicode(String escapedUnicodeString)
@@ -530,11 +522,11 @@
 	}
 
 	/**
-	 * Checks whether the <code>string</code> is considered empty. Empty means
-	 * that the string may contain whitespace, but no visible characters.
-	 *
+	 * Checks whether the <code>string</code> is considered empty. Empty means that the string may
+	 * contain whitespace, but no visible characters.
+	 * 
 	 * "\n\t " is considered empty, while " a" is not.
-	 *
+	 * 
 	 * @param string
 	 *            The string
 	 * @return True if the string is null or ""
@@ -545,9 +537,9 @@
 	}
 
 	/**
-	 * Checks whether two strings are equals taken care of 'null' values and
-	 * treating 'null' same as trim(string).equals("")
-	 *
+	 * Checks whether two strings are equals taken care of 'null' values and treating 'null' same as
+	 * trim(string).equals("")
+	 * 
 	 * @param string1
 	 * @param string2
 	 * @return true, if both strings are equal
@@ -572,15 +564,13 @@
 	}
 
 	/**
-	 * Converts the text in <code>s</code> to a corresponding boolean. On,
-	 * yes, y, true and 1 are converted to <code>true</code>. Off, no, n,
-	 * false and 0 (zero) are converted to <code>false</code>. An empty
-	 * string is converted to <code>false</code>. Conversion is
-	 * case-insensitive, and does <em>not</em> take internationalization into
-	 * account.
-	 *
+	 * Converts the text in <code>s</code> to a corresponding boolean. On, yes, y, true and 1 are
+	 * converted to <code>true</code>. Off, no, n, false and 0 (zero) are converted to
+	 * <code>false</code>. An empty string is converted to <code>false</code>. Conversion is
+	 * case-insensitive, and does <em>not</em> take internationalization into account.
+	 * 
 	 * 'Ja', 'Oui', 'Igen', 'Nein', 'Nee', 'Non', 'Nem' are all illegal values.
-	 *
+	 * 
 	 * @param s
 	 *            the value to convert into a boolean
 	 * @return Boolean the converted value of <code>s</code>
@@ -601,14 +591,14 @@
 				return false;
 			}
 
-			if (s.equalsIgnoreCase("on") || s.equalsIgnoreCase("yes") || s.equalsIgnoreCase("y")
-					|| s.equalsIgnoreCase("1"))
+			if (s.equalsIgnoreCase("on") || s.equalsIgnoreCase("yes") || s.equalsIgnoreCase("y") ||
+					s.equalsIgnoreCase("1"))
 			{
 				return true;
 			}
 
-			if (s.equalsIgnoreCase("off") || s.equalsIgnoreCase("no") || s.equalsIgnoreCase("n")
-					|| s.equalsIgnoreCase("0"))
+			if (s.equalsIgnoreCase("off") || s.equalsIgnoreCase("no") || s.equalsIgnoreCase("n") ||
+					s.equalsIgnoreCase("0"))
 			{
 				return false;
 			}
@@ -626,7 +616,7 @@
 
 	/**
 	 * Joins string fragments using the specified separator
-	 *
+	 * 
 	 * @param separator
 	 * @param fragments
 	 * @return combined fragments
@@ -676,18 +666,17 @@
 	}
 
 	/**
-	 * Gets the last path component of a path using a given separator. If the
-	 * separator cannot be found, the path itself is returned.
+	 * Gets the last path component of a path using a given separator. If the separator cannot be
+	 * found, the path itself is returned.
 	 * <p>
 	 * For example, lastPathComponent("foo.bar", '.') would return "bar" and
 	 * lastPathComponent("foo", '.') would return "foo".
-	 *
+	 * 
 	 * @param path
 	 *            The path to parse
 	 * @param separator
 	 *            The path separator character
-	 * @return The last component in the path or path itself if no separator
-	 *         characters exist.
+	 * @return The last component in the path or path itself if no separator characters exist.
 	 */
 	public static String lastPathComponent(final String path, final char separator)
 	{
@@ -708,7 +697,7 @@
 
 	/**
 	 * Replace all occurrences of one string replaceWith another string.
-	 *
+	 * 
 	 * @param s
 	 *            The string to process
 	 * @param searchFor
@@ -786,7 +775,7 @@
 
 	/**
 	 * Replace HTML numbers like &#20540 by the appropriate character.
-	 *
+	 * 
 	 * @param str
 	 *            The text to be evaluated
 	 * @return The text with "numbers" replaced
@@ -812,9 +801,8 @@
 	}
 
 	/**
-	 * Simpler, faster version of String.split() for splitting on a simple
-	 * character.
-	 *
+	 * Simpler, faster version of String.split() for splitting on a simple character.
+	 * 
 	 * @param s
 	 *            The string to split
 	 * @param c
@@ -850,13 +838,12 @@
 
 	/**
 	 * Strips the ending from the string <code>s</code>.
-	 *
+	 * 
 	 * @param s
 	 *            The string to strip
 	 * @param ending
 	 *            The ending to strip off
-	 * @return The stripped string or the original string if the ending did not
-	 *         exist
+	 * @return The stripped string or the original string if the ending did not exist
 	 */
 	public static String stripEnding(final String s, final String ending)
 	{
@@ -892,9 +879,8 @@
 	}
 
 	/**
-	 * Strip any jsessionid and possibly other redundant info that might be in
-	 * our way.
-	 *
+	 * Strip any jsessionid and possibly other redundant info that might be in our way.
+	 * 
 	 * @param url
 	 *            The url to strip
 	 * @return The stripped url
@@ -922,9 +908,8 @@
 
 
 	/**
-	 * Converts the string s to a Boolean. See <code>isTrue</code> for valid
-	 * values of s.
-	 *
+	 * Converts the string s to a Boolean. See <code>isTrue</code> for valid values of s.
+	 * 
 	 * @param s
 	 *            The string to convert.
 	 * @return Boolean <code>TRUE</code> when <code>isTrue(s)</code>.
@@ -939,13 +924,12 @@
 
 	/**
 	 * Converts the 1 character string s to a character.
-	 *
+	 * 
 	 * @param s
 	 *            The 1 character string to convert to a char.
 	 * @return Character value to convert
 	 * @throws StringValueConversionException
-	 *             when the string is longer or shorter than 1 character, or
-	 *             <code>null</code>.
+	 *             when the string is longer or shorter than 1 character, or <code>null</code>.
 	 */
 	public static char toChar(final String s) throws StringValueConversionException
 	{
@@ -957,8 +941,8 @@
 			}
 			else
 			{
-				throw new StringValueConversionException("Expected single character, not \"" + s
-						+ "\"");
+				throw new StringValueConversionException("Expected single character, not \"" + s +
+						"\"");
 			}
 		}
 
@@ -967,7 +951,7 @@
 
 	/**
 	 * Converts unicodes to encoded &#92;uxxxx.
-	 *
+	 * 
 	 * @param unicodeString
 	 *            The unicode string
 	 * @return The escaped unicode string, like '\u4F60\u597D'.
@@ -1049,15 +1033,13 @@
 	}
 
 	/**
-	 * Converts a String to multiline HTML markup by replacing newlines with
-	 * line break entities (&lt;br/&gt;) and multiple occurrences of newline
-	 * with paragraph break entities (&lt;p&gt;).
-	 *
+	 * Converts a String to multiline HTML markup by replacing newlines with line break entities
+	 * (&lt;br/&gt;) and multiple occurrences of newline with paragraph break entities (&lt;p&gt;).
+	 * 
 	 * @param s
 	 *            String to transform
-	 * @return String with all single occurrences of newline replaced with
-	 *         &lt;br/&gt; and all multiple occurrences of newline replaced with
-	 *         &lt;p&gt;.
+	 * @return String with all single occurrences of newline replaced with &lt;br/&gt; and all
+	 *         multiple occurrences of newline replaced with &lt;p&gt;.
 	 */
 	public static CharSequence toMultilineMarkup(final CharSequence s)
 	{
@@ -1112,10 +1094,9 @@
 
 	/**
 	 * Converts the given object to a string. Does special conversion for
-	 * {@link Throwable throwables} and String arrays of length 1 (in which case
-	 * it just returns to string in that array, as this is a common thing to
-	 * have in the Servlet API).
-	 *
+	 * {@link Throwable throwables} and String arrays of length 1 (in which case it just returns to
+	 * string in that array, as this is a common thing to have in the Servlet API).
+	 * 
 	 * @param object
 	 *            The object
 	 * @return The string
@@ -1146,20 +1127,16 @@
 	}
 
 	/**
-	 * Creates a location stacktrace string representation for the component for
-	 * reference when the render check fails. This method filters out most of
-	 * the unnecessary parts of the stack trace. The message of the
-	 * <code>location</code> is used as a verb in the rendered string. Use
+	 * Creates a location stacktrace string representation for the component for reference when the
+	 * render check fails. This method filters out most of the unnecessary parts of the stack trace.
+	 * The message of the <code>location</code> is used as a verb in the rendered string. Use
 	 * "added", "constructed" or similar verbs as values.
-	 *
+	 * 
 	 * @param component
-	 *            the component that was constructed or added and failed to
-	 *            render
+	 *            the component that was constructed or added and failed to render
 	 * @param location
-	 *            the location where the component was created or added in the
-	 *            java code.
-	 * @return a string giving the line precise location where the component was
-	 *         added or created.
+	 *            the location where the component was created or added in the java code.
+	 * @return a string giving the line precise location where the component was added or created.
 	 */
 	public static String toString(final Component component, final Throwable location)
 	{
@@ -1178,9 +1155,9 @@
 		// create a user friendly message, using the location's message as a
 		// differentiator for the message (e.g. "component foo was ***added***"
 		// or "component foo was ***created***")
-		AppendingStringBuffer sb = new AppendingStringBuffer("The " + componentType.toLowerCase()
-				+ " with id '" + component.getId() + "' that failed to render was "
-				+ location.getMessage() + "\n");
+		AppendingStringBuffer sb = new AppendingStringBuffer("The " + componentType.toLowerCase() +
+				" with id '" + component.getId() + "' that failed to render was " +
+				location.getMessage() + "\n");
 
 		// a list of stacktrace elements that need to be skipped in the location
 		// stack trace
@@ -1235,7 +1212,7 @@
 
 	/**
 	 * Converts a Throwable to a string.
-	 *
+	 * 
 	 * @param throwable
 	 *            The throwable
 	 * @return The string
@@ -1301,11 +1278,10 @@
 	}
 
 	/**
-	 * Outputs the throwable and its stacktrace to the stringbuffer. If
-	 * stopAtWicketSerlvet is true then the output will stop when the
-	 * org.apache.wicket servlet is reached. sun.reflect. packages are filtered
-	 * out.
-	 *
+	 * Outputs the throwable and its stacktrace to the stringbuffer. If stopAtWicketSerlvet is true
+	 * then the output will stop when the org.apache.wicket servlet is reached. sun.reflect.
+	 * packages are filtered out.
+	 * 
 	 * @param cause
 	 * @param sb
 	 * @param stopAtWicketServlet
@@ -1324,8 +1300,8 @@
 				sb.append("     at ");
 				sb.append(traceString);
 				sb.append("\n");
-				if (stopAtWicketServlet
-						&& (traceString.startsWith("org.apache.wicket.protocol.http.WicketServlet") || traceString
+				if (stopAtWicketServlet &&
+						(traceString.startsWith("org.apache.wicket.protocol.http.WicketServlet") || traceString
 								.startsWith("org.apache.wicket.protocol.http.WicketFilter")))
 				{
 					return;
@@ -1358,7 +1334,7 @@
 
 	/**
 	 * Convert a nibble to a hex character
-	 *
+	 * 
 	 * @param nibble
 	 *            the nibble to convert.
 	 * @return hex character

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/string/interpolator/MapVariableInterpolator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/string/interpolator/MapVariableInterpolator.java?rev=584925&r1=584924&r2=584925&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/string/interpolator/MapVariableInterpolator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/string/interpolator/MapVariableInterpolator.java Mon Oct 15 14:21:25 2007
@@ -54,9 +54,8 @@
 	 *            The variables to substitute
 	 * @param exceptionOnNullVarValue
 	 *            if true an {@link IllegalStateException} will be thrown if a
-	 *            {@link #getValue(String)} returns null, otherwise the
-	 *            ${varname} string will be left in the <code>string</code> so
-	 *            multiple interpolators can be chained
+	 *            {@link #getValue(String)} returns null, otherwise the ${varname} string will be
+	 *            left in the <code>string</code> so multiple interpolators can be chained
 	 */
 	public MapVariableInterpolator(String string, final Map variables,
 			boolean exceptionOnNullVarValue)

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/string/interpolator/PropertyVariableInterpolator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/string/interpolator/PropertyVariableInterpolator.java?rev=584925&r1=584924&r2=584925&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/string/interpolator/PropertyVariableInterpolator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/string/interpolator/PropertyVariableInterpolator.java Mon Oct 15 14:21:25 2007
@@ -19,14 +19,13 @@
 import org.apache.wicket.util.lang.PropertyResolver;
 
 /**
- * Interpolates values into strings that are produced by interpreting property
- * expressions against a beans model.
+ * Interpolates values into strings that are produced by interpreting property expressions against a
+ * beans model.
  * <p>
- * The interpolate(String string, Object model) method takes a string such as
- * "My name is ${name}" and a beans model such as a Person, and reflects on the
- * object using any property expressions found inside ${} markers in the string.
- * In this case, if the Person model had a getName() method, the results of
- * calling that method would be substituted for ${name}. If getName() returned
+ * The interpolate(String string, Object model) method takes a string such as "My name is ${name}"
+ * and a beans model such as a Person, and reflects on the object using any property expressions
+ * found inside ${} markers in the string. In this case, if the Person model had a getName() method,
+ * the results of calling that method would be substituted for ${name}. If getName() returned
  * Jonathan, interpolate() would then return "My name is Jonathan".
  * 
  * @author Jonathan Locke

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/CssTemplate.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/CssTemplate.java?rev=584925&r1=584924&r2=584925&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/CssTemplate.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/CssTemplate.java Mon Oct 15 14:21:25 2007
@@ -59,8 +59,7 @@
 
 
 	/**
-	 * This class decorates another text template class and so does not allow
-	 * interpolation.
+	 * This class decorates another text template class and so does not allow interpolation.
 	 * 
 	 * @param variables
 	 *            Ignored

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/JavaScriptTemplate.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/JavaScriptTemplate.java?rev=584925&r1=584924&r2=584925&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/JavaScriptTemplate.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/JavaScriptTemplate.java Mon Oct 15 14:21:25 2007
@@ -58,8 +58,7 @@
 	}
 
 	/**
-	 * This class decorates another text template class and so
-	 * does not allow interpolation.
+	 * This class decorates another text template class and so does not allow interpolation.
 	 * 
 	 * @param variables
 	 *            Ignored

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/PackagedTextTemplate.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/PackagedTextTemplate.java?rev=584925&r1=584924&r2=584925&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/PackagedTextTemplate.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/PackagedTextTemplate.java Mon Oct 15 14:21:25 2007
@@ -57,6 +57,7 @@
 		private static final long serialVersionUID = 1L;
 
 		private final String className;
+
 		CachedTextTemplateKey(Class clazz, String path)
 		{
 			this.className = clazz.getName();
@@ -102,8 +103,8 @@
 	 * Constructor.
 	 * 
 	 * @param clazz
-	 *            The class to be used for retrieving the classloader for
-	 *            loading the packaged template.
+	 *            The class to be used for retrieving the classloader for loading the packaged
+	 *            template.
 	 * @param fileName
 	 *            The name of the file, relative to the clazz position
 	 */
@@ -116,13 +117,12 @@
 	 * Constructor.
 	 * 
 	 * @param clazz
-	 *            The class to be used for retrieving the classloader for
-	 *            loading the packaged template.
+	 *            The class to be used for retrieving the classloader for loading the packaged
+	 *            template.
 	 * @param fileName
 	 *            the name of the file, relative to the clazz position
 	 * @param contentType
-	 *            The mime type of this resource, such as "image/jpeg" or
-	 *            "text/html"
+	 *            The mime type of this resource, such as "image/jpeg" or "text/html"
 	 */
 	public PackagedTextTemplate(final Class clazz, final String fileName, final String contentType)
 	{
@@ -133,13 +133,12 @@
 	 * Constructor.
 	 * 
 	 * @param clazz
-	 *            The class to be used for retrieving the classloader for
-	 *            loading the packaged template.
+	 *            The class to be used for retrieving the classloader for loading the packaged
+	 *            template.
 	 * @param fileName
 	 *            the name of the file, relative to the clazz position
 	 * @param contentType
-	 *            The mime type of this resource, such as "image/jpeg" or
-	 *            "text/html"
+	 *            The mime type of this resource, such as "image/jpeg" or "text/html"
 	 * @param encoding
 	 *            The file's encoding, e.g. 'UTF-8'
 	 */
@@ -158,8 +157,8 @@
 
 		if (stream == null)
 		{
-			throw new IllegalArgumentException("resource " + fileName + " not found for scope "
-					+ clazz + " (path = " + path + ")");
+			throw new IllegalArgumentException("resource " + fileName + " not found for scope " +
+					clazz + " (path = " + path + ")");
 		}
 
 		try
@@ -211,15 +210,14 @@
 	}
 
 	/**
-	 * Interpolate the map of variables with the content and replace the content
-	 * with the result. Variables are denoted in this string by the syntax
-	 * ${variableName}. The contents will be altered by replacing each variable
-	 * of the form ${variableName} with the value returned by
+	 * Interpolate the map of variables with the content and replace the content with the result.
+	 * Variables are denoted in this string by the syntax ${variableName}. The contents will be
+	 * altered by replacing each variable of the form ${variableName} with the value returned by
 	 * variables.getValue("variableName").
 	 * <p>
-	 * WARNING there is no going back to the original contents after the
-	 * interpolation is done. if you need to do different interpolations on the
-	 * same original contents, use method {@link #asString(Map)} instead.
+	 * WARNING there is no going back to the original contents after the interpolation is done. if
+	 * you need to do different interpolations on the same original contents, use method
+	 * {@link #asString(Map)} instead.
 	 * </p>
 	 * 
 	 * @param variables

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplate.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplate.java?rev=584925&r1=584924&r2=584925&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplate.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplate.java Mon Oct 15 14:21:25 2007
@@ -43,8 +43,7 @@
 	 * Construct.
 	 * 
 	 * @param contentType
-	 *            The mime type of this resource, such as "image/jpeg" or
-	 *            "text/html".
+	 *            The mime type of this resource, such as "image/jpeg" or "text/html".
 	 */
 	public TextTemplate(String contentType)
 	{
@@ -52,11 +51,10 @@
 	}
 
 	/**
-	 * Interpolate the map of variables with the content and return the
-	 * resulting string without replacing the content. Variables are denoted in
-	 * this string by the syntax ${variableName}. The contents will be altered
-	 * by replacing each variable of the form ${variableName} with the value
-	 * returned by variables.getValue("variableName").
+	 * Interpolate the map of variables with the content and return the resulting string without
+	 * replacing the content. Variables are denoted in this string by the syntax ${variableName}.
+	 * The contents will be altered by replacing each variable of the form ${variableName} with the
+	 * value returned by variables.getValue("variableName").
 	 * 
 	 * @param variables
 	 *            The variables to interpolate

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateDecorator.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateDecorator.java?rev=584925&r1=584924&r2=584925&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateDecorator.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateDecorator.java Mon Oct 15 14:21:25 2007
@@ -27,8 +27,8 @@
 
 
 /**
- * Provides the ability to 'decorate' the actual template contents before it is
- * contributed to the header. E.g. to embed in a javascript tag pair.
+ * Provides the ability to 'decorate' the actual template contents before it is contributed to the
+ * header. E.g. to embed in a javascript tag pair.
  * 
  * @author Eelco Hillenius
  */
@@ -60,8 +60,8 @@
 	}
 
 	/**
-	 * @return the contents decorated with {@link #getBeforeTemplateContents()}
-	 *         and {@link #getAfterTemplateContents()}.
+	 * @return the contents decorated with {@link #getBeforeTemplateContents()} and
+	 *         {@link #getAfterTemplateContents()}.
 	 * @see org.apache.wicket.util.template.TextTemplate#asString()
 	 */
 	public String asString()
@@ -74,8 +74,8 @@
 	}
 
 	/**
-	 * @return the contents decorated with {@link #getBeforeTemplateContents()}
-	 *         and {@link #getAfterTemplateContents()}.
+	 * @return the contents decorated with {@link #getBeforeTemplateContents()} and
+	 *         {@link #getAfterTemplateContents()}.
 	 * @see org.apache.wicket.util.template.TextTemplate#asString(java.util.Map)
 	 */
 	public String asString(Map variables)

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateHeaderContributor.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateHeaderContributor.java?rev=584925&r1=584924&r2=584925&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateHeaderContributor.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateHeaderContributor.java Mon Oct 15 14:21:25 2007
@@ -24,8 +24,8 @@
 
 
 /**
- * A header contributor that will contribute the contents of the given template
- * interpolated with the provided map of variables.
+ * A header contributor that will contribute the contents of the given template interpolated with
+ * the provided map of variables.
  * 
  * @author Eelco Hillenius
  */
@@ -34,8 +34,8 @@
 	private static final long serialVersionUID = 1L;
 
 	/**
-	 * This model holds the template and returns the interpolation of the
-	 * template with of any of the
+	 * This model holds the template and returns the interpolation of the template with of any of
+	 * the
 	 */
 	private static final class TemplateModel extends LoadableDetachableModel
 	{
@@ -47,8 +47,8 @@
 		private final TextTemplate template;
 
 		/**
-		 * The model that holds any variables for interpolation. It should
-		 * return a {@link Map} or null.
+		 * The model that holds any variables for interpolation. It should return a {@link Map} or
+		 * null.
 		 */
 		private final IModel variablesModel;
 
@@ -58,8 +58,8 @@
 		 * @param template
 		 *            the template to work on
 		 * @param variablesModel
-		 *            The model that holds any variables for interpolation. It
-		 *            should return a {@link Map} or null.
+		 *            The model that holds any variables for interpolation. It should return a
+		 *            {@link Map} or null.
 		 */
 		protected TemplateModel(TextTemplate template, IModel variablesModel)
 		{
@@ -71,6 +71,7 @@
 			this.template = template;
 			this.variablesModel = variablesModel;
 		}
+
 		/**
 		 * @see org.apache.wicket.model.IModel#detach()
 		 */
@@ -98,9 +99,9 @@
 	}
 
 	/**
-	 * Gets a css header contributor based on the given text template. The
-	 * template will be interpolated with the given variables. The content will
-	 * be written as the body of a script tag pair.
+	 * Gets a css header contributor based on the given text template. The template will be
+	 * interpolated with the given variables. The content will be written as the body of a script
+	 * tag pair.
 	 * 
 	 * @param template
 	 *            The text template that is the base for the contribution
@@ -114,14 +115,13 @@
 	}
 
 	/**
-	 * Gets a css header contributor that will load the template from the given
-	 * file name relative to (/in the same package as) the provided clazz
-	 * argument. The template will be interpolated with the given variables. The
-	 * content will be written as the body of a script tag pair.
+	 * Gets a css header contributor that will load the template from the given file name relative
+	 * to (/in the same package as) the provided clazz argument. The template will be interpolated
+	 * with the given variables. The content will be written as the body of a script tag pair.
 	 * 
 	 * @param clazz
-	 *            The class to be used for retrieving the classloader for
-	 *            loading the packaged template.
+	 *            The class to be used for retrieving the classloader for loading the packaged
+	 *            template.
 	 * @param fileName
 	 *            The name of the file, relative to the clazz position
 	 * @param variablesModel
@@ -135,9 +135,9 @@
 	}
 
 	/**
-	 * Gets a javascript header contributor based on the given text template.
-	 * The template will be interpolated with the given variables. The content
-	 * will be written as the body of a script tag pair.
+	 * Gets a javascript header contributor based on the given text template. The template will be
+	 * interpolated with the given variables. The content will be written as the body of a script
+	 * tag pair.
 	 * 
 	 * @param template
 	 *            The text template that is the base for the contribution
@@ -152,14 +152,14 @@
 	}
 
 	/**
-	 * Gets a javascript header contributor that will load the template from the
-	 * given file name relative to (/in the same package as) the provided clazz
-	 * argument. The template will be interpolated with the given variables. The
-	 * content will be written as the body of a script tag pair.
+	 * Gets a javascript header contributor that will load the template from the given file name
+	 * relative to (/in the same package as) the provided clazz argument. The template will be
+	 * interpolated with the given variables. The content will be written as the body of a script
+	 * tag pair.
 	 * 
 	 * @param clazz
-	 *            The class to be used for retrieving the classloader for
-	 *            loading the packaged template.
+	 *            The class to be used for retrieving the classloader for loading the packaged
+	 *            template.
 	 * @param fileName
 	 *            The name of the file, relative to the clazz position
 	 * @param variablesModel

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateLink.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateLink.java?rev=584925&r1=584924&r2=584925&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateLink.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateLink.java Mon Oct 15 14:21:25 2007
@@ -22,8 +22,8 @@
 
 
 /**
- * Links to shared, interpolated text template resources created by a factory.
- * This is useful for creating dynamic JNLP descriptors, among other things.
+ * Links to shared, interpolated text template resources created by a factory. This is useful for
+ * creating dynamic JNLP descriptors, among other things.
  * 
  * @author Jonathan Locke
  */
@@ -39,8 +39,7 @@
 	 * @param factory
 	 *            The factory to create resources with
 	 * @param variables
-	 *            Variables to interpolate into the template held by the shared
-	 *            resource factory
+	 *            Variables to interpolate into the template held by the shared resource factory
 	 */
 	public TextTemplateLink(final String id, final TextTemplateSharedResourceFactory factory,
 			final Map variables)

Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateSharedResourceFactory.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateSharedResourceFactory.java?rev=584925&r1=584924&r2=584925&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateSharedResourceFactory.java (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/template/TextTemplateSharedResourceFactory.java Mon Oct 15 14:21:25 2007
@@ -29,24 +29,22 @@
 
 
 /**
- * A resource (reference) factory that takes a TextTemplate and generates shared
- * resources for various interpolations of that template.
+ * A resource (reference) factory that takes a TextTemplate and generates shared resources for
+ * various interpolations of that template.
  * <p>
- * A scope for adding shared resources allows you to limit the namespace impact
- * of the shared resources created. If you omit the scope, the application-wide
- * scope Application.class will be used by default.
+ * A scope for adding shared resources allows you to limit the namespace impact of the shared
+ * resources created. If you omit the scope, the application-wide scope Application.class will be
+ * used by default.
  * <p>
- * You may use resources created by this factory directly by calling
- * resourceReference(Map) to get a resource reference to the given shared
- * resource interpolation represented by the variables in the map. Or, for
- * convenience, you can use TextTemplateLink to link to resources created by
- * this factory.
+ * You may use resources created by this factory directly by calling resourceReference(Map) to get a
+ * resource reference to the given shared resource interpolation represented by the variables in the
+ * map. Or, for convenience, you can use TextTemplateLink to link to resources created by this
+ * factory.
  * <p>
- * In many cases, it will be useful to extend this class and override
- * sharedResourceName(Map) to provide a unique name for resources created by the
- * factory using map values. If you don't provide an override, every value in
- * the map will be used to produce the unique name, which may create either
- * longer names or more unique shared resources than you really wanted.
+ * In many cases, it will be useful to extend this class and override sharedResourceName(Map) to
+ * provide a unique name for resources created by the factory using map values. If you don't provide
+ * an override, every value in the map will be used to produce the unique name, which may create
+ * either longer names or more unique shared resources than you really wanted.
  * 
  * @author Jonathan Locke
  */
@@ -58,7 +56,7 @@
 	/**
 	 * Shared resource scope
 	 */
-	private final WeakReference/*<Class>*/ scopeRef;
+	private final WeakReference/* <Class> */scopeRef;
 
 	/**
 	 * Template to use to create resources
@@ -93,8 +91,8 @@
 	/**
 	 * @param variables
 	 *            The variables to interpolate into the template
-	 * @return A resource reference to the template encoded as a resource with
-	 *         the given variables interpolated.
+	 * @return A resource reference to the template encoded as a resource with the given variables
+	 *         interpolated.
 	 */
 	public ResourceReference resourceReference(final Map variables)
 	{
@@ -155,8 +153,7 @@
 	}
 
 	/**
-	 * Simple encoder for key values. Letters and digits are unchanged. All
-	 * others are encoded as %<hexcode>.
+	 * Simple encoder for key values. Letters and digits are unchanged. All others are encoded as %<hexcode>.
 	 * 
 	 * @param value
 	 *            The value