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 [2/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/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java Sun Dec 25 20:10:58 2011
@@ -19,75 +19,106 @@
 package org.apache.manifoldcf.crawler.connectors.cmis;
 
 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.cmis.common";
-
+  public static final String DEFAULT_PATH_NAME="org.apache.manifoldcf.crawler.connectors.cmis";
+  
   /** 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/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html Sun Dec 25 20:10:58 2011
@@ -45,7 +45,7 @@
 			</nobr>
 		</td>
 		<td class="value">
-			<input type="text" id="username" name="username" value="${USERNAME}" />
+			<input type="text" id="username" name="username" value="${USERNAME:A}" />
 		</td>
 	</tr>
 	<tr>
@@ -55,7 +55,7 @@
 			</nobr>
 		</td>
 		<td class="value">
-			<input type="password" id="password" name="password" value="${PASSWORD}" />
+			<input type="password" id="password" name="password" value="${PASSWORD:A}" />
 		</td>
 	</tr>
 	<tr>
@@ -78,7 +78,7 @@
       </nobr>
     </td>
     <td class="value">
-        <input id="server" name="server" type="text" size="32" value="${SERVER}"/>
+        <input id="server" name="server" type="text" size="32" value="${SERVER:A}"/>
     </td>
   </tr>
   <tr>
@@ -88,7 +88,7 @@
       </nobr>
     </td>
     <td class="value">
-        <input id="port" name="port" type="text" size="5" value="${PORT}" />
+        <input id="port" name="port" type="text" size="5" value="${PORT:A}" />
     </td>
   </tr>
   <tr>
@@ -98,7 +98,7 @@
       </nobr>
     </td>
     <td class="value">
-        <input id="path" name="path" type="text" size="32" value="${PATH}" />
+        <input id="path" name="path" type="text" size="32" value="${PATH:A}" />
     </td>
   </tr>
 	<tr>
@@ -117,13 +117,13 @@
 </table>
 
 <script type="text/javascript">
-var binding = "${BINDING}";
+var binding = "${BINDING:BJ}";
 if(binding=="ws"){
   var bindingSelect = document.getElementById("binding");
   bindingSelect.options[1].selected = true;
 }
 
-var repositoryId = "${REPOSITORYID}";
+var repositoryId = "${REPOSITORYID:BJ}";
 var repositoryIdField = document.getElementById("repositoryId");
 if(repositoryId!=null && repositoryId!="" && repositoryId!=undefined){
   repositoryIdField.value = repositoryId;
@@ -131,23 +131,7 @@ if(repositoryId!=null && repositoryId!="
   repositoryIdField.value = "";
 }
 
-var username = "${USERNAME}";
-var password = "${PASSWORD}";
-var server = "${SERVER}";
-var port = "${PORT}";
-var path = "${PATH}";
-
-if(username==null || username==""){
-  var usernameInput = document.getElementById("username");
-  usernameInput.value = "dummyuser";
-}
-
-if(password==null || password==""){
-  var passwordInput = document.getElementById("password");
-  passwordInput.value = "dummysecret";
-}
-
-var protocol = "${PROTOCOL}";
+var protocol = "${PROTOCOL:BJ}";
 var protocolSelect = document.getElementById("protocol");
 if(protocol=="https"){
   protocolSelect.options[1].selected = true;
@@ -155,18 +139,4 @@ if(protocol=="https"){
   protocolSelect.options[0].selected = true;
 }
 
-if(server==null || server==""){
-  var serverInput = document.getElementById("server");
-  serverInput.value = "localhost";
-}
-
-if(port==null || port==""){
-  var portInput = document.getElementById("port");
-  portInput.value = "9090";
-}
-
-if(path==null || path==""){
-  var pathInput = document.getElementById("path");
-  pathInput.value = "/chemistry-opencmis-server-inmemory-war/atom";
-}
 </script>
\ No newline at end of file

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.html?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.html Sun Dec 25 20:10:58 2011
@@ -45,7 +45,7 @@
 			</nobr>
 		</td>
 		<td class="value">
-			<input type="text" name="username" value="${USERNAME}" />
+			<input type="text" name="username" value="${USERNAME:A}" />
 		</td>
 	</tr>
 	<tr>
@@ -55,7 +55,7 @@
 			</nobr>
 		</td>
 		<td class="value">
-			<input type="password" name="password" value="${PASSWORD}" />
+			<input type="password" name="password" value="${PASSWORD:A}" />
 		</td>
 	</tr>
 	<tr>
@@ -65,7 +65,7 @@
 			</nobr>
 		</td>
 		<td class="value">
-			<input type="text" name="endpoint" value="${ENDPOINT}" size="50" />
+			<input type="text" name="endpoint" value="${ENDPOINT:A}" size="50" />
 		</td>
 	</tr>
 	<tr>
@@ -84,17 +84,26 @@
 </table>
 
 <script type="text/javascript">
-var binding = "${BINDING}";
+var binding = "${BINDING:BJ}";
 if(binding=="ws"){
   var bindingSelect = document.getElementById("binding");
   bindingSelect.options[1].selected = true;
 }
 
-var repositoryId = "${REPOSITORYID}";
+var repositoryId = "${REPOSITORYID:BJ}";
 var repositoryIdField = document.getElementById("repositoryId");
 if(repositoryId!=null && repositoryId!="" && repositoryId!=undefined){
   repositoryIdField.value = repositoryId;
 } else {
   repositoryIdField.value = "";
 }
+
+var protocol = "${PROTOCOL:BJ}";
+var protocolSelect = document.getElementById("protocol");
+if(protocol=="https"){
+  protocolSelect.options[1].selected = true;
+} else {
+  protocolSelect.options[0].selected = true;
+}
+
 </script>

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_en_US.html?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_en_US.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_en_US.html Sun Dec 25 20:10:58 2011
@@ -29,7 +29,7 @@
 		</td>
 		<td class="value">
 			<nobr>
-				<input type="text" size="120" name="cmisQuery" value="${CMISQUERY}" />
+				<input type="text" size="120" name="cmisQuery" value="${CMISQUERY:A}" />
 			</nobr>
 		</td>
 	</tr>

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_ja_JP.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_ja_JP.html?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_ja_JP.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_ja_JP.html Sun Dec 25 20:10:58 2011
@@ -29,7 +29,7 @@
 		</td>
 		<td class="value">
 			<nobr>
-				<input type="text" size="120" name="cmisQuery" value="${CMISQUERY}" />
+				<input type="text" size="120" name="cmisQuery" value="${CMISQUERY:A}" />
 			</nobr>
 		</td>
 	</tr>

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenConfiguration_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenConfiguration_en_US.html?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenConfiguration_en_US.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenConfiguration_en_US.html Sun Dec 25 20:10:58 2011
@@ -14,11 +14,11 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<input type="hidden" name="username" value="${USERNAME}" />
-<input type="hidden" name="password" value="${PASSWORD}" />
-<input type="hidden" name="protocol" value="${PROTOCOL}" />
-<input type="hidden" name="server" value="${SERVER}" />
-<input type="hidden" name="port" value="${PORT}" />
-<input type="hidden" name="path" value="${PATH}" />
-<input type="hidden" name="binding" value="${BINDING}" />
-<input type="hidden" name="repositoryId" value="${REPOSITORYID}" />
\ No newline at end of file
+<input type="hidden" name="username" value="${USERNAME:A}" />
+<input type="hidden" name="password" value="${PASSWORD:A}" />
+<input type="hidden" name="protocol" value="${PROTOCOL:A}" />
+<input type="hidden" name="server" value="${SERVER:A}" />
+<input type="hidden" name="port" value="${PORT:A}" />
+<input type="hidden" name="path" value="${PATH:A}" />
+<input type="hidden" name="binding" value="${BINDING:A}" />
+<input type="hidden" name="repositoryId" value="${REPOSITORYID:A}" />
\ No newline at end of file

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenConfiguration_ja_JP.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenConfiguration_ja_JP.html?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenConfiguration_ja_JP.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenConfiguration_ja_JP.html Sun Dec 25 20:10:58 2011
@@ -14,11 +14,11 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<input type="hidden" name="username" value="${USERNAME}" />
-<input type="hidden" name="password" value="${PASSWORD}" />
-<input type="hidden" name="protocol" value="${PROTOCOL}" />
-<input type="hidden" name="server" value="${SERVER}" />
-<input type="hidden" name="port" value="${PORT}" />
-<input type="hidden" name="path" value="${PATH}" />
-<input type="hidden" name="binding" value="${BINDING}" />
-<input type="hidden" name="repositoryId" value="${REPOSITORYID}" />
\ No newline at end of file
+<input type="hidden" name="username" value="${USERNAME:A}" />
+<input type="hidden" name="password" value="${PASSWORD:A}" />
+<input type="hidden" name="protocol" value="${PROTOCOL:A}" />
+<input type="hidden" name="server" value="${SERVER:A}" />
+<input type="hidden" name="port" value="${PORT:A}" />
+<input type="hidden" name="path" value="${PATH:A}" />
+<input type="hidden" name="binding" value="${BINDING:A}" />
+<input type="hidden" name="repositoryId" value="${REPOSITORYID:A}" />
\ No newline at end of file

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenSpecification_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenSpecification_en_US.html?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenSpecification_en_US.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenSpecification_en_US.html Sun Dec 25 20:10:58 2011
@@ -14,4 +14,4 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<input type="hidden" name="cmisQuery" value="${CMISQUERY}" />
\ No newline at end of file
+<input type="hidden" name="cmisQuery" value="${CMISQUERY:A}" />
\ No newline at end of file

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenSpecification_ja_JP.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenSpecification_ja_JP.html?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenSpecification_ja_JP.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/hiddenSpecification_ja_JP.html Sun Dec 25 20:10:58 2011
@@ -14,4 +14,4 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<input type="hidden" name="cmisQuery" value="${CMISQUERY}" />
\ No newline at end of file
+<input type="hidden" name="cmisQuery" value="${CMISQUERY:A}" />
\ No newline at end of file

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewConfiguration_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewConfiguration_en_US.html?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewConfiguration_en_US.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewConfiguration_en_US.html Sun Dec 25 20:10:58 2011
@@ -24,7 +24,7 @@
 		</td>
 		<td class="value" colspan="3">
 			<nobr>
-				username=${USERNAME}
+				username=${USERNAME:B}
 			</nobr>
 			<br />
       <nobr>
@@ -32,39 +32,30 @@
       </nobr>
 			<br />
 			<nobr>
-				binding=${BINDING}
+				binding=${BINDING:B}
 			</nobr>
 			<br />
 			<nobr>
-        protocol=${PROTOCOL}
+        protocol=${PROTOCOL:B}
       </nobr>
       <br />
       <nobr>
-        server=${SERVER}
+        server=${SERVER:B}
       </nobr>
       <br />
       <nobr>
-        port=${PORT}
+        port=${PORT:B}
       </nobr>
       <br />
       <nobr>
-        path=${PATH}
+        path=${PATH:B}
       </nobr>
       <br />
-			<nobr>
-        <div id="repositoryIdDiv"></div>
+      <nobr>
+        repositoryId=${REPOSITORYID:B}
       </nobr>
       <br />
 		</td>
 	</tr>
 </table>
 
-<script type="text/javascript">
-var repositoryId = "${REPOSITORYID}";
-var repositoryIdField = document.getElementById("repositoryIdDiv");
-if(repositoryId!=null && repositoryId!="" && repositoryId!=undefined){
-  repositoryIdField.innerHTML = "repositoryId=" + repositoryId;
-} else {
-  repositoryIdField.innerHTML = "";
-}
-</script>
\ No newline at end of file

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewConfiguration_ja_JP.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewConfiguration_ja_JP.html?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewConfiguration_ja_JP.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewConfiguration_ja_JP.html Sun Dec 25 20:10:58 2011
@@ -24,7 +24,7 @@
 		</td>
 		<td class="value" colspan="3">
 			<nobr>
-				ユーザ名=${USERNAME}
+				ユーザ名=${USERNAME:B}
 			</nobr>
 			<br />
       <nobr>
@@ -32,27 +32,17 @@
       </nobr>
 			<br />
 			<nobr>
-				バイディング=${BINDING}
+				バイディング=${BINDING:B}
 			</nobr>
 			<br />
 			<nobr>
-				エンドポイント=${ENDPOINT}
+				エンドポイント=${ENDPOINT:B}
 			</nobr>
 			<br />
-			<nobr>
-        <div id="repositoryIdDiv"></div>
+      <nobr>
+        repositoryId=${REPOSITORYID:B}
       </nobr>
       <br />
 		</td>
 	</tr>
 </table>
-
-<script type="text/javascript">
-var repositoryId = "${REPOSITORYID}";
-var repositoryIdField = document.getElementById("repositoryIdDiv");
-if(repositoryId!=null && repositoryId!="" && repositoryId!=undefined){
-  repositoryIdField.innerHTML = "repositoryId=" + repositoryId;
-} else {
-  repositoryIdField.innerHTML = "";
-}
-</script>

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification_en_US.html?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification_en_US.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification_en_US.html Sun Dec 25 20:10:58 2011
@@ -21,15 +21,7 @@
 			CMIS Query:
 		</td>
 		<td class="value">
-			<div id="cmisQueryDiv">${CMISQUERY}</div>
+			${CMISQUERY:B}
 		</td>
 	</tr>
 </table>
-
-<script type="text/javascript">
-var cmisQuery = "${CMISQUERY}";
-if(cmisQuery.trim()==""){
-  var cmisQueryDiv = document.getElementById("cmisQueryDiv");
-  cmisQueryDiv.innerHTML = "";
-}
-</script>

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification_ja_JP.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification_ja_JP.html?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification_ja_JP.html (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification_ja_JP.html Sun Dec 25 20:10:58 2011
@@ -21,15 +21,7 @@
 			CMISクエリー:
 		</td>
 		<td class="value">
-			<div id="cmisQueryDiv">${CMISQUERY}</div>
+			${CMISQUERY:B}
 		</td>
 	</tr>
 </table>
-
-<script type="text/javascript">
-var cmisQuery = "${CMISQUERY}";
-if(cmisQuery.trim()==""){
-  var cmisQueryDiv = document.getElementById("cmisQueryDiv");
-  cmisQueryDiv.innerHTML = "";
-}
-</script>

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/authorities/DCTM/AuthorityConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/authorities/DCTM/AuthorityConnector.java?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/authorities/DCTM/AuthorityConnector.java (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/authorities/DCTM/AuthorityConnector.java Sun Dec 25 20:10:58 2011
@@ -986,7 +986,8 @@ public class AuthorityConnector extends 
   *@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("Docbase");
@@ -1036,7 +1037,8 @@ public class AuthorityConnector extends 
   *@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 docbaseName = parameters.getParameter(org.apache.manifoldcf.crawler.authorities.DCTM.AuthorityConnector.CONFIG_PARAM_DOCBASE);
@@ -1174,7 +1176,8 @@ public class AuthorityConnector extends 
   *@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 docbaseName = variableContext.getParameter("docbasename");
@@ -1212,7 +1215,8 @@ public class AuthorityConnector extends 
   *@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(

Modified: incubator/lcf/branches/CONNECTORS-335/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/authorities/DCTM/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/authorities/DCTM/Messages.java?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/authorities/DCTM/Messages.java (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/authorities/DCTM/Messages.java Sun Dec 25 20:10:58 2011
@@ -19,75 +19,106 @@
 package org.apache.manifoldcf.crawler.authorities.DCTM;
 
 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.authorities.DCTM.common";
-
+  public static final String DEFAULT_PATH_NAME="org.apache.manifoldcf.crawler.authorities.DCTM";
+  
   /** 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/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-335/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java?rev=1224641&r1=1224640&r2=1224641&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-335/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java (original)
+++ incubator/lcf/branches/CONNECTORS-335/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java Sun Dec 25 20:10:58 2011
@@ -1917,11 +1917,12 @@ public class DCTM extends org.apache.man
   *@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("DCTM.Docbase"));
-    tabsArray.add(Messages.getString("DCTM.Webtop"));
+    tabsArray.add(Messages.getString(locale,"DCTM.Docbase"));
+    tabsArray.add(Messages.getString(locale,"DCTM.Webtop"));
     
     out.print(
 "<script type=\"text/javascript\">\n"+
@@ -1931,28 +1932,28 @@ public class DCTM extends org.apache.man
 "  if (editconnection.docbasename.value == \"\")\n"+
 "  {\n"+
 "    alert(\"Please supply the name of a Docbase\");\n"+
-"    SelectTab(\"" + Messages.getString("DCTM.Docbase") + ”\");\n"+
+"    SelectTab(\"" + Messages.getBodyJavascriptString(locale,"DCTM.Docbase") + "\");\n"+
 "    editconnection.docbasename.focus();\n"+
 "    return false;\n"+
 "  }\n"+
 "  if (editconnection.docbaseusername.value == \"\")\n"+
 "  {\n"+
 "    alert(\"The connection requires a valid Documentum user name\");\n"+
-"    SelectTab(\"" + Messages.getString("DCTM.Docbase") + "\");\n"+
+"    SelectTab(\"" + Messages.getBodyJavascriptString(locale,"DCTM.Docbase") + "\");\n"+
 "    editconnection.docbaseusername.focus();\n"+
 "    return false;\n"+
 "  }\n"+
 "  if (editconnection.docbasepassword.value == \"\")\n"+
 "  {\n"+
 "    alert(\"The connection requires the Documentum user's password\");\n"+
-"    SelectTab(\"" + Messages.getString("DCTM.Docbase") + "\");\n"+
+"    SelectTab(\"" + Messages.getBodyJavascriptString(locale,"DCTM.Docbase") + "\");\n"+
 "    editconnection.docbasepassword.focus();\n"+
 "    return false;\n"+
 "  }\n"+
 "  if (editconnection.webtopbaseurl.value == \"\")\n"+
 "  {\n"+
 "    alert(\"Please specify the base url to a webtop to serve selected documents\");\n"+
-"    SelectTab(\"" + Messages.getString("DCTM.Webtop") + "\");\n"+
+"    SelectTab(\"" + Messages.getBodyJavascriptString(locale,"DCTM.Webtop") + "\");\n"+
 "    editconnection.webtopbaseurl.focus();\n"+
 "    return false;\n"+
 "  }\n"+
@@ -1974,7 +1975,8 @@ public class DCTM extends org.apache.man
   *@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 docbaseName = parameters.getParameter(org.apache.manifoldcf.crawler.connectors.DCTM.DCTM.CONFIG_PARAM_DOCBASE);
@@ -1994,22 +1996,22 @@ public class DCTM extends org.apache.man
       webtopBaseUrl = "http://localhost/webtop/";
 
     // "Docbase" tab
-    if (tabName.equals(Messages.getString("DCTM.Docbase")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.Docbase")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("DCTM.DocbaseName") + "</nobr></td><td class=\"value\"><input type=\"text\" size=\"32\" name=\"docbasename\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(docbaseName)+"\"/></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"DCTM.DocbaseName") + "</nobr></td><td class=\"value\"><input type=\"text\" size=\"32\" name=\"docbasename\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(docbaseName)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("DCTM.DocbaseUserName") + "</nobr></td><td class=\"value\"><input type=\"text\" size=\"32\" name=\"docbaseusername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(docbaseUserName)+"\"/></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"DCTM.DocbaseUserName") + "</nobr></td><td class=\"value\"><input type=\"text\" size=\"32\" name=\"docbaseusername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(docbaseUserName)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("DCTM.DocbasePassword") + "</nobr></td><td class=\"value\"><input type=\"password\" size=\"32\" name=\"docbasepassword\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(docbasePassword)+"\"/></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"DCTM.DocbasePassword") + "</nobr></td><td class=\"value\"><input type=\"password\" size=\"32\" name=\"docbasepassword\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(docbasePassword)+"\"/></td>\n"+
 "  </tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("DCTM.DocbaseDomain") + "</nobr></td><td class=\"value\"><input type=\"text\" size=\"32\" name=\"docbasedomain\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(docbaseDomain)+"\"/></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"DCTM.DocbaseDomain") + "</nobr></td><td class=\"value\"><input type=\"text\" size=\"32\" name=\"docbasedomain\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(docbaseDomain)+"\"/></td>\n"+
 "  </tr>\n"+
 "</table>\n"
       );
@@ -2026,13 +2028,13 @@ public class DCTM extends org.apache.man
     }
 
     // Webtop tab
-    if (tabName.equals(Messages.getString("DCTM.Webtop")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.Webtop")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("DCTM.WebtopBaseURL") + "</nobr></td><td class=\"value\"><input type=\"text\" size=\"64\" name=\"webtopbaseurl\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(webtopBaseUrl)+"\"/></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"DCTM.WebtopBaseURL") + "</nobr></td><td class=\"value\"><input type=\"text\" size=\"64\" name=\"webtopbaseurl\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(webtopBaseUrl)+"\"/></td>\n"+
 "  </tr>\n"+
 "</table>\n"
       );
@@ -2056,7 +2058,8 @@ public class DCTM extends org.apache.man
   *@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 docbaseName = variableContext.getParameter("docbasename");
@@ -2090,13 +2093,14 @@ public class DCTM extends org.apache.man
   *@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("DCTM.Parameters") + "</nobr></td>\n"+
+"    <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getBodyString(locale,"DCTM.Parameters") + "</nobr></td>\n"+
 "    <td class=\"value\" colspan=\"3\">\n"
     );
     Iterator iter = parameters.listParameters();
@@ -2139,15 +2143,15 @@ public class DCTM extends org.apache.man
   *@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("DCTM.Paths"));
-    tabsArray.add(Messages.getString("DCTM.DocumentTypes"));
-    tabsArray.add(Messages.getString("DCTM.ContentTypes"));
-    tabsArray.add(Messages.getString("DCTM.ContentLength"));
-    tabsArray.add(Messages.getString("DCTM.Security"));
-    tabsArray.add(Messages.getString("DCTM.PathMetadata"));
+    tabsArray.add(Messages.getString(locale,"DCTM.Paths"));
+    tabsArray.add(Messages.getString(locale,"DCTM.DocumentTypes"));
+    tabsArray.add(Messages.getString(locale,"DCTM.ContentTypes"));
+    tabsArray.add(Messages.getString(locale,"DCTM.ContentLength"));
+    tabsArray.add(Messages.getString(locale,"DCTM.Security"));
+    tabsArray.add(Messages.getString(locale,"DCTM.PathMetadata"));
     out.print(
 "<script type=\"text/javascript\">\n"+
 "<!--\n"+
@@ -2224,14 +2228,14 @@ public class DCTM extends org.apache.man
   *@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;
     int k;
 
     // Paths tab
-    if (tabName.equals(Messages.getString("DCTM.Paths")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.Paths")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2389,13 +2393,13 @@ public class DCTM extends org.apache.man
       }
     }
 
-    if (tabName.equals(Messages.getString("DCTM.Security")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.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("DCTM.Security2")</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"DCTM.Security2") + "</nobr></td>\n"+
 "    <td class=\"value\" colspan=\"1\">\n"+
 "      <input type=\"radio\" name=\"specsecurity\" value=\"on\" "+((securityOn)?"checked=\"true\"":"")+" />Enabled&nbsp;\n"+
 "      <input type=\"radio\" name=\"specsecurity\" value=\"off\" "+((securityOn==false)?"checked=\"true\"":"")+" />Disabled\n"+
@@ -2435,7 +2439,7 @@ public class DCTM extends org.apache.man
       {
         out.print(
 "  <tr>\n"+
-"    <td class=\"message\" colspan=\"2\">" + Messages.getString("DCTM.NoAccessTokensPresent") + "</td>\n"+
+"    <td class=\"message\" colspan=\"2\">" + Messages.getBodyString(locale,"DCTM.NoAccessTokensPresent") + "</td>\n"+
 "  </tr>\n"
         );
       }
@@ -2519,7 +2523,7 @@ public class DCTM extends org.apache.man
       }
     }
 
-    if (tabName.equals(Messages.getString("DCTM.DocumentTypes")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.DocumentTypes")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2679,7 +2683,7 @@ public class DCTM extends org.apache.man
       }
     }
 
-    if (tabName.equals(Messages.getString("DCTM.ContentTypes")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.ContentTypes")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2775,7 +2779,7 @@ public class DCTM extends org.apache.man
       }
     }
 
-    if (tabName.equals(Messages.getString("DCTM.ContentLength")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.ContentLength")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
@@ -2827,7 +2831,7 @@ public class DCTM extends org.apache.man
       }
     }
 
-    if (tabName.equals(Messages.getString("DCTM.PathMetadata")))
+    if (tabName.equals(Messages.getString(locale,"DCTM.PathMetadata")))
     {
       out.print(
 "<input type=\"hidden\" name=\"specmappingcount\" value=\""+Integer.toString(matchMap.getMatchCount())+"\"/>\n"+
@@ -2836,7 +2840,7 @@ public class DCTM extends org.apache.man
 "<table class=\"displaytable\">\n"+
 "  <tr><td class=\"separator\" colspan=\"4\"><hr/></td></tr>\n"+
 "  <tr>\n"+
-"    <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getString("DCTM.PathAttributeName") + "</nobr></td>\n"+
+"    <td class=\"description\" colspan=\"1\"><nobr>" + Messages.getBodyString(locale,"DCTM.PathAttributeName") + "</nobr></td>\n"+
 "    <td class=\"value\" colspan=\"3\">\n"+
 "      <input type=\"text\" name=\"specpathnameattribute\" size=\"20\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(pathNameAttribute)+"\"/>\n"+
 "    </td>\n"+
@@ -2852,7 +2856,7 @@ public class DCTM extends org.apache.man
 "  <tr>\n"+
 "    <td class=\"description\"><input type=\"hidden\" name=\""+"specmappingop_"+Integer.toString(i)+"\" value=\"\"/>\n"+
 "      <a name=\""+"mapping_"+Integer.toString(i)+"\">\n"+
-"        <input type=\"button\" onClick='Javascript:SpecOp(\"specmappingop_"+Integer.toString(i)+"\",\"" + Messages.getString("DCTM.Delete") + "\",\"mapping_"+Integer.toString(i)+"\")' alt=\"" + Messages.getString("DCTM.DeleteMapping") + Integer.toString(i)+"\" value=\"Delete\"/>\n"+
+"        <input type=\"button\" onClick='Javascript:SpecOp(\"specmappingop_"+Integer.toString(i)+"\",\"" + Messages.getAttributeJavascriptString(locale,"DCTM.Delete") + "\",\"mapping_"+Integer.toString(i)+"\")' alt=\"" + Messages.getAttributeString(locale,"DCTM.DeleteMapping") + Integer.toString(i)+"\" value=\"Delete\"/>\n"+
 "      </a>\n"+
 "    </td>\n"+
 "    <td class=\"value\"><input type=\"hidden\" name=\"specmatch_"+Integer.toString(i)+"\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(matchString)+"\"/>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(matchString)+"</td>\n"+
@@ -2865,7 +2869,7 @@ public class DCTM extends org.apache.man
       if (i == 0)
       {
         out.print(
-"  <tr><td colspan=\"4\" class=\"message\">" + Messages.getString("DCTM.NoMappingsSpecified") + "</td></tr>\n"
+"  <tr><td colspan=\"4\" class=\"message\">" + Messages.getBodyString(locale,"DCTM.NoMappingsSpecified") + "</td></tr>\n"
         );
       }
       out.print(
@@ -2874,12 +2878,12 @@ public class DCTM extends org.apache.man
 "  <tr>\n"+
 "    <td class=\"description\">\n"+
 "      <a name=\""+"mapping_"+Integer.toString(i)+"\">\n"+
-"        <input type=\"button\" onClick='Javascript:SpecAddMapping(\"mapping_"+Integer.toString(i+1)+"\")' alt=\"" + Messages.getString("DCTM.AddToMappings") + "\" value=\"" + Messages.getString("DCTM.Add") + "\"/>\n"+
+"        <input type=\"button\" onClick='Javascript:SpecAddMapping(\"mapping_"+Integer.toString(i+1)+"\")' alt=\"" + Messages.getAttributeString(locale,"DCTM.AddToMappings") + "\" value=\"" + Messages.getAttributeString(locale,"DCTM.Add") + "\"/>\n"+
 "      </a>\n"+
 "    </td>\n"+
-"    <td class=\"value\">" + Messages.getString("DCTM.MatchRegexp") + "&nbsp;<input type=\"text\" name=\"specmatch\" size=\"32\" value=\"\"/></td>\n"+
+"    <td class=\"value\">" + Messages.getBodyString(locale,"DCTM.MatchRegexp") + "&nbsp;<input type=\"text\" name=\"specmatch\" size=\"32\" value=\"\"/></td>\n"+
 "    <td class=\"value\">==></td>\n"+
-"    <td class=\"value\">" + Messages.getString("DCTM.ReplaceString") + "&nbsp;<input type=\"text\" name=\"specreplace\" size=\"32\" value=\"\"/></td>\n"+
+"    <td class=\"value\">" + Messages.getBodyString(locale,"DCTM.ReplaceString") + "&nbsp;<input type=\"text\" name=\"specreplace\" size=\"32\" value=\"\"/></td>\n"+
 "  </tr>\n"+
 "</table>\n"
       );
@@ -2913,7 +2917,7 @@ public class DCTM extends org.apache.man
   *@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
   {
     String x = variableContext.getParameter("pathcount");
@@ -3222,7 +3226,7 @@ public class DCTM extends org.apache.man
   *@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(
@@ -3240,7 +3244,7 @@ public class DCTM extends org.apache.man
         {
           seenAny = true;
           out.print(
-"    <td class=\"description\">" + Messages.getString("DCTM.CabinetFolderPaths") + "</td>\n"+
+"    <td class=\"description\">" + Messages.getBodyString(locale,"DCTM.CabinetFolderPaths") + "</td>\n"+
 "    <td class=\"value\">\n"
           );
         }
@@ -3259,7 +3263,7 @@ public class DCTM extends org.apache.man
     else
     {
       out.print(
-"    <td colspan=\"2\" class=\"message\">" + Messages.getString("DCTM.NoCabinetFolderPathsSpecified") + "</td>\n"
+"    <td colspan=\"2\" class=\"message\">" + Messages.getBodyString(locale,"DCTM.NoCabinetFolderPathsSpecified") + "</td>\n"
       );
     }
     out.print(
@@ -3278,7 +3282,7 @@ public class DCTM extends org.apache.man
         if (seenAny == false)
         {
           out.print(
-"    <td class=\"description\"><nobr>" + Messages.getString("DCTM.ObjectTypes") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"DCTM.ObjectTypes") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <table class=\"displaytable\">\n"
           );
@@ -3295,7 +3299,7 @@ public class DCTM extends org.apache.man
         );
         if (isAll != null && isAll.equals("true"))
           out.print(
-"            <nobr>" + Messages.getString("DCTM.allMetadataAttributes") + "</nobr>\n"
+"            <nobr>" + Messages.getBodyString(locale,"DCTM.allMetadataAttributes") + "</nobr>\n"
           );
         else
         {
@@ -3329,7 +3333,7 @@ public class DCTM extends org.apache.man
     else
     {
       out.print(
-"    <td colspan=\"2\" class=\"message\">" + Messages.getString("DCTM.NoDocumentTypesSpecified") + "</td>\n"
+"    <td colspan=\"2\" class=\"message\">" + Messages.getBodyString(locale,"DCTM.NoDocumentTypesSpecified") + "</td>\n"
       );
     }
     out.print(
@@ -3348,7 +3352,7 @@ public class DCTM extends org.apache.man
         if (seenAny == false)
         {
           out.print(
-"    <td class=\"description\"><nobr>" + Messages.getString("DCTM.ContentTypes2") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"DCTM.ContentTypes2") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"
           );
           seenAny = true;
@@ -3368,7 +3372,7 @@ public class DCTM extends org.apache.man
     else
     {
       out.print(
-"    <td colspan=\"2\" class=\"message\">" + Messages.getString("DCTM.NoMimeTypesSpecified") + "</td>\n"
+"    <td colspan=\"2\" class=\"message\">" + Messages.getBodyString(locale,"DCTM.NoMimeTypesSpecified") + "</td>\n"
       );
     }
     out.print(
@@ -3391,7 +3395,7 @@ public class DCTM extends org.apache.man
     out.print(
 "\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("DCTM.MaximumDocumentLength") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"DCTM.MaximumDocumentLength") + "</nobr></td>\n"+
 "    <td class=\"value\">"+maxDocumentLength+"</td>\n"+
 "  </tr>\n"+
 "\n"+
@@ -3417,7 +3421,7 @@ public class DCTM extends org.apache.man
     out.print(
 "\n"+
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>Messages.getString("DCTM.Security2")</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"DCTM.Security2") + "</nobr></td>\n"+
 "    <td class=\"value\">"+((securityOn)?"Enabled":"Disabled")+"</td>\n"+
 "  </tr>\n"+
 "\n"+
@@ -3435,7 +3439,7 @@ public class DCTM extends org.apache.man
         {
           out.print(
 "  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getString("DCTM.AccessTokens") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"DCTM.AccessTokens") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"
           );
           seenAny = true;
@@ -3457,7 +3461,7 @@ public class DCTM extends org.apache.man
     else
     {
       out.print(
-"  <tr><td class=\"message\" colspan=\"2\">" + Messages.getString("DCTM.NoAccessTokensSpecified") + "</td></tr>\n"
+"  <tr><td class=\"message\" colspan=\"2\">" + Messages.getBodyString(locale,"DCTM.NoAccessTokensSpecified") + "</td></tr>\n"
       );
     }
 
@@ -3484,14 +3488,14 @@ public class DCTM extends org.apache.man
     if (pathNameAttribute.length() > 0)
     {
       out.print(
-"    <td class=\"description\">" + Messages.getString("DCTM.PathNameMetadataAttribute") + "</td>\n"+
+"    <td class=\"description\">" + Messages.getBodyString(locale,"DCTM.PathNameMetadataAttribute") + "</td>\n"+
 "    <td class=\"value\">"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(pathNameAttribute)+"</td>\n"
       );
     }
     else
     {
       out.print(
-"    <td class=\"message\" colspan=\"2\">" +  + "</td>\n"
+"    <td class=\"message\" colspan=\"2\">" + Messages.getBodyString(locale,"DCTM.NoPathNameMetadataAttributeSpecified") + "</td>\n"
       );
     }
     
@@ -3519,7 +3523,7 @@ public class DCTM extends org.apache.man
     if (matchMap.getMatchCount() > 0)
     {
       out.print(
-"    <td class=\"description\"><nobr>" + Messages.getString("DCTM.PathValueMapping") + "</nobr></td>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"DCTM.PathValueMapping") + "</nobr></td>\n"+
 "    <td class=\"value\">\n"+
 "      <table class=\"displaytable\">\n"
       );
@@ -3546,7 +3550,7 @@ public class DCTM extends org.apache.man
     else
     {
       out.print(
-"    <td class=\"message\" colspan=\"2\">" + Messages.getString("DCTM.NoMappingsSpecified") + "</td>\n"
+"    <td class=\"message\" colspan=\"2\">" + Messages.getBodyString(locale,"DCTM.NoMappingsSpecified") + "</td>\n"
       );
     }
 

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