manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1224641 [5/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/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/Messages.java?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/Messages.java (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/Messages.java Sun Dec 25 20:10:58 2011
@@ -19,75 +19,106 @@
 package org.apache.manifoldcf.agents.output.opensearchserver;
 
 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.agents.output.opensearchserver.common";
-
+  public static final String DEFAULT_PATH_NAME="org.apache.manifoldcf.crawler.connectors.opensearchserver";
+  
   /** 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);
   }
   
 }

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerConnector.java Sun Dec 25 20:10:58 2011
@@ -26,6 +26,7 @@ import java.io.UnsupportedEncodingExcept
 import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
+import java.util.Locale;
 
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOUtils;
@@ -45,6 +46,7 @@ import org.apache.manifoldcf.core.interf
 import org.apache.manifoldcf.core.interfaces.IThreadContext;
 import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
 import org.apache.manifoldcf.core.interfaces.SpecificationNode;
+import org.apache.manifoldcf.core.system.Logging;
 import org.json.JSONException;
 import org.json.JSONObject;
 
@@ -58,7 +60,6 @@ public class OpenSearchServerConnector e
       OPENSEARCHSERVER_INDEXATION_ACTIVITY, OPENSEARCHSERVER_DELETION_ACTIVITY,
       OPENSEARCHSERVER_OPTIMIZE_ACTIVITY };
 
-  private final static String OPENSEARCHSERVER_TAB_PARAMETER = Messages.getString("OpenSearchServerConnector.Parameters");
   private final static String OPENSEARCHSERVER_TAB_OPENSEARCHSERVER = "OpenSearchServer";
 
   private String specsCacheOutpuDescription;
@@ -82,55 +83,37 @@ public class OpenSearchServerConnector e
    * @param out
    * @throws ManifoldCFException
    */
-  private void outputResource(String resName, IHTTPOutput out,
-      OpenSearchServerParam params) throws ManifoldCFException {
-    InputStream is = getClass().getResourceAsStream(resName);
-    BufferedReader br = null;
-    try {
-      br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
-      String line;
-      while ((line = br.readLine()) != null)
-        if (params != null)
-          out.println(params.replace(line));
-        else
-          out.println(line);
-    } catch (UnsupportedEncodingException e) {
-      throw new ManifoldCFException(e);
-    } catch (IOException e) {
-      throw new ManifoldCFException(e);
-    } finally {
-      if (br != null)
-        IOUtils.closeQuietly(br);
-      if (is != null)
-        IOUtils.closeQuietly(is);
-    }
+  private static void outputResource(String resName, IHTTPOutput out,
+      Locale locale, OpenSearchServerParam params) throws ManifoldCFException {
+    Messages.outputResource(out,locale,resName,params.buildMap(),false);
   }
 
   @Override
   public void outputConfigurationHeader(IThreadContext threadContext,
-      IHTTPOutput out, ConfigParams parameters, List<String> tabsArray)
+      IHTTPOutput out, Locale locale, ConfigParams parameters, List<String> tabsArray)
       throws ManifoldCFException, IOException {
-    super.outputConfigurationHeader(threadContext, out, parameters, tabsArray);
-    tabsArray.add(OPENSEARCHSERVER_TAB_PARAMETER);
-    outputResource(Messages.getString("OpenSearchServerConnector.configurationJs"), out, null);
+    super.outputConfigurationHeader(threadContext, out, locale, parameters, tabsArray);
+    tabsArray.add(Messages.getString(locale,"OpenSearchServerConnector.Parameters"));
+    outputResource("configuration.js", out, locale, null);
   }
 
   @Override
   public void outputConfigurationBody(IThreadContext threadContext,
-      IHTTPOutput out, ConfigParams parameters, String tabName)
+      IHTTPOutput out, Locale locale, ConfigParams parameters, String tabName)
       throws ManifoldCFException, IOException {
-    super.outputConfigurationBody(threadContext, out, parameters, tabName);
-    if (OPENSEARCHSERVER_TAB_PARAMETER.equals(tabName)) {
-      outputResource(Messages.getString("OpenSearchServerConnector.configurationHtml"), out, getConfigParameters(parameters));
+    super.outputConfigurationBody(threadContext, out, locale, parameters, tabName);
+    if (Messages.getString(locale,"OpenSearchServerConnector.Parameters").equals(tabName)) {
+      outputResource("configuration.html", out, locale, getConfigParameters(parameters));
     }
   }
 
   @Override
   public void outputSpecificationHeader(IHTTPOutput out,
-      OutputSpecification os, List<String> tabsArray)
+      Locale locale, OutputSpecification os, List<String> tabsArray)
       throws ManifoldCFException, IOException {
-    super.outputSpecificationHeader(out, os, tabsArray);
+    super.outputSpecificationHeader(out, locale, os, tabsArray);
     tabsArray.add(OPENSEARCHSERVER_TAB_OPENSEARCHSERVER);
+    outputResource("specifications.js", out, locale, null);
   }
 
   final private SpecificationNode getSpecNode(OutputSpecification os) {
@@ -146,17 +129,17 @@ public class OpenSearchServerConnector e
   }
 
   @Override
-  public void outputSpecificationBody(IHTTPOutput out, OutputSpecification os,
+  public void outputSpecificationBody(IHTTPOutput out, Locale locale, OutputSpecification os,
       String tabName) throws ManifoldCFException, IOException {
-    super.outputSpecificationBody(out, os, tabName);
+    super.outputSpecificationBody(out, locale, os, tabName);
     if (OPENSEARCHSERVER_TAB_OPENSEARCHSERVER.equals(tabName)) {
-      outputResource(Messages.getString("OpenSearchServerConnector.specificationsHtml"), out, getSpecParameters(os));
+      outputResource("specifications.html", out, locale, getSpecParameters(os));
     }
   }
 
   @Override
   public String processSpecificationPost(IPostParameters variableContext,
-      OutputSpecification os) throws ManifoldCFException {
+      Locale locale, OutputSpecification os) throws ManifoldCFException {
     ConfigurationNode specNode = getSpecNode(os);
     boolean bAdd = (specNode == null);
     if (bAdd) {
@@ -239,14 +222,14 @@ public class OpenSearchServerConnector e
 
   @Override
   public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out,
-      ConfigParams parameters) throws ManifoldCFException, IOException {
-    outputResource(Messages.getString("OpenSearchServerConnector.viewHtml"), out, getConfigParameters(parameters));
+      Locale locale, ConfigParams parameters) throws ManifoldCFException, IOException {
+    outputResource("view.html", out, locale, getConfigParameters(parameters));
   }
 
   @Override
-  public void viewSpecification(IHTTPOutput out, OutputSpecification os)
+  public void viewSpecification(IHTTPOutput out, Locale locale, OutputSpecification os)
       throws ManifoldCFException, IOException {
-    outputResource(Messages.getString("OpenSearchServerConnector.viewSpecHtml"), out, getSpecParameters(os));
+    outputResource("viewSpec.html", out, locale, getSpecParameters(os));
   }
 
   @Override

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerParam.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerParam.java?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerParam.java (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/java/org/apache/manifoldcf/agents/output/opensearchserver/OpenSearchServerParam.java Sun Dec 25 20:10:58 2011
@@ -73,16 +73,11 @@ public class OpenSearchServerParam exten
     super(params.length);
   }
 
-  /**
-   * Replace the variables ${PARAMNAME} with the value contained in the set.
-   * 
-   * @param text
-   * @return
-   */
-  final public String replace(String text) {
+  final public Map<String,String> buildMap() {
+    Map<String,String> rval = new HashMap<String,String>();
     for (Map.Entry<ParameterEnum, String> entry : this.entrySet())
-      text = text.replace("${" + entry.getKey().name() + "}", entry.getValue());
-    return text;
+      rval.put(entry.getKey().name(), entry.getValue());
+    return rval;
   }
-
+  
 }

Copied: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_en_US.html (from r1222806, incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration.html)
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_en_US.html?p2=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_en_US.html&p1=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration.html&r1=1222806&r2=1224641&rev=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_en_US.html Sun Dec 25 20:10:58 2011
@@ -19,22 +19,22 @@
 	<tr>
 		<td class="description"><nobr>Server Location</nobr> (URL):</td>
 		<td class="value"><input name="serverlocation"
-			value="${SERVERLOCATION}" size="48" />
+			value="${SERVERLOCATION:A}" size="48" />
 		</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>Index name:</nobr></td>
-		<td class="value"><input name="indexname" value="${INDEXNAME}"
+		<td class="value"><input name="indexname" value="${INDEXNAME:A}"
 			size="24" /></td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>User name:</nobr></td>
-		<td class="value"><input name="username" value="${USERNAME}"
+		<td class="value"><input name="username" value="${USERNAME:A}"
 			size="24" /></td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>API Key:</nobr></td>
-		<td class="value"><input name="apikey" value="${APIKEY}"
+		<td class="value"><input name="apikey" value="${APIKEY:A}"
 			size="40" /></td>
 	</tr>
 </table>
\ No newline at end of file

Copied: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_ja_JP.html (from r1222806, incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_ja.html)
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_ja_JP.html?p2=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_ja_JP.html&p1=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_ja.html&r1=1222806&r2=1224641&rev=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_ja.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/configuration_ja_JP.html Sun Dec 25 20:10:58 2011
@@ -19,22 +19,22 @@
 	<tr>
 		<td class="description"><nobr>サーバ</nobr>(URL):</td>
 		<td class="value"><input name="serverlocation"
-			value="${SERVERLOCATION}" size="48" />
+			value="${SERVERLOCATION:A}" size="48" />
 		</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>索引名:</nobr></td>
-		<td class="value"><input name="indexname" value="${INDEXNAME}"
+		<td class="value"><input name="indexname" value="${INDEXNAME:A}"
 			size="24" /></td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>ユーザ名:</nobr></td>
-		<td class="value"><input name="username" value="${USERNAME}"
+		<td class="value"><input name="username" value="${USERNAME:A}"
 			size="24" /></td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>APIキー:</nobr></td>
-		<td class="value"><input name="apikey" value="${APIKEY}"
+		<td class="value"><input name="apikey" value="${APIKEY:A}"
 			size="40" /></td>
 	</tr>
 </table>

Copied: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.html (from r1222806, incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications.html)
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.html?p2=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.html&p1=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications.html&r1=1222806&r2=1224641&rev=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.html Sun Dec 25 20:10:58 2011
@@ -19,17 +19,17 @@
 	<tr>
 		<td class="description"><nobr>Max file size</nobr> (bytes):</td>
 		<td class="value"><input name="maxfilesize"
-			value="${MAXFILESIZE}" size="24" /></td>
+			value="${MAXFILESIZE:A}" size="24" /></td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>Allowed MIME Types :</nobr>
 		</td>
-		<td class="value"><textarea rows="10" cols="64" name="mimetypes">${MIMETYPES}</textarea>
+		<td class="value"><textarea rows="10" cols="64" name="mimetypes">${MIMETYPES:B}</textarea>
 		</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>Allowed file</nobr> extensions:</td>
-		<td class="value"><textarea rows="10" cols="12" name="extensions">${EXTENSIONS}</textarea>
+		<td class="value"><textarea rows="10" cols="12" name="extensions">${EXTENSIONS:B}</textarea>
 		</td>
 	</tr>
 </table>
\ No newline at end of file

Added: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.js
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.js?rev=1224641&view=auto
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.js (added)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.js Sun Dec 25 20:10:58 2011
@@ -0,0 +1,21 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<script type="text/javascript">
+<!--
+-->
+</script>
\ No newline at end of file

Propchange: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_en_US.js
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.html (from r1222806, incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja.html)
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.html?p2=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.html&p1=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja.html&r1=1222806&r2=1224641&rev=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.html Sun Dec 25 20:10:58 2011
@@ -19,17 +19,17 @@
 	<tr>
 		<td class="description"><nobr>最大ファイルサイズ</nobr> (bytes):</td>
 		<td class="value"><input name="maxfilesize"
-			value="${MAXFILESIZE}" size="24" /></td>
+			value="${MAXFILESIZE:A}" size="24" /></td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>利用可能なMIMEタイプ:</nobr>
 		</td>
-		<td class="value"><textarea rows="10" cols="64" name="mimetypes">${MIMETYPES}</textarea>
+		<td class="value"><textarea rows="10" cols="64" name="mimetypes">${MIMETYPES:B}</textarea>
 		</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>利用可能なファイル</nobr> 拡張子:</td>
-		<td class="value"><textarea rows="10" cols="12" name="extensions">${EXTENSIONS}</textarea>
+		<td class="value"><textarea rows="10" cols="12" name="extensions">${EXTENSIONS:B}</textarea>
 		</td>
 	</tr>
 </table>

Added: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.js
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.js?rev=1224641&view=auto
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.js (added)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.js Sun Dec 25 20:10:58 2011
@@ -0,0 +1,21 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<script type="text/javascript">
+<!--
+-->
+</script>
\ No newline at end of file

Propchange: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/specifications_ja_JP.js
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_en_US.html (from r1222806, incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec.html)
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_en_US.html?p2=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_en_US.html&p1=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec.html&r1=1222806&r2=1224641&rev=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_en_US.html Sun Dec 25 20:10:58 2011
@@ -18,14 +18,14 @@
 <table class="displaytable">
 	<tr>
 		<td class="description"><nobr>Max file size</nobr> (bytes):</td>
-		<td class="value">${MAXFILESIZE}</td>
+		<td class="value">${MAXFILESIZE:B}</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>Allowed MIME types:</nobr></td>
-		<td class="value">${MIMETYPES}</td>
+		<td class="value">${MIMETYPES:B}</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>Allowed file</nobr> extensions:</td>
-		<td class="value">${EXTENSIONS}</td>
+		<td class="value">${EXTENSIONS:B}</td>
 	</tr>
 </table>
\ No newline at end of file

Copied: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_ja_JP.html (from r1222806, incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_ja.html)
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_ja_JP.html?p2=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_ja_JP.html&p1=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_ja.html&r1=1222806&r2=1224641&rev=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_ja.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/viewSpec_ja_JP.html Sun Dec 25 20:10:58 2011
@@ -18,14 +18,14 @@
 <table class="displaytable">
 	<tr>
 		<td class="description"><nobr>最大ファイルサイズ</nobr> (バイト:):</td>
-		<td class="value">${MAXFILESIZE}</td>
+		<td class="value">${MAXFILESIZE:B}</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>利用可能なMIMEタイプ:</nobr></td>
-		<td class="value">${MIMETYPES}</td>
+		<td class="value">${MIMETYPES:B}</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>利用可能なファイル</nobr> 拡張子:</td>
-		<td class="value">${EXTENSIONS}</td>
+		<td class="value">${EXTENSIONS:B}</td>
 	</tr>
 </table>

Copied: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_en_US.html (from r1222806, incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view.html)
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_en_US.html?p2=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_en_US.html&p1=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view.html&r1=1222806&r2=1224641&rev=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_en_US.html Sun Dec 25 20:10:58 2011
@@ -18,18 +18,18 @@
 <table class="displaytable">
 	<tr>
 		<td class="description"><nobr>Server Location</nobr> (URL):</td>
-		<td class="value">${SERVERLOCATION}</td>
+		<td class="value">${SERVERLOCATION:B}</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>Index name:</nobr></td>
-		<td class="value">${INDEXNAME}</td>
+		<td class="value">${INDEXNAME:B}</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>User name:</nobr></td>
-		<td class="value">${USERNAME}</td>
+		<td class="value">${USERNAME:B}</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>API Key:</nobr></td>
-		<td class="value">${APIKEY}</td>
+		<td class="value">${APIKEY:B}</td>
 	</tr>
 </table>
\ No newline at end of file

Copied: incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_ja_JP.html (from r1222806, incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_ja.html)
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_ja_JP.html?p2=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_ja_JP.html&p1=incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_ja.html&r1=1222806&r2=1224641&rev=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_ja.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/opensearchserver/connector/src/main/resource/org/apache/manifoldcf/agents/output/opensearchserver/view_ja_JP.html Sun Dec 25 20:10:58 2011
@@ -18,18 +18,18 @@
 <table class="displaytable">
 	<tr>
 		<td class="description"><nobr>サーバ</nobr> (URL):</td>
-		<td class="value">${SERVERLOCATION}</td>
+		<td class="value">${SERVERLOCATION:B}</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>索引名:</nobr></td>
-		<td class="value">${INDEXNAME}</td>
+		<td class="value">${INDEXNAME:B}</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>ユーザ名:</nobr></td>
-		<td class="value">${USERNAME}</td>
+		<td class="value">${USERNAME:B}</td>
 	</tr>
 	<tr>
 		<td class="description"><nobr>APIキー:</nobr></td>
-		<td class="value">${APIKEY}</td>
+		<td class="value">${APIKEY:B}</td>
 	</tr>
 </table>

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Messages.java?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Messages.java (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/Messages.java Sun Dec 25 20:10:58 2011
@@ -19,75 +19,106 @@
 package org.apache.manifoldcf.crawler.connectors.rss;
 
 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.rss.common";
-
+  public static final String DEFAULT_PATH_NAME="org.apache.manifoldcf.crawler.connectors.rss";
+  
   /** 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);
   }
   
 }

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java Sun Dec 25 20:10:58 2011
@@ -1553,13 +1553,14 @@ public class RSSConnector extends org.ap
   *@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("RSSConnector.Email"));
-    tabsArray.add(Messages.getString("RSSConnector.Robots"));
-    tabsArray.add(Messages.getString("RSSConnector.Bandwidth"));
-    tabsArray.add(Messages.getString("RSSConnector.Proxy"));
+    tabsArray.add(Messages.getString(locale,"RSSConnector.Email"));
+    tabsArray.add(Messages.getString(locale,"RSSConnector.Robots"));
+    tabsArray.add(Messages.getString(locale,"RSSConnector.Bandwidth"));
+    tabsArray.add(Messages.getString(locale,"RSSConnector.Proxy"));
     out.print(
 "<script type=\"text/javascript\">\n"+
 "<!--\n"+
@@ -1619,7 +1620,8 @@ public class RSSConnector extends org.ap
   *@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 email = parameters.getParameter(org.apache.manifoldcf.crawler.connectors.rss.RSSConnector.emailParameter);
@@ -1657,13 +1659,13 @@ public class RSSConnector extends org.ap
       proxyAuthPassword = "";
       
     // Email tab
-    if (tabName.equals(Messages.getString("RSSConnector.Email")))
+    if (tabName.equals(Messages.getString(locale,"RSSConnector.Email")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("RSSConnector.EmailAddressToContact") + "</nobr></td><td class=\"value\"><input type=\"text\" size=\"32\" name=\"email\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(email)+"\"/></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.EmailAddressToContact") + "</nobr></td><td class=\"value\"><input type=\"text\" size=\"32\" name=\"email\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(email)+"\"/></td>\n"+
 "  </tr>\n"+
 "</table>\n"
       );
@@ -1676,18 +1678,18 @@ public class RSSConnector extends org.ap
     }
 
     // Robots tab
-    if (tabName.equals(Messages.getString("RSSConnector.Robots")))
+    if (tabName.equals(Messages.getString(locale,"RSSConnector.Robots")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("RSSConnector.RobotsTxtUsage") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.RobotsTxtUsage") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <select name=\"robotsusage\" size=\"3\">\n"+
-"        <option value=\"none\" "+(robotsUsage.equals("none")?"selected=\"selected\"":"")+">" + Messages.getString("RSSConnector.DontLookAtRobotsTxt") + "</option>\n"+
-"        <option value=\"data\" "+(robotsUsage.equals("data")?"selected=\"selected\"":"")+">" + Messages.getString("RSSConnector.ObeyRobotsTxtForDataFetchesOnly") + "</option>\n"+
-"        <option value=\"all\" "+(robotsUsage.equals("all")?"selected=\"selected\"":"")+">" + Messages.getString("RSSConnector.ObeyRobotsTxtForAllFetches") + "</option>\n"+
+"        <option value=\"none\" "+(robotsUsage.equals("none")?"selected=\"selected\"":"")+">" + Messages.getBodyString(locale,"RSSConnector.DontLookAtRobotsTxt") + "</option>\n"+
+"        <option value=\"data\" "+(robotsUsage.equals("data")?"selected=\"selected\"":"")+">" + Messages.getBodyString(locale,"RSSConnector.ObeyRobotsTxtForDataFetchesOnly") + "</option>\n"+
+"        <option value=\"all\" "+(robotsUsage.equals("all")?"selected=\"selected\"":"")+">" + Messages.getBodyString(locale,"RSSConnector.ObeyRobotsTxtForAllFetches") + "</option>\n"+
 "      </select>\n"+
 "    </td>\n"+
 "  </tr>\n"+
@@ -1702,25 +1704,25 @@ public class RSSConnector extends org.ap
     }
 
     // Bandwidth tab
-    if (tabName.equals(Messages.getString("RSSConnector.Bandwidth")))
+    if (tabName.equals(Messages.getString(locale,"RSSConnector.Bandwidth")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("RSSConnector.MaxKBytesPerSecondPerServer") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.MaxKBytesPerSecondPerServer") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"text\" size=\"6\" name=\"bandwidth\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(bandwidth)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("RSSConnector.MaxConnectionsPerServer") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.MaxConnectionsPerServer") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"text\" size=\"4\" name=\"connections\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(connections)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("RSSConnector.MaxFetchesPerMinutePerServer") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.MaxFetchesPerMinutePerServer") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"text\" size=\"4\" name=\"fetches\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(fetches)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("RSSConnector.ThrottleGroupName") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.ThrottleGroupName") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"text\" size=\"32\" name=\"throttlegroup\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(throttleGroup)+"\"/></td>\n"+
 "  </tr>\n"+
 "</table>\n"
@@ -1737,29 +1739,29 @@ public class RSSConnector extends org.ap
     }
     
     // Proxy tab
-    if (tabName.equals(Messages.getString("RSSConnector.Proxy")))
+    if (tabName.equals(Messages.getString(locale,"RSSConnector.Proxy")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("RSSConnector.ProxyHost") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.ProxyHost") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"text\" size=\"40\" name=\"proxyhost\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(proxyHost)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("RSSConnector.ProxyPort") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.ProxyPort") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"text\" size=\"5\" name=\"proxyport\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(proxyPort)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("RSSConnector.ProxyAuthenticationDomain") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.ProxyAuthenticationDomain") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"text\" size=\"32\" name=\"proxyauthdomain\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(proxyAuthDomain)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("RSSConnector.ProxyAuthenticationUserName") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.ProxyAuthenticationUserName") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"text\" size=\"32\" name=\"proxyauthusername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(proxyAuthUsername)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("RSSConnector.ProxyAuthenticationPassword") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.ProxyAuthenticationPassword") + "</nobr></td>\n"+
 "    <td class=\"value\"><input type=\"password\" size=\"16\" name=\"proxyauthpassword\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(proxyAuthPassword)+"\"/></td>\n"+
 "  </tr>\n"+
 "</table>\n"
@@ -1787,7 +1789,8 @@ public class RSSConnector extends org.ap
   *@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 email = variableContext.getParameter("email");
@@ -1835,13 +1838,14 @@ public class RSSConnector extends org.ap
   *@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("RSSConnector.Parameters") + "</nobr></td>\n"+
+"    <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.Parameters") + "</nobr></td>\n"+
 "    <td class=\"value\" colspan=\"3\">\n"
     );
     Iterator iter = parameters.listParameters();
@@ -1884,16 +1888,16 @@ public class RSSConnector extends org.ap
   *@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("RSSConnector.URLs"));
-    tabsArray.add(Messages.getString("RSSConnector.Canonicalization"));
-    tabsArray.add(Messages.getString("RSSConnector.URLMappings"));
-    tabsArray.add(Messages.getString("RSSConnector.TimeValues"));
-    tabsArray.add(Messages.getString("RSSConnector.Security"));
-    tabsArray.add(Messages.getString("RSSConnector.Metadata"));
-    tabsArray.add(Messages.getString("RSSConnector.DechromedContent"));
+    tabsArray.add(Messages.getString(locale,"RSSConnector.URLs"));
+    tabsArray.add(Messages.getString(locale,"RSSConnector.Canonicalization"));
+    tabsArray.add(Messages.getString(locale,"RSSConnector.URLMappings"));
+    tabsArray.add(Messages.getString(locale,"RSSConnector.TimeValues"));
+    tabsArray.add(Messages.getString(locale,"RSSConnector.Security"));
+    tabsArray.add(Messages.getString(locale,"RSSConnector.Metadata"));
+    tabsArray.add(Messages.getString(locale,"RSSConnector.DechromedContent"));
     out.print(
 "<script type=\"text/javascript\">\n"+
 "<!--\n"+
@@ -2004,7 +2008,7 @@ public class RSSConnector extends org.ap
   *@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;
@@ -2069,7 +2073,7 @@ public class RSSConnector extends org.ap
 
     // URLs tab
 
-    if (tabName.equals(Messages.getString("RSSConnector.URLs")))
+    if (tabName.equals(Messages.getString(locale,"RSSConnector.URLs")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2090,7 +2094,7 @@ public class RSSConnector extends org.ap
     }
 
     // Canonicalization tab
-    if (tabName.equals(Messages.getString("RSSConnector.Canonicalization")))
+    if (tabName.equals(Messages.getString(locale,"RSSConnector.Canonicalization")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2245,7 +2249,7 @@ public class RSSConnector extends org.ap
   
     // Mappings tab
 
-    if (tabName.equals(Messages.getString("RSSConnector.URLMappings")))
+    if (tabName.equals(Messages.getString(locale,"RSSConnector.URLMappings")))
     {
       out.print(
 "<input type=\"hidden\" name=\"rssop\" value=\"\"/>\n"+
@@ -2322,7 +2326,7 @@ public class RSSConnector extends org.ap
     }
 
     // Timeout Value tab
-    if (tabName.equals(Messages.getString("RSSConnector.TimeValues")))
+    if (tabName.equals(Messages.getString(locale,"RSSConnector.TimeValues")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2373,7 +2377,7 @@ public class RSSConnector extends org.ap
       else if (sn.getType().equals("chromedmode"))
         chromedMode = sn.getAttributeValue("mode");
     }
-    if (tabName.equals(Messages.getString("RSSConnector.DechromedContent")))
+    if (tabName.equals(Messages.getString(locale,"RSSConnector.DechromedContent")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2411,7 +2415,7 @@ public class RSSConnector extends org.ap
     // There is no native security, so all we care about are the tokens.
     i = 0;
 
-    if (tabName.equals(Messages.getString("RSSConnector.Security")))
+    if (tabName.equals(Messages.getString(locale,"RSSConnector.Security")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2449,7 +2453,7 @@ public class RSSConnector extends org.ap
       {
         out.print(
 "  <tr>\n"+
-"    <td class=\"message\" colspan=\"2\">" + Messages.getString("RSSConnector.NoAccessTokensPresent") + "</td>\n"+
+"    <td class=\"message\" colspan=\"2\">" + Messages.getBodyString(locale,"RSSConnector.NoAccessTokensPresent") + "</td>\n"+
 "  </tr>\n"
         );
       }
@@ -2494,7 +2498,7 @@ public class RSSConnector extends org.ap
     }
 
     // "Metadata" tab
-    if (tabName.equals(Messages.getString("RSSConnector.Metadata")))
+    if (tabName.equals(Messages.getString(locale,"RSSConnector.Metadata")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2601,7 +2605,7 @@ public class RSSConnector extends org.ap
   *@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
   {
     // Get the map
@@ -3025,7 +3029,7 @@ public class RSSConnector extends org.ap
   *@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
   {
     out.print(
@@ -3295,7 +3299,7 @@ public class RSSConnector extends org.ap
     else
     {
       out.print(
-"  <tr><td class=\"message\" colspan=\"2\"><nobr>" + Messages.getString("RSSConnector.NoAccessTokensSpecified") + "</nobr></td></tr>\n"
+"  <tr><td class=\"message\" colspan=\"2\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.NoAccessTokensSpecified") + "</nobr></td></tr>\n"
       );
     }
     out.print(
@@ -3312,7 +3316,7 @@ public class RSSConnector extends org.ap
         if (seenAny == false)
         {
           out.print(
-"  <tr><td class=\"description\"><nobr>" + Messages.getString("RSSConnector.Metadata") + "</nobr></td>\n"+
+"  <tr><td class=\"description\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.Metadata") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"
           );
           seenAny = true;
@@ -3335,7 +3339,7 @@ public class RSSConnector extends org.ap
     else
     {
       out.print(
-"  <tr><td class=\"message\" colspan=\"2\"><nobr>" + Messages.getString("RSSConnector.NoMetadataSpecified") + "</nobr></td></tr>\n"
+"  <tr><td class=\"message\" colspan=\"2\"><nobr>" + Messages.getBodyString(locale,"RSSConnector.NoMetadataSpecified") + "</nobr></td></tr>\n"
       );
     }
     out.print(

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/Messages.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/Messages.java (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/Messages.java Sun Dec 25 20:10:58 2011
@@ -19,75 +19,106 @@
 package org.apache.manifoldcf.crawler.connectors.sharepoint;
 
 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.sharepoint.common";
-
+  public static final String DEFAULT_PATH_NAME="org.apache.manifoldcf.crawler.connectors.sharepoint";
+  
   /** 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