You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2014/01/28 23:11:45 UTC

svn commit: r1562252 - in /manifoldcf/branches/release-1.5-branch: ./ CHANGES.txt connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java

Author: kwright
Date: Tue Jan 28 22:11:45 2014
New Revision: 1562252

URL: http://svn.apache.org/r1562252
Log:
Pull up fix for CONNECTORS-871 from trunk.

Modified:
    manifoldcf/branches/release-1.5-branch/   (props changed)
    manifoldcf/branches/release-1.5-branch/CHANGES.txt
    manifoldcf/branches/release-1.5-branch/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java

Propchange: manifoldcf/branches/release-1.5-branch/
------------------------------------------------------------------------------
  Merged /manifoldcf/trunk:r1562251

Modified: manifoldcf/branches/release-1.5-branch/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-1.5-branch/CHANGES.txt?rev=1562252&r1=1562251&r2=1562252&view=diff
==============================================================================
--- manifoldcf/branches/release-1.5-branch/CHANGES.txt (original)
+++ manifoldcf/branches/release-1.5-branch/CHANGES.txt Tue Jan 28 22:11:45 2014
@@ -4,6 +4,9 @@ $Id$
 
 ======================= Release 1.5 =====================
 
+CONNECTORS-871: Fix versions caused by the commit for CONNECTORS-833.
+(David Morana, Karl Wright)
+
 CONNECTORS-866: Fix lock-clean scripts.
 (Karl Wright)
 

Modified: manifoldcf/branches/release-1.5-branch/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-1.5-branch/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java?rev=1562252&r1=1562251&r2=1562252&view=diff
==============================================================================
--- manifoldcf/branches/release-1.5-branch/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java (original)
+++ manifoldcf/branches/release-1.5-branch/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java Tue Jan 28 22:11:45 2014
@@ -95,7 +95,7 @@ public class LivelinkConnector extends o
   private final static String ACTIVITY_FETCH = "fetch document";
 
   /** Deny access token for default authority */
-  private final static String defaultAuthorityDenyToken = "DEAD_AUTHORITY";
+  private final static String defaultAuthorityDenyToken = GLOBAL_DENY_TOKEN;
 
   // Livelink does not have "deny" permissions, and there is no such thing as a document with no tokens, so it is safe to not have a local "deny" token.
   // However, people feel that a suspenders-and-belt approach is called for, so this restriction has been added.
@@ -118,7 +118,8 @@ public class LivelinkConnector extends o
   protected final static String GENERAL_OWNER = "general_owner";
   protected final static String GENERAL_CREATOR = "general_creator";
   protected final static String GENERAL_MODIFIER = "general_modifier";
-
+  protected final static String GENERAL_PARENTID = "general_parentid";
+  
   // Signal that we have set up connection parameters properly
   private boolean hasSessionParameters = false;
   // Signal that we have set up a connection properly
@@ -703,6 +704,16 @@ public class LivelinkConnector extends o
       }
     }
   }
+  
+  /** This method is called to assess whether to count this connector instance should
+  * actually be counted as being connected.
+  *@return true if the connector instance is actually connected.
+  */
+  @Override
+  public boolean isConnected()
+  {
+    return hasConnected;
+  }
 
   /** Close the connection.  Call this before discarding the repository connector.
   */
@@ -1777,6 +1788,8 @@ public class LivelinkConnector extends o
     String serverPassword = parameters.getObfuscatedParameter(LiveLinkParameters.serverPassword);
     if (serverPassword == null)
       serverPassword = "";
+    else
+      serverPassword = out.mapPasswordToKey(serverPassword);
     String serverHTTPCgiPath = parameters.getParameter(LiveLinkParameters.serverHTTPCgiPath);
     if (serverHTTPCgiPath == null)
       serverHTTPCgiPath = "/livelink/livelink.exe";
@@ -1789,6 +1802,8 @@ public class LivelinkConnector extends o
     String serverHTTPNTLMPassword = parameters.getObfuscatedParameter(LiveLinkParameters.serverHTTPNTLMPassword);
     if (serverHTTPNTLMPassword == null)
       serverHTTPNTLMPassword = "";
+    else
+      serverHTTPNTLMPassword = out.mapPasswordToKey(serverHTTPNTLMPassword);
     String serverHTTPSKeystore = parameters.getParameter(LiveLinkParameters.serverHTTPSKeystore);
     IKeystoreManager localServerHTTPSKeystore;
     if (serverHTTPSKeystore == null)
@@ -1812,6 +1827,8 @@ public class LivelinkConnector extends o
     String ingestNtlmPassword = parameters.getObfuscatedParameter(LiveLinkParameters.ingestNtlmPassword);
     if (ingestNtlmPassword == null)
       ingestNtlmPassword = "";
+    else
+      ingestNtlmPassword = out.mapPasswordToKey(ingestNtlmPassword);
     String ingestNtlmDomain = parameters.getParameter(LiveLinkParameters.ingestNtlmDomain);
     if (ingestNtlmDomain == null)
       ingestNtlmDomain = "";
@@ -2161,7 +2178,7 @@ public class LivelinkConnector extends o
       parameters.setParameter(LiveLinkParameters.serverUsername,serverUserName);
     String serverPassword = variableContext.getParameter("serverpassword");
     if (serverPassword != null)
-      parameters.setObfuscatedParameter(LiveLinkParameters.serverPassword,serverPassword);
+      parameters.setObfuscatedParameter(LiveLinkParameters.serverPassword,variableContext.mapKeyToPassword(serverPassword));
     String serverHTTPCgiPath = variableContext.getParameter("serverhttpcgipath");
     if (serverHTTPCgiPath != null)
       parameters.setParameter(LiveLinkParameters.serverHTTPCgiPath,serverHTTPCgiPath);
@@ -2173,7 +2190,7 @@ public class LivelinkConnector extends o
       parameters.setParameter(LiveLinkParameters.serverHTTPNTLMUsername,serverHTTPNTLMUserName);
     String serverHTTPNTLMPassword = variableContext.getParameter("serverhttpntlmpassword");
     if (serverHTTPNTLMPassword != null)
-      parameters.setObfuscatedParameter(LiveLinkParameters.serverHTTPNTLMPassword,serverHTTPNTLMPassword);
+      parameters.setObfuscatedParameter(LiveLinkParameters.serverHTTPNTLMPassword,variableContext.mapKeyToPassword(serverHTTPNTLMPassword));
     String serverHTTPSKeystoreValue = variableContext.getParameter("serverhttpskeystoredata");
     if (serverHTTPSKeystoreValue != null)
       parameters.setParameter(LiveLinkParameters.serverHTTPSKeystore,serverHTTPSKeystoreValue);
@@ -2251,7 +2268,7 @@ public class LivelinkConnector extends o
       parameters.setParameter(LiveLinkParameters.ingestNtlmUsername,ingestNtlmUsername);
     String ingestNtlmPassword = variableContext.getParameter("ingestntlmpassword");
     if (ingestNtlmPassword != null)
-      parameters.setObfuscatedParameter(LiveLinkParameters.ingestNtlmPassword,ingestNtlmPassword);
+      parameters.setObfuscatedParameter(LiveLinkParameters.ingestNtlmPassword,variableContext.mapKeyToPassword(ingestNtlmPassword));
     String ingestKeystoreValue = variableContext.getParameter("ingestkeystoredata");
     if (ingestKeystoreValue != null)
       parameters.setParameter(LiveLinkParameters.ingestKeystore,ingestKeystoreValue);
@@ -4269,6 +4286,7 @@ public class LivelinkConnector extends o
             String fileName = versInfo.getFileName();
             Date creationDate = objInfo.getCreationDate();
             Date modifyDate = versInfo.getModifyDate();
+            Integer parentID = objInfo.getParentId();
             RepositoryDocument rd = new RepositoryDocument();
 
             
@@ -4288,6 +4306,8 @@ public class LivelinkConnector extends o
               rd.addField(GENERAL_CREATIONDATE_FIELD,creationDate.toString());
             if (modifyDate != null)
               rd.addField(GENERAL_MODIFYDATE_FIELD,modifyDate.toString());
+            if (parentID != null)
+              rd.addField(GENERAL_PARENTID,parentID.toString());
             UserInformation owner = llc.getUserInformation(objInfo.getOwnerId().intValue());
             UserInformation creator = llc.getUserInformation(objInfo.getCreatorId().intValue());
             UserInformation modifier = llc.getUserInformation(versInfo.getOwnerId().intValue());
@@ -5615,7 +5635,7 @@ public class LivelinkConnector extends o
       LLValue elem = getVersionValue();
       if (elem == null)
         return null;
-      return new Long(elem.toInteger("FILEDATASIZE"));
+      return new Long(elem.toLong("FILEDATASIZE"));
     }
 
     /** Get file name.