You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by aw...@apache.org on 2007/06/06 00:16:43 UTC

svn commit: r544659 [2/4] - in /myfaces/trinidad/trunk/trinidad: trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/chang...

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/logging/TrinidadLogger.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/logging/TrinidadLogger.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/logging/TrinidadLogger.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/logging/TrinidadLogger.java Tue Jun  5 15:16:36 2007
@@ -19,11 +19,13 @@
 package org.apache.myfaces.trinidad.logging;
 
 import java.util.Locale;
+import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 import java.util.logging.Handler;
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
 import java.util.logging.Logger;
+import org.apache.myfaces.trinidad.util.FastMessageFormat;
 
 /**
  * TrinidadLogger wraps JDK 1.4 logging to provided a large number of 
@@ -38,7 +40,8 @@
   private TrinidadLogger(Logger log)
   {
     if (log == null)
-      throw new IllegalArgumentException("Logger required");    
+      throw new IllegalArgumentException(_LOG.getMessage(
+        "LOGGER_REQUIRED"));    
     _log = log;
   }
 
@@ -62,17 +65,18 @@
    * to also send logging output to its parent's handlers.  It will
    * be registered in the LogManager global namespace.
    * 
-   * @param	name		A name for the logger.  This should
-   *				be a dot-separated name and should normally
-   *				be based on the package name or class name
-   *				of the subsystem, such as java.net
-   *				or javax.swing
+   * @param name        A name for the logger.  This should
+   *                be a dot-separated name and should normally
+   *                be based on the package name or class name
+   *                of the subsystem, such as java.net
+   *                or javax.swing
    * @return a suitable Logger
    */
   private static TrinidadLogger createTrinidadLogger(String name) 
   {
     if (name == null)
-      throw new IllegalArgumentException("Logger Name required");
+      throw new IllegalArgumentException(_LOG.getMessage(
+        "LOGGER_NAME_REQUIRED"));
     
     Logger log;
 
@@ -108,22 +112,23 @@
    * a different resource bundle name then an IllegalArgumentException
    * is thrown.
    * <p>
-   * @param	name	A name for the logger.  This should
-   *				be a dot-separated name and should normally
-   *				be based on the package name or class name
-   *				of the subsystem, such as java.net
-   *				or javax.swing
-   * @param 	resourceBundleName  name of ResourceBundle to be used for localizing
-   *				messages for this logger.
+   * @param name    A name for the logger.  This should
+   *                be a dot-separated name and should normally
+   *                be based on the package name or class name
+   *                of the subsystem, such as java.net
+   *                or javax.swing
+   * @param     resourceBundleName  name of ResourceBundle to be used for localizing
+   *                messages for this logger.
    * @return a suitable Logger
    * @throws MissingResourceException if the named ResourceBundle cannot be found.
    * @throws IllegalArgumentException if the Logger already exists and uses
-   *		   a different resource bundle name.
+   *           a different resource bundle name.
    */
   private static TrinidadLogger createTrinidadLogger(String name, String resourceBundleName) 
   {
     if (name == null)
-      throw new IllegalArgumentException("Logger Name required");
+      throw new IllegalArgumentException(_LOG.getMessage(
+        "LOGGER_NAME_REQUIRED"));
    
     Logger log = Logger.getLogger(name, resourceBundleName);
 
@@ -141,13 +146,14 @@
    * to also send logging output to its parent's handlers.  It will
    * be registered in the LogManager global namespace.
    * 
-   * @param	c		A class instance for the logger.  
+   * @param c       A class instance for the logger.  
    * @return a suitable Logger
    */
   public static TrinidadLogger createTrinidadLogger(Class<?> c) 
   {
     if (c == null)
-      throw new IllegalArgumentException("Class required");
+      throw new IllegalArgumentException(_LOG.getMessage(
+        "CLASS_REQUIRED"));
     String name = c.getName();
     return createTrinidadLogger(name);
   }
@@ -162,16 +168,17 @@
    * to also send logging output to its parent's handlers.  It will
    * be registered in the LogManager global namespace.
    * 
-   * @param	c		A class instance for the logger.  
-   * @param 	resourceBundleName  name of ResourceBundle to be used for localizing
-   *				messages for this logger.
+   * @param c       A class instance for the logger.  
+   * @param     resourceBundleName  name of ResourceBundle to be used for localizing
+   *                messages for this logger.
    *        
    * @return a suitable Logger
    */
   public static TrinidadLogger createTrinidadLogger(Class<?> c, String resourceBundleName) 
   {
     if (c == null)
-      throw new IllegalArgumentException("Class required");
+      throw new IllegalArgumentException(_LOG.getMessage(
+        "CLASS_REQUIRED"));
     String name = c.getName();
     return createTrinidadLogger(name, resourceBundleName);
   }
@@ -186,14 +193,15 @@
    * to also send logging output to its parent's handlers.  It will
    * be registered in the LogManager global namespace.
    * 
-   * @param	p		A Package instance for the logger.  
+   * @param p       A Package instance for the logger.  
    * @return a suitable Logger
    */
 
   public static TrinidadLogger createTrinidadLogger(Package p)
   {
     if (p == null)
-      throw new IllegalArgumentException("Package required");
+      throw new IllegalArgumentException(_LOG.getMessage(
+        "PACKAGE_REQUIRED"));
     String name = p.getName();
     return createTrinidadLogger(name);
   }
@@ -208,9 +216,9 @@
    * to also send logging output to its parent's handlers.  It will
    * be registered in the LogManager global namespace.
    * 
-   * @param	p		A Package instance for the logger.  
-   * @param 	resourceBundleName  name of ResourceBundle to be used for localizing
-   *				messages for this logger.
+   * @param p       A Package instance for the logger.  
+   * @param     resourceBundleName  name of ResourceBundle to be used for localizing
+   *                messages for this logger.
    *        
    * @return a suitable Logger
    */
@@ -218,7 +226,8 @@
   public static TrinidadLogger createTrinidadLogger(Package p, String resourceBundleName)
   {
     if (p == null)
-      throw new IllegalArgumentException("Package required");
+      throw new IllegalArgumentException(_LOG.getMessage(
+        "PACKAGE_REQUIRED"));
     String name = p.getName();
     return createTrinidadLogger(name, resourceBundleName);
   }
@@ -265,8 +274,8 @@
    * by default it inherits its effective level and handlers
    * from the root logger.
    * <p>
-   * @param 	resourceBundleName  name of ResourceBundle to be used for localizing
-   *				messages for this logger.
+   * @param     resourceBundleName  name of ResourceBundle to be used for localizing
+   *                messages for this logger.
    * @return a newly created private Logger
    * @throws MissingResourceException if the named ResourceBundle cannot be found.
    */
@@ -302,7 +311,7 @@
    * level then the given message is forwarded to all the
    * registered output Handler objects.
    * <p>
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param   msg   The string message (or a key in the message catalog)
    */
   public void log(String msg) 
   {
@@ -316,8 +325,8 @@
    * level then the given message is forwarded to all the
    * registered output Handler objects.
    * <p>
-   * @param	level	One of the message level identifiers, e.g. SEVERE
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param level   One of the message level identifiers, e.g. SEVERE
+   * @param   msg   The string message (or a key in the message catalog)
    */
   public void log(Level level, String msg) 
   {
@@ -335,9 +344,9 @@
    * level then a corresponding LogRecord is created and forwarded 
    * to all the registered output Handler objects.
    * <p>
-   * @param	level   One of the message level identifiers, e.g. SEVERE
-   * @param   msg	The string message (or a key in the message catalog)
-   * @param   param1	parameter to the message
+   * @param level   One of the message level identifiers, e.g. SEVERE
+   * @param   msg   The string message (or a key in the message catalog)
+   * @param   param1    parameter to the message
    */
   public void log(Level level, String msg, Object param1) 
   {
@@ -357,9 +366,9 @@
    * level then a corresponding LogRecord is created and forwarded 
    * to all the registered output Handler objects.
    * <p>
-   * @param	level   One of the message level identifiers, e.g. SEVERE
-   * @param   msg	The string message (or a key in the message catalog)
-   * @param   params	array of parameters to the message
+   * @param level   One of the message level identifiers, e.g. SEVERE
+   * @param   msg   The string message (or a key in the message catalog)
+   * @param   params    array of parameters to the message
    */
   public void log(Level level, String msg, Object params[]) 
   {
@@ -383,8 +392,8 @@
    * processed specially by output Formatters and is not treated
    * as a formatting parameter to the LogRecord message property.
    * <p>
-   * @param	level   One of the message level identifiers, e.g. SEVERE
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param level   One of the message level identifiers, e.g. SEVERE
+   * @param   msg   The string message (or a key in the message catalog)
    * @param   thrown  Throwable associated with log message.
    */
   public void log(Level level, String msg, Throwable thrown) 
@@ -409,10 +418,10 @@
    * level then the given message is forwarded to all the
    * registered output Handler objects.
    * <p>
-   * @param	level	One of the message level identifiers, e.g. SEVERE
+   * @param level   One of the message level identifiers, e.g. SEVERE
    * @param   sourceClass    name of class that issued the logging request
    * @param   sourceMethod   name of method that issued the logging request
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param   msg   The string message (or a key in the message catalog)
    */
   public void logp(Level level, String sourceClass, String sourceMethod, String msg) 
   {
@@ -433,10 +442,10 @@
    * level then a corresponding LogRecord is created and forwarded 
    * to all the registered output Handler objects.
    * <p>
-   * @param	level   One of the message level identifiers, e.g. SEVERE
+   * @param level   One of the message level identifiers, e.g. SEVERE
    * @param   sourceClass    name of class that issued the logging request
    * @param   sourceMethod   name of method that issued the logging request
-   * @param   msg	 The string message (or a key in the message catalog)
+   * @param   msg    The string message (or a key in the message catalog)
    * @param   param1    Parameter to the log message.
    */
   public void logp(Level level, String sourceClass, String sourceMethod,
@@ -461,11 +470,11 @@
    * level then a corresponding LogRecord is created and forwarded 
    * to all the registered output Handler objects.
    * <p>
-   * @param	level   One of the message level identifiers, e.g. SEVERE
+   * @param level   One of the message level identifiers, e.g. SEVERE
    * @param   sourceClass    name of class that issued the logging request
    * @param   sourceMethod   name of method that issued the logging request
-   * @param   msg	The string message (or a key in the message catalog)
-   * @param   params	Array of parameters to the message
+   * @param   msg   The string message (or a key in the message catalog)
+   * @param   params    Array of parameters to the message
    */
   public void logp(Level level, String sourceClass, String sourceMethod,
                    String msg, Object params[]) 
@@ -493,10 +502,10 @@
    * processed specially by output Formatters and is not treated
    * as a formatting parameter to the LogRecord message property.
    * <p>
-   * @param	level   One of the message level identifiers, e.g. SEVERE
+   * @param level   One of the message level identifiers, e.g. SEVERE
    * @param   sourceClass    name of class that issued the logging request
    * @param   sourceMethod   name of method that issued the logging request
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param   msg   The string message (or a key in the message catalog)
    * @param   thrown  Throwable associated with log message.
    */
   public void logp(Level level, String sourceClass, String sourceMethod,
@@ -524,13 +533,13 @@
    * The msg string is localized using the named resource bundle.  If the
    * resource bundle name is null, then the msg string is not localized.
    * <p>
-   * @param	level	One of the message level identifiers, e.g. SEVERE
+   * @param level   One of the message level identifiers, e.g. SEVERE
    * @param   sourceClass    name of class that issued the logging request
    * @param   sourceMethod   name of method that issued the logging request
    * @param   bundleName     name of resource bundle to localize msg
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param   msg   The string message (or a key in the message catalog)
    * @throws  MissingResourceException if no suitable ResourceBundle can
-   *		be found.
+   *        be found.
    */
 
   public void logrb(Level level, String sourceClass, String sourceMethod, 
@@ -556,14 +565,14 @@
    * The msg string is localized using the named resource bundle.  If the
    * resource bundle name is null, then the msg string is not localized.
    * <p>
-   * @param	level   One of the message level identifiers, e.g. SEVERE
+   * @param level   One of the message level identifiers, e.g. SEVERE
    * @param   sourceClass    name of class that issued the logging request
    * @param   sourceMethod   name of method that issued the logging request
    * @param   bundleName     name of resource bundle to localize msg
-   * @param   msg	 The string message (or a key in the message catalog)
+   * @param   msg    The string message (or a key in the message catalog)
    * @param   param1    Parameter to the log message.
    * @throws  MissingResourceException if no suitable ResourceBundle can
-   *		be found.
+   *        be found.
    */
   public void logrb(Level level, String sourceClass, String sourceMethod,
                     String bundleName, String msg, Object param1) 
@@ -590,14 +599,14 @@
    * The msg string is localized using the named resource bundle.  If the
    * resource bundle name is null, then the msg string is not localized.
    * <p>
-   * @param	level   One of the message level identifiers, e.g. SEVERE
+   * @param level   One of the message level identifiers, e.g. SEVERE
    * @param   sourceClass    name of class that issued the logging request
    * @param   sourceMethod   name of method that issued the logging request
    * @param   bundleName     name of resource bundle to localize msg
-   * @param   msg	The string message (or a key in the message catalog)
-   * @param   params	Array of parameters to the message
+   * @param   msg   The string message (or a key in the message catalog)
+   * @param   params    Array of parameters to the message
    * @throws  MissingResourceException if no suitable ResourceBundle can
-   *		be found.
+   *        be found.
    */
   public void logrb(Level level, String sourceClass, String sourceMethod,
                     String bundleName, String msg, Object params[]) 
@@ -628,14 +637,14 @@
    * processed specially by output Formatters and is not treated
    * as a formatting parameter to the LogRecord message property.
    * <p>
-   * @param	level   One of the message level identifiers, e.g. SEVERE
+   * @param level   One of the message level identifiers, e.g. SEVERE
    * @param   sourceClass    name of class that issued the logging request
    * @param   sourceMethod   name of method that issued the logging request
    * @param   bundleName     name of resource bundle to localize msg
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param   msg   The string message (or a key in the message catalog)
    * @param   thrown  Throwable associated with log message.
    * @throws  MissingResourceException if no suitable ResourceBundle can
-   *		be found.
+   *        be found.
    */
   public void logrb(Level level, String sourceClass, String sourceMethod,
                     String bundleName, String msg, Throwable thrown) 
@@ -680,7 +689,7 @@
    * <p>
    * @param   sourceClass    name of class that issued the logging request
    * @param   sourceMethod   name of method that is being entered
-   * @param   param1	       parameter to the method being entered
+   * @param   param1           parameter to the method being entered
    */
   public void entering(String sourceClass, String sourceMethod, Object param1) 
   {
@@ -698,7 +707,7 @@
    * <p>
    * @param   sourceClass    name of class that issued the logging request
    * @param   sourceMethod   name of method that is being entered
-   * @param   params	       array of parameters to the method being entered
+   * @param   params           array of parameters to the method being entered
    */
   public void entering(String sourceClass, String sourceMethod, Object params[]) 
   {
@@ -775,7 +784,7 @@
    * level then the given message is forwarded to all the
    * registered output Handler objects.
    * <p>
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param   msg   The string message (or a key in the message catalog)
    */
   public void severe(String msg) 
   {
@@ -790,7 +799,7 @@
    * level then the given message is forwarded to all the
    * registered output Handler objects.
    * <p>
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param   msg   The string message (or a key in the message catalog)
    */
   public void warning(String msg) 
   {
@@ -805,7 +814,7 @@
    * level then the given message is forwarded to all the
    * registered output Handler objects.
    * <p>
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param   msg   The string message (or a key in the message catalog)
    */
   public void info(String msg) 
   {
@@ -820,7 +829,7 @@
    * level then the given message is forwarded to all the
    * registered output Handler objects.
    * <p>
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param   msg   The string message (or a key in the message catalog)
    */
   public void config(String msg) 
   {
@@ -835,7 +844,7 @@
    * level then the given message is forwarded to all the
    * registered output Handler objects.
    * <p>
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param   msg   The string message (or a key in the message catalog)
    */
   public void fine(String msg) 
   {
@@ -850,7 +859,7 @@
    * level then the given message is forwarded to all the
    * registered output Handler objects.
    * <p>
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param   msg   The string message (or a key in the message catalog)
    */
   public void finer(String msg) 
   {
@@ -865,7 +874,7 @@
    * level then the given message is forwarded to all the
    * registered output Handler objects.
    * <p>
-   * @param   msg	The string message (or a key in the message catalog)
+   * @param   msg   The string message (or a key in the message catalog)
    */
   public void finest(String msg) 
   {
@@ -913,7 +922,7 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
+   * @param msg          the string message (or a key in the resource bundle)
    */
   public void severe(
                     String sourceClass,
@@ -931,8 +940,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param param1	     a parameter to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param param1       a parameter to the message
    */
   public void severe(
                     String sourceClass,
@@ -951,8 +960,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param params	     an array of parameters to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param params       an array of parameters to the message
    */
   public void severe(
                     String sourceClass,
@@ -971,7 +980,7 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
+   * @param msg          the string message (or a key in the resource bundle)
    */
   public void warning(
                      String sourceClass,
@@ -989,8 +998,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param param1	     a parameter to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param param1       a parameter to the message
    */
   public void warning(
                      String sourceClass,
@@ -1009,8 +1018,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param params	     an array of parameters to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param params       an array of parameters to the message
    */
   public void warning(
                      String sourceClass,
@@ -1029,7 +1038,7 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
+   * @param msg          the string message (or a key in the resource bundle)
    */
   public void info(
                   String sourceClass,
@@ -1047,8 +1056,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param param1	     a parameter to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param param1       a parameter to the message
    */
   public void info(
                   String sourceClass,
@@ -1067,8 +1076,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param params	     an array of parameters to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param params       an array of parameters to the message
    */
   public void info(
                   String sourceClass,
@@ -1087,7 +1096,7 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
+   * @param msg          the string message (or a key in the resource bundle)
    */
   public void config(
                     String sourceClass,
@@ -1105,8 +1114,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param param1	     a parameter to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param param1       a parameter to the message
    */
   public void config(
                     String sourceClass,
@@ -1125,8 +1134,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param params	     an array of parameters to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param params       an array of parameters to the message
    */
   public void config(
                     String sourceClass,
@@ -1145,7 +1154,7 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
+   * @param msg          the string message (or a key in the resource bundle)
    */
   public void fine(
                   String sourceClass,
@@ -1163,8 +1172,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param param1	     a parameter to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param param1       a parameter to the message
    */
   public void fine(
                   String sourceClass,
@@ -1183,8 +1192,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param params	     an array of parameters to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param params       an array of parameters to the message
    */
   public void fine(
                   String sourceClass,
@@ -1203,7 +1212,7 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
+   * @param msg          the string message (or a key in the resource bundle)
    */
   public void finer(
                    String sourceClass,
@@ -1221,8 +1230,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param param1	     a parameter to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param param1       a parameter to the message
    */
   public void finer(
                    String sourceClass,
@@ -1241,8 +1250,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param params	     an array of parameters to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param params       an array of parameters to the message
    */
   public void finer(
                    String sourceClass,
@@ -1261,7 +1270,7 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
+   * @param msg          the string message (or a key in the resource bundle)
    */
   public void finest(
                     String sourceClass,
@@ -1279,8 +1288,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param param1	     a parameter to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param param1       a parameter to the message
    */
   public void finest(
                     String sourceClass,
@@ -1299,8 +1308,8 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param params	     an array of parameters to the message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param params       an array of parameters to the message
    */
   public void finest(
                     String sourceClass,
@@ -1319,10 +1328,10 @@
    * <p>
    * @param sourceClass  the name of the class that issued the logging request 
    * @param sourceMethod the name of the method that issued the logging request 
-   * @param msg	         the string message (or a key in the resource bundle)
-   * @param params1	     Parameter 1 to the log message
-   * @param params2	     Parameter 2 to the log message
-   * @param params3	     Parameter 3 to the log message
+   * @param msg          the string message (or a key in the resource bundle)
+   * @param params1      Parameter 1 to the log message
+   * @param params2      Parameter 2 to the log message
+   * @param params3      Parameter 3 to the log message
    */
   public void logp(Level level,
                    String sourceClass,
@@ -1364,7 +1373,7 @@
    * The result may be null, which means that this logger's
    * effective level will be inherited from its parent.
    *
-   * @return	this Logger's level
+   * @return    this Logger's level
    */
   public Level getLevel() 
   {
@@ -1376,8 +1385,8 @@
    * by this logger.  This check is based on the Loggers effective level,
    * which may be inherited from its parent.
    *
-   * @param	level	a message logging level
-   * @return	true if the given message level is currently being logged.
+   * @param level   a message logging level
+   * @return    true if the given message level is currently being logged.
    */
   public boolean isLoggable(Level level) 
   {
@@ -1400,7 +1409,7 @@
    * Typically the root Logger is configured with a set of Handlers
    * that essentially act as default handlers for all loggers.
    *
-   * @param	handler	a logging Handler
+   * @param handler a logging Handler
    * @exception  SecurityException  if a security manager exists and if
    *             the caller does not have LoggingPermission("control").
    */
@@ -1414,7 +1423,7 @@
    * <P>
    * Returns silently if the given Handler is not found.
    * 
-   * @param	handler	a logging Handler
+   * @param handler a logging Handler
    * @exception  SecurityException  if a security manager exists and if
    *             the caller does not have LoggingPermission("control").
    */
@@ -1440,7 +1449,7 @@
    * to its parent, recursively up the namespace.
    *
    * @param useParentHandlers   true if output is to be sent to the
-   *		logger's parent.
+   *        logger's parent.
    * @exception  SecurityException  if a security manager exists and if
    *             the caller does not have LoggingPermission("control").
    */
@@ -1705,7 +1714,6 @@
     return isLoggable(Level.FINER);
   }
 
-
   /**
    * Returns true if finest messages should be logged.
    */
@@ -1714,9 +1722,70 @@
     return isLoggable(Level.FINEST);
   }
 
+  /**
+   * Returns message string in default locale
+   */
+  public String getMessage(String key)
+  {
+    try
+    {
+      return _log.getResourceBundle().getString(key);
+    }
+    catch (MissingResourceException mre)
+    {
+      return key;
+    }
+  }
+
+  /**
+   * Returns formated string in default locale
+   */
+  public String getMessage(String key, Object[] params)
+  {
+    String message = getMessage(key);
+    FastMessageFormat fmt = new FastMessageFormat(message);  
+    return fmt.format(params);  
+  }
+
+  /**
+   * Returns formated string in default locale
+   */
+  public String getMessage(String key, Object param)
+  {
+    if (param == null)
+      System.out.println("null param");
+    return getMessage(key, new Object[]{param});
+  }
+ 
+  /**
+   * Returns formated string in default locale
+   */ 
+  public String getMessage(String key, String param)
+  {
+    return getMessage(key, new Object[]{param});
+  }
+    
+  /**
+   * Returns formated string in default locale
+   */
+  public String getMessage(String key, char c)
+  {
+    return getMessage(key, String.valueOf(c));
+  }
+  
+  /**
+   * Returns formated string in default locale
+   */
+  public String getMessage(String key, int i)
+  {
+    return getMessage(key, String.valueOf(i));
+  }
+
   private Logger _log;
   
   private static final String _API_LOGGER_BUNDLE = "org.apache.myfaces.trinidad.resource.LoggerBundle";
 
   private static final String _IMPL_LOGGER_BUNDLE = "org.apache.myfaces.trinidadinternal.resource.LoggerBundle";
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    TrinidadLogger.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ChildPropertyTreeModel.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ChildPropertyTreeModel.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ChildPropertyTreeModel.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ChildPropertyTreeModel.java Tue Jun  5 15:16:36 2007
@@ -22,6 +22,7 @@
 import java.util.List;
 
 import javax.faces.el.PropertyResolver;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
  * Creates a TreeModel from a List of beans.
@@ -220,7 +221,8 @@
   {
     Object rowData = getRowData();
     if (rowData == null)
-      throw new IllegalStateException("rowData is null");
+      throw new IllegalStateException(_LOG.getMessage(
+        "NULL_ROWDATA"));
     Node node = new Node(rowData);
     _path.add(node);
   }
@@ -232,7 +234,8 @@
     if (sz > 1)
       _path.remove(sz - 1);
     else
-      throw new IllegalStateException("Cannot exit the root container");
+      throw new IllegalStateException(_LOG.getMessage(
+        "CANNOT_EXIT_ROOT_CONTAINER"));
   }
   
   /**
@@ -381,4 +384,6 @@
   private final List<Node> _path = new ArrayList<Node>(5);
   private String _childProperty = null;
   private Object _wrappedData = null;
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    ChildPropertyTreeModel.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/DefaultBoundedRangeModel.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/DefaultBoundedRangeModel.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/DefaultBoundedRangeModel.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/DefaultBoundedRangeModel.java Tue Jun  5 15:16:36 2007
@@ -19,6 +19,7 @@
 package org.apache.myfaces.trinidad.model;
 
 import java.io.Serializable;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 
 /**
@@ -51,8 +52,8 @@
   {
     if (value > maximum || value < -1)
     {
-      throw new IllegalArgumentException(
-        "Illegal value being set - value should be between -1 and maximum");
+      throw new IllegalArgumentException(_LOG.getMessage(
+        "SETTING_ILLEGAL_VALUE"));
     }
     _maximum = maximum;
     _value = value;
@@ -91,12 +92,14 @@
   {
     if (value > _maximum || value < -1)
     {
-      throw new IllegalArgumentException(
-        "Illegal value being set - value should be between -1 and maximum");
+      throw new IllegalArgumentException(_LOG.getMessage(
+        "SETTING_ILLEGAL_VALUE"));
     }
     _value = value;
   }
   
   private long _value;
   private long _maximum;
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    DefaultBoundedRangeModel.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ModelUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ModelUtils.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ModelUtils.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ModelUtils.java Tue Jun  5 15:16:36 2007
@@ -29,6 +29,7 @@
 import javax.faces.model.DataModel;
 import javax.faces.model.ListDataModel;
 import javax.faces.model.ScalarDataModel;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
  * Provides convenience methods for converting objects into models, and
@@ -200,8 +201,8 @@
       catch (IntrospectionException e)
       {
         IllegalArgumentException re =
-          new IllegalArgumentException("Could not convert:"+value+
-                                       " into a MenuModel");
+          new IllegalArgumentException(_LOG.getMessage(
+            "CANNOT_CONVERT_INTO_MENUMODEL",value));
         re.initCause(e);
         throw re;
       }
@@ -254,4 +255,6 @@
   private ModelUtils()
   {
   }
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    ModelUtils.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/PathHelper.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/PathHelper.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/PathHelper.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/PathHelper.java Tue Jun  5 15:16:36 2007
@@ -21,6 +21,7 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
  */
@@ -139,7 +140,8 @@
   public final void pushPath()
   {
     if (_rowKey == null)
-      throw new IllegalStateException("rowKey");
+      throw new IllegalStateException(_LOG.getMessage(
+        "NULL_ROWKEY"));
   
     Object parentData = getLastPathData();
     Object data = pushPath(parentData, _rowKey);
@@ -178,7 +180,8 @@
       _rowKey = lastPath.rowKey;
     }
     else
-      throw new IllegalStateException("No Path element to pop");
+      throw new IllegalStateException(_LOG.getMessage(
+        "NO_PATH_ELEMENT_TO_POP"));
   }
 
   private PathHelper.PathElement _getPathElement(int index)
@@ -200,4 +203,6 @@
       this.node = data;
     }
   }
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    PathHelper.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySet.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySet.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySet.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySet.java Tue Jun  5 15:16:36 2007
@@ -19,6 +19,7 @@
 package org.apache.myfaces.trinidad.model;
 
 import java.util.AbstractSet;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
  * This Set is a mutable collection
@@ -203,7 +204,10 @@
     catch (CloneNotSupportedException e)
     {
       // should not happen:
-      throw new UnsupportedOperationException("Could not clone", e);
+      throw new UnsupportedOperationException(_LOG.getMessage(
+        "CANNOT_CLONE", e), e);
     }
   }
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    RowKeySet.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetImpl.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetImpl.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetImpl.java Tue Jun  5 15:16:36 2007
@@ -363,7 +363,8 @@
       public void remove()
       {
         if (_current == null)
-          throw new IllegalStateException("No element to remove");
+          throw new IllegalStateException(_LOG.getMessage(
+            "NO_ELEMENT_TO_REMOVE"));
         Set<Object> mutable = _getSet(true);
         // since this is the not-in-set iterator, we "remove" the element
         // by adding it to the Set:

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java Tue Jun  5 15:16:36 2007
@@ -29,6 +29,7 @@
 import java.util.Map.Entry;
 import java.util.NoSuchElementException;
 import java.util.Set;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
  * Implements a collection of rowKeys from a TreeModel.
@@ -321,7 +322,7 @@
   public void invertAll()
   {
     // TODO
-    throw new UnsupportedOperationException("todo");
+    throw new UnsupportedOperationException();
   }
 
   /**
@@ -694,4 +695,6 @@
   private Node<Object> _root;
   private transient TreeModel _model = null;
   private static final long serialVersionUID = 1L;
+  private static final TrinidadLogger _LOG =
+    TrinidadLogger.createTrinidadLogger(RowKeySetTreeImpl.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/SortCriterion.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/SortCriterion.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/SortCriterion.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/SortCriterion.java Tue Jun  5 15:16:36 2007
@@ -19,6 +19,7 @@
 package org.apache.myfaces.trinidad.model;
 
 import java.io.Serializable;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
  * This class pairs together a property and a direction by which a 
@@ -30,7 +31,8 @@
   public SortCriterion(String property, boolean isAscending)
   {
     if (property == null)
-      throw new NullPointerException("property is null");
+      throw new NullPointerException(_LOG.getMessage(
+        "NULL_PROPERTY"));
 
     _property = property;
     _sortOrder = isAscending;
@@ -84,4 +86,6 @@
   
   private final String _property;
   private final boolean _sortOrder;
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    SortCriterion.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/XMLMenuModel.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/XMLMenuModel.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/XMLMenuModel.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/XMLMenuModel.java Tue Jun  5 15:16:36 2007
@@ -570,7 +570,8 @@
          
         if (services.isEmpty())
         {
-          throw new IllegalStateException("No MenuContentHandler was registered.");
+          throw new IllegalStateException(_LOG.getMessage(
+            "NO_MENUCONTENTHANDLER_REGISTERED"));
         }
         
         _contentHandler = services.get(0);

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java Tue Jun  5 15:16:36 2007
@@ -34,6 +34,7 @@
 import org.apache.myfaces.trinidad.context.RequestContext;
 
 import org.apache.myfaces.trinidad.context.RenderingContext;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
  * Basic implementation of the core rendering functionality
@@ -177,7 +178,8 @@
     {
       RenderingContext arc = RenderingContext.getCurrentInstance();
       if (arc == null)
-        throw new IllegalStateException("No RenderingContext");
+        throw new IllegalStateException(_LOG.getMessage(
+          "NO_RENDERINGCONTEXT"));
       
       FacesBean bean = getFacesBean(component);
       encodeBegin(context, arc, component, bean);
@@ -197,7 +199,8 @@
   {
     RenderingContext arc = RenderingContext.getCurrentInstance();
     if (arc == null)
-      throw new IllegalStateException("No RenderingContext");
+      throw new IllegalStateException(_LOG.getMessage(
+        "NO_RENDERINGCONTEXT"));
 
     FacesBean bean = getFacesBean(component);
     if (getRendersChildren())
@@ -633,4 +636,6 @@
 
     context.getResponseWriter().writeAttribute("class", builder.toString(), null);
   }
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    CoreRenderer.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/RegexResourceLoader.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/RegexResourceLoader.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/RegexResourceLoader.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/RegexResourceLoader.java Tue Jun  5 15:16:36 2007
@@ -26,6 +26,7 @@
 import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
  * A resource loader implementation which loads resources
@@ -118,9 +119,8 @@
     if (!regex.startsWith("/")  &&
         !regex.startsWith("(/"))
     {
-      throw new IllegalArgumentException("Resource path regular expression \"" +
-                                         regex + 
-                                         "\" does not have leading slash");
+      throw new IllegalArgumentException(_LOG.getMessage(
+        "RESOURCE_PATH_REGULAR_EXPRESSION_HAS_NO_LEADING_SLASH", regex));
     }
   }
   
@@ -147,4 +147,6 @@
   }
 
   private final List<RegexResourceNode> _loaders;
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    RegexResourceLoader.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/skin/SkinFactory.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/skin/SkinFactory.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/skin/SkinFactory.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/skin/SkinFactory.java Tue Jun  5 15:16:36 2007
@@ -23,6 +23,7 @@
 import java.util.Map;
 
 import javax.faces.context.FacesContext;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 
 /**
@@ -52,8 +53,8 @@
       ClassLoader cl = _getClassLoader();
       if (_FACTORIES.get(cl) != null)
       {
-        throw new IllegalStateException(
-          "Factory already available for this class loader.");
+        throw new IllegalStateException(_LOG.getMessage(
+          "FACTORY_ALREADY_AVAILABlE_FOR_THIS_CLASS_LOADER"));
       }
 
       _FACTORIES.put(cl, factory);
@@ -120,4 +121,6 @@
 
   static private final Map<ClassLoader, SkinFactory> _FACTORIES = 
     new WeakHashMap<ClassLoader, SkinFactory>();
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    SkinFactory.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/Base64OutputStream.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/Base64OutputStream.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/Base64OutputStream.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/Base64OutputStream.java Tue Jun  5 15:16:36 2007
@@ -21,6 +21,7 @@
 import java.io.OutputStream;
 import java.io.Writer;
 import java.io.IOException;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
  * An OutputStream that encodes data in a base64 representation.
@@ -76,13 +77,14 @@
   {
     if (b==null) 
     {
-      throw new NullPointerException("byte[] cannot be null");
+      throw new NullPointerException(_LOG.getMessage(
+        "BYTE_ARRAY_CANNOT_BE_NULL"));
     }
       
     if (off<0 || len<0 || off+len>b.length) 
     {
-      throw new IndexOutOfBoundsException("Actual Length:"+b.length+" offset:"+off+
-                                          " length:"+len);
+      throw new IndexOutOfBoundsException(_LOG.getMessage(
+        "ACTUAL_LENGTH_OFFSET", new Object[]{b.length,off,len}));
     }
     
     int lengthToProcess = len;
@@ -354,4 +356,6 @@
 
   // Writer that will receive all completed character output
   private final Writer      _out;  
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    Base64OutputStream.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/FastMessageFormat.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/FastMessageFormat.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/FastMessageFormat.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/FastMessageFormat.java Tue Jun  5 15:16:36 2007
@@ -18,6 +18,7 @@
  */
 package org.apache.myfaces.trinidad.util;
 
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
  * The FastMessageFormat class is a greatly reduced version
@@ -42,9 +43,7 @@
  * <p>
  * @version $Name:  $ ($Revision: adfrt/faces/adf-faces-api/src/main/java/oracle/adf/view/faces/util/FastMessageFormat.java#0 $) $Date: 10-nov-2005.19:08:37 $
  */
-// TODO This class to be made public once we figure out whether we should
-// This class is also availble in impl for laf strings.
-class FastMessageFormat
+public class FastMessageFormat
 {
   /**
    * Creates a FastMessageFormat based on the given format string.
@@ -133,18 +132,18 @@
             {
               if ((patternChar < '0') ||
                   (patternChar > '9'))
-                throw new IllegalArgumentException(
-                   "FastMessageFormat only supports numeric arguments");
+                throw new IllegalArgumentException(_LOG.getLogger().getResourceBundle().getString(
+                  "FASTMESSAGEFORMAT_ONLY_SUPPORT_NUMERIC_ARGUMENTS"));
               sourceIndex = (sourceIndex * 10) + (patternChar - '0');
             }
           }
 
           if (j == formatLength)
-            throw new IllegalArgumentException(
-                   "End of pattern not found");
+            throw new IllegalArgumentException(_LOG.getLogger().getResourceBundle().getString(
+              "END_OF_PATTERN_NOT_FOUND"));
           if (j == i + 1)
-            throw new IllegalArgumentException(
-                   "FastMessageFormat: empty argument - {} - found");
+            throw new IllegalArgumentException(_LOG.getLogger().getResourceBundle().getString(
+              "FASTMESSAGEFORMAT_FIND_EMPTY_ARGUMENT"));
           if (sourceIndex < sourceCount)
           {
             Object sourceString = source[sourceIndex];
@@ -169,6 +168,8 @@
   }
 
   private final char[] _formatText;
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    FastMessageFormat.class);
 }
 
 

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/LocaleUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/LocaleUtils.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/LocaleUtils.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/LocaleUtils.java Tue Jun  5 15:16:36 2007
@@ -62,7 +62,8 @@
     ResourceBundle bundle  = info.getBundle();
     if (null == bundle)
     {
-      throw new NullPointerException("bundle not found");
+      throw new NullPointerException(_LOG.getMessage(
+        "BUNDLE_NOT_FOUND"));
     }
 
     // Look up for key_detail now
@@ -92,7 +93,8 @@
     ResourceBundle bundle  = info.getBundle();
     if (null == bundle)
     {
-      throw new NullPointerException("bundle not found");
+      throw new NullPointerException(_LOG.getMessage(
+        "BUNDLE_NOT_FOUND"));
     }
 
     // Look up for key_detail now
@@ -125,7 +127,8 @@
 
     if (resourceId == null)
     {
-      throw new NullPointerException("resourceId is null");
+      throw new NullPointerException(_LOG.getMessage(
+        "NULL_RESOURCEID"));
     }
 
     Locale locale = _getLocale(context);
@@ -149,7 +152,8 @@
         if(bundle == null)
         {
           // That bundle is from the spec, it should never be null
-          throw new NullPointerException("The default FacesMessage.FACES_MESSAGES cannot be found");
+          throw new NullPointerException(_LOG.getMessage(
+            "CANNOT_FIND_DEFAULT_FACESMESSAGE"));
         }
         
         summary = _getBundleSummaryInfo(bundle, resourceId);
@@ -300,7 +304,8 @@
   private static void _assertContextNotNull(FacesContext context)
   {
     if (null == context)
-      throw new NullPointerException("FacesContext is null");
+      throw new NullPointerException(_LOG.getMessage(
+        "NULL_FACESCONTEXT"));
   }
 
   /**

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/MessageFactory.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/MessageFactory.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/MessageFactory.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/MessageFactory.java Tue Jun  5 15:16:36 2007
@@ -498,7 +498,8 @@
   {
     if (!(customMessagePattern instanceof ValueBinding ||
          customMessagePattern instanceof String))
-         throw new IllegalArgumentException("custom message should be of type ValueBinding or String");
+         throw new IllegalArgumentException(_LOG.getMessage(
+           "CUSTOM_MESSAGE_SHOULD_BE_VALUEBINDING_OR_STRING_TYPE"));
   }
 
   private static ErrorMessages _getBindingOrFormattedErrorMessages(

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/Service.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/Service.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/Service.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/Service.java Tue Jun  5 15:16:36 2007
@@ -20,6 +20,7 @@
 
 import javax.faces.context.FacesContext;
 import javax.faces.render.RenderKit;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
  * <p>
@@ -86,9 +87,8 @@
       if (o != null)
       {
         if (!serviceClass.isAssignableFrom(o.getClass()))
-          throw new IllegalStateException(
-            "Provider " + from + " did not return an object implementing " +
-            serviceClass.getName());
+          throw new IllegalStateException(_LOG.getMessage(
+            "PROVIDER_NOT_RETURN_IMPLEMENTING_OBJECT", new Object[]{from, serviceClass.getName()}));
 
         return o;
       }
@@ -110,12 +110,12 @@
     // Service.getService().
     RenderKit rk = context.getRenderKit();
     if (rk == null)
-      throw new NullPointerException(
-        "FacesContext.getRenderKit() returned null while trying to "+
-        "get the " + serviceClass.getName() + " service;  please check " +
-        "your configuration.");
+      throw new NullPointerException(_LOG.getMessage(
+        "OBTAIN_NULL_RENDERKIT_WHILE_GETTING_SERVICE", serviceClass.getName()));
  
 
     return getService(rk, serviceClass);
   }
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    Service.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ByteLengthValidator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ByteLengthValidator.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ByteLengthValidator.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ByteLengthValidator.java Tue Jun  5 15:16:36 2007
@@ -34,6 +34,7 @@
 import org.apache.myfaces.trinidad.bean.PropertyKey;
 import org.apache.myfaces.trinidad.util.ComponentUtils;
 import org.apache.myfaces.trinidad.util.MessageFactory;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 
 /**
@@ -219,7 +220,8 @@
 
     if ((context == null) || (component == null))
     {
-      throw new NullPointerException("FacesContext or Component is null");
+      throw new NullPointerException(_LOG.getMessage(
+        "NULL_FACESCONTEXT_OR_UICOMPONENT"));
     }
 
     if (value != null)
@@ -239,8 +241,8 @@
       }
       catch (UnsupportedEncodingException uee)
       {
-        throw new IllegalCharsetNameException("Encoding: " + getEncoding() +
-                                         " is unsupported by JVM");
+        throw new IllegalCharsetNameException(_LOG.getMessage(
+          "ENCODING_NOT_SUPPORTED_BY_JVM", getEncoding()));
       }
     }
   }
@@ -402,4 +404,6 @@
   private boolean _isTransient = false;
 
 
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    ByteLengthValidator.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateRestrictionValidator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateRestrictionValidator.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateRestrictionValidator.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateRestrictionValidator.java Tue Jun  5 15:16:36 2007
@@ -41,6 +41,7 @@
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
 import org.apache.myfaces.trinidad.context.RequestContext;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 import org.apache.myfaces.trinidad.model.DateListProvider;
 import org.apache.myfaces.trinidad.util.ComponentUtils;
 import org.apache.myfaces.trinidad.util.MessageFactory;
@@ -208,7 +209,8 @@
   {
     if ((context == null) || (component == null))
     {
-      throw new NullPointerException("FacesContext or Component is null");
+      throw new NullPointerException(_LOG.getMessage(
+        "NULL_FACESCONTEXT_OR_UICOMPONENT"));
     }
 
     if (value != null)
@@ -414,7 +416,8 @@
         return ( (Date)value );
       }
 
-      throw new IllegalArgumentException("'value' is not of type java.util.Date");
+      throw new IllegalArgumentException(_LOG.getMessage(
+        "VALUE_IS_NOT_DATE_TYPE"));
     }
 
   private FacesMessage _getWrongWeekDayMessage(
@@ -586,4 +589,8 @@
   
   private Map<Integer, String> _dayMap = null;
   private Map<Integer, String> _monthMap = null;
+
+  private static final TrinidadLogger _LOG =
+    TrinidadLogger.createTrinidadLogger(DateRestrictionValidator.class);
+
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java Tue Jun  5 15:16:36 2007
@@ -35,6 +35,7 @@
 import org.apache.myfaces.trinidad.bean.PropertyKey;
 import org.apache.myfaces.trinidad.util.ComponentUtils;
 import org.apache.myfaces.trinidad.util.MessageFactory;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 
 /**
@@ -343,7 +344,8 @@
   {
     if ((context == null) || (component == null))
     {
-      throw new NullPointerException("FacesContext or Component is null");
+      throw new NullPointerException(_LOG.getMessage(
+        "NULL_FACESCONTEXT_OR_UICOMPONENT"));
     }
 
     if (value != null)
@@ -496,7 +498,8 @@
       return ( (Date)value );
     }
 
-    throw new IllegalArgumentException("'value' is not of type java.util.Date");
+    throw new IllegalArgumentException(_LOG.getMessage(
+      "VALUE_IS_NOT_DATE_TYPE"));
   }
 
   private FacesMessage _getNotInRangeMessage(
@@ -647,4 +650,6 @@
 
   private boolean _transientValue = false;
 
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    DateTimeRangeValidator.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/RegExpValidator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/RegExpValidator.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/RegExpValidator.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/RegExpValidator.java Tue Jun  5 15:16:36 2007
@@ -34,6 +34,7 @@
 import org.apache.myfaces.trinidad.bean.PropertyKey;
 import org.apache.myfaces.trinidad.util.ComponentUtils;
 import org.apache.myfaces.trinidad.util.MessageFactory;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
 <p><strong>RegExpValidator</strong> is a {@link javax.faces.validator.Validator} that checks
@@ -108,7 +109,8 @@
 
     if ((context == null) || (component == null))
     {
-      throw new NullPointerException("FacesContext or Component is null");
+      throw new NullPointerException(_LOG.getMessage(
+        "NULL_FACESCONTEXT_OR_UICOMPONENT"));
     }
 
     if ( value != null)
@@ -117,7 +119,8 @@
                                     "'value' is not of type java.lang.String.");
 
       if (getPattern() == null)
-        throw new NullPointerException("Pattern null");
+        throw new NullPointerException(_LOG.getMessage(
+          "NULL_REGEXP_PATTERN"));
 
       // compile the regular expression if we haven't already.
       // we cache the compiled regular expression because we can't cache
@@ -359,4 +362,6 @@
 
   private boolean _isTransient = false;
 
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    RegExpValidator.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ValidatorUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ValidatorUtils.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ValidatorUtils.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ValidatorUtils.java Tue Jun  5 15:16:36 2007
@@ -23,6 +23,7 @@
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.FacesBeanImpl;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
  * Utility class for Validators. 
@@ -97,7 +98,8 @@
     FacesBean.Type type = bean.getType();
     PropertyKey key = type.findKey(name);
     if (isStrict && key == null)
-     throw new IllegalArgumentException("Invalid attribute name " + name);
+     throw new IllegalArgumentException(_LOG.getMessage(
+       "INVALID_ATTRIBUTE_NAME", name));
     else 
     return key;
   }
@@ -112,4 +114,6 @@
          throw new NullPointerException(message);
     }
   }
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    ValidatorUtils.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentTag.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentTag.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentTag.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentTag.java Tue Jun  5 15:16:36 2007
@@ -132,9 +132,8 @@
   {
     if (component instanceof UIViewRoot)
     {
-      throw new IllegalStateException(
-         "<f:view> was not present on this page; tag " + this +
-         "encountered without an <f:view> being processed.");
+      throw new IllegalStateException(_LOG.getMessage(
+        "VIEW_TAG_NOT_PRESENT", this));
     }
 
     super.setProperties(component);

Modified: myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/LoggerBundle.xrts
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/LoggerBundle.xrts?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/LoggerBundle.xrts (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/LoggerBundle.xrts Tue Jun  5 15:16:36 2007
@@ -150,4 +150,242 @@
 <!-- EVENT_DELIVERED_ALREADY_IN_DISCLOSURE_STATE -->
 <resource key="EVENT_DELIVERED_ALREADY_IN_DISCLOSURE_STATE">Event {0} was delivered to a showDetail already in that disclosure state.</resource>
 
+ <!-- NAME_ALREADY_REGISTERED -->
+ <resource key="NAME_ALREADY_REGISTERED">Name "{0}" had already been registered.</resource>
+ 
+ <!-- INDEX_ALREADY_REGISTERED -->
+ <resource key="INDEX_ALREADY_REGISTERED">Index "{0}" had already been registered.</resource>
+ 
+ <!-- TYPE_ALREADY_LOCKED -->
+ <resource key="TYPE_ALREADY_LOCKED">Type is already locked</resource>
+ 
+ <!-- CANNOT_FIND_PROPERTY -->
+ <resource key="CANNOT_FIND_PROPERTY">Property "{0}" cannot be bound.</resource>
+ 
+ <!-- >KEY_CANNOT_BE_USED_FOR_LISTS -->
+ <resource key=">KEY_CANNOT_BE_USED_FOR_LISTS">Key {0} cannot be used for lists</resource>
+ 
+ <!-- KEY_IS_LIST_KEY -->
+ <resource key="KEY_IS_LIST_KEY">Key {0} is a list key</resource>
+ 
+ <!-- DEFAULT_VALUE_IS_NOT_ASSIGNED_TO_TYPE -->
+ <resource key="DEFAULT_VALUE_IS_NOT_ASSIGNED_TO_TYPE">Default value {0} is not assignable to type {1}</resource>
+ 
+ <!-- CAPABILITY_MASK_NOT_UNDERSTOOD -->
+ <resource key="CAPABILITY_MASK_NOT_UNDERSTOOD">Capability mask {0} not understood</resource>
+ 
+ <!-- INVALID_INDEX -->
+ <resource key="INVALID_INDEX">Invalid index</resource>
+ 
+ <!-- ATTEMP_ADD_DUPLICATE_ID -->
+ <resource key="ATTEMP_ADD_DUPLICATE_ID">Attempt to add a duplicate ID {0}</resource>
+ 
+ <!-- NO_NODE_SPECIFIED -->
+ <resource key="NO_NODE_SPECIFIED">No node specified</resource>
+ 
+ <!-- COMPONENT_REQUIRED -->
+ <resource key="COMPONENT_REQUIRED">Component required</resource>
+ 
+ <!-- DOCUMENTFRAGMENT_REQUIRED -->
+ <resource key="DOCUMENTFRAGMENT_REQUIRED">DocumentFragment required</resource>
+ 
+ <!-- CANNOT_CONSTRUCT_ATTRIBUTECHANGE_WITH_NULL_NAME -->
+ <resource key="CANNOT_CONSTRUCT_ATTRIBUTECHANGE_WITH_NULL_NAME">Cannot construct an AttributeChange with null attribute name.</resource>
+ 
+ <!-- CANNOT_ADD_CHANGE_WITH_FACECONTEXT_OR_UICOMPONENT_OR_NULL -->
+ <resource key="CANNOT_ADD_CHANGE_WITH_FACECONTEXT_OR_UICOMPONENT_OR_NULL">Cannot add a Change with either of FacesContext, UIComponent or Change being null.</resource>
+ 
+ <!-- CANNOT_CONSTRUCT_CHANGECOMPONENTPROXY_WITH_NULL_UICOMPONENT -->
+ <resource key="CANNOT_CONSTRUCT_CHANGECOMPONENTPROXY_WITH_NULL_UICOMPONENT">Cannot construct an ChangeComponentProxy with null UIComponent.</resource>
+ 
+ <!-- TARGET_CLASS_NAME_MUST_BE_PROVIDED -->
+ <resource key="TARGET_CLASS_NAME_MUST_BE_PROVIDED">Target class name must be provided</resource>
+ 
+ <!-- CONVERTER_CLASS_NAME_MUST_BE_PROVIDED -->
+ <resource key="CONVERTER_CLASS_NAME_MUST_BE_PROVIDED">Converter class name must be provided</resource>
+ 
+ <!-- PARENT_CANNOT_BE_NULL -->
+ <resource key="PARENT_CANNOT_BE_NULL">Parent cannot be null</resource>
+ 
+ <!-- CANNOT_CONSTRUCT_REMOVECHILDCHANGE_WITH_NULL_ID -->
+ <resource key="CANNOT_CONSTRUCT_REMOVECHILDCHANGE_WITH_NULL_ID">Cannot construct a RemoveChildChange with null child id.</resource>
+ 
+ <!-- CANNOT_CONSTRUCT_REMOVEFACETCHANGE_WITH_NULL_FACETNAME -->
+ <resource key="CANNOT_CONSTRUCT_REMOVEFACETCHANGE_WITH_NULL_FACETNAME">Cannot construct a RemoveFacetChange with null facetName.</resource>
+ 
+ <!-- CANNOT_CONSTRUCT_REORDERCHANGE_WITH_NULL_ID -->
+ <resource key="CANNOT_CONSTRUCT_REORDERCHANGE_WITH_NULL_ID">Cannot construct a ReorderChange with null child ids.</resource>
+ 
+ <!-- CANNOT_CONSTRUCT_ADDFACETCHANGE_WITH_NULL_FACETNAME_FACETCOMPONENT -->
+ <resource key="CANNOT_CONSTRUCT_ADDFACETCHANGE_WITH_NULL_FACETNAME_FACETCOMPONENT">Cannot construct an AddFacetChange with either of facetName or facetComponent being null.</resource>
+ 
+ <!-- FACET_NAME_MUST_SPECIFIED -->
+ <resource key="FACET_NAME_MUST_SPECIFIED">Facet name must be specified</resource>
+ 
+ <!-- INDEX_SIZE -->
+ <resource key="INDEX_SIZE">index:{0} size:{1}</resource>
+ 
+ <!-- BAD_PHASEID -->
+ <resource key="BAD_PHASEID">Bad PhaseId:{0}</resource>
+ 
+ <!-- ILLEGAL_ID -->
+ <resource key="ILLEGAL_ID">Illegal id: {0}</resource>
+ 
+ <!-- WRAPPEDEVENT -->
+ <resource key="WRAPPEDEVENT">wrappedEvent</resource>
+ 
+ <!-- RENDERINGCONTEXT_ALREADY_RELEASED_OR_NEVER_ATTACHED -->
+ <resource key="RENDERINGCONTEXT_ALREADY_RELEASED_OR_NEVER_ATTACHED">RenderingContext was already released or had never been attached.</resource>
+ 
+ <!-- TRY_RELEASING_DIFFERENT_RENDERINGCONTEXT -->
+ <resource key="TRY_RELEASING_DIFFERENT_RENDERINGCONTEXT">Trying to release a different RenderingContext than the current context.</resource>
+ 
+ <!-- RELEASE_DIFFERENT_REQUESTCONTEXT_THAN_CURRENT_ONE -->
+ <resource key="RELEASE_DIFFERENT_REQUESTCONTEXT_THAN_CURRENT_ONE">Trying to release a different RequestContext than the current context.</resource>
+ 
+ <!-- FACTORY_ALREADY_AVAILABLE_FOR_CLASS_LOADER -->
+ <resource key="FACTORY_ALREADY_AVAILABLE_FOR_CLASS_LOADER">Factory already available for this class loader.</resource>
+ 
+ <!-- NULL_FACESCONTEXT_OR_UICOMPONENT -->
+ <resource key="NULL_FACESCONTEXT_OR_UICOMPONENT">FacesContext or UIComponent is null</resource>
+ 
+ <!-- PATTERN_MUST_HAVE_VALUE -->
+ <resource key="PATTERN_MUST_HAVE_VALUE">Patterns should contain at least one value and cannot be null</resource>
+ 
+ <!-- CANNOT_FORMAT_GIVEN_OBJECT_AS_COLOR -->
+ <resource key="CANNOT_FORMAT_GIVEN_OBJECT_AS_COLOR">Cannot format given Object as a Color</resource>
+ 
+ <!-- INVALID_ATTRIBUTE_NAME -->
+ <resource key="INVALID_ATTRIBUTE_NAME">Invalid attribute name {0}</resource>
+ 
+ <!-- VALUE_IS_NOT_DATE_TYPE_IT_IS -->
+ <resource key="VALUE_IS_NOT_DATE_TYPE_IT_IS">Value "{0}" is not of type java.util.Date, it is {1}</resource>
+ 
+ <!-- INVALID_DATE_STYLE -->
+ <resource key="INVALID_DATE_STYLE">Invalid date style ''{0}''</resource>
+ 
+ <!-- INVALID_TIME_STYLE -->
+ <resource key="INVALID_TIME_STYLE">Invalid time style ''{0}''</resource>
+ 
+ <!-- INVALID_TYPE -->
+ <resource key="INVALID_TYPE">Invalid type ''{0}''</resource>
+ 
+ <!-- ILLEGAL_MESSAGE_ID -->
+ <resource key="ILLEGAL_MESSAGE_ID">Illegal message id unexpected value {0}</resource>
+ 
+ <!-- ILLEGAL_ATTRIBUTE_TYPE_VALUE -->
+ <resource key="ILLEGAL_ATTRIBUTE_TYPE_VALUE">Illegal value for attribute "type" unexpected value {0}</resource>
+ 
+ <!-- EITHER_PATTERN_OR_TYPE_MUST_SPECIFIED -->
+ <resource key="EITHER_PATTERN_OR_TYPE_MUST_SPECIFIED">Either "pattern" or "type" must be specified</resource>
+ 
+ <!-- VALUE_NOT_JAVA_LANG_NUMBER_TYPE -->
+ <resource key="VALUE_NOT_JAVA_LANG_NUMBER_TYPE">"value" is not of type java.lang.Number</resource>
+ 
+ <!-- NOT_VALID_TYPE -->
+ <resource key="NOT_VALID_TYPE">{0} is not a valid type</resource>
+ 
+ <!-- ILLEGAL_PATTERN_CHARACTER -->
+ <resource key="ILLEGAL_PATTERN_CHARACTER">Illegal pattern character ''{0}''</resource>
+ 
+ <!-- LOGGER_REQUIRED -->
+ <resource key="LOGGER_REQUIRED">Logger required</resource>
+ 
+ <!-- LOGGER_NAME_REQUIRED -->
+ <resource key="LOGGER_NAME_REQUIRED">Logger Name required</resource>
+ 
+ <!-- CLASS_REQUIRED -->
+ <resource key="CLASS_REQUIRED">Class required</resource>
+ 
+ <!-- PACKAGE_REQUIRED -->
+ <resource key="PACKAGE_REQUIRED">Package required</resource>
+ 
+ <!-- NULL_ROWDATA -->
+ <resource key="NULL_ROWDATA">rowData is null</resource>
+ 
+ <!-- CANNOT_EXIT_ROOT_CONTAINER -->
+ <resource key="CANNOT_EXIT_ROOT_CONTAINER">Cannot exit the root container</resource>
+ 
+ <!-- SETTING_ILLEGAL_VALUE -->
+ <resource key="SETTING_ILLEGAL_VALUE">Illegal value being set - value should be between -1 and maximum</resource>
+ 
+ <!-- CANNOT_CONVERT_INTO_MENUMODEL -->
+ <resource key="CANNOT_CONVERT_INTO_MENUMODEL">Could not convert {0} into a MenuModel</resource>
+ 
+ <!-- ROWKEY -->
+ <resource key="NULL_ROWKEY">rowKey is null</resource>
+ 
+ <!-- NO_PATH_ELEMENT_TO_POP -->
+ <resource key="NO_PATH_ELEMENT_TO_POP">No Path element to pop</resource>
+ 
+ <!-- CANNOT_CLONE -->
+ <resource key="CANNOT_CLONE">Could not clone</resource>
+ 
+ <!-- NO_ELEMENT_TO_REMOVE -->
+ <resource key="NO_ELEMENT_TO_REMOVE">No element to remove</resource>
+ 
+ <!-- NULL_PROPERTY -->
+ <resource key="NULL_PROPERTY">property is null</resource>
+ 
+ <!-- NO_MENUCONTENTHANDLER_REGISTERED -->
+ <resource key="NO_MENUCONTENTHANDLER_REGISTERED">No MenuContentHandler was registered.</resource>
+ 
+ <!-- NO_RENDERINGCONTEXT -->
+ <resource key="NO_RENDERINGCONTEXT">No RenderingContext</resource>
+ 
+ <!-- RESOURCE_PATH_REGULAR_EXPRESSION_HAS_NO_LEADING_SLASH -->
+ <resource key="RESOURCE_PATH_REGULAR_EXPRESSION_HAS_NO_LEADING_SLASH">Resource path regular expression "{0}" does not have leading slash</resource>
+ 
+ <!-- FACTORY_ALREADY_AVAILABlE_FOR_THIS_CLASS_LOADER -->
+ <resource key="FACTORY_ALREADY_AVAILABlE_FOR_THIS_CLASS_LOADER">Factory already available for this class loader.</resource>
+ 
+ <!-- BYTE_ARRAY_CANNOT_BE_NULL -->
+ <resource key="BYTE_ARRAY_CANNOT_BE_NULL">byte[] cannot be null</resource>
+ 
+ <!-- ACTUAL_LENGTH_OFFSET -->
+ <resource key="ACTUAL_LENGTH_OFFSET">Actual Length:{0} offset:{1} length:{2}</resource>
+ 
+ <!-- FASTMESSAGEFORMAT_ONLY_SUPPORT_NUMERIC_ARGUMENTS -->
+ <resource key="FASTMESSAGEFORMAT_ONLY_SUPPORT_NUMERIC_ARGUMENTS">FastMessageFormat only supports numeric arguments</resource>
+ 
+ <!-- END_OF_PATTERN_NOT_FOUND -->
+ <resource key="END_OF_PATTERN_NOT_FOUND">End of pattern not found</resource>
+ 
+ <!-- FASTMESSAGEFORMAT_FIND_EMPTY_ARGUMENT -->
+ <resource key="FASTMESSAGEFORMAT_FIND_EMPTY_ARGUMENT">FastMessageFormat: empty argument - {} - found</resource>
+ 
+ <!-- BUNDLE_NOT_FOUND -->
+ <resource key="BUNDLE_NOT_FOUND">bundle not found</resource>
+ 
+ <!-- NULL_RESOURCEID -->
+ <resource key="NULL_RESOURCEID">resourceId is null</resource>
+ 
+ <!-- CANNOT_FIND_DEFAULT_FACESMESSAGE -->
+ <resource key="CANNOT_FIND_DEFAULT_FACESMESSAGE">The default FacesMessage.FACES_MESSAGES cannot be found</resource>
+ 
+ <!-- NULL_FACESCONTEXT -->
+ <resource key="NULL_FACESCONTEXT">FacesContext is null</resource>
+ 
+ <!-- CUSTOM_MESSAGE_SHOULD_BE_VALUEBINDING_OR_STRING_TYPE -->
+ <resource key="CUSTOM_MESSAGE_SHOULD_BE_VALUEBINDING_OR_STRING_TYPE">custom message should be of type ValueBinding or String</resource>
+ 
+ <!-- PROVIDER_NOT_RETURN_IMPLEMENTING_OBJECT -->
+ <resource key="PROVIDER_NOT_RETURN_IMPLEMENTING_OBJECT">Provider {0} did not return an object implementing {1}</resource>
+ 
+ <!-- OBTAIN_NULL_RENDERKIT_WHILE_GETTING_SERVICE -->
+ <resource key="OBTAIN_NULL_RENDERKIT_WHILE_GETTING_SERVICE">FacesContext.getRenderKit() returned null while trying to get the {0} service;  please check your configuration.</resource>
+ 
+ <!-- ENCODING_NOT_SUPPORTED_BY_JVM -->
+ <resource key="ENCODING_NOT_SUPPORTED_BY_JVM">Encoding: {0} is unsupported by JVM</resource>
+ 
+ <!-- VALUE_IS_NOT_DATE_TYPE -->
+ <resource key="VALUE_IS_NOT_DATE_TYPE">'value' is not of type java.util.Date</resource>
+ 
+ <!-- NULL_REGEXP_PATTERN -->
+ <resource key="NULL_REGEXP_PATTERN">Regular expression pattern is null</resource>
+ 
+ <!-- VIEW_TAG_NOT_PRESENT -->
+ <resource key="VIEW_TAG_NOT_PRESENT">&lt;f:view&gt; was not present on this page; tag {0} encountered without an &lt;f:view&gt; being processed.</resource>
+ 
+
 </resources>

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentUtil.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentUtil.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentUtil.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentUtil.java Tue Jun  5 15:16:36 2007
@@ -24,6 +24,7 @@
 import org.apache.myfaces.trinidad.context.RequestContext;
 
 import javax.faces.context.FacesContext;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
 /**
  * agent util class
@@ -130,9 +131,8 @@
       Map<Object, Object> capabilities)
   {
     if (!(agent instanceof TrinidadAgentImpl))
-      throw new IllegalArgumentException("mergeCapabilities() may only be " +
-                                         "used with Agents created by this " +
-                                         "class.");
+      throw new IllegalArgumentException(_LOG.getMessage(
+        "MERGECAPABILITIES_ONLY_USED_WITH_AGENTS_CREATED_BY_THIS_CLASS"));
     // Make a copy of the agent first
     agent = (TrinidadAgent) agent.clone();
 
@@ -144,4 +144,6 @@
     return agent;
   }
 
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(
+    AgentUtil.class);
 }

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/parse/CapabilitiesDocumentParser.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/parse/CapabilitiesDocumentParser.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/parse/CapabilitiesDocumentParser.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/parse/CapabilitiesDocumentParser.java Tue Jun  5 15:16:36 2007
@@ -111,14 +111,14 @@
   {
     if (!NS_URI.equals(namespaceURI))
     {
-      throw new SAXParseException("Invalid Namespace: " +
-                                  namespaceURI, context.getLocator());
+      throw new SAXParseException(_LOG.getMessage(
+        "INVALID_NAMESPACE", namespaceURI), context.getLocator());
     }
 
     if (!ELEMENT_ROOT.equals(localName))
     {
-      throw new SAXParseException("Invalid Root Element: " +
-                                  localName, context.getLocator());
+      throw new SAXParseException(_LOG.getMessage(
+        "INVALID_ROOT_ELEMENT", localName), context.getLocator());
     }
   }
 

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/parse/CapabilitiesNodeParser.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/parse/CapabilitiesNodeParser.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/parse/CapabilitiesNodeParser.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/parse/CapabilitiesNodeParser.java Tue Jun  5 15:16:36 2007
@@ -50,8 +50,8 @@
   {
     if (!NS_URI.equals(namespaceURI))
     {
-      throw new SAXParseException("Invalid Namespace: " +
-                                  namespaceURI, context.getLocator());
+      throw new SAXParseException(_LOG.getMessage(
+        "INVALID_NAMESPACE", namespaceURI), context.getLocator());
     }
 
     _id = attrs.getValue(ATTRIBUTE_ID);

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/parse/CapabilityDataDocumentParser.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/parse/CapabilityDataDocumentParser.java?view=diff&rev=544659&r1=544658&r2=544659
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/parse/CapabilityDataDocumentParser.java (original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/parse/CapabilityDataDocumentParser.java Tue Jun  5 15:16:36 2007
@@ -105,8 +105,8 @@
   {
     if (!NS_URI.equals(namespaceURI))
     {
-      throw new SAXParseException("Invalid Namespace: " +
-                                  namespaceURI, context.getLocator());
+      throw new SAXParseException(_LOG.getMessage(
+        "INVALID_NAMESPACE", namespaceURI), context.getLocator());
     }
   }