Author: kwright
Date: Thu Jun 20 00:40:41 2019
New Revision: 1861666

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

Modified:
    
manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/csws/CswsAuthority.java
    
manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/csws/CswsConnector.java

Modified: 
manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/csws/CswsAuthority.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/csws/CswsAuthority.java?rev=1861666&r1=1861665&r2=1861666&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/csws/CswsAuthority.java
 (original)
+++ 
manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/csws/CswsAuthority.java
 Thu Jun 20 00:40:41 2019
@@ -28,6 +28,7 @@ import org.apache.manifoldcf.connectorco
 
 import com.opentext.livelink.service.memberservice.User;
 import com.opentext.livelink.service.memberservice.Member;
+import com.opentext.livelink.service.memberservice.MemberPrivileges;
 import org.apache.manifoldcf.csws.*;
 
 import java.io.*;
@@ -403,18 +404,21 @@ public class CswsAuthority extends org.a
         return RESPONSE_USERNOTFOUND;
       }
 
-      // TBD
-      int deleted = userObject.toInteger("Deleted");
-      if (deleted == 1)
+      if (user.isDeleted())
       {
         if (Logging.authorityConnectors.isDebugEnabled())
           Logging.authorityConnectors.debug("Csws: Csws user 
'"+domainAndUser+"' has been deleted");
         // Since the user cannot become undeleted, then this should be treated 
as 'user does not exist'.
         return RESPONSE_USERNOTFOUND;
       }
-      int privs = userObject.toInteger("UserPrivileges");
-      if ((privs & LAPI_USERS.PRIV_PERM_WORLD) == LAPI_USERS.PRIV_PERM_WORLD)
+      
+      final MemberPrivileges memberPrivileges = user.getPrivileges();
+      if (memberPrivileges.isPublicAccessEnabled()) {
+        // if ((privs & LAPI_USERS.PRIV_PERM_WORLD) == 
LAPI_USERS.PRIV_PERM_WORLD) ??
         list.add("GUEST");
+      }
+      
+      // TBD -- what is this??
       if ((privs & LAPI_USERS.PRIV_PERM_BYPASS) == LAPI_USERS.PRIV_PERM_BYPASS)
         list.add("SYSTEM");
 

Modified: 
manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/csws/CswsConnector.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/csws/CswsConnector.java?rev=1861666&r1=1861665&r2=1861666&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/csws/CswsConnector.java
 (original)
+++ 
manifoldcf/branches/CONNECTORS-1566/connectors/csws/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/csws/CswsConnector.java
 Thu Jun 20 00:40:41 2019
@@ -2862,11 +2862,6 @@ public class CswsConnector extends org.a
       if (modifier != null)
         rd.addField(GENERAL_MODIFIER,modifier.getName());
 
-      /* Old-style code.  Category paths come out of description.  Then
-          we look up the category path to get the category version for the
-          specific document.  Then we iterate over all attribute names for the
-          category version, and fetch their values.
-      
       // Iterate over the metadata items.  These are organized by category
       // for speed of lookup.
       Iterator<MetadataItem> catIter = desc.getItems(categoryPaths);
@@ -2876,8 +2871,10 @@ public class CswsConnector extends org.a
         MetadataPathItem pathItem = item.getPathItem();
         if (pathItem != null)
         {
-          int catID = pathItem.getCatID();
+          long catID = pathItem.getCatID();
+          
           // grab the associated catversion
+          // TBD
           LLValue catVersion = getCatVersion(objID,catID);
           if (catVersion != null)
           {
@@ -2889,6 +2886,7 @@ public class CswsConnector extends org.a
               // Create a unique metadata name
               String metadataName = pathItem.getCatName()+":"+attrName;
               // Fetch the metadata and stuff it into the RepositoryData 
structure
+              // TBD
               String[] metadataValue = getAttributeValue(catVersion,attrName);
               if (metadataValue != null)
                 rd.addField(metadataName,metadataValue);
@@ -2899,7 +2897,8 @@ public class CswsConnector extends org.a
           
         }
       }
-      */
+      
+      /*
       // New-style code.  We have a list of AttributeGroup objects attached to 
the item.  We iterate over them and
       // use the ones we want.
       final List<? extends AttributeGroup> attributeGroups = 
objInfo.getAttributeGroups();
@@ -2951,6 +2950,7 @@ public class CswsConnector extends org.a
           }
         }
       }
+*/
 
       if (actualAcls != null && denyAcls != null)
         
rd.setSecurity(RepositoryDocument.SECURITY_TYPE_DOCUMENT,actualAcls,denyAcls);
@@ -4737,12 +4737,12 @@ public class CswsConnector extends org.a
   */
   protected static class MetadataPathItem
   {
-    protected final int catID;
+    protected final long catID;
     protected final String catName;
 
     /** Constructor.
     */
-    public MetadataPathItem(int catID, String catName)
+    public MetadataPathItem(long catID, String catName)
     {
       this.catID = catID;
       this.catName = catName;
@@ -4751,7 +4751,7 @@ public class CswsConnector extends org.a
     /** Get the cat ID.
     *@return the id.
     */
-    public int getCatID()
+    public long getCatID()
     {
       return catID;
     }
@@ -5142,8 +5142,8 @@ public class CswsConnector extends org.a
             // Get the object id of the category the path describes.
             // NOTE: We don't use the RootValue version of getCategoryId 
because
             // we want to use the cached value of rootValue, if it was around.
-            int catObjectID = rootValue.getCategoryId(rv.getRemainderPath());
-            if (catObjectID != -1)
+            long catObjectID = rootValue.getCategoryId(rv.getRemainderPath());
+            if (catObjectID != -1L)
             {
               item = new MetadataPathItem(catObjectID,rv.getRemainderPath());
               categoryMap.put(category,item);


Reply via email to