manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1562251 - in /manifoldcf/trunk: CHANGES.txt connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
Date Tue, 28 Jan 2014 22:10:16 GMT
Author: kwright
Date: Tue Jan 28 22:10:15 2014
New Revision: 1562251

URL: http://svn.apache.org/r1562251
Log:
Fix for CONNECTORS-871.  Commit for CONNECTORS-833 undid many LiveLink connector changes inadvertantly.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1562251&r1=1562250&r2=1562251&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Tue Jan 28 22:10:15 2014
@@ -18,6 +18,9 @@ a pair of partial fixes.)
 
 ======================= 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/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java?rev=1562251&r1=1562250&r2=1562251&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
(original)
+++ manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
Tue Jan 28 22:10:15 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.



Mime
View raw message