manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1627377 - in /manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink: LiveLinkParameters.java LivelinkAuthority.java
Date Wed, 24 Sep 2014 17:58:37 GMT
Author: kwright
Date: Wed Sep 24 17:58:36 2014
New Revision: 1627377

URL: http://svn.apache.org/r1627377
Log:
Remove user mapping tab from Livelink connector.  Part of CONNECTORS-1046.

Modified:
    manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LiveLinkParameters.java
    manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkAuthority.java

Modified: manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LiveLinkParameters.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LiveLinkParameters.java?rev=1627377&r1=1627376&r2=1627377&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LiveLinkParameters.java
(original)
+++ manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LiveLinkParameters.java
Wed Sep 24 17:58:36 2014
@@ -76,18 +76,9 @@ public class LiveLinkParameters
   
   
   // These parameters are for the LiveLink Authority
-  /** User name mapping description.  This replaces username regexp and username spec below.
*/
-  public final static String userNameMapping = "Livelink user name map";
   /** Cache time in seconds */
   public final static String cacheLifetime = "Cache lifetime minutes";
   /** Max LRU size */
   public final static String cacheLRUSize = "Max cache LRU size";
   
-  // These two are deprecated
-  /** Username regexp */
-  public final static String userNameRegexp = "User name regexp";
-  /** Livelink username spec */
-  public final static String livelinkNameSpec = "Livelink user spec";
-
-
 }

Modified: manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkAuthority.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkAuthority.java?rev=1627377&r1=1627376&r2=1627377&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkAuthority.java
(original)
+++ manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkAuthority.java
Wed Sep 24 17:58:36 2014
@@ -76,9 +76,6 @@ public class LivelinkAuthority extends o
   private long responseLifetime = 60000L;
   private int LRUsize = 1000;
 
-  // Match map for username
-  private MatchMap matchMap = null;
-
   // Retry count.  This is so we can try to install some measure of sanity into situations
where LAPI gets confused communicating to the server.
   // So, for some kinds of errors, we just retry for a while hoping it will go away.
   private static final int FAILURE_RETRY_COUNT = 5;
@@ -142,23 +139,6 @@ public class LivelinkAuthority extends o
       serverHTTPNTLMUsername = params.getParameter(LiveLinkParameters.serverHTTPNTLMUsername);
       serverHTTPNTLMPassword = params.getObfuscatedParameter(LiveLinkParameters.serverHTTPNTLMPassword);
 
-      // These have been deprecated
-      String userNamePattern = params.getParameter(LiveLinkParameters.userNameRegexp);
-      String userEvalExpression = params.getParameter(LiveLinkParameters.livelinkNameSpec);
-      String userNameMapping = params.getParameter(LiveLinkParameters.userNameMapping);
-      if ((userNameMapping == null || userNameMapping.length() == 0) && userNamePattern
!= null && userEvalExpression != null)
-      {
-        // Create a matchmap using the old system
-        matchMap = new MatchMap();
-        matchMap.appendOldstyleMatchPair(userNamePattern,userEvalExpression);
-      }
-      else
-      {
-        if (userNameMapping == null)
-          userNameMapping = "(.*)\\\\@([A-Z|a-z|0-9|_|-]*)\\\\.(.*)=$(2)\\$(1l)";
-        matchMap = new MatchMap(userNameMapping);
-      }
-
       // Server parameter processing
 
       if (serverProtocol == null || serverProtocol.length() == 0)
@@ -343,7 +323,6 @@ public class LivelinkAuthority extends o
       llServer = null;
     }
     LLUsers = null;
-    matchMap = null;
     
     serverProtocol = null;
     serverName = null;
@@ -426,8 +405,7 @@ public class LivelinkAuthority extends o
         Logging.authorityConnectors.debug("Authentication user name = '"+userName+"'");
       }
 
-      // Use the matchMap object to do the translation
-      String domainAndUser = matchMap.translate(userName);
+      String domainAndUser = userName;
 
       if (Logging.authorityConnectors.isDebugEnabled())
       {
@@ -588,7 +566,6 @@ public class LivelinkAuthority extends o
     throws ManifoldCFException, IOException
   {
     tabsArray.add(Messages.getString(locale,"LivelinkConnector.Server"));
-    tabsArray.add(Messages.getString(locale,"LivelinkConnector.UserMapping"));
     tabsArray.add(Messages.getString(locale,"LivelinkConnector.Cache"));
 
     out.print(
@@ -623,12 +600,6 @@ public class LivelinkAuthority extends o
 "    editconnection.serverport.focus();\n"+
 "    return false;\n"+
 "  }\n"+
-"  if (editconnection.usernameregexp.value != \"\" && !isRegularExpression(editconnection.usernameregexp.value))\n"+
-"  {\n"+
-"    alert(\"" + Messages.getBodyJavascriptString(locale,"LivelinkConnector.UserNameRegularExpressionMustBeValidRegularExpression")
+ "\");\n"+
-"    editconnection.usernameregexp.focus();\n"+
-"    return false;\n"+
-"  }\n"+
 "  return true;\n"+
 "}\n"+
 "\n"+
@@ -648,13 +619,6 @@ public class LivelinkAuthority extends o
 "    editconnection.serverport.focus();\n"+
 "    return false;\n"+
 "  }\n"+
-"  if (editconnection.usernameregexp.value == \"\")\n"+
-"  {\n"+
-"    alert(\"" + Messages.getBodyJavascriptString(locale,"LivelinkConnector.UserNameRegularExpressionCannotBeNull")
+ "\");\n"+
-"    SelectTab(\"" + Messages.getBodyJavascriptString(locale,"LivelinkConnector.UserMapping")
+ "\");\n"+
-"    editconnection.usernameregexp.focus();\n"+
-"    return false;\n"+
-"  }\n"+
 "  if (editconnection.cachelifetime.value == \"\")\n"+
 "  {\n"+
 "    alert(\"" + Messages.getBodyJavascriptString(locale,"LivelinkConnector.CacheLifetimeCannotBeNull")
+ "\");\n"+
@@ -752,27 +716,6 @@ public class LivelinkAuthority extends o
     if (cacheLRUsize == null)
       cacheLRUsize = "1000";    
 
-    MatchMap matchMap = null;
-    String usernameRegexp = parameters.getParameter(LiveLinkParameters.userNameRegexp);
-    String livelinkUserExpr = parameters.getParameter(LiveLinkParameters.livelinkNameSpec);
-    if (usernameRegexp != null && usernameRegexp.length() > 0 && livelinkUserExpr
!= null)
-    {
-      // Old-style configuration.  Convert to the new.
-      matchMap = new MatchMap();
-      matchMap.appendOldstyleMatchPair(usernameRegexp,livelinkUserExpr);
-    }
-    else
-    {
-      // New style configuration.
-      String userNameMapping = parameters.getParameter(LiveLinkParameters.userNameMapping);
-      if (userNameMapping == null)
-        userNameMapping = "^(.*)\\\\@([A-Z|a-z|0-9|_|-]*)\\\\.(.*)$=$(2)\\\\$(1l)";
-      matchMap = new MatchMap(userNameMapping);
-    }
-
-    usernameRegexp = matchMap.getMatchString(0);
-    livelinkUserExpr = matchMap.getReplaceString(0);
-
     // The "Server" tab
     // Always pass the whole keystore as a hidden.
     out.print(
@@ -900,32 +843,6 @@ public class LivelinkAuthority extends o
       );
     }
 
-    // The "User Mapping" tab
-    if (tabName.equals(Messages.getString(locale,"LivelinkConnector.UserMapping")))
-    {
-      out.print(
-"<table class=\"displaytable\">\n"+
-"  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
-"  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"LivelinkConnector.UserNameRegularExpression")
+ "</nobr></td>\n"+
-"    <td class=\"value\"><input type=\"text\" size=\"40\" name=\"usernameregexp\"
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(usernameRegexp)+"\"/></td>\n"+
-"  </tr>\n"+
-"  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"LivelinkConnector.LivelinkUserExpression")
+ "</nobr></td>\n"+
-"    <td class=\"value\"><input type=\"text\" size=\"40\" name=\"livelinkuserexpr\"
value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(livelinkUserExpr)+"\"/></td>\n"+
-"  </tr>\n"+
-"</table>\n"
-      );
-    }
-    else
-    {
-      // Hiddens for "User Mapping" tab
-      out.print(
-"<input type=\"hidden\" name=\"usernameregexp\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(usernameRegexp)+"\"/>\n"+
-"<input type=\"hidden\" name=\"livelinkuserexpr\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(livelinkUserExpr)+"\"/>\n"
-      );
-    }
-    
     // "Cache" tab
     if(tabName.equals(Messages.getString(locale,"LivelinkConnector.Cache")))
     {
@@ -1055,19 +972,6 @@ public class LivelinkAuthority extends o
       }
     }
 
-    // User name parameters
-    String usernameRegexp = variableContext.getParameter("usernameregexp");
-    String livelinkUserExpr = variableContext.getParameter("livelinkuserexpr");
-    if (usernameRegexp != null && livelinkUserExpr != null)
-    {
-      parameters.setParameter(LiveLinkParameters.userNameRegexp,null);
-      parameters.setParameter(LiveLinkParameters.livelinkNameSpec,null);
-
-      MatchMap matchMap = new MatchMap();
-      matchMap.appendMatchPair(usernameRegexp,livelinkUserExpr);
-      parameters.setParameter(LiveLinkParameters.userNameMapping,matchMap.toString());
-    }
-
     // Cache parameters
     String cacheLifetime = variableContext.getParameter("cachelifetime");
     if (cacheLifetime != null)



Mime
View raw message