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 4BD93200D07 for ; Sun, 1 Oct 2017 20:49:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4A2041609C8; Sun, 1 Oct 2017 18:49:07 +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 8BC741609C5 for ; Sun, 1 Oct 2017 20:49:06 +0200 (CEST) Received: (qmail 50443 invoked by uid 500); 1 Oct 2017 18:49:05 -0000 Mailing-List: contact dev-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 dev@manifoldcf.apache.org Received: (qmail 50432 invoked by uid 99); 1 Oct 2017 18:49:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Oct 2017 18:49:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 297CCD6ED0 for ; Sun, 1 Oct 2017 18:49:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id hC7N9oQo-Uy4 for ; Sun, 1 Oct 2017 18:49:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 73CA75F239 for ; Sun, 1 Oct 2017 18:49:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 3F109E0EB9 for ; Sun, 1 Oct 2017 18:49:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A7B2D242B6 for ; Sun, 1 Oct 2017 18:49:01 +0000 (UTC) Date: Sun, 1 Oct 2017 18:49:01 +0000 (UTC) From: "Luis Cabaceira (JIRA)" To: dev@manifoldcf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CONNECTORS-1462) Add support for rootPath attribute in File System Connector repository MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 01 Oct 2017 18:49:07 -0000 [ https://issues.apache.org/jira/browse/CONNECTORS-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Luis Cabaceira updated CONNECTORS-1462: --------------------------------------- Attachment: CONNECTORS-1462.patch Corrected path. Including sectionized path into the List > Add support for rootPath attribute in File System Connector repository > ---------------------------------------------------------------------- > > Key: CONNECTORS-1462 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1462 > Project: ManifoldCF > Issue Type: Improvement > Components: Alfresco BFSI Output Connector, File system connector > Affects Versions: ManifoldCF 2.9 > Reporter: Luis Cabaceira > Assignee: Piergiorgio Lucidi > Labels: patch > Fix For: ManifoldCF next > > Attachments: CONNECTORS-1462.patch, FileConnector.java > > Original Estimate: 2h > Remaining Estimate: 2h > > In recent conversations about specific needs of the new output connectors (in this case for the Alfresco BFSI Output connector) a new construct was added in RepositoryDocument to support having a rootPath attribute under the document object. This new construct exists currently only in CONNECTORS-1356-2.7.1 branch. > This issue addresses the changes necessary to the File System Connector to support the new construct and inject the rootPath locations into RepositoryDocument. > ------------ > Changes > ------------ > org.apache.manifoldcf.crawler.connectors.filesystem.FileConnector.java > > {code:java} > // Extract rootPath from the specification > ArrayList rootPath = new ArrayList(); > for (int i = 0; i < spec.getChildCount(); i++) > { > SpecificationNode sn = spec.getChild(i); > if (sn.getType().equals("startpoint")) > { > String path = sn.getAttributeValue("path").replaceAll("\\\\","/"); > if (path.length() > 0) > { > if (!path.endsWith("/")) path += "/"; > rootPath.add(path); > break; > } > } > } > {code} > ... > {code:java} > RepositoryDocument data = new RepositoryDocument(); > data.setFileName(fileName); > data.setMimeType(mimeType); > data.setModifiedDate(modifiedDate); > data.setRootPath(rootPath); // Adding the rootPath to RepositoryDocument > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)