manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1483032 - in /manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main: java/org/apache/manifoldcf/crawler/connectors/livelink/ native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/
Date Wed, 15 May 2013 19:33:27 GMT
Author: kwright
Date: Wed May 15 19:33:26 2013
New Revision: 1483032

URL: http://svn.apache.org/r1483032
Log:
Add UI support for UI user workspace checkbox

Modified:
    manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
    manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_en_US.properties
    manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_ja_JP.properties

Modified: manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java?rev=1483032&r1=1483031&r2=1483032&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
Wed May 15 19:33:26 2013
@@ -1002,7 +1002,7 @@ public class LivelinkConnector extends o
               if (Logging.connectors.isDebugEnabled())
                 Logging.connectors.debug("Livelink: Found a user: ID="+Integer.toString(childID));
 
-              activities.addSeedDocument("U0:"+Integer.toString(childID));
+              activities.addSeedDocument("F0:"+Integer.toString(childID));
             }
             break;
           }
@@ -2479,10 +2479,32 @@ public class LivelinkConnector extends o
     int k;
 
     // Paths tab
+    boolean userWorkspaces = false;
+    i = 0;
+    while (i < ds.getChildCount())
+    {
+      SpecificationNode sn = ds.getChild(i++);
+      if (sn.getType().equals("userworkspace"))
+      {
+        String value = sn.getAttributeValue("value");
+        if (value != null && value.equals("true"))
+          userWorkspaces = true;
+      }
+    }
     if (tabName.equals(Messages.getString(locale,"LivelinkConnector.Paths")))
     {
       out.print(
 "<table class=\"displaytable\">\n"+
+"  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
+"  <tr>\n"+
+"    <td class=\"description\">\n"+
+"      <nobr>"+Messages.getBodyString(locale,"LivelinkConnector.CrawlUserWorkspaces")+"</nobr>\n"+
+"    </td>\n"+
+"    <td class=\"value\">\n"+
+"      <input type=\"checkbox\" name=\"userworkspace\" value=\"true\""+(userWorkspaces?"
checked=\"true\"":"")+"/>\n"+
+"      <input type=\"hidden\" name=\"userworkspace_present\" value=\"true\"/>\n"+
+"    </td>\n"+
+"  </tr>\n"+
 "  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"
       );
       // Now, loop through paths
@@ -2614,7 +2636,9 @@ public class LivelinkConnector extends o
         }
       }
       out.print(
-"<input type=\"hidden\" name=\"pathcount\" value=\""+Integer.toString(k)+"\"/>\n"
+"<input type=\"hidden\" name=\"pathcount\" value=\""+Integer.toString(k)+"\"/>\n"+
+"<input type=\"hidden\" name=\"userworkspace\" value=\""+(userWorkspaces?"true":"false")+"\"/>\n"+
+"<input type=\"hidden\" name=\"userworkspace_present\" value=\"true\"/>\n"
       );
     }
 
@@ -3207,6 +3231,24 @@ public class LivelinkConnector extends o
   public String processSpecificationPost(IPostParameters variableContext, Locale locale,
DocumentSpecification ds)
     throws ManifoldCFException
   {
+    String userWorkspacesPresent = variableContext.getParameter("userworkspace_present");
+    if (userWorkspacesPresent != null)
+    {
+      String value = variableContext.getParameter("userworkspace");
+      int i = 0;
+      while (i < ds.getChildCount())
+      {
+        SpecificationNode sn = ds.getChild(i);
+        if (sn.getType().equals("userworkspace"))
+          ds.removeChild(i);
+        else
+          i++;
+      }
+      SpecificationNode sn = new SpecificationNode("userworkspace");
+      sn.setAttribute("value",value);
+      ds.addChild(ds.getChildCount(),sn);
+    }
+    
     String xc = variableContext.getParameter("pathcount");
     if (xc != null)
     {
@@ -3702,6 +3744,35 @@ public class LivelinkConnector extends o
 "  <tr>\n"
     );
     int i = 0;
+    boolean userWorkspaces = false;
+    while (i < ds.getChildCount())
+    {
+      SpecificationNode sn = ds.getChild(i++);
+      if (sn.getType().equals("userworkspace"))
+      {
+        String value = sn.getAttributeValue("value");
+        if (value != null && value.equals("true"))
+          userWorkspaces = true;
+      }
+    }
+
+    out.print(
+"    <td class=\"description\"/>\n"+
+"      <nobr>"+Messages.getBodyString(locale,"LivelinkConnector.CrawlUserWorkspaces")+"</nobr>\n"+
+"    </td>\n"+
+"    <td class=\"value\"/>\n"+
+"      "+(userWorkspaces?Messages.getBodyString(locale,"LivelinkConnector.Yes"):Messages.getBodyString(locale,"LivelinkConnector.No"))+"\n"+
+"    </td>\n"+
+"  </tr>"
+    );
+    out.print(
+"  <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"
+    );
+    out.print(
+"  <tr>"
+    );
+
+    i = 0;
     boolean seenAny = false;
     while (i < ds.getChildCount())
     {

Modified: manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_en_US.properties?rev=1483032&r1=1483031&r2=1483032&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_en_US.properties
(original)
+++ manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_en_US.properties
Wed May 15 19:33:26 2013
@@ -88,7 +88,7 @@ LivelinkConnector.AddFileSpecification=A
 LivelinkConnector.Include=Include
 LivelinkConnector.Exclude=Exclude
 LivelinkConnector.SecurityColon=Security:
-LivelinkConnector.Enabled=Enabled&nbsp;
+LivelinkConnector.Enabled=Enabled
 LivelinkConnector.Disabled=Disabled
 LivelinkConnector.DeleteToken=Delete token #
 LivelinkConnector.AddAccessToken=Add access token
@@ -143,3 +143,4 @@ LivelinkConnector.EnterTheServerCgiPathT
 LivelinkConnector.TheServerCgiPathMustBeginWithACharacter=The server CGI path must begin
with a '/' character
 LivelinkConnector.Delete=Delete
 LivelinkConnector.Add=Add
+LivelinkConnector.CrawlUserWorkspaces=Crawl user workspaces?

Modified: manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_ja_JP.properties?rev=1483032&r1=1483031&r2=1483032&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_ja_JP.properties
(original)
+++ manifoldcf/branches/CONNECTORS-689/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_ja_JP.properties
Wed May 15 19:33:26 2013
@@ -143,3 +143,4 @@ LivelinkConnector.EnterTheServerCgiPathT
 LivelinkConnector.TheServerCgiPathMustBeginWithACharacter=The server CGI path must begin
with a '/' character
 LivelinkConnector.Delete=削除
 LivelinkConnector.Add=追加
+LivelinkConnector.CrawlUserWorkspaces=Crawl user workspaces?



Mime
View raw message