manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1418282 - /manifoldcf/branches/CONNECTORS-578/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
Date Fri, 07 Dec 2012 11:34:44 GMT
Author: kwright
Date: Fri Dec  7 11:34:43 2012
New Revision: 1418282

URL: http://svn.apache.org/viewvc?rev=1418282&view=rev
Log:
More consolidation

Modified:
    manifoldcf/branches/CONNECTORS-578/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java

Modified: manifoldcf/branches/CONNECTORS-578/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-578/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java?rev=1418282&r1=1418281&r2=1418282&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-578/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-578/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
Fri Dec  7 11:34:43 2012
@@ -5115,6 +5115,17 @@ public class LivelinkConnector extends o
       return elem.toString("COMMENT"); 
     }
 
+    /** Get parent ID.
+    */
+    public Integer getParentId()
+      throws ServiceInterruption, ManifoldCFException
+    {
+      LLValue elem = getObjectValue();
+      if (elem == null)
+        return null;
+      return new Integer(elem.toInteger("ParentId")); 
+    }
+
     /** Get owner ID.
     */
     public Integer getOwnerId()
@@ -5351,19 +5362,6 @@ public class LivelinkConnector extends o
     }
   }
 
-  /**
-  * Returns an Assoc value object containing information
-  * about the specified object.
-  * @param vol is the volume id (which comes from the project)
-  * @param id the object ID
-  * @return LLValue the LAPI value object, or null if object has been deleted (or doesn't
exist)
-  */
-  protected LLValue getObjectInfo(int vol, int id)
-    throws ManifoldCFException, ServiceInterruption
-  {
-    return new ObjectInformation(vol,id).getObjectValue();
-  }
-
   /** Build a set of actual acls given a set of rights */
   protected String[] lookupTokens(int[] rights, ObjectInformation objInfo)
     throws ManifoldCFException, ServiceInterruption
@@ -6006,9 +6004,8 @@ public class LivelinkConnector extends o
           throw new ManifoldCFException("Bad document identifier: "+e.getMessage(),e);
         }
 
-        // Load the object
-        LLValue x = getObjectInfo(volumeID,objectID);
-        if (x == null)
+        ObjectInformation objInfo = new ObjectInformation(volumeID,objectID);
+        if (!objInfo.exists())
         {
           // The document identifier describes a path that does not exist.
           // This is unexpected, but don't die: just log a warning and allow the higher level
to deal with it.
@@ -6017,9 +6014,9 @@ public class LivelinkConnector extends o
         }
 
         // Get the name attribute
-        String name = x.toString("Name");
+        String name = objInfo.getName();
         // Get the parentID attribute
-        int parentID = x.toInteger("ParentID");
+        int parentID = objInfo.getParentId().intValue();
         if (parentID == -1)
           path = name;
         else



Mime
View raw message