manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1497854 - in /manifoldcf/branches/CONNECTORS-703: ./ connectors/ connectors/regexpmapper/ connectors/regexpmapper/connector/ connectors/regexpmapper/connector/src/ connectors/regexpmapper/connector/src/main/ connectors/regexpmapper/connect...
Date Fri, 28 Jun 2013 17:24:49 GMT
Author: kwright
Date: Fri Jun 28 17:24:48 2013
New Revision: 1497854

URL: http://svn.apache.org/r1497854
Log:
Hook up regexpmapper to build system

Added:
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/build.xml   (with props)
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/Messages.java
  (with props)
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/RegexpMapper.java
  (with props)
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_en_US.properties
  (with props)
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_ja_JP.properties
  (with props)
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/resources/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/resources/org/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/resources/org/apache/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/resources/org/apache/manifoldcf/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/resources/org/apache/manifoldcf/authorities/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/resources/org/apache/manifoldcf/authorities/mappers/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/resources/org/apache/manifoldcf/authorities/mappers/regexp/
    manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/pom.xml   (with props)
Modified:
    manifoldcf/branches/CONNECTORS-703/build.xml
    manifoldcf/branches/CONNECTORS-703/connectors/pom.xml
    manifoldcf/branches/CONNECTORS-703/framework/example-common/connectors.xml

Modified: manifoldcf/branches/CONNECTORS-703/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/build.xml?rev=1497854&r1=1497853&r2=1497854&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/build.xml (original)
+++ manifoldcf/branches/CONNECTORS-703/build.xml Fri Jun 28 17:24:48 2013
@@ -77,6 +77,7 @@
         <ant dir="connectors/nullauthority" target="clean"/>
         <ant dir="connectors/nulloutput" target="clean"/>
         <ant dir="connectors/rss" target="clean"/>
+        <ant dir="connectors/regexpmapper" target="clean"/>
         <ant dir="connectors/sharepoint" target="clean"/>
         <ant dir="connectors/webcrawler" target="clean"/>
         <ant dir="connectors/wiki" target="clean"/>
@@ -129,6 +130,7 @@
         <ant dir="connectors/nullauthority" target="clean"/>
         <ant dir="connectors/nulloutput" target="clean"/>
         <ant dir="connectors/rss" target="clean"/>
+        <ant dir="connectors/regexpmapper" target="clean"/>
         <ant dir="connectors/sharepoint" target="clean"/>
         <ant dir="connectors/webcrawler" target="clean"/>
         <ant dir="connectors/wiki" target="clean"/>
@@ -919,6 +921,42 @@
         <ant dir="connectors/rss" target="run-tests-HSQLDB"/>
     </target>
 
+    <target name="setup-regexp-mapper" depends="build-framework" if="downloaded"/>
+
+    <target name="setup-regexp-mapper-tests" depends="build-tests-framework" if="downloaded"/>
+
+    <target name="build-regexp-mapper" depends="setup-regexp-mapper" if="downloaded">
+        <ant dir="connectors/regexpmapper" target="build"/>
+    </target>
+
+    <target name="doc-regexp-mapper" depends="setup-regexp-mapper" if="downloaded">
+        <ant dir="connectors/regexpmapper" target="doc"/>
+    </target>
+
+    <target name="build-tests-regexp-mapper" depends="setup-regexp-mapper,setup-regexp-mapper-tests"
if="downloaded">
+        <ant dir="connectors/regexpmapper" target="build-tests"/>
+    </target>
+
+    <target name="run-tests-regexp-mapper" depends="setup-regexp-mapper,setup-regexp-mapper-tests"
if="downloaded">
+        <ant dir="connectors/regexpmapper" target="run-tests"/>
+    </target>
+
+    <target name="run-tests-derby-regexp-mapper" depends="setup-regexp-mapper,setup-regexp-mapper-tests"
if="downloaded">
+        <ant dir="connectors/regexpmapper" target="run-tests-derby"/>
+    </target>
+
+    <target name="run-tests-postgresql-regexp-mapper" depends="setup-regexp-mapper,setup-regexp-mapper-tests"
if="downloaded">
+        <ant dir="connectors/regexpmapper" target="run-tests-postgresql"/>
+    </target>
+
+    <target name="run-tests-mysql-regexp-mapper" depends="setup-regexp-mapper,setup-regexp-mapper-tests"
if="downloaded">
+        <ant dir="connectors/regexpmapper" target="run-tests-mysql"/>
+    </target>
+
+    <target name="run-tests-HSQLDB-regexp-mapper" depends="setup-regexp-mapper,setup-regexp-mapper-tests"
if="downloaded">
+        <ant dir="connectors/regexpmapper" target="run-tests-HSQLDB"/>
+    </target>
+
     <target name="setup-sharepoint-connector" depends="build-framework" if="downloaded"/>
     
     <target name="setup-sharepoint-connector-tests" depends="build-tests-framework" if="downloaded"/>
@@ -1199,7 +1237,25 @@
         </condition>
     </target>
     
-    
+    <target name="general-add-mapping-connector-commented" depends="general-connector-runnable-check"
unless="${connector-name}.is-runnable">
+        <replace file="dist/connectors.xml" token="&lt;!-- Add your mapping connectors
here --&gt;" value="&lt;!-- Add your mapping connectors here --&gt;&#0010;
 &lt;!--mappingconnector name=&quot;${connector-label}&quot; class=&quot;${connector-class}&quot;/--&gt;"/>
+    </target>
+
+    <target name="general-add-mapping-connector-non-commented" depends="general-connector-runnable-check"
if="${connector-name}.is-runnable">
+        <replace file="dist/connectors.xml" token="&lt;!-- Add your mapping connectors
here --&gt;" value="&lt;!-- Add your mapping connectors here --&gt;&#0010;
 &lt;mappingconnector name=&quot;${connector-label}&quot; class=&quot;${connector-class}&quot;/&gt;"/>
+    </target>
+
+    <target name="general-add-mapping-connector-proprietary-commented" depends="general-connector-proprietary-runnable-check"
unless="${connector-name}.is-proprietary-runnable">
+        <replace file="dist/connectors-proprietary.xml" token="&lt;!-- Add your mapping
connectors here --&gt;" value="&lt;!-- Add your mapping connectors here --&gt;&#0010;
 &lt;!--mappingconnector name=&quot;${connector-label}&quot; class=&quot;${connector-class}&quot;/--&gt;"/>
+    </target>
+
+    <target name="general-add-mapping-connector-proprietary-non-commented" depends="general-connector-proprietary-runnable-check"
if="${connector-name}.is-proprietary-runnable">
+        <replace file="dist/connectors-proprietary.xml" token="&lt;!-- Add your mapping
connectors here --&gt;" value="&lt;!-- Add your mapping connectors here --&gt;&#0010;
 &lt;mappingconnector name=&quot;${connector-label}&quot; class=&quot;${connector-class}&quot;/&gt;"/>
+    </target>
+
+    <target name="general-add-mapping-connector" depends="general-add-mapping-connector-commented,general-add-mapping-connector-non-commented,general-add-mapping-connector-proprietary-commented,general-add-mapping-connector-proprietary-non-commented">
+    </target>
+
     <target name="general-add-authority-connector-commented" depends="general-connector-runnable-check"
unless="${connector-name}.is-runnable">
         <replace file="dist/connectors.xml" token="&lt;!-- Add your authority connectors
here --&gt;" value="&lt;!-- Add your authority connectors here --&gt;&#0010;
 &lt;!--authorityconnector name=&quot;${connector-label}&quot; class=&quot;${connector-class}&quot;/--&gt;"/>
     </target>
@@ -2103,6 +2159,43 @@
         </antcall>
     </target>
 
+    <target name="calculate-regexpmapper-condition" depends="build-regexp-mapper">
+        <available file="connectors/regexpmapper/dist/lib" type="dir" property="regexpmapper.exists"/>
+        <condition property="regexpmapper.include">
+            <and>
+                <isset property="regexpmapper.exists"/>
+                <isset property="downloaded"/>
+            </and>
+        </condition>
+    </target>
+
+    <target name="calculate-regexpmapper-doc-condition" depends="doc-regexp-mapper">
+        <available file="connectors/regexpmapper/dist/doc" type="dir" property="regexpmapper-doc.exists"/>
+        <condition property="regexpmapper-doc.include">
+            <and>
+                <isset property="regexpmapper-doc.exists"/>
+                <isset property="downloaded"/>
+            </and>
+        </condition>
+    </target>
+
+    <target name="deliver-regexp-mapper" depends="calculate-regexpmapper-condition" if="regexpmapper.include">
+        <antcall target="general-connector-delivery">
+            <param name="connector-name" value="regexpmapper"/>
+        </antcall>
+        <antcall target="general-add-mapping-connector">
+            <param name="connector-name" value="regexpmapper"/>
+            <param name="connector-label" value="Regular expression mapper"/>
+            <param name="connector-class" value="org.apache.manifoldcf.authorities.mappers.regexp.RegexpMapper"/>
+        </antcall>
+    </target>
+    
+    <target name="deliver-regexp-mapper-doc" depends="calculate-regexpmapper-doc-condition"
if="regexpmapper-doc.include">
+        <antcall target="general-connector-doc-delivery">
+            <param name="connector-name" value="regexpmapper"/>
+        </antcall>
+    </target>
+
     <target name="calculate-sharepoint-condition" depends="build-sharepoint-connector">
         <available file="connectors/sharepoint/dist/lib" type="dir" property="sharepoint.exists"/>
         <condition property="sharepoint.include">
@@ -2657,16 +2750,19 @@
     <target name="deliver-output-connectors" depends="deliver-gts-connector,deliver-solr-connector,deliver-nulloutput-connector,deliver-opensearchserver-connector,deliver-elasticsearch-connector"/>
     <target name="deliver-output-connectors-doc" depends="deliver-gts-connector-doc,deliver-solr-connector-doc,deliver-nulloutput-connector-doc,deliver-opensearchserver-connector-doc,deliver-elasticsearch-connector-doc"/>
     
+    <target name="deliver-mapping-connectors" depends="deliver-regexp-mapper"/>
+    <target name="deliver-mapping-connectors-doc" depends="deliver-regexp-mapper-doc"/>
+    
     <target name="deliver-lgpl-connectors" depends="deliver-jcifs-connector"/>
     <target name="deliver-lgpl-connectors-doc" depends="deliver-jcifs-connector-doc"/>
     
     <target name="deliver-proprietary-connectors" depends="deliver-documentum-connector,deliver-filenet-connector,deliver-livelink-connector,deliver-memex-connector,deliver-meridio-connector,deliver-sharepoint-connector"/>
     <target name="deliver-proprietary-connectors-doc" depends="deliver-documentum-connector-doc,deliver-filenet-connector-doc,deliver-livelink-connector-doc,deliver-memex-connector-doc,deliver-meridio-connector-doc,deliver-sharepoint-connector-doc"/>
 
-    <target name="build" depends="deliver-framework,deliver-open-connectors,deliver-output-connectors,deliver-lgpl-connectors,deliver-proprietary-connectors"/>
+    <target name="build" depends="deliver-framework,deliver-open-connectors,deliver-output-connectors,deliver-mapping-connectors,deliver-lgpl-connectors,deliver-proprietary-connectors"/>
     <target name="tmpclean" depends="cleanup-afterbuild"/>
     <target name="buildcln" depends="build,tmpclean"/>
-    <target name="javadoc" depends="deliver-framework-doc,deliver-open-connectors-doc,deliver-output-connectors-doc,deliver-lgpl-connectors-doc,deliver-proprietary-connectors-doc"/>
+    <target name="javadoc" depends="deliver-framework-doc,deliver-open-connectors-doc,deliver-output-connectors-doc,deliver-mapping-connectors-doc,deliver-lgpl-connectors-doc,deliver-proprietary-connectors-doc"/>
     <target name="doc" depends="deliver-site-doc"/>
     
     <target name="set-version">

Modified: manifoldcf/branches/CONNECTORS-703/connectors/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/connectors/pom.xml?rev=1497854&r1=1497853&r2=1497854&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/connectors/pom.xml (original)
+++ manifoldcf/branches/CONNECTORS-703/connectors/pom.xml Fri Jun 28 17:24:48 2013
@@ -52,6 +52,7 @@
     <module>elasticsearch</module>
     <module>dropbox</module>
     <module>googledrive</module>
+    <module>regexpmapper</module>
   </modules>
 
 </project>

Added: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/build.xml?rev=1497854&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/build.xml (added)
+++ manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/build.xml Fri Jun 28 17:24:48
2013
@@ -0,0 +1,23 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project name="regexpmapper" default="all">
+
+    <import file="../connector-build.xml"/>
+    
+    
+</project>

Propchange: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/build.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/Messages.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/Messages.java?rev=1497854&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/Messages.java
(added)
+++ manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/Messages.java
Fri Jun 28 17:24:48 2013
@@ -0,0 +1,141 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.authorities.mappers.regexp;
+
+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.ui.i18n.Messages
+{
+  public static final String DEFAULT_BUNDLE_NAME="org.apache.manifoldcf.authorities.mappers.regexp.common";
+  public static final String DEFAULT_PATH_NAME="org.apache.manifoldcf.authorities.mappers.regexp";
+  
+  /** Constructor - do no instantiate
+  */
+  protected Messages()
+  {
+  }
+  
+  public static String getString(Locale locale, String messageKey)
+  {
+    return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getAttributeString(Locale locale, String messageKey)
+  {
+    return getAttributeString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getBodyString(Locale locale, String messageKey)
+  {
+    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);
+  }
+  
+  public static String getBodyString(Locale locale, String messageKey, Object[] args)
+  {
+    return getBodyString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  public static String getAttributeJavascriptString(Locale locale, String messageKey, Object[]
args)
+  {
+    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, Locale locale, String messageKey, Object[]
args)
+  {
+    return getString(Messages.class, bundleName, locale, messageKey, args);
+  }
+
+  public static String getAttributeString(String bundleName, Locale locale, String messageKey,
Object[] args)
+  {
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
+  }
+
+  public static String getBodyString(String bundleName, Locale locale, String messageKey,
Object[] args)
+  {
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
+  }
+  
+  public static String getAttributeJavascriptString(String bundleName, Locale locale, String
messageKey, Object[] args)
+  {
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
+  }
+
+  public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey,
Object[] args)
+  {
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
+  }
+
+  // Resource output
+  
+  public static void outputResource(IHTTPOutput output, Locale locale, String resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResource(output,Messages.class,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+  
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String
resourceKey,
+    Map<String,String> substitutionParameters, boolean mapToUpperCase)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      substitutionParameters,mapToUpperCase);
+  }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String
resourceKey,
+    Map<String,Object> contextObjects)
+    throws ManifoldCFException
+  {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      contextObjects);
+  }
+  
+}
+

Propchange: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/Messages.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/Messages.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/RegexpMapper.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/RegexpMapper.java?rev=1497854&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/RegexpMapper.java
(added)
+++ manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/RegexpMapper.java
Fri Jun 28 17:24:48 2013
@@ -0,0 +1,144 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.authorities.mappers.regexp;
+
+import org.apache.manifoldcf.core.interfaces.*;
+import org.apache.manifoldcf.agents.interfaces.*;
+import org.apache.manifoldcf.authorities.interfaces.*;
+import org.apache.manifoldcf.authorities.system.Logging;
+import org.apache.manifoldcf.authorities.system.ManifoldCF;
+
+import java.io.*;
+import java.util.*;
+
+/** This is the regexp mapper implementation, which uses a regular expression to manipulate
a user name.
+*/
+public class RegexpMapper extends org.apache.manifoldcf.authorities.mappers.BaseMappingConnector
+{
+  public static final String _rcsid = "@(#)$Id$";
+
+  /** Constructor.
+  */
+  public RegexpMapper()
+  {
+  }
+
+  // All methods below this line will ONLY be called if a connect() call succeeded
+  // on this instance!
+
+  /** Map an input user name to an output name.
+  *@param userName is the name to map
+  *@return the mapped user name
+  */
+  @Override
+  public String mapUser(String userName)
+    throws ManifoldCFException
+  {
+    // MHL
+    return userName;
+  }
+
+  // UI support methods.
+  //
+  // These support methods are involved in setting up authority connection configuration
information. The configuration methods cannot assume that the
+  // current authority object is connected.  That is why they receive a thread context argument.
+    
+  /** Output the configuration header section.
+  * This method is called in the head section of the connector's configuration page.  Its
purpose is to add the required tabs to the list, and to output any
+  * javascript methods that might be needed by the configuration editing HTML.
+  *@param threadContext is the local thread context.
+  *@param out is the output to which any HTML should be sent.
+  *@param parameters are the configuration parameters, as they currently exist, for this
connection being configured.
+  *@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,
+    Locale locale, ConfigParams parameters, List<String> tabsArray)
+    throws ManifoldCFException, IOException
+  {
+    out.print(
+"<script type=\"text/javascript\">\n"+
+"<!--\n"+
+"function checkConfig()\n"+
+"{\n"+
+"  return true;\n"+
+"}\n"+
+"\n"+
+"function checkConfigForSave()\n"+
+"{\n"+
+"  return true;\n"+
+"}\n"+
+"\n"+
+"//-->\n"+
+"</script>\n"
+    );
+  }
+  
+  /** Output the configuration body section.
+  * This method is called in the body section of the authority connector's configuration
page.  Its purpose is to present the required form elements for editing.
+  * The coder can presume that the HTML that is output from this configuration will be within
appropriate <html>, <body>, and <form> tags.  The name of the
+  * form is "editconnection".
+  *@param threadContext is the local thread context.
+  *@param out is the output to which any HTML should be sent.
+  *@param parameters are the configuration parameters, as they currently exist, for this
connection being configured.
+  *@param tabName is the current tab name.
+  */
+  @Override
+  public void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out,
+    Locale locale, ConfigParams parameters, String tabName)
+    throws ManifoldCFException, IOException
+  {
+    // Does nothing
+  }
+  
+  /** Process a configuration post.
+  * This method is called at the start of the authority connector's configuration page, whenever
there is a possibility that form data for a connection has been
+  * posted.  Its purpose is to gather form information and modify the configuration parameters
accordingly.
+  * The name of the posted form is "editconnection".
+  *@param threadContext is the local thread context.
+  *@param variableContext is the set of variables available from the post, including binary
file post information.
+  *@param parameters are the configuration parameters, as they currently exist, for this
connection being configured.
+  *@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,
+    Locale locale, ConfigParams parameters)
+    throws ManifoldCFException
+  {
+    return null;
+  }
+  
+  /** View configuration.
+  * This method is called in the body section of the authority connector's view configuration
page.  Its purpose is to present the connection information to the user.
+  * The coder can presume that the HTML that is output from this configuration will be within
appropriate <html> and <body> tags.
+  *@param threadContext is the local thread context.
+  *@param out is the output to which any HTML should be sent.
+  *@param parameters are the configuration parameters, as they currently exist, for this
connection being configured.
+  */
+  @Override
+  public void viewConfiguration(IThreadContext threadContext, IHTTPOutput out,
+    Locale locale, ConfigParams parameters)
+    throws ManifoldCFException, IOException
+  {
+    // Does nothing
+  }
+
+}
+
+

Propchange: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/RegexpMapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/java/org/apache/manifoldcf/authorities/mappers/regexp/RegexpMapper.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_en_US.properties?rev=1497854&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_en_US.properties
(added)
+++ manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_en_US.properties
Fri Jun 28 17:24:48 2013
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#RegexpMapper.xxx

Propchange: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_en_US.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_en_US.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_ja_JP.properties?rev=1497854&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_ja_JP.properties
(added)
+++ manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_ja_JP.properties
Fri Jun 28 17:24:48 2013
@@ -0,0 +1,15 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+

Propchange: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_ja_JP.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/mappers/regexp/common_ja_JP.properties
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/pom.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/pom.xml?rev=1497854&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/pom.xml (added)
+++ manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/pom.xml Fri Jun 28 17:24:48
2013
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.apache.manifoldcf</groupId>
+    <artifactId>mcf-connectors</artifactId>
+    <version>1.3-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>mcf-regexpmapper-connector</artifactId>
+  <name>ManifoldCF - Connectors - Regexp Mapper</name>
+
+  <build>
+    <sourceDirectory>${basedir}/connector/src/main/java</sourceDirectory>
+    <testSourceDirectory>${basedir}/connector/src/test/java</testSourceDirectory>
+    <resources>
+      <resource>
+        <directory>${basedir}/connector/src/main/resources</directory>
+        <includes>
+          <include>**/*.html</include>
+          <include>**/*.js</include>
+        </includes>
+      </resource>
+      <resource>
+        <directory>${basedir}/connector/src/main/native2ascii</directory>
+        <includes>
+          <include>**/*.properties</include>
+        </includes>
+      </resource>
+    </resources> 
+
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>native2ascii-maven-plugin</artifactId>
+        <version>1.0-beta-1</version>
+        <configuration>
+            <workDir>target/classes</workDir>
+        </configuration>
+        <executions>
+            <execution>
+                <id>native2ascii-utf8</id>
+                <goals>
+                    <goal>native2ascii</goal>
+                </goals>
+                <configuration>
+                    <encoding>UTF8</encoding>
+                    <includes>
+                      <include>**/*.properties</include>
+                    </includes>
+                </configuration>
+            </execution>
+        </executions>
+      </plugin>
+    </plugins>
+
+  </build>
+
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-agents</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-pull-agent</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>mcf-ui-core</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

Propchange: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/branches/CONNECTORS-703/connectors/regexpmapper/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: manifoldcf/branches/CONNECTORS-703/framework/example-common/connectors.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/framework/example-common/connectors.xml?rev=1497854&r1=1497853&r2=1497854&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/framework/example-common/connectors.xml (original)
+++ manifoldcf/branches/CONNECTORS-703/framework/example-common/connectors.xml Fri Jun 28
17:24:48 2013
@@ -23,6 +23,7 @@
 -->
 <connectors>
     <!-- Add your output connectors here -->
+    <!-- Add your mapping connectors here -->
     <!-- Add your authority connectors here -->
     <!-- Add your repository connectors here -->
 </connectors>



Mime
View raw message