manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1587740 - in /manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main: java/org/apache/manifoldcf/agents/output/amazoncloudsearch/ native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/ resources/org...
Date Tue, 15 Apr 2014 22:40:22 GMT
Author: kwright
Date: Tue Apr 15 22:40:21 2014
New Revision: 1587740

URL: http://svn.apache.org/r1587740
Log:
Committed 3.diff, with some minor fixes

Modified:
    manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java
    manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_ja_JP.properties
    manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/amazoncloudsearch/editConfiguration.js
    manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/amazoncloudsearch/viewConfiguration.html

Modified: manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java?rev=1587740&r1=1587739&r2=1587740&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/amazoncloudsearch/AmazonCloudSearchConnector.java
Tue Apr 15 22:40:21 2014
@@ -191,42 +191,40 @@ public class AmazonCloudSearchConnector 
   *@return the connection's status as a displayable string.
   */
   @Override
-  public String check()
-    throws ManifoldCFException
-  {
-    try
-    {
-      getSession();
-      String responsbody = postData("[]");
-      String status = getStatusFromJsonResponse(responsbody);
-      
-      //check status message
-      String message = "";
-      if("error".equals(status))
-      {
-        JsonParser parser = new JsonFactory().createJsonParser(responsbody);
-        while (parser.nextToken() != JsonToken.END_OBJECT) {
-          String name = parser.getCurrentName();
-          if("errors".equalsIgnoreCase(name)){
-            message = parseMessage(parser);
-            break;
-          }
-        }
-      }
-      
-      if("error".equalsIgnoreCase(status) &&
-          "batch must contain at least one operation".equals(message)){
-        return "Connection working.";
-      }
-      return "Connection NOT working.";
+  public String check() throws ManifoldCFException {
+    try {
+      getSession();
+      String responsbody = postData("[]");
+      String status = getStatusFromJsonResponse(responsbody);
+      
+      // check status message
+      String message = "";
+      if ("error".equals(status)) {
+        JsonParser parser = new JsonFactory().createJsonParser(responsbody);
+        while (parser.nextToken() != JsonToken.END_OBJECT) {
+          String name = parser.getCurrentName();
+          if ("errors".equalsIgnoreCase(name)) {
+            message = parseMessage(parser);
+            break;
+          }
+        }
+      }
+      if ("error".equalsIgnoreCase(status)
+          && "batch must contain at least one operation".equals(message)) {
+        return "Connection working.";
+      }
+      return "Connection NOT working.";
+      
+    } catch (ClientProtocolException e) {
+      Logging.connectors.debug(e);
+      return "Protocol exception: "+e.getMessage();
+    } catch (IOException e) {
+      Logging.connectors.debug(e);
+      return "IO exception: "+e.getMessage();
+    } catch (ServiceInterruption e) {
+      Logging.connectors.debug(e);
+      return "Transient exception: "+e.getMessage();
     }
-    catch (ClientProtocolException e) {
-      throw new ManifoldCFException(e);
-    } catch (IOException e) {
-      throw new ManifoldCFException(e);
-    } catch (ServiceInterruption e) {
-      throw new ManifoldCFException(e);
-    }
   }
   
   private String getStatusFromJsonResponse(String responsbody) throws ManifoldCFException
{

Modified: manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_ja_JP.properties?rev=1587740&r1=1587739&r2=1587740&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_ja_JP.properties
(original)
+++ manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/amazoncloudsearch/common_ja_JP.properties
Tue Apr 15 22:40:21 2014
@@ -13,12 +13,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-AmazonCloudSearchOutputConnector.ServerTabName=Server
-AmazonCloudSearchOutputConnector.ServerHostColon=Server host:
-AmazonCloudSearchOutputConnector.ServerPathColon=Server path:
-AmazonCloudSearchOutputConnector.ProxyProtocolColon=Proxy protocol:
-AmazonCloudSearchOutputConnector.ProxyHostColon=Proxy host:
-AmazonCloudSearchOutputConnector.ProxyPortColon=Proxy port:
-AmazonCloudSearchOutputConnector.ServerHostCannotBeNull=Server host cannot be null
-AmazonCloudSearchOutputConnector.ServerPathMustStartWithSlash=Server path must start with
a '/'
-AmazonCloudSearchOutputConnector.ProxyPortMustBeAnInteger=Proxy port must be an integer
+AmazonCloudSearchOutputConnector.ServerTabName=サーバー
+AmazonCloudSearchOutputConnector.ServerHostColon=サーバー名:
+AmazonCloudSearchOutputConnector.ServerPathColon=パス:
+AmazonCloudSearchOutputConnector.ProxyProtocolColon=プロキシ プロトコル:
+AmazonCloudSearchOutputConnector.ProxyHostColon=プロキシ ホスト:
+AmazonCloudSearchOutputConnector.ProxyPortColon=プロキシ ポート:
+AmazonCloudSearchOutputConnector.ServerHostCannotBeNull=サーバー名は必須です。
+AmazonCloudSearchOutputConnector.ServerPathMustStartWithSlash=パスは / から入力してください。
+AmazonCloudSearchOutputConnector.ProxyPortMustBeAnInteger=プロキシ ポートは数値を入力してください。

Modified: manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/amazoncloudsearch/editConfiguration.js
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/amazoncloudsearch/editConfiguration.js?rev=1587740&r1=1587739&r2=1587740&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/amazoncloudsearch/editConfiguration.js
(original)
+++ manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/amazoncloudsearch/editConfiguration.js
Tue Apr 15 22:40:21 2014
@@ -26,10 +26,10 @@ function checkConfigForSave()
     editconnection.serverhost.focus();
     return false;
   }
-  if (!editconnection.serverpath.value.startsWith("/"))
+  if (!editconnection.serverpath.value.indexOf("/") == 0)
   {
     alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('AmazonCloudSearchOutputConnector.ServerPathMustStartWithSlash'))");
-    SelectTab("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('HDFSOutputConnector.ServerTabName'))");
+    SelectTab("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('AmazonCloudSearchOutputConnector.ServerTabName'))");
     editconnection.serverpath.focus();
     return false;
   }

Modified: manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/amazoncloudsearch/viewConfiguration.html
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/amazoncloudsearch/viewConfiguration.html?rev=1587740&r1=1587739&r2=1587740&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/amazoncloudsearch/viewConfiguration.html
(original)
+++ manifoldcf/branches/CONNECTORS-916/connectors/amazoncloudsearch/connector/src/main/resources/org/apache/manifoldcf/agents/output/amazoncloudsearch/viewConfiguration.html
Tue Apr 15 22:40:21 2014
@@ -21,7 +21,7 @@
     <td class="value">$Encoder.bodyEscape($SERVERHOST)</td>
   </tr>
   <tr>
-    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('AmazonCloudSearchOutputConnector.ServerPathColon))</nobr></td>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('AmazonCloudSearchOutputConnector.ServerPathColon'))</nobr></td>
     <td class="value">$Encoder.bodyEscape($SERVERPATH)</td>
   </tr>
 



Mime
View raw message