manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1794913 - in /manifoldcf/branches/CONNECTORS-1425/connectors/tikaservice/connector/src/main: java/org/apache/manifoldcf/agents/transformation/tikaservice/ resources/org/apache/manifoldcf/agents/transformation/tikaservice/
Date Fri, 12 May 2017 03:14:08 GMT
Author: kwright
Date: Fri May 12 03:14:08 2017
New Revision: 1794913

URL: http://svn.apache.org/viewvc?rev=1794913&view=rev
Log:
Get the UI to work

Modified:
    manifoldcf/branches/CONNECTORS-1425/connectors/tikaservice/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tikaservice/TikaExtractor.java
    manifoldcf/branches/CONNECTORS-1425/connectors/tikaservice/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tikaservice/editConfiguration_Server.html

Modified: manifoldcf/branches/CONNECTORS-1425/connectors/tikaservice/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tikaservice/TikaExtractor.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1425/connectors/tikaservice/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tikaservice/TikaExtractor.java?rev=1794913&r1=1794912&r2=1794913&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1425/connectors/tikaservice/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tikaservice/TikaExtractor.java
(original)
+++ manifoldcf/branches/CONNECTORS-1425/connectors/tikaservice/connector/src/main/java/org/apache/manifoldcf/agents/transformation/tikaservice/TikaExtractor.java
Fri May 12 03:14:08 2017
@@ -176,8 +176,17 @@ public class TikaExtractor extends org.a
   {
     if (sessionTimeout == -1L)
     {
-      this.tikaPort = Integer.parseInt(tikaPortString);
-
+      if (tikaHostname == null || tikaHostname.length() == 0) {
+        throw new ManifoldCFException("Missing host name");
+      }
+      if (tikaPortString == null) {
+        throw new ManifoldCFException("Missing port value");
+      }
+      try {
+        this.tikaPort = Integer.parseInt(tikaPortString);
+      } catch (NumberFormatException e) {
+        throw new ManifoldCFException("Bad port number: "+tikaPortString);
+      }
       final int connectionTimeout = 60000;
       final int socketTimeout = 900000;
 
@@ -305,12 +314,12 @@ public class TikaExtractor extends org.a
     Locale locale, ConfigParams parameters)
     throws ManifoldCFException
   {
-    String tikaHostname = variableContext.getParameter("tikaHostname");
+    final String tikaHostname = variableContext.getParameter("tikaHostname");
 
     if (tikaHostname != null)
       parameters.setParameter(TikaConfig.PARAM_TIKAHOSTNAME,tikaHostname);
 
-    String tikaPort = variableContext.getParameter("tikaPort");
+    final String tikaPort = variableContext.getParameter("tikaPort");
     if (tikaPort != null)
       parameters.setParameter(TikaConfig.PARAM_TIKAPORT,tikaPort);
 

Modified: manifoldcf/branches/CONNECTORS-1425/connectors/tikaservice/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tikaservice/editConfiguration_Server.html
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1425/connectors/tikaservice/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tikaservice/editConfiguration_Server.html?rev=1794913&r1=1794912&r2=1794913&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1425/connectors/tikaservice/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tikaservice/editConfiguration_Server.html
(original)
+++ manifoldcf/branches/CONNECTORS-1425/connectors/tikaservice/connector/src/main/resources/org/apache/manifoldcf/agents/transformation/tikaservice/editConfiguration_Server.html
Fri May 12 03:14:08 2017
@@ -15,19 +15,19 @@
  limitations under the License.
 -->
 
-#if($TABNAME == $ResourceBundle.getString('TikaExtractor.TikaServerTabName'))
+#if($TabName == $ResourceBundle.getString('TikaExtractor.TikaServerTabName'))
 
 <table class="displaytable">
   <tr><td class="separator" colspan="2"><hr/></td></tr>
   <tr>
     <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('TikaExtractor.TikaHostname'))</nobr></td>
-    <td class="value"><input name="tikahostname" type="text"
+    <td class="value"><input name="tikaHostname" type="text"
       value="$Encoder.attributeEscape($TIKAHOSTNAME)" size="16" />
     </td>
   </tr>
   <tr>
     <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('TikaExtractor.TikaPort'))</nobr></td>
-    <td class="value"><input name="tikaport" type="text"
+    <td class="value"><input name="tikaPort" type="text"
       value="$Encoder.attributeEscape($TIKAPORT)" size="5" />
     </td>
   </tr>
@@ -35,7 +35,7 @@
 
 #else
 
-<input type="hidden" name="tikahostname" value="$Encoder.attributeEscape($TIKAHOSTNAME)"/>
-<input type="hidden" name="tikaport" value="$Encoder.attributeEscape($TIKAPORT)"/>
+<input type="hidden" name="tikaHostname" value="$Encoder.attributeEscape($TIKAHOSTNAME)"/>
+<input type="hidden" name="tikaPort" value="$Encoder.attributeEscape($TIKAPORT)"/>
 
 #end
\ No newline at end of file



Mime
View raw message