Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F265A200C81 for ; Fri, 12 May 2017 05:14:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F1219160BCA; Fri, 12 May 2017 03:14:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 42869160BC7 for ; Fri, 12 May 2017 05:14:12 +0200 (CEST) Received: (qmail 52085 invoked by uid 500); 12 May 2017 03:14:11 -0000 Mailing-List: contact commits-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list commits@manifoldcf.apache.org Received: (qmail 52075 invoked by uid 99); 12 May 2017 03:14:10 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 May 2017 03:14:10 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 6CAF43A2A0E for ; Fri, 12 May 2017 03:14:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@manifoldcf.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170512031409.6CAF43A2A0E@svn01-us-west.apache.org> archived-at: Fri, 12 May 2017 03:14:13 -0000 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')) - - @@ -35,7 +35,7 @@ #else - - + + #end \ No newline at end of file

$Encoder.bodyEscape($ResourceBundle.getString('TikaExtractor.TikaHostname'))
$Encoder.bodyEscape($ResourceBundle.getString('TikaExtractor.TikaPort'))