incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1295926 - in /incubator/lcf/trunk: ./ connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/al...
Date Thu, 01 Mar 2012 21:56:28 GMT
Author: kwright
Date: Thu Mar  1 21:56:27 2012
New Revision: 1295926

URL: http://svn.apache.org/viewvc?rev=1295926&view=rev
Log:
Fix for CONNECTORS-420.

Added:
    incubator/lcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration.html
      - copied unchanged from r1295923, incubator/lcf/branches/CONNECTORS-420/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration.html
Removed:
    incubator/lcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html
    incubator/lcf/trunk/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.html
Modified:
    incubator/lcf/trunk/   (props changed)
    incubator/lcf/trunk/CHANGES.txt
    incubator/lcf/trunk/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/Messages.java
    incubator/lcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/Messages.java
    incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java
    incubator/lcf/trunk/connectors/cmis/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/cmis/common_en_US.properties
    incubator/lcf/trunk/connectors/cmis/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/cmis/common_ja_JP.properties
    incubator/lcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/authorities/DCTM/Messages.java
    incubator/lcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/Messages.java
    incubator/lcf/trunk/connectors/filenet/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filenet/Messages.java
    incubator/lcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/Messages.java
    incubator/lcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/Messages.java
    incubator/lcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/Messages.java
    incubator/lcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/Messages.java
    incubator/lcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/Messages.java
    incubator/lcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/Messages.java
    incubator/lcf/trunk/connectors/nullauthority/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/nullauthority/Messages.java
    incubator/lcf/trunk/connectors/nulloutput/connector/src/main/java/org/apache/manifoldcf/agents/output/nullconnector/Messages.java
    incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/Messages.java
    incubator/lcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Messages.java
    incubator/lcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/Messages.java
    incubator/lcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/Messages.java
    incubator/lcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/Messages.java
    incubator/lcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/Messages.java
    incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
    incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java

Propchange: incubator/lcf/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar  1 21:56:27 2012
@@ -20,3 +20,4 @@
 /incubator/lcf/branches/CONNECTORS-353:1226361-1226428
 /incubator/lcf/branches/CONNECTORS-388:1233014-1234466
 /incubator/lcf/branches/CONNECTORS-402:1242059-1242965
+/incubator/lcf/branches/CONNECTORS-420:1295533-1295923

Modified: incubator/lcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/CHANGES.txt?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/CHANGES.txt (original)
+++ incubator/lcf/trunk/CHANGES.txt Thu Mar  1 21:56:27 2012
@@ -3,6 +3,11 @@ $Id$
 
 ======================= 0.5-dev =====================
 
+CONNECTORS-420: Revise the way we use Velocity so that we can make
+better use of it for internationalization purposes, and for things like loops
+etc.
+(Karl Wright)
+
 CONNECTORS-419: Alfresco Connector needs to invoke the ingestDocument for each d:content property of a node
 (Piergiorgio Lucidi)
 

Modified: incubator/lcf/trunk/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/Messages.java (original)
+++ incubator/lcf/trunk/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/Messages.java (original)
+++ incubator/lcf/trunk/connectors/alfresco/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/alfresco/Messages.java Thu Mar  1 21:56:27 2012
@@ -93,27 +93,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -127,13 +127,20 @@ public class Messages extends org.apache
   }
   
   public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
-      Map<String,String> substitutionParameters, boolean mapToUpperCase)
-      throws ManifoldCFException
-    {
-      outputResourceWithVelocity(output,createVelocityEngine(Messages.class),DEFAULT_PATH_NAME,locale,resourceKey,
-        substitutionParameters,mapToUpperCase);
-    }
-  
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
   
 }
 

Modified: incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java (original)
+++ incubator/lcf/trunk/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -122,12 +122,20 @@ public class Messages extends org.apache
   }
   
   public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
-      Map<String,String> substitutionParameters, boolean mapToUpperCase)
-      throws ManifoldCFException
-    {
-      outputResourceWithVelocity(output,createVelocityEngine(Messages.class),DEFAULT_PATH_NAME,locale,resourceKey,
-        substitutionParameters,mapToUpperCase);
-    }
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
   
 }
 

Modified: incubator/lcf/trunk/connectors/cmis/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/cmis/common_en_US.properties
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/cmis/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/cmis/common_en_US.properties?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/cmis/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/cmis/common_en_US.properties (original)
+++ incubator/lcf/trunk/connectors/cmis/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/cmis/common_en_US.properties Thu Mar  1 21:56:27 2012
@@ -19,12 +19,16 @@ CmisAuthorityConnector.UserMapping=User 
 CmisAuthorityConnector.TheEndpointMustBeNotNull=The endpoint must be not null
 CmisAuthorityConnector.Parameters=Parameters:
 
-CmisRepositoryConnector.viewConfigurationHtml=viewConfiguration.html
-CmisRepositoryConnector.editConfigurationHtml=editConfiguration.html
-CmisRepositoryConnector.editConfigurationJs=editConfiguration.js
-CmisRepositoryConnector.viewSpecificationHtml=viewSpecification.html
-CmisRepositoryConnector.editSpecificationHtml=editSpecification.html
-CmisRepositoryConnector.editSpecificationJs=editSpecification.js
+CmisRepositoryConnector.BindingColon=Binding:
+CmisRepositoryConnector.UsernameColon=Username:
+CmisRepositoryConnector.PasswordColon=Password:
+CmisRepositoryConnector.ProtocolColon=Protocol:
+CmisRepositoryConnector.ServerColon=Server:
+CmisRepositoryConnector.PortColon=Port:
+CmisRepositoryConnector.PortColon=Path:
+CmisRepositoryConnector.RepositoryIDColon=Repository ID:
+CmisRepositoryConnector.Optional=(optional)
+
 CmisRepositoryConnector.CMISQuery=CMIS Query
 
 CmisAuthorityConnector.Repository=Repository

Modified: incubator/lcf/trunk/connectors/cmis/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/cmis/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/cmis/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/cmis/common_ja_JP.properties?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/cmis/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/cmis/common_ja_JP.properties (original)
+++ incubator/lcf/trunk/connectors/cmis/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/cmis/common_ja_JP.properties Thu Mar  1 21:56:27 2012
@@ -19,12 +19,16 @@ CmisAuthorityConnector.UserMapping=�
 CmisAuthorityConnector.TheEndpointMustBeNotNull=エンドポイントがnullです
 CmisAuthorityConnector.Parameters=引数:
 
-CmisRepositoryConnector.viewConfigurationHtml=viewConfiguration_ja.html
-CmisRepositoryConnector.editConfigurationHtml=editConfiguration_ja.html
-CmisRepositoryConnector.editConfigurationJs=editConfiguration_ja.js
-CmisRepositoryConnector.viewSpecificationHtml=viewSpecification_ja.html
-CmisRepositoryConnector.editSpecificationHtml=editSpecification_ja.html
-CmisRepositoryConnector.editSpecificationJs=editSpecification_ja.js
+CmisRepositoryConnector.BindingColon=バイディング:
+CmisRepositoryConnector.UsernameColon=ユーザ名:
+CmisRepositoryConnector.PasswordColon=パスワード:
+CmisRepositoryConnector.ProtocolColon=プロトコル:
+CmisRepositoryConnector.ServerColon=サーバ:
+CmisRepositoryConnector.PortColon=ポート:
+CmisRepositoryConnector.PortColon=パス:
+CmisRepositoryConnector.RepositoryIDColon=リポジトリID:
+CmisRepositoryConnector.Optional=(任意)
+
 CmisRepositoryConnector.CMISQuery=CMISクエリー
 
 CmisAuthorityConnector.Repository=リポジトリ

Modified: incubator/lcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/authorities/DCTM/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/authorities/DCTM/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/authorities/DCTM/Messages.java (original)
+++ incubator/lcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/authorities/DCTM/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/Messages.java (original)
+++ incubator/lcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/filenet/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filenet/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/filenet/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filenet/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/filenet/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filenet/Messages.java (original)
+++ incubator/lcf/trunk/connectors/filenet/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filenet/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/Messages.java (original)
+++ incubator/lcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/Messages.java (original)
+++ incubator/lcf/trunk/connectors/gts/connector/src/main/java/org/apache/manifoldcf/agents/output/gts/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/Messages.java (original)
+++ incubator/lcf/trunk/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/Messages.java (original)
+++ incubator/lcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/Messages.java (original)
+++ incubator/lcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/Messages.java (original)
+++ incubator/lcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/nullauthority/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/nullauthority/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/nullauthority/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/nullauthority/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/nullauthority/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/nullauthority/Messages.java (original)
+++ incubator/lcf/trunk/connectors/nullauthority/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/nullauthority/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/nulloutput/connector/src/main/java/org/apache/manifoldcf/agents/output/nullconnector/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/nulloutput/connector/src/main/java/org/apache/manifoldcf/agents/output/nullconnector/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/nulloutput/connector/src/main/java/org/apache/manifoldcf/agents/output/nullconnector/Messages.java (original)
+++ incubator/lcf/trunk/connectors/nulloutput/connector/src/main/java/org/apache/manifoldcf/agents/output/nullconnector/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/Messages.java (original)
+++ incubator/lcf/trunk/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -122,12 +122,20 @@ public class Messages extends org.apache
   }
   
   public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
-      Map<String,String> substitutionParameters, boolean mapToUpperCase)
-      throws ManifoldCFException
-    {
-      outputResourceWithVelocity(output,createVelocityEngine(Messages.class),DEFAULT_PATH_NAME,locale,resourceKey,
-        substitutionParameters,mapToUpperCase);
-    }
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
   
 }
 

Modified: incubator/lcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Messages.java (original)
+++ incubator/lcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/Messages.java (original)
+++ incubator/lcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/Messages.java (original)
+++ incubator/lcf/trunk/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/Messages.java (original)
+++ incubator/lcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/Messages.java (original)
+++ incubator/lcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/Messages.java Thu Mar  1 21:56:27 2012
@@ -88,27 +88,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   // Resource output
@@ -121,5 +121,21 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
 }
 

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/i18n/Messages.java Thu Mar  1 21:56:27 2012
@@ -63,12 +63,13 @@ public class Messages
   }
   
   
-  /** Read a resource as an input stream, given a classloader, path, locale, and resource key.
+  /** Read a resource as an input stream, given a class, path, locale, and resource key.
   */
   public static InputStream getResourceAsStream(Class classInstance, String pathName,
-    Locale locale, String resourceKey)
+    Locale originalLocale, String resourceKey)
     throws ManifoldCFException
   {
+    Locale locale = originalLocale;
     InputStream is = classInstance.getResourceAsStream(localizeResourceName(pathName,resourceKey,locale));
     if (is == null)
     {
@@ -89,7 +90,13 @@ public class Messages
           locale = new Locale(locale.getLanguage());
           is = classInstance.getResourceAsStream(localizeResourceName(pathName,resourceKey,locale));
           if (is == null)
-            throw new ManifoldCFException("No language resource in path '"+pathName+"' named '"+resourceKey+"' found for locale '"+locale.toString()+"'");
+          {
+            complainMissingResource("No resource in path '"+pathName+"' named '"+resourceKey+"' found for locale '"+locale.toString()+"'",
+              new Exception("Resource not found"),pathName,locale,resourceKey);
+            is = classInstance.getResourceAsStream(localizeResourceName(pathName,resourceKey,null));
+            if (is == null)
+              throw new ManifoldCFException("No matching language resource in path '"+pathName+"' named '"+resourceKey+"' found for locale '"+originalLocale.toString()+"'");
+          }
         }
       }
     }
@@ -100,18 +107,21 @@ public class Messages
   {
     // Path names temporarily disabled, since they don't work.
     // MHL
+    if (locale == null)
+      return /*pathName + "." + */resourceName;
     int dotIndex = resourceName.lastIndexOf(".");
     if (dotIndex == -1)
       return /*pathName + "." + */resourceName + "_" + locale.toString();
     return /*pathName + "." + */resourceName.substring(0,dotIndex) + "_" + locale.toString() + resourceName.substring(dotIndex);
   }
   
-  /** Obtain a string given a classloader, bundle, locale, message key, and arguments.
+  /** Obtain a resource bundle given a class, bundle name, and locale.
+  *@return null if the resource bundle could not be found.
   */
-  public static String getString(ClassLoader classLoader, String bundleName, Locale locale,
-    String messageKey, Object[] args)
+  public static ResourceBundle getResourceBundle(Class clazz, String bundleName, Locale locale)
   {
     ResourceBundle resources;
+    ClassLoader classLoader = clazz.getClassLoader();
     try
     {
       resources = ResourceBundle.getBundle(bundleName, locale, classLoader);
@@ -147,23 +157,44 @@ public class Messages
           catch (MissingResourceException e4)
           {
             complainMissingBundle("No backup en bundle found! "+e4.getMessage(),e4,bundleName,locale);
-            return messageKey;
+            return null;
           }
         }
       }
     }
+    return resources;
+  }
+  
+  /** Obtain a message given a resource bundle and message key.
+  *@return null if the message could not be found.
+  */
+  public static String getMessage(Class clazz, String bundleName, Locale locale, String messageKey)
+  {
+    ResourceBundle resources = getResourceBundle(clazz,bundleName,locale);
+    if (resources == null)
+      return null;
     
     String message;
     try
     {
-      message = resources.getString(messageKey);
+      return resources.getString(messageKey);
     }
     catch (MissingResourceException e)
     {
       complainMissingMessage("Missing resource '" + messageKey + "' in bundle '" + bundleName + "' for locale '"+locale.toString()+"'",
         e,bundleName,locale,messageKey);
-      message = messageKey;
+      return null;
     }
+  }
+  
+  /** Obtain a string given a class, bundle, locale, message key, and arguments.
+  */
+  public static String getString(Class clazz, String bundleName, Locale locale,
+    String messageKey, Object[] args)
+  {
+    String message = getMessage(clazz,bundleName,locale,messageKey);
+    if (message == null)
+      return messageKey;
 
     // Format the message
     String formatMessage;

Modified: incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java?rev=1295926&r1=1295925&r2=1295926&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java (original)
+++ incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java Thu Mar  1 21:56:27 2012
@@ -26,7 +26,9 @@ import java.io.Writer;
 import java.util.Iterator;
 import java.util.Locale;
 import java.util.Map;
+import java.util.HashMap;
 import java.util.Properties;
+import java.util.ResourceBundle;
 
 import org.apache.manifoldcf.core.interfaces.IHTTPOutput;
 import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
@@ -93,27 +95,27 @@ public class Messages extends org.apache
   
   public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
   }
   
   public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
   }
 
   /** Constructor - do no instantiate
@@ -121,37 +123,32 @@ public class Messages extends org.apache
   protected Messages()
   {
   }
-  
-  /** Write a resource to HTTP output, specifying what to substitute, and more importantly, how.
-   * ${PARAM_NAME} will be substituted directly with the value.
-   * ${PARAM_NAME:A} will be substituted with HTML attribute-escaped value.
-   * ${PARAM_NAME:B} will be substituted with HTML body-escaped value.
-   * ${PARAM_NAME:AJ} will be substituted with HTML attribute + Javascript escaped value.
-   * ${PARAM_NAME:BJ} will be substituted with HTML body + Javascript escaped value.
-   */
-   public static void outputResourceWithVelocity(IHTTPOutput output, VelocityEngine engine, String pathName,
-     Locale locale, String resourceKey, Map<String,String> substitutionParameters, boolean mapToUpperCase)
-     throws ManifoldCFException
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Class clazz, String bundleName, String pathName,
+    Locale locale, String resourceKey, Map<String,Object> contextObjects)
+    throws ManifoldCFException
   {
+    VelocityEngine engine = createVelocityEngine(clazz);
     try {
-      VelocityContext  context = new VelocityContext();
-      if (substitutionParameters != null)
+      VelocityContext context = new VelocityContext();
+      
+      // Add utility methods the UI needs
+      context.put("Encoder",org.apache.manifoldcf.ui.util.Encoder.class);
+      context.put("Formatter",org.apache.manifoldcf.ui.util.Formatter.class);
+      context.put("MultilineParser",org.apache.manifoldcf.ui.util.MultilineParser.class);
+      
+      // Add in the resource bundle
+      ResourceBundle rb = getResourceBundle(clazz,bundleName,locale);
+      context.put("ResourceBundle",rb);
+      
+      if (contextObjects != null)
       {
-        Iterator<String> i = substitutionParameters.keySet().iterator();
+        Iterator<String> i = contextObjects.keySet().iterator();
         while(i.hasNext())
         {
           String key = i.next();
-          String value = substitutionParameters.get(key);
-          if (mapToUpperCase)
-            key = key.toUpperCase();
-          if (value == null)
-            value = "";
-             
+          Object value = contextObjects.get(key);
           context.put(key,value);
-          context.put(key+"_A",Encoder.attributeEscape(value));
-          context.put(key+"_B",Encoder.bodyEscape(value));
-          context.put(key+"_AJ",Encoder.attributeJavascriptEscape(value));
-          context.put(key+"_BJ",Encoder.bodyJavascriptEscape(value));
         }
       }
       
@@ -165,6 +162,41 @@ public class Messages extends org.apache
     }
   }
   
+  /** Write a resource to HTTP output, specifying what to substitute, and more importantly, how.
+   * $PARAM_NAME will be substituted directly with the value.
+   * $PARAM_NAME_A will be substituted with HTML attribute-escaped value.
+   * $PARAM_NAME_B will be substituted with HTML body-escaped value.
+   * $PARAM_NAME_AJ will be substituted with HTML attribute + Javascript escaped value.
+   * $PARAM_NAME_BJ will be substituted with HTML body + Javascript escaped value.
+   */
+   public static void outputResourceWithVelocity(IHTTPOutput output, Class clazz, String bundleName, String pathName,
+     Locale locale, String resourceKey, Map<String,String> substitutionParameters, boolean mapToUpperCase)
+     throws ManifoldCFException
+  {
+    Map<String,Object> contextObjects = null;
+    if (substitutionParameters != null)
+    {
+      contextObjects = new HashMap<String,Object>();
+      Iterator<String> i = substitutionParameters.keySet().iterator();
+      while(i.hasNext())
+      {
+        String key = i.next();
+        String value = substitutionParameters.get(key);
+        if (mapToUpperCase)
+          key = key.toUpperCase();
+        if (value == null)
+          value = "";
+             
+        contextObjects.put(key,value);
+        contextObjects.put(key+"_A",Encoder.attributeEscape(value));
+        contextObjects.put(key+"_B",Encoder.bodyEscape(value));
+        contextObjects.put(key+"_AJ",Encoder.attributeJavascriptEscape(value));
+        contextObjects.put(key+"_BJ",Encoder.bodyJavascriptEscape(value));
+      }
+    }
+    outputResourceWithVelocity(output,clazz,bundleName,pathName,locale,resourceKey,contextObjects);
+  }
+  
   private static class OutputWriter extends Writer
   {
     private IHTTPOutput output;
@@ -285,34 +317,34 @@ public class Messages extends org.apache
   
   /** Obtain a string given a classloader, bundle, locale, message key, and arguments, and escape it for HTML body context.
   */
-  public static String getBodyString(ClassLoader classLoader, String bundleName, Locale locale,
+  public static String getBodyString(Class clazz, String bundleName, Locale locale,
     String messageKey, Object[] args)
   {
-    return Encoder.bodyEscape(getString(classLoader,bundleName,locale,messageKey,args));
+    return Encoder.bodyEscape(getString(clazz,bundleName,locale,messageKey,args));
   }
   
   /** Obtain a string given a classloader, bundle, locale, message key, and arguments, and escape it for HTML attribute context.
   */
-  public static String getAttributeString(ClassLoader classLoader, String bundleName, Locale locale,
+  public static String getAttributeString(Class clazz, String bundleName, Locale locale,
     String messageKey, Object[] args)
   {
-    return Encoder.attributeEscape(getString(classLoader,bundleName,locale,messageKey,args));
+    return Encoder.attributeEscape(getString(clazz,bundleName,locale,messageKey,args));
   }
 
   /** Obtain a string given a classloader, bundle, locale, message key, and arguments, and escape it for HTML attribute/javascript context.
   */
-  public static String getAttributeJavascriptString(ClassLoader classLoader, String bundleName, Locale locale,
+  public static String getAttributeJavascriptString(Class clazz, String bundleName, Locale locale,
     String messageKey, Object[] args)
   {
-    return Encoder.attributeJavascriptEscape(getString(classLoader,bundleName,locale,messageKey,args));
+    return Encoder.attributeJavascriptEscape(getString(clazz,bundleName,locale,messageKey,args));
   }
 
   /** Obtain a string given a classloader, bundle, locale, message key, and arguments, and escape it for HTML body/javascript context.
   */
-  public static String getBodyJavascriptString(ClassLoader classLoader, String bundleName, Locale locale,
+  public static String getBodyJavascriptString(Class clazz, String bundleName, Locale locale,
     String messageKey, Object[] args)
   {
-    return Encoder.bodyJavascriptEscape(getString(classLoader,bundleName,locale,messageKey,args));
+    return Encoder.bodyJavascriptEscape(getString(clazz,bundleName,locale,messageKey,args));
   }
 
 }



Mime
View raw message