incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1224641 [6/8] - in /incubator/lcf/branches/CONNECTORS-335: ./ connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ connectors/alfresco/ connectors/alfresco/connector/src/main/jav...
Date Sun, 25 Dec 2011 20:11:01 GMT
Modified: incubator/lcf/branches/CONNECTORS-335/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java Sun Dec 25 20:10:58 2011
@@ -30,6 +30,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Locale;
 import java.util.List;
 import java.net.*;
 
@@ -1358,10 +1359,11 @@ public class SharePointRepository extend
   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific to the connector.
   */
   @Override
-  public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, List<String> tabsArray)
+  public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out,
+    Locale locale, ConfigParams parameters, List<String> tabsArray)
     throws ManifoldCFException, IOException
   {
-    tabsArray.add(Messages.getString("SharePointRepository.Server"));
+    tabsArray.add(Messages.getString(locale,"SharePointRepository.Server"));
     out.print(
 "<script type=\"text/javascript\">\n"+
 "<!--\n"+
@@ -1427,14 +1429,14 @@ public class SharePointRepository extend
 "  if (editconnection.serverName.value == \"\")\n"+
 "  {\n"+
 "    alert(\"Please fill in a SharePoint server name\");\n"+
-"    SelectTab(\"" + Messages.getString("SharePointRepository.Server") + "\");\n"+
+"    SelectTab(\"" + Messages.getBodyJavascriptString(locale,"SharePointRepository.Server") + "\");\n"+
 "    editconnection.serverName.focus();\n"+
 "    return false;\n"+
 "  }\n"+
 "  if (editconnection.serverName.value.indexOf(\"/\") >= 0)\n"+
 "  {\n"+
 "    alert(\"Please specify any server path information in the site path field, not the server name field\");\n"+
-"    SelectTab(\"" + Messages.getString("SharePointRepository.Server") + "\");\n"+
+"    SelectTab(\"" + Messages.getBodyJavascriptString(locale,"SharePointRepository.Server") + "\");\n"+
 "    editconnection.serverName.focus();\n"+
 "    return false;\n"+
 "  }\n"+
@@ -1442,28 +1444,28 @@ public class SharePointRepository extend
 "  if (svrloc != \"\" && svrloc.charAt(0) != \"/\")\n"+
 "  {\n"+
 "    alert(\"Site path must begin with a '/' character\");\n"+
-"    SelectTab(\"" + Messages.getString("SharePointRepository.Server") + "\");\n"+
+"    SelectTab(\"" + Messages.getBodyJavascriptString(locale,"SharePointRepository.Server") + "\");\n"+
 "    editconnection.serverLocation.focus();\n"+
 "    return false;\n"+
 "  }\n"+
 "  if (svrloc != \"\" && svrloc.charAt(svrloc.length - 1) == \"/\")\n"+
 "  {\n"+
 "    alert(\"Site path cannot end with a '/' character\");\n"+
-"    SelectTab(\"" + Messages.getString("SharePointRepository.Server") + "\");\n"+
+"    SelectTab(\"" + Messages.getBodyJavascriptString(locale,"SharePointRepository.Server") + "\");\n"+
 "    editconnection.serverLocation.focus();\n"+
 "    return false;\n"+
 "  }\n"+
 "  if (editconnection.serverPort.value != \"\" && !isInteger(editconnection.serverPort.value))\n"+
 "  {\n"+
 "    alert(\"Please supply a SharePoint port number, or none for default\");\n"+
-"    SelectTab(\"" + Messages.getString("SharePointRepository.Server") + "\");\n"+
+"    SelectTab(\"" + Messages.getBodyJavascriptString(locale,"SharePointRepository.Server") + "\");\n"+
 "    editconnection.serverPort.focus();\n"+
 "    return false;\n"+
 "  }\n"+
 "  if (editconnection.userName.value == \"\" || editconnection.userName.value.indexOf(\"\\\\\") <= 0)\n"+
 "  {\n"+
 "    alert(\"The connection requires a valid SharePoint user name of the form <domain>\\\\<user>\");\n"+
-"    SelectTab(\"" + Messages.getString("SharePointRepository.Server") + "\");\n"+
+"    SelectTab(\"" + Messages.getBodyJavascriptString(locale,"SharePointRepository.Server") + "\");\n"+
 "    editconnection.userName.focus();\n"+
 "    return false;\n"+
 "  }\n"+
@@ -1485,7 +1487,8 @@ public class SharePointRepository extend
   *@param tabName is the current tab name.
   */
   @Override
-  public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, String tabName)
+  public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out,
+    Locale locale, ConfigParams parameters, String tabName)
     throws ManifoldCFException, IOException
   {
     String serverVersion = parameters.getParameter("serverVersion");
@@ -1532,12 +1535,12 @@ public class SharePointRepository extend
       );
     }
 
-    if (tabName.equals(Messages.getString("SharePointRepository.Server")))
+    if (tabName.equals(Messages.getString(locale,"SharePointRepository.Server")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.ServerSharePointVersion") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.ServerSharePointVersion") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <select name=\"serverVersion\">\n"+
 "        <option value=\"2.0\" "+((serverVersion.equals("2.0"))?"selected=\"true\"":"")+">SharePoint Services 2.0</option>\n"+
@@ -1546,7 +1549,7 @@ public class SharePointRepository extend
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.ServerProtocol") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.ServerProtocol") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <select name=\"serverProtocol\">\n"+
 "        <option value=\"http\" "+((serverProtocol.equals("http"))?"selected=\"true\"":"")+">http</option>\n"+
@@ -1555,27 +1558,27 @@ public class SharePointRepository extend
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.ServerName") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.ServerName") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"text\" size=\"64\" name=\"serverName\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverName)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.ServerPort") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.ServerPort") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"text\" size=\"5\" name=\"serverPort\" value=\""+serverPort+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.SitePath") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.SitePath") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"text\" size=\"64\" name=\"serverLocation\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverLocation)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.UserName") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.UserName") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"text\" size=\"32\" name=\"userName\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(userName)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.Password") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Password") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"password\" size=\"32\" name=\"password\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(password)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.SSLCertificateList") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.SSLCertificateList") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input type=\"hidden\" name=\"configop\" value=\"Continue\"/>\n"+
 "      <input type=\"hidden\" name=\"shpkeystorealias\" value=\"\"/>\n"+
@@ -1586,7 +1589,7 @@ public class SharePointRepository extend
       if (contents.length == 0)
       {
         out.print(
-"        <tr><td class=\"message\" colspan=\"2\">" + Messages.getString("SharePointRepository.NoCertificatesPresent") + "</td></tr>\n"
+"        <tr><td class=\"message\" colspan=\"2\">" + Messages.getBodyString(locale,"SharePointRepository.NoCertificatesPresent") + "</td></tr>\n"
         );
       }
       else
@@ -1601,7 +1604,7 @@ public class SharePointRepository extend
           out.print(
 "        <tr>\n"+
 "          <td class=\"value\">\n"+
-"            <input type=\"button\" onclick='Javascript:ShpDeleteCertificate(\""+org.apache.manifoldcf.ui.util.Encoder.attributeJavascriptEscape(alias)+"\")' alt=\""+Messages.getString("SharePointRepository.DeleteCert")+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(alias)+"\" value=\"" + Messages.getString("SharePointRepository.Delete") + "\"/>\n"+
+"            <input type=\"button\" onclick='Javascript:ShpDeleteCertificate(\""+org.apache.manifoldcf.ui.util.Encoder.attributeJavascriptEscape(alias)+"\")' alt=\""+Messages.getAttributeString(locale,"SharePointRepository.DeleteCert")+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(alias)+"\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.Delete") + "\"/>\n"+
 "          </td>\n"+
 "          <td>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)+"</td>\n"+
 "        </tr>\n"
@@ -1612,7 +1615,7 @@ public class SharePointRepository extend
       }
       out.print(
 "      </table>\n"+
-"      <input type=\"button\" onclick='Javascript:ShpAddCertificate()' alt=\"" + Messages.getString("SharePointRepository.AddCert") + "\" value=\"" + Messages.getString("SharePointRepository.Add") + "\"/>&nbsp;\n"+
+"      <input type=\"button\" onclick='Javascript:ShpAddCertificate()' alt=\"" + Messages.getAttributeString(locale,"SharePointRepository.AddCert") + "\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.Add") + "\"/>&nbsp;\n"+
 "      Certificate:&nbsp;<input name=\"shpcertificate\" size=\"50\" type=\"file\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
@@ -1643,7 +1646,8 @@ public class SharePointRepository extend
   *@return null if all is well, or a string error message if there is an error that should prevent saving of the connection (and cause a redirection to an error page).
   */
   @Override
-  public String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext, ConfigParams parameters)
+  public String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext,
+    Locale locale, ConfigParams parameters)
     throws ManifoldCFException
   {
     String serverVersion = variableContext.getParameter("serverVersion");
@@ -1745,13 +1749,14 @@ public class SharePointRepository extend
   *@param parameters are the configuration parameters, as they currently exist, for this connection being configured.
   */
   @Override
-  public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters)
+  public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out,
+    Locale locale, ConfigParams parameters)
     throws ManifoldCFException, IOException
   {
     out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr>\n"+
-"    <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getString("SharePointRepository.Parameters") + "</nobr></td>\n"+
+"    <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Parameters") + "</nobr></td>\n"+
 "    <td class=\"value\" colspan=\"3\">\n"
     );
     Iterator iter = parameters.listParameters();
@@ -1794,12 +1799,12 @@ public class SharePointRepository extend
   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific to the connector.
   */
   @Override
-  public void outputSpecificationHeader(IHTTPOutput out, DocumentSpecification ds, List<String> tabsArray)
+  public void outputSpecificationHeader(IHTTPOutput out, Locale locale, DocumentSpecification ds, List<String> tabsArray)
     throws ManifoldCFException, IOException
   {
-    tabsArray.add(Messages.getString("SharePointRepository.Paths"));
-    tabsArray.add(Messages.getString("SharePointRepository.Security"));
-    tabsArray.add(Messages.getString("SharePointRepository.Metadata"));
+    tabsArray.add(Messages.getString(locale,"SharePointRepository.Paths"));
+    tabsArray.add(Messages.getString(locale,"SharePointRepository.Security"));
+    tabsArray.add(Messages.getString(locale,"SharePointRepository.Metadata"));
     out.print(
 "<script type=\"text/javascript\">\n"+
 "<!--\n"+
@@ -1971,7 +1976,7 @@ public class SharePointRepository extend
   *@param tabName is the current tab name.
   */
   @Override
-  public void outputSpecificationBody(IHTTPOutput out, DocumentSpecification ds, String tabName)
+  public void outputSpecificationBody(IHTTPOutput out, Locale locale, DocumentSpecification ds, String tabName)
     throws ManifoldCFException, IOException
   {
     int i;
@@ -1981,20 +1986,20 @@ public class SharePointRepository extend
     // Paths tab
 
 
-    if (tabName.equals(Messages.getString("SharePointRepository.Paths")))
+    if (tabName.equals(Messages.getString(locale,"SharePointRepository.Paths")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.PathRules") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.PathRules") + "</nobr></td>\n"+
 "    <td class=\"boxcell\">\n"+
 "      <table class=\"formtable\">\n"+
 "        <tr class=\"formheaderrow\">\n"+
 "          <td class=\"formcolumnheader\"></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.PathMatch") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.Type") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.Action") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.PathMatch") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Type") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Action") + "</nobr></td>\n"+
 "        </tr>\n"
       );
       i = 0;
@@ -2030,7 +2035,7 @@ public class SharePointRepository extend
 "            <nobr>\n"+
 "              <a name=\""+"path_"+Integer.toString(k)+"\"/>\n"+
 "              <input type=\"hidden\" name=\""+pathOpName+"\" value=\"\"/>\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.InsertNewRule") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Insert Here\",\"path_"+Integer.toString(k)+"\")' alt=\""+"Insert new rule before rule #"+Integer.toString(k)+"\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.InsertNewRule") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Insert Here\",\"path_"+Integer.toString(k)+"\")' alt=\""+"Insert new rule before rule #"+Integer.toString(k)+"\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"+
 "          <td class=\"formcolumncell\" colspan=\"3\"></td>\n"+
@@ -2041,7 +2046,7 @@ public class SharePointRepository extend
 "        <tr class=\""+(((l % 2)==0)?"evenformrow":"oddformrow")+"\">\n"+
 "          <td class=\"formcolumncell\">\n"+
 "            <nobr>\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.Delete") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Delete\",\"path_"+Integer.toString(k)+"\")' alt=\""+Messages.getString("SharePointRepository.DeleteRule")+Integer.toString(k)+"\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.Delete") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Delete\",\"path_"+Integer.toString(k)+"\")' alt=\""+Messages.getAttributeString(locale,"SharePointRepository.DeleteRule")+Integer.toString(k)+"\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"+
 "          <td class=\"formcolumncell\">\n"+
@@ -2079,7 +2084,7 @@ public class SharePointRepository extend
 "            <nobr>\n"+
 "              <a name=\""+"path_"+Integer.toString(k)+"\"/>\n"+
 "              <input type=\"hidden\" name=\""+pathOpName+"\" value=\"\"/>\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.InsertNewRule") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Insert Here\",\"path_"+Integer.toString(k)+"\")' alt=\""+"Insert new rule before rule #"+Integer.toString(k)+"\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.InsertNewRule") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Insert Here\",\"path_"+Integer.toString(k)+"\")' alt=\""+"Insert new rule before rule #"+Integer.toString(k)+"\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"+
 "          <td class=\"formcolumncell\" colspan=\"3\"></td>\n"+
@@ -2090,7 +2095,7 @@ public class SharePointRepository extend
 "        <tr class=\""+(((l % 2)==0)?"evenformrow":"oddformrow")+"\">\n"+
 "          <td class=\"formcolumncell\">\n"+
 "            <nobr>\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.Delete") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Delete\",\"path_"+Integer.toString(k)+"\")' alt=\""+"Delete rule #"+Integer.toString(k)+"\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.Delete") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Delete\",\"path_"+Integer.toString(k)+"\")' alt=\""+"Delete rule #"+Integer.toString(k)+"\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"+
 "          <td class=\"formcolumncell\">\n"+
@@ -2135,7 +2140,7 @@ public class SharePointRepository extend
 "            <nobr>\n"+
 "              <a name=\""+"path_"+Integer.toString(k)+"\"/>\n"+
 "              <input type=\"hidden\" name=\""+pathOpName+"\" value=\"\"/>\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.InsertNewRule") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Insert Here\",\"path_"+Integer.toString(k)+"\")' alt=\""+"Insert new rule before rule #"+Integer.toString(k)+"\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.InsertNewRule") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Insert Here\",\"path_"+Integer.toString(k)+"\")' alt=\""+"Insert new rule before rule #"+Integer.toString(k)+"\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"+
 "          <td class=\"formcolumncell\" colspan=\"3\"></td>\n"+
@@ -2146,7 +2151,7 @@ public class SharePointRepository extend
 "        <tr class=\""+(((l % 2)==0)?"evenformrow":"oddformrow")+"\">\n"+
 "          <td class=\"formcolumncell\">\n"+
 "            <nobr>\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.Delete") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Delete\",\"path_"+Integer.toString(k)+"\")' alt=\""+"Delete rule #"+Integer.toString(k)+"\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.Delete") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Delete\",\"path_"+Integer.toString(k)+"\")' alt=\""+"Delete rule #"+Integer.toString(k)+"\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"+
 "          <td class=\"formcolumncell\">\n"+
@@ -2176,7 +2181,7 @@ public class SharePointRepository extend
       if (k == 0)
       {
         out.print(
-"        <tr class=\"formrow\"><td colspan=\"4\" class=\"formmessage\">" + Messages.getString("SharePointRepository.NoDocumentsCurrentlyIncluded") + "</td></tr>\n"
+"        <tr class=\"formrow\"><td colspan=\"4\" class=\"formmessage\">" + Messages.getBodyString(locale,"SharePointRepository.NoDocumentsCurrentlyIncluded") + "</td></tr>\n"
         );
       }
       out.print(
@@ -2186,7 +2191,7 @@ public class SharePointRepository extend
 "              <a name=\""+"path_"+Integer.toString(k)+"\"/>\n"+
 "              <input type=\"hidden\" name=\"specop\" value=\"\"/>\n"+
 "              <input type=\"hidden\" name=\"specpathcount\" value=\""+Integer.toString(k)+"\"/>\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.AddNewRule") + "\" onClick='Javascript:SpecRuleAddPath(\"path_"+Integer.toString(k)+"\")' alt=\"Add rule\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.AddNewRule") + "\" onClick='Javascript:SpecRuleAddPath(\"path_"+Integer.toString(k)+"\")' alt=\"Add rule\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"+
 "          <td class=\"formcolumncell\" colspan=\"3\"></td>\n"+
@@ -2280,9 +2285,9 @@ public class SharePointRepository extend
         {
           out.print(
 "              <select name=\"spectype\" size=\"3\">\n"+
-"                <option value=\"file\" selected=\"true\">" + Messages.getString("SharePointRepository.File") + "</option>\n"+
-"                <option value=\"library\">" + Messages.getString("SharePointRepository.Library") + "</option>\n"+
-"                <option value=\"site\">" + Messages.getString("SharePointRepository.Site") + "</option>\n"+
+"                <option value=\"file\" selected=\"true\">" + Messages.getBodyString(locale,"SharePointRepository.File") + "</option>\n"+
+"                <option value=\"library\">" + Messages.getBodyString(locale,"SharePointRepository.Library") + "</option>\n"+
+"                <option value=\"site\">" + Messages.getBodyString(locale,"SharePointRepository.Site") + "</option>\n"+
 "              </select>\n"
           );
         }
@@ -2307,8 +2312,8 @@ public class SharePointRepository extend
 "          <td class=\"formcolumncell\">\n"+
 "            <nobr>\n"+
 "              <select name=\"specflavor\" size=\"2\">\n"+
-"                <option value=\"include\" selected=\"true\">" + Messages.getString("SharePointRepository.Include") + "</option>\n"+
-"                <option value=\"exclude\">" + Messages.getString("SharePointRepository.Exclude") + "</option>\n"+
+"                <option value=\"include\" selected=\"true\">" + Messages.getBodyString(locale,"SharePointRepository.Include") + "</option>\n"+
+"                <option value=\"exclude\">" + Messages.getBodyString(locale,"SharePointRepository.Exclude") + "</option>\n"+
 
 "              </select>\n"+
 "            </nobr>\n"+
@@ -2350,9 +2355,9 @@ public class SharePointRepository extend
         if (pathState.equals("site") && childSiteList != null && childSiteList.size() > 0)
         {
           out.print(
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.AddSite") + "\" onClick='Javascript:SpecPathAppendSite(\"pathwidget\")' alt=\"Add Site to Rule Path\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.AddSite") + "\" onClick='Javascript:SpecPathAppendSite(\"pathwidget\")' alt=\"Add Site to Rule Path\"/>\n"+
 "              <select name=\"specsite\" size=\"5\">\n"+
-"                <option value=\"\" selected=\"true\">-- " + Messages.getString("SharePointRepository.SelectSite") + " --</option>\n"
+"                <option value=\"\" selected=\"true\">-- " + Messages.getBodyString(locale,"SharePointRepository.SelectSite") + " --</option>\n"
           );
           int q = 0;
           while (q < childSiteList.size())
@@ -2370,9 +2375,9 @@ public class SharePointRepository extend
         if (pathState.equals("site") && childLibList != null && childLibList.size() > 0)
         {
           out.print(
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.AddLibrary") + "\" onClick='Javascript:SpecPathAppendLibrary(\"pathwidget\")' alt=\"Add Library to Rule Path\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.AddLibrary") + "\" onClick='Javascript:SpecPathAppendLibrary(\"pathwidget\")' alt=\"Add Library to Rule Path\"/>\n"+
 "              <select name=\"speclibrary\" size=\"5\">\n"+
-"                <option value=\"\" selected=\"true\">-- " + Messages.getString("SharePointRepository.SelectLibrary") + " --</option>\n"
+"                <option value=\"\" selected=\"true\">-- " + Messages.getBodyString(locale,"SharePointRepository.SelectLibrary") + " --</option>\n"
           );
           int q = 0;
           while (q < childLibList.size())
@@ -2387,7 +2392,7 @@ public class SharePointRepository extend
           );
         }
         out.print(
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.AddText") + "\" onClick='Javascript:SpecPathAppendText(\"pathwidget\")' alt=\"Add Text to Rule Path\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.AddText") + "\" onClick='Javascript:SpecPathAppendText(\"pathwidget\")' alt=\"Add Text to Rule Path\"/>\n"+
 "              <input type=\"text\" name=\"specmatch\" size=\"32\" value=\"\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"
@@ -2491,13 +2496,13 @@ public class SharePointRepository extend
       }
     }
 
-    if (tabName.equals(Messages.getString("SharePointRepository.Security")))
+    if (tabName.equals(Messages.getString(locale,"SharePointRepository.Security")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.Security2") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Security2") + "</nobr></td>\n"+
 "    <td class=\"value\" colspan=\"1\">\n"+
 "      <nobr>\n"+
 "        <input type=\"radio\" name=\"specsecurity\" value=\"on\" "+(securityOn?"checked=\"true\"":"")+" />Enabled&nbsp;\n"+
@@ -2525,7 +2530,7 @@ public class SharePointRepository extend
 "      <input type=\"hidden\" name=\""+accessOpName+"\" value=\"\"/>\n"+
 "      <input type=\"hidden\" name=\""+"spectoken"+accessDescription+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(token)+"\"/>\n"+
 "      <a name=\""+"token_"+Integer.toString(k)+"\">\n"+
-"        <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.Delete") + "\" onClick='Javascript:SpecOp(\""+accessOpName+"\",\"Delete\",\"token_"+Integer.toString(k)+"\")' alt=\""+"Delete token #"+Integer.toString(k)+"\"/>\n"+
+"        <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.Delete") + "\" onClick='Javascript:SpecOp(\""+accessOpName+"\",\"Delete\",\"token_"+Integer.toString(k)+"\")' alt=\""+"Delete token #"+Integer.toString(k)+"\"/>\n"+
 "      </a>\n"+
 "    </td>\n"+
 "    <td class=\"value\">\n"+
@@ -2540,7 +2545,7 @@ public class SharePointRepository extend
       {
         out.print(
 "  <tr>\n"+
-"    <td class=\"message\" colspan=\"2\">" + Messages.getString("SharePointRepository.NoAccessTokensPresent") + "</td>\n"+
+"    <td class=\"message\" colspan=\"2\">" + Messages.getBodyString(locale,"SharePointRepository.NoAccessTokensPresent") + "</td>\n"+
 "  </tr>\n"
         );
       }
@@ -2551,7 +2556,7 @@ public class SharePointRepository extend
 "      <input type=\"hidden\" name=\"tokencount\" value=\""+Integer.toString(k)+"\"/>\n"+
 "      <input type=\"hidden\" name=\"accessop\" value=\"\"/>\n"+
 "      <a name=\""+"token_"+Integer.toString(k)+"\">\n"+
-"        <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.Add") + "\" onClick='Javascript:SpecAddAccessToken(\"token_"+Integer.toString(k+1)+"\")' alt=\"Add access token\"/>\n"+
+"        <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.Add") + "\" onClick='Javascript:SpecAddAccessToken(\"token_"+Integer.toString(k+1)+"\")' alt=\"Add access token\"/>\n"+
 "      </a>\n"+
 "    </td>\n"+
 "    <td class=\"value\">\n"+
@@ -2615,7 +2620,7 @@ public class SharePointRepository extend
       }
     }
 
-    if (tabName.equals(Messages.getString("SharePointRepository.Metadata")))
+    if (tabName.equals(Messages.getString(locale,"SharePointRepository.Metadata")))
     {
       out.print(
 "<input type=\"hidden\" name=\"specmappingcount\" value=\""+Integer.toString(matchMap.getMatchCount())+"\"/>\n"+
@@ -2624,15 +2629,15 @@ public class SharePointRepository extend
 "<table class=\"displaytable\">\n"+
 "<tr><td class=\"separator\" colspan=\"4\"><hr/></td></tr>\n"+
 "<tr>\n"+
-"  <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getString("SharePointRepository.MetadataRules") + "</nobr></td>\n"+
+"  <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.MetadataRules") + "</nobr></td>\n"+
 "    <td class=\"boxcell\" colspan=\"3\">\n"+
 "      <table class=\"formtable\">\n"+
 "        <tr class=\"formheaderrow\">\n"+
 "          <td class=\"formcolumnheader\"></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.PathMatch") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.Action") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.AllMetadata") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.Fields") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.PathMatch") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Action") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.AllMetadata") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Fields") + "</nobr></td>\n"+
 "        </tr>\n"
       );
       i = 0;
@@ -2677,7 +2682,7 @@ public class SharePointRepository extend
 "            <nobr>\n"+
 "              <a name=\""+"meta_"+Integer.toString(k)+"\"/>\n"+
 "              <input type=\"hidden\" name=\""+pathOpName+"\" value=\"\"/>\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.InsertNewRule") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Insert Here\",\"meta_"+Integer.toString(k)+"\")' alt=\""+"Insert new metadata rule before rule #"+Integer.toString(k)+"\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.InsertNewRule") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Insert Here\",\"meta_"+Integer.toString(k)+"\")' alt=\""+"Insert new metadata rule before rule #"+Integer.toString(k)+"\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"+
 "          <td class=\"formcolumncell\" colspan=\"4\"></td>\n"+
@@ -2688,7 +2693,7 @@ public class SharePointRepository extend
 "        <tr class=\""+(((l % 2)==0)?"evenformrow":"oddformrow")+"\">\n"+
 "          <td class=\"formcolumncell\">\n"+
 "            <nobr>\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.Delete") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Delete\",\"meta_"+Integer.toString(k)+"\")' alt=\""+"Delete metadata rule #"+Integer.toString(k)+"\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.Delete") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Delete\",\"meta_"+Integer.toString(k)+"\")' alt=\""+"Delete metadata rule #"+Integer.toString(k)+"\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"+
 "          <td class=\"formcolumncell\">\n"+
@@ -2766,7 +2771,7 @@ public class SharePointRepository extend
 "            <nobr>\n"+
 "              <a name=\""+"meta_"+Integer.toString(k)+"\"/>\n"+
 "              <input type=\"hidden\" name=\""+pathOpName+"\" value=\"\"/>\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.InsertNewRule") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Insert Here\",\"meta_"+Integer.toString(k)+"\")' alt=\""+"Insert new metadata rule before rule #"+Integer.toString(k)+"\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.InsertNewRule") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Insert Here\",\"meta_"+Integer.toString(k)+"\")' alt=\""+"Insert new metadata rule before rule #"+Integer.toString(k)+"\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"+
 "          <td class=\"formcolumncell\" colspan=\"4\"></td>\n"+
@@ -2777,7 +2782,7 @@ public class SharePointRepository extend
 "        <tr class=\""+(((l % 2)==0)?"evenformrow":"oddformrow")+"\">\n"+
 "          <td class=\"formcolumncell\">\n"+
 "            <nobr>\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.Delete") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Delete\",\"meta_"+Integer.toString(k)+"\")' alt=\""+"Delete metadata rule #"+Integer.toString(k)+"\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.Delete") + "\" onClick='Javascript:SpecOp(\""+pathOpName+"\",\"Delete\",\"meta_"+Integer.toString(k)+"\")' alt=\""+"Delete metadata rule #"+Integer.toString(k)+"\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"+
 "          <td class=\"formcolumncell\">\n"+
@@ -2832,7 +2837,7 @@ public class SharePointRepository extend
 "              <a name=\""+"meta_"+Integer.toString(k)+"\"/>\n"+
 "              <input type=\"hidden\" name=\"metaop\" value=\"\"/>\n"+
 "              <input type=\"hidden\" name=\"metapathcount\" value=\""+Integer.toString(k)+"\"/>\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.AddNewRule") + "\" onClick='Javascript:MetaRuleAddPath(\"meta_"+Integer.toString(k)+"\")' alt=\"Add rule\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.AddNewRule") + "\" onClick='Javascript:MetaRuleAddPath(\"meta_"+Integer.toString(k)+"\")' alt=\"Add rule\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"+
 "          <td class=\"formcolumncell\" colspan=\"4\"></td>\n"+
@@ -2948,8 +2953,8 @@ public class SharePointRepository extend
 "          <td class=\"formcolumncell\">\n"+
 "            <nobr>\n"+
 "              <select name=\"metaflavor\" size=\"2\">\n"+
-"                <option value=\"include\" selected=\"true\">" + Messages.getString("SharePointRepository.Include") + "</option>\n"+
-"                <option value=\"exclude\">" + Messages.getString("SharePointRepository.Exclude") + "</option>\n"+
+"                <option value=\"include\" selected=\"true\">" + Messages.getBodyString(locale,"SharePointRepository.Include") + "</option>\n"+
+"                <option value=\"exclude\">" + Messages.getBodyString(locale,"SharePointRepository.Exclude") + "</option>\n"+
 "              </select>\n"+
 "            </nobr>\n"+
 "          </td>\n"+
@@ -3000,7 +3005,7 @@ public class SharePointRepository extend
 "          <td class=\"formcolumncell\">\n"+
 "            <nobr>\n"+
 "              <a name=\"metapathwidget\"/>\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.ResetPath") + "\" onClick='Javascript:MetaPathReset(\"metapathwidget\")' alt=\"Reset Metadata Rule Path\"/>\n"
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.ResetPath") + "\" onClick='Javascript:MetaPathReset(\"metapathwidget\")' alt=\"Reset Metadata Rule Path\"/>\n"
         );
         if (metaPathSoFar.length() > 1 && (metaPathState.equals("site") || metaPathState.equals("library")))
         {
@@ -3017,7 +3022,7 @@ public class SharePointRepository extend
         if (metaPathState.equals("site") && childSiteList != null && childSiteList.size() > 0)
         {
           out.print(
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.AddSite") + "\" onClick='Javascript:MetaPathAppendSite(\"metapathwidget\")' alt=\"Add Site to Metadata Rule Path\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.AddSite") + "\" onClick='Javascript:MetaPathAppendSite(\"metapathwidget\")' alt=\"Add Site to Metadata Rule Path\"/>\n"+
 "              <select name=\"metasite\" size=\"5\">\n"+
 "                <option value=\"\" selected=\"true\">-- Select site --</option>\n"
           );
@@ -3037,7 +3042,7 @@ public class SharePointRepository extend
         if (metaPathState.equals("site") && childLibList != null && childLibList.size() > 0)
         {
           out.print(
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.AddLibrary") + "\" onClick='Javascript:MetaPathAppendLibrary(\"metapathwidget\")' alt=\"Add Library to Metadata Rule Path\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.AddLibrary") + "\" onClick='Javascript:MetaPathAppendLibrary(\"metapathwidget\")' alt=\"Add Library to Metadata Rule Path\"/>\n"+
 "              <select name=\"metalibrary\" size=\"5\">\n"+
 "                <option value=\"\" selected=\"true\">-- Select library --</option>\n"
           );
@@ -3054,7 +3059,7 @@ public class SharePointRepository extend
           );
         }
         out.print(
-"              <input type=\"button\" value=\"" + Messages.getString("SharePointRepository.AddText") + "\" onClick='Javascript:MetaPathAppendText(\"metapathwidget\")' alt=\"Add Text to Metadata Rule Path\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getAttributeString(locale,"SharePointRepository.AddText") + "\" onClick='Javascript:MetaPathAppendText(\"metapathwidget\")' alt=\"Add Text to Metadata Rule Path\"/>\n"+
 "              <input type=\"text\" name=\"metamatch\" size=\"32\" value=\"\"/>\n"+
 "            </nobr>\n"+
 "          </td>\n"
@@ -3067,11 +3072,11 @@ public class SharePointRepository extend
 "  </tr>\n"+
 "  <tr><td class=\"separator\" colspan=\"4\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getString("SharePointRepository.PathMetadata") + "</nobr></td>\n"+
+"    <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.PathMetadata") + "</nobr></td>\n"+
 "    <td class=\"boxcell\" colspan=\"3\">\n"+
 "      <table class=\"displaytable\">\n"+
 "        <tr>\n"+
-"          <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.AttributeName") + "</nobr></td>\n"+
+"          <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.AttributeName") + "</nobr></td>\n"+
 "          <td class=\"value\" colspan=\"3\">\n"+
 "            <nobr>\n"+
 "              <input type=\"text\" name=\"specpathnameattribute\" size=\"20\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathNameAttribute)+"\"/>\n"+
@@ -3113,7 +3118,7 @@ public class SharePointRepository extend
       if (i == 0)
       {
         out.print(
-"        <tr><td colspan=\"4\" class=\"message\">" + Messages.getString("SharePointRepository.NoMappingsSpecified") + "</td></tr>\n"
+"        <tr><td colspan=\"4\" class=\"message\">" + Messages.getBodyString(locale,"SharePointRepository.NoMappingsSpecified") + "</td></tr>\n"
         );
       }
       out.print(
@@ -3125,9 +3130,9 @@ public class SharePointRepository extend
 "              <input type=\"button\" onClick='Javascript:SpecAddMapping(\"mapping_"+Integer.toString(i+1)+"\")' alt=\"Add to mappings\" value=\"Add Path Mapping\"/>\n"+
 "            </a>\n"+
 "          </td>\n"+
-"          <td class=\"value\"><nobr>"+Messages.getString("SharePointRepository.MatchRegexp") + "&nbsp;<input type=\"text\" name=\"specmatch\" size=\"32\" value=\"\"/></nobr></td>\n"+
+"          <td class=\"value\"><nobr>"+Messages.getBodyString(locale,"SharePointRepository.MatchRegexp") + "&nbsp;<input type=\"text\" name=\"specmatch\" size=\"32\" value=\"\"/></nobr></td>\n"+
 "          <td class=\"value\">==></td>\n"+
-"          <td class=\"value\"><nobr>" + Messages.getString("SharePointRepository.ReplaceString") + "&nbsp;<input type=\"text\" name=\"specreplace\" size=\"32\" value=\"\"/></nobr></td>\n"+
+"          <td class=\"value\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.ReplaceString") + "&nbsp;<input type=\"text\" name=\"specreplace\" size=\"32\" value=\"\"/></nobr></td>\n"+
 "        </tr>\n"+
 "      </table>\n"+
 "    </td>\n"+
@@ -3248,7 +3253,7 @@ public class SharePointRepository extend
   *@return null if all is well, or a string error message if there is an error that should prevent saving of the job (and cause a redirection to an error page).
   */
   @Override
-  public String processSpecificationPost(IPostParameters variableContext, DocumentSpecification ds)
+  public String processSpecificationPost(IPostParameters variableContext, Locale locale, DocumentSpecification ds)
     throws ManifoldCFException
   {
     // Remove old-style rules, but only if the information would not be lost
@@ -3766,7 +3771,7 @@ public class SharePointRepository extend
   *@param ds is the current document specification for this job.
   */
   @Override
-  public void viewSpecification(IHTTPOutput out, DocumentSpecification ds)
+  public void viewSpecification(IHTTPOutput out, Locale locale, DocumentSpecification ds)
     throws ManifoldCFException, IOException
   {
     // Display path rules
@@ -3801,13 +3806,13 @@ public class SharePointRepository extend
             {
               seenAny = true;
               out.print(
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.PathRules") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.PathRules") + "</nobr></td>\n"+
 "    <td class=\"boxcell\">\n"+
 "      <table class=\"formtable\">\n"+
 "        <tr class=\"formheaderrow\">\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.PathMatch") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.RuleType") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.Action") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.PathMatch") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.RuleType") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Action") + "</nobr></td>\n"+
 "        </tr>\n"
               );
             }
@@ -3820,7 +3825,7 @@ public class SharePointRepository extend
             out.print(
 "        <tr class=\""+(((l % 2)==0)?"evenformrow":"oddformrow")+"\">\n"+
 "          <td class=\"formcolumncell\"><nobr>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(completePath)+"</nobr></td>\n"+
-"          <td class=\"formcolumncell\"><nobr>" + Messages.getString("SharePointRepository.file") + "</nobr></td>\n"+
+"          <td class=\"formcolumncell\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.file") + "</nobr></td>\n"+
 "          <td class=\"formcolumncell\"><nobr>"+action+"</nobr></td>\n"+
 "        </tr>\n"
             );
@@ -3831,7 +3836,7 @@ public class SharePointRepository extend
               out.print(
 "        <tr class=\""+(((l % 2)==0)?"evenformrow":"oddformrow")+"\">\n"+
 "          <td class=\"formcolumncell\"><nobr>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(completePath)+"</nobr></td>\n"+
-"          <td class=\"formcolumncell\"><nobr>" + Messages.getString("SharePointRepository.file") + "</nobr></td>\n"+
+"          <td class=\"formcolumncell\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.file") + "</nobr></td>\n"+
 "          <td class=\"formcolumncell\"><nobr>"+action+"</nobr></td>\n"+
 "        </tr>\n"
               );
@@ -3849,13 +3854,13 @@ public class SharePointRepository extend
         {
           seenAny = true;
           out.print(
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.PathRules") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.PathRules") + "</nobr></td>\n"+
 "    <td class=\"boxcell\">\n"+
 "      <table class=\"formtable\">\n"+
 "        <tr class=\"formheaderrow\">\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.PathMatch") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.RuleType") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.Action") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.PathMatch") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.RuleType") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Action") + "</nobr></td>\n"+
 "        </tr>\n"
           );
         }
@@ -3879,7 +3884,7 @@ public class SharePointRepository extend
     else
     {
       out.print(
-"    <td colspan=\"2\" class=\"message\"><nobr>" + Messages.getString("SharePointRepository.NoDocumentsWillBeIncluded") + "</nobr></td>\n"
+"    <td colspan=\"2\" class=\"message\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.NoDocumentsWillBeIncluded") + "</nobr></td>\n"
       );
     }
     out.print(
@@ -3928,21 +3933,21 @@ public class SharePointRepository extend
           {
             seenAny = true;
             out.print(
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.Metadata2") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Metadata2") + "</nobr></td>\n"+
 "    <td class=\"boxcell\">\n"+
 "      <table class=\"formtable\">\n"+
 "        <tr class=\"formheaderrow\">\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.PathMatch") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.Action") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.AllMetadata") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.Fields") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.PathMatch") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Action") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.AllMetadata") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Fields") + "</nobr></td>\n"+
 "        </tr>\n"
             );
           }
           out.print(
 "        <tr class=\""+(((l % 2)==0)?"evenformrow":"oddformrow")+"\">\n"+
 "          <td class=\"formcolumncell\"><nobr>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(path)+"</nobr></td>\n"+
-"          <td class=\"formcolumncell\"><nobr>" + Messages.getString("SharePointRepository.include2") + "</nobr></td>\n"+
+"          <td class=\"formcolumncell\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.include2") + "</nobr></td>\n"+
 "          <td class=\"formcolumncell\"><nobr>"+allmetadata+"</nobr></td>\n"+
 "          <td class=\"formcolumncell\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(metadataFieldList.toString())+"</td>\n"+
 "        </tr>\n"
@@ -3981,14 +3986,14 @@ public class SharePointRepository extend
         {
           seenAny = true;
           out.print(
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.Metadata2") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Metadata2") + "</nobr></td>\n"+
 "    <td class=\"boxcell\">\n"+
 "      <table class=\"formtable\">\n"+
 "        <tr class=\"formheaderrow\">\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.PathMatch") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.Action") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.AllMetadata") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SharePointRepository.Fields") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.PathMatch") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Action") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.AllMetadata") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Fields") + "</nobr></td>\n"+
 "        </tr>\n"
           );
         }
@@ -4013,7 +4018,7 @@ public class SharePointRepository extend
     else
     {
       out.print(
-"    <td colspan=\"2\" class=\"message\"><nobr>" + Messages.getString("SharePointRepository.NoMetadataWillBeIncluded") + "</nobr></td>\n"
+"    <td colspan=\"2\" class=\"message\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.NoMetadataWillBeIncluded") + "</nobr></td>\n"
       );
     }
     out.print(
@@ -4037,7 +4042,7 @@ public class SharePointRepository extend
     }
     out.print(
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.Security2") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.Security2") + "</nobr></td>\n"+
 "    <td class=\"value\"><nobr>"+(securityOn?"Enabled":"Disabled")+"</nobr></td>\n"+
 "  </tr>\n"+
 "\n"+
@@ -4054,7 +4059,7 @@ public class SharePointRepository extend
         if (seenAny == false)
         {
           out.print(
-"  <tr><td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.AccessToken") + "</nobr></td>\n"+
+"  <tr><td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.AccessToken") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"
           );
           seenAny = true;
@@ -4076,7 +4081,7 @@ public class SharePointRepository extend
     else
     {
       out.print(
-"  <tr><td class=\"message\" colspan=\"2\">" + Messages.getString("SharePointRepository.NoAccessTokensSpecified") + "</td></tr>\n"
+"  <tr><td class=\"message\" colspan=\"2\">" + Messages.getBodyString(locale,"SharePointRepository.NoAccessTokensSpecified") + "</td></tr>\n"
       );
     }
     out.print(
@@ -4099,14 +4104,14 @@ public class SharePointRepository extend
     if (pathNameAttribute.length() > 0)
     {
       out.print(
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.PathMetadataAttributeName") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.PathMetadataAttributeName") + "</nobr></td>\n"+
 "    <td class=\"value\"><nobr>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(pathNameAttribute)+"</nobr></td>\n"
       );
     }
     else
     {
       out.print(
-"    <td class=\"message\" colspan=\"2\">" + Messages.getString("SharePointRepository.NoPathNameMetadataAttributeSpecified") + "</td>\n"
+"    <td class=\"message\" colspan=\"2\">" + Messages.getBodyString(locale,"SharePointRepository.NoPathNameMetadataAttributeSpecified") + "</td>\n"
       );
     }
     out.print(
@@ -4133,7 +4138,7 @@ public class SharePointRepository extend
     if (matchMap.getMatchCount() > 0)
     {
       out.print(
-"    <td class=\"description\"><nobr>" + Messages.getString("SharePointRepository.PathValueMapping") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"SharePointRepository.PathValueMapping") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <table class=\"displaytable\">\n"
       );
@@ -4159,7 +4164,7 @@ public class SharePointRepository extend
     else
     {
       out.print(
-"    <td class=\"message\" colspan=\"2\">" + Messages.getString("SharePointRepository.NoMappingsSpecified") + "</td>\n"
+"    <td class=\"message\" colspan=\"2\">" + Messages.getBodyString(locale,"SharePointRepository.NoMappingsSpecified") + "</td>\n"
       );
     }
     out.print(

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java Sun Dec 25 20:10:58 2011
@@ -564,14 +564,15 @@ public class SolrConnector extends org.a
   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific to the connector.
   */
   @Override
-  public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, List<String> tabsArray)
+  public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out,
+    Locale locale, ConfigParams parameters, List<String> tabsArray)
     throws ManifoldCFException, IOException
   {
-    tabsArray.add(Messages.getString("SolrConnector.Server"));
-    tabsArray.add(Messages.getString("SolrConnector.Schema"));
-    tabsArray.add(Messages.getString("SolrConnector.Arguments"));
-    tabsArray.add(Messages.getString("SolrConnector.Documents"));
-    tabsArray.add(Messages.getString("SolrConnector.Commits"));
+    tabsArray.add(Messages.getString(locale,"SolrConnector.Server"));
+    tabsArray.add(Messages.getString(locale,"SolrConnector.Schema"));
+    tabsArray.add(Messages.getString(locale,"SolrConnector.Arguments"));
+    tabsArray.add(Messages.getString(locale,"SolrConnector.Documents"));
+    tabsArray.add(Messages.getString(locale,"SolrConnector.Commits"));
 
     out.print(
 "<script type=\"text/javascript\">\n"+
@@ -778,7 +779,8 @@ public class SolrConnector extends org.a
   *@param tabName is the current tab name.
   */
   @Override
-  public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, String tabName)
+  public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out,
+    Locale locale, ConfigParams parameters, String tabName)
     throws ManifoldCFException, IOException
   {
     String protocol = parameters.getParameter(SolrConfig.PARAM_PROTOCOL);
@@ -868,12 +870,12 @@ public class SolrConnector extends org.a
 "<input name=\"configop\" type=\"hidden\" value=\"Continue\"/>\n"
     );
     
-    if (tabName.equals(Messages.getString("SolrConnector.Server")))
+    if (tabName.equals(Messages.getString(locale,"SolrConnector.Server")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.Protocol") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.Protocol") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <select name=\"serverprotocol\">\n"+
 "        <option value=\"http\""+(protocol.equals("http")?" selected=\"true\"":"")+">http</option>\n"+
@@ -882,70 +884,70 @@ public class SolrConnector extends org.a
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.ServerName") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.ServerName") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input name=\"servername\" type=\"text\" size=\"32\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(server)+"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.Port") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.Port") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input name=\"serverport\" type=\"text\" size=\"5\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(port)+"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr><td colspan=\"2\" class=\"separator\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.WebApplicationName") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.WebApplicationName") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input name=\"webappname\" type=\"text\" size=\"16\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(webapp)+"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.CoreName") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.CoreName") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input name=\"core\" type=\"text\" size=\"16\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(core)+"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.UpdateHandler") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.UpdateHandler") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input name=\"updatepath\" type=\"text\" size=\"32\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(updatePath)+"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.RemoveHandler") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.RemoveHandler") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input name=\"removepath\" type=\"text\" size=\"32\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(removePath)+"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.StatusHandler") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.StatusHandler") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input name=\"statuspath\" type=\"text\" size=\"32\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(statusPath)+"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr><td colspan=\"2\" class=\"separator\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.Realm") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.Realm") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input name=\"realm\" type=\"text\" size=\"32\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(realm)+"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.UserID") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.UserID") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input name=\"userid\" type=\"text\" size=\"32\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(userID)+"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.Password") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.Password") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input type=\"password\" size=\"32\" name=\"password\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(password)+"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.SSLTrustCertificateList") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.SSLTrustCertificateList") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input type=\"hidden\" name=\"solrkeystorealias\" value=\"\"/>\n"+
 "      <table class=\"displaytable\">\n"
@@ -955,7 +957,7 @@ public class SolrConnector extends org.a
       if (contents.length == 0)
       {
         out.print(
-"        <tr><td class=\"message\" colspan=\"2\"><nobr>" + Messages.getString("SolrConnector.NoCertificatesPresent") + "</nobr></td></tr>\n"
+"        <tr><td class=\"message\" colspan=\"2\"><nobr>" + Messages.getString(locale,"SolrConnector.NoCertificatesPresent") + "</nobr></td></tr>\n"
         );
       }
       else
@@ -978,8 +980,8 @@ public class SolrConnector extends org.a
       }
       out.print(
 "      </table>\n"+
-"      <input type=\"button\" onclick='Javascript:SolrAddCertificate()' alt=\"" + Messages.getString("SolrConnector.AddCert") + "\" value=\"" + Messages.getString("SolrConnector.Add") + "\"/>&nbsp;\n"+
-"      " + Messages.getString("SolrConnector.Certificate") + "&nbsp;<input name=\"solrcertificate\" size=\"50\" type=\"file\"/>\n"+
+"      <input type=\"button\" onclick='Javascript:SolrAddCertificate()' alt=\"" + Messages.getString(locale,"SolrConnector.AddCert") + "\" value=\"" + Messages.getString(locale,"SolrConnector.Add") + "\"/>&nbsp;\n"+
+"      " + Messages.getString(locale,"SolrConnector.Certificate") + "&nbsp;<input name=\"solrcertificate\" size=\"50\" type=\"file\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "</table>\n"
@@ -1004,12 +1006,12 @@ public class SolrConnector extends org.a
     }
 
     // "Schema" tab
-    if (tabName.equals(Messages.getString("SolrConnector.Schema")))
+    if (tabName.equals(Messages.getString(locale,"SolrConnector.Schema")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.IDFieldName") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.IDFieldName") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input name=\"idfield\" type=\"text\" size=\"32\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(idField)+"\"/>\n"+
 "    </td>\n"+
@@ -1025,24 +1027,24 @@ public class SolrConnector extends org.a
     }
     
     // "Documents" tab
-    if (tabName.equals(Messages.getString("SolrConnector.Documents")))
+    if (tabName.equals(Messages.getString(locale,"SolrConnector.Documents")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.MaximumDocumentLength") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.MaximumDocumentLength") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input name=\"maxdocumentlength\" type=\"text\" size=\"16\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(maxLength)+"\"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.IncludedMimeTypes") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.IncludedMimeTypes") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <textarea rows=\"10\" cols=\"20\" name=\"includedmimetypes\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(includedMimeTypes)+"</textarea>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.ExcludedMimeTypes") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.ExcludedMimeTypes") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <textarea rows=\"10\" cols=\"20\" name=\"excludedmimetypes\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(excludedMimeTypes)+"</textarea>\n"+
 "    </td>\n"+
@@ -1060,19 +1062,19 @@ public class SolrConnector extends org.a
     }
     
     // "Commits" tab
-    if (tabName.equals(Messages.getString("SolrConnector.Commits")))
+    if (tabName.equals(Messages.getString(locale,"SolrConnector.Commits")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.CommitAtEndOfEveryJob") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.CommitAtEndOfEveryJob") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input name=\"commits_present\" type=\"hidden\" value=\"true\"/>\n"+
 "      <input name=\"commits\" type=\"checkbox\" value=\"true\""+(commits.equals("true")?" checked=\"yes\"":"")+"/>\n"+
 "    </td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.CommitEachDocumentWithin") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.CommitEachDocumentWithin") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <input name=\"commitwithin\" type=\"text\" size=\"16\" value=\""+commitWithin+"\"/>\n"+
 "    </td>\n"+
@@ -1110,7 +1112,7 @@ public class SolrConnector extends org.a
     }
     
     // "Arguments" tab
-    if (tabName.equals(Messages.getString("SolrConnector.Arguments")))
+    if (tabName.equals(Messages.getString(locale,"SolrConnector.Arguments")))
     {
       // For the display, sort the arguments into alphabetic order
       String[] sortArray = new String[argumentMap.size()];
@@ -1125,13 +1127,13 @@ public class SolrConnector extends org.a
 "<table class=\"displaytable\">\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.Arguments2") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.Arguments2") + "</nobr></td>\n"+
 "    <td class=\"boxcell\">\n"+
 "      <table class=\"formtable\">\n"+
 "        <tr class=\"formheaderrow\">\n"+
 "          <td class=\"formcolumnheader\"></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SolrConnector.Name") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SolrConnector.Value") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString(locale,"SolrConnector.Name") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString(locale,"SolrConnector.Value") + "</nobr></td>\n"+
 "        </tr>\n"
       );
       i = 0;
@@ -1168,7 +1170,7 @@ public class SolrConnector extends org.a
       if (i == 0)
       {
         out.print(
-"        <tr class=\"formrow\"><td class=\"formmessage\" colspan=\"3\">" + Messages.getString("SolrConnector.NoArgumentsSpecified") + "</td></tr>\n"
+"        <tr class=\"formrow\"><td class=\"formmessage\" colspan=\"3\">" + Messages.getString(locale,"SolrConnector.NoArgumentsSpecified") + "</td></tr>\n"
         );
       }
       out.print(
@@ -1230,7 +1232,8 @@ public class SolrConnector extends org.a
   *@return null if all is well, or a string error message if there is an error that should prevent saving of the connection (and cause a redirection to an error page).
   */
   @Override
-  public String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext, ConfigParams parameters)
+  public String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext,
+    Locale locale, ConfigParams parameters)
     throws ManifoldCFException
   {
     String protocol = variableContext.getParameter("serverprotocol");
@@ -1421,13 +1424,14 @@ public class SolrConnector extends org.a
   *@param parameters are the configuration parameters, as they currently exist, for this connection being configured.
   */
   @Override
-  public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters)
+  public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out,
+    Locale locale, ConfigParams parameters)
     throws ManifoldCFException, IOException
   {
     out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr>\n"+
-"    <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getString("SolrConnector.Parameters") + "</nobr></td>\n"+
+"    <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getString(locale,"SolrConnector.Parameters") + "</nobr></td>\n"+
 "    <td class=\"value\" colspan=\"3\">\n"
     );
     Iterator iter = parameters.listParameters();
@@ -1461,12 +1465,12 @@ public class SolrConnector extends org.a
 "  </tr>\n"+
 "\n"+
 "  <tr>\n"+
-"    <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getString("SolrConnector.Arguments3") + "</nobr></td>\n"+
+"    <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getString(locale,"SolrConnector.Arguments3") + "</nobr></td>\n"+
 "    <td class=\"boxcell\" colspan=\"3\">\n"+
 "      <table class=\"formtable\">\n"+
 "        <tr class=\"formheaderrow\">\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SolrConnector.Name") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SolrConnector.Value") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString(locale,"SolrConnector.Name") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString(locale,"SolrConnector.Value") + "</nobr></td>\n"+
 "        </tr>\n"
     );
     
@@ -1494,7 +1498,7 @@ public class SolrConnector extends org.a
     if (instanceNumber == 0)
     {
       out.print(
-"        <tr class=\"formrow\"><td class=\"formmessage\" colspan=\"5\">" + Messages.getString("SolrConnector.NoArguments") + "</td></tr>\n"
+"        <tr class=\"formrow\"><td class=\"formmessage\" colspan=\"5\">" + Messages.getString(locale,"SolrConnector.NoArguments") + "</td></tr>\n"
       );
     }
     
@@ -1514,10 +1518,10 @@ public class SolrConnector extends org.a
   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific to the connector.
   */
   @Override
-  public void outputSpecificationHeader(IHTTPOutput out, OutputSpecification os, List<String> tabsArray)
+  public void outputSpecificationHeader(IHTTPOutput out, Locale locale, OutputSpecification os, List<String> tabsArray)
     throws ManifoldCFException, IOException
   {
-    tabsArray.add(Messages.getString("SolrConnector.SolrFieldMapping"));
+    tabsArray.add(Messages.getString(locale,"SolrConnector.SolrFieldMapping"));
     out.print(
 "<script type=\"text/javascript\">\n"+
 "<!--\n"+
@@ -1565,7 +1569,7 @@ public class SolrConnector extends org.a
   *@param tabName is the current tab name.
   */
   @Override
-  public void outputSpecificationBody(IHTTPOutput out, OutputSpecification os, String tabName)
+  public void outputSpecificationBody(IHTTPOutput out, Locale locale, OutputSpecification os, String tabName)
     throws ManifoldCFException, IOException
   {
     // Prep for field mapping tab
@@ -1585,19 +1589,19 @@ public class SolrConnector extends org.a
     }
     
     // Field Mapping tab
-    if (tabName.equals(Messages.getString("SolrConnector.SolrFieldMapping")))
+    if (tabName.equals(Messages.getString(locale,"SolrConnector.SolrFieldMapping")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.FieldMappings") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.FieldMappings") + "</nobr></td>\n"+
 "    <td class=\"boxcell\">\n"+
 "      <table class=\"formtable\">\n"+
 "        <tr class=\"formheaderrow\">\n"+
 "          <td class=\"formcolumnheader\"></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SolrConnector.MetadataFieldName") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SolrConnector.SolrFieldName") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString(locale,"SolrConnector.MetadataFieldName") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString(locale,"SolrConnector.SolrFieldName") + "</nobr></td>\n"+
 "        </tr>\n"
       );
 
@@ -1648,7 +1652,7 @@ public class SolrConnector extends org.a
       if (fieldCounter == 0)
       {
         out.print(
-"        <tr class=\"formrow\"><td class=\"formmessage\" colspan=\"3\">" + Messages.getString("SolrConnector.NoFieldMappingSpecified") + "</td></tr>\n"
+"        <tr class=\"formrow\"><td class=\"formmessage\" colspan=\"3\">" + Messages.getString(locale,"SolrConnector.NoFieldMappingSpecified") + "</td></tr>\n"
         );
       }
       out.print(
@@ -1656,7 +1660,7 @@ public class SolrConnector extends org.a
 "        <tr class=\"formrow\">\n"+
 "          <td class=\"formcolumncell\">\n"+
 "            <a name=\"solr_fieldmapping\">\n"+
-"              <input type=\"button\" value=\"" + Messages.getString("SolrConnector.Add") + "\" alt=\"" + Messages.getString("SolrConnector.AddFieldMapping") + "\" onclick=\"javascript:addFieldMapping();\"/>\n"+
+"              <input type=\"button\" value=\"" + Messages.getString(locale,"SolrConnector.Add") + "\" alt=\"" + Messages.getString(locale,"SolrConnector.AddFieldMapping") + "\" onclick=\"javascript:addFieldMapping();\"/>\n"+
 "            </a>\n"+
 "            <input type=\"hidden\" name=\"solr_fieldmapping_count\" value=\""+fieldCounter+"\"/>\n"+
 "            <input type=\"hidden\" name=\"solr_fieldmapping_op\" value=\"Continue\"/>\n"+
@@ -1709,7 +1713,7 @@ public class SolrConnector extends org.a
   *@return null if all is well, or a string error message if there is an error that should prevent saving of the job (and cause a redirection to an error page).
   */
   @Override
-  public String processSpecificationPost(IPostParameters variableContext, OutputSpecification os)
+  public String processSpecificationPost(IPostParameters variableContext, Locale locale, OutputSpecification os)
     throws ManifoldCFException
   {
     String x = variableContext.getParameter("solr_fieldmapping_count");
@@ -1768,7 +1772,7 @@ public class SolrConnector extends org.a
   *@param os is the current output specification for this job.
   */
   @Override
-  public void viewSpecification(IHTTPOutput out, OutputSpecification os)
+  public void viewSpecification(IHTTPOutput out, Locale locale, OutputSpecification os)
     throws ManifoldCFException, IOException
   {
     // Prep for field mappings
@@ -1801,12 +1805,12 @@ public class SolrConnector extends org.a
 "\n"+
 "<table class=\"displaytable\">\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("SolrConnector.FieldMappings") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getString(locale,"SolrConnector.FieldMappings") + "</nobr></td>\n"+
 "    <td class=\"boxcell\">\n"+
 "      <table class=\"formtable\">\n"+
 "        <tr class=\"formheaderrow\">\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SolrConnector.MetadataFieldName") + "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString("SolrConnector.SolrFieldName") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString(locale,"SolrConnector.MetadataFieldName") + "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getString(locale,"SolrConnector.SolrFieldName") + "</nobr></td>\n"+
 "        </tr>\n"
     );
 
@@ -1837,7 +1841,7 @@ public class SolrConnector extends org.a
     if (fieldCounter == 0)
     {
       out.print(
-"        <tr class=\"formrow\"><td class=\"formmessage\" colspan=\"3\">" + Messages.getString("SolrConnector.NoFieldMappingSpecified") + "</td></tr>\n"
+"        <tr class=\"formrow\"><td class=\"formmessage\" colspan=\"3\">" + Messages.getString(locale,"SolrConnector.NoFieldMappingSpecified") + "</td></tr>\n"
       );
     }
     out.print(

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/Messages.java?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/Messages.java (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/Messages.java Sun Dec 25 20:10:58 2011
@@ -19,75 +19,106 @@
 package org.apache.manifoldcf.crawler.connectors.webcrawler;
 
 import java.util.Locale;
+import java.util.Map;
+import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
+import org.apache.manifoldcf.core.interfaces.IHTTPOutput;
 
-public class Messages extends org.apache.manifoldcf.core.i18n.Messages
+public class Messages extends org.apache.manifoldcf.ui.i18n.Messages
 {
   public static final String DEFAULT_BUNDLE_NAME="org.apache.manifoldcf.crawler.connectors.webcrawler.common";
-
+  public static final String DEFAULT_PATH_NAME="org.apache.manifoldcf.crawler.connectors.webcrawler";
+  
   /** Constructor - do no instantiate
   */
-  private Messages()
+  protected Messages()
   {
   }
   
-  // These four have limited applicability since they are all local to the core jar, which generally does not render
-  // text.
-  
-  public static String getString(String messageKey)
+  public static String getString(Locale locale, String messageKey)
   {
-    return getString(DEFAULT_BUNDLE_NAME, Locale.getDefault(), messageKey, null);
+    return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
   }
-  
-  public static String getString(String messageKey, Object[] args)
+
+  public static String getAttributeString(Locale locale, String messageKey)
   {
-    return getString(DEFAULT_BUNDLE_NAME, Locale.getDefault(), messageKey, args);
+    return getAttributeString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
   }
-  
-  public static String getString(Locale locale, String messageKey)
+
+  public static String getBodyString(Locale locale, String messageKey)
   {
-    return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+    return getBodyString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
   }
-  
+
+  public static String getAttributeJavascriptString(Locale locale, String messageKey)
+  {
+    return getAttributeJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getBodyJavascriptString(Locale locale, String messageKey)
+  {
+    return getBodyJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
   public static String getString(Locale locale, String messageKey, Object[] args)
   {
     return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
   }
+
+  public static String getAttributeString(Locale locale, String messageKey, Object[] args)
+  {
+    return getAttributeString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
   
-  // More general methods which allow bundlenames and class loaders to be specified.
-  
-  public static String getString(String bundleName, String messageKey)
+  public static String getBodyString(Locale locale, String messageKey, Object[] args)
   {
-    return getString(bundleName, Locale.getDefault(), messageKey, null);
+    return getBodyString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
   }
 
-  public static String getString(ClassLoader classLoader, String bundleName, String messageKey)
+  public static String getAttributeJavascriptString(Locale locale, String messageKey, Object[] args)
   {
-    return getString(classLoader, bundleName, Locale.getDefault(), messageKey, null);
+    return getAttributeJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
   }
+
+  public static String getBodyJavascriptString(Locale locale, String messageKey, Object[] args)
+  {
+    return getBodyJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  // More general methods which allow bundlenames and class loaders to be specified.
   
-  public static String getString(String bundleName, String messageKey, Object[] args)
+  public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(bundleName, Locale.getDefault(), messageKey, args);
+    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
   }
 
-  public static String getString(ClassLoader classLoader, String bundleName, String messageKey, Object[] args)
+  public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(classLoader, bundleName, Locale.getDefault(), messageKey, args);
+    return getAttributeString(Messages.class.getClassLoader(), 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);
   }
   
-  public static String getString(String bundleName, Locale locale, String messageKey)
+  public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(bundleName, locale, messageKey, null);
+    return getAttributeJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
   }
 
-  public static String getString(ClassLoader classLoader, String bundleName, Locale locale, String messageKey)
+  public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
   {
-    return getString(classLoader, bundleName, locale, messageKey, null);
+    return getBodyJavascriptString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
   }
+
+  // Resource output
   
-  public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
+  public static void outputResource(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
   {
-    return getString(Messages.class.getClassLoader(), bundleName, locale, messageKey, args);
+    outputResource(output,Messages.class,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
   }
   
 }



Mime
View raw message