manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1500554 - in /manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main: java/org/apache/manifoldcf/crawler/connectors/jira/ native2ascii/org/apache/manifoldcf/crawler/connectors/jira/ resources/org/apache/manifoldcf/crawler/co...
Date Mon, 08 Jul 2013 00:20:17 GMT
Author: kwright
Date: Mon Jul  8 00:20:17 2013
New Revision: 1500554

URL: http://svn.apache.org/r1500554
Log:
Add switch to enable/disable native security

Modified:
    manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
    manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_en_US.properties
    manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_ja_JP.properties
    manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraSecurity.html
    manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/viewSpecification_jira.html

Modified: manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java?rev=1500554&r1=1500553&r2=1500554&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
Mon Jul  8 00:20:17 2013
@@ -64,6 +64,8 @@ public class JiraRepositoryConnector ext
   // Nodes
   private static final String JOB_STARTPOINT_NODE_TYPE = "startpoint";
   private static final String JOB_QUERY_ATTRIBUTE = "query";
+  private static final String JOB_SECURITY_NODE_TYPE = "security";
+  private static final String JOB_VALUE_ATTRIBUTE = "value";
   private static final String JOB_ACCESS_NODE_TYPE = "access";
   private static final String JOB_TOKEN_ATTRIBUTE = "token";
 
@@ -486,6 +488,7 @@ public class JiraRepositoryConnector ext
    */
   private static void fillInJIRASecuritySpecificationMap(Map<String, Object> newMap,
DocumentSpecification ds) {
     List<Map<String,String>> accessTokenList = new ArrayList<Map<String,String>>();
+    String securityValue = "on";
     for (int i = 0; i < ds.getChildCount(); i++) {
       SpecificationNode sn = ds.getChild(i);
       if (sn.getType().equals(JOB_ACCESS_NODE_TYPE)) {
@@ -493,9 +496,12 @@ public class JiraRepositoryConnector ext
         Map<String,String> accessMap = new HashMap<String,String>();
         accessMap.put("TOKEN",token);
         accessTokenList.add(accessMap);
+      } else if (sn.getType().equals(JOB_SECURITY_NODE_TYPE)) {
+        securityValue = sn.getAttributeValue(JOB_VALUE_ATTRIBUTE);
       }
     }
     newMap.put("ACCESSTOKENS", accessTokenList);
+    newMap.put("SECURITYON", securityValue);
   }
 
   /**
@@ -555,6 +561,22 @@ public class JiraRepositoryConnector ext
       ds.addChild(ds.getChildCount(), node);
     }
     
+    String securityOn = variableContext.getParameter("specsecurity");
+    if (securityOn != null) {
+      // Delete all security records first
+      int i = 0;
+      while (i < ds.getChildCount()) {
+        SpecificationNode sn = ds.getChild(i);
+        if (sn.getType().equals(JOB_SECURITY_NODE_TYPE))
+          ds.removeChild(i);
+        else
+          i++;
+      }
+      SpecificationNode node = new SpecificationNode(JOB_SECURITY_NODE_TYPE);
+      node.setAttribute(JOB_VALUE_ATTRIBUTE,securityOn);
+      ds.addChild(ds.getChildCount(),node);
+    }
+    
     String xc = variableContext.getParameter("tokencount");
     if (xc != null) {
       // Delete all tokens first

Modified: manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_en_US.properties?rev=1500554&r1=1500553&r2=1500554&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_en_US.properties
(original)
+++ manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_en_US.properties
Mon Jul  8 00:20:17 2013
@@ -32,6 +32,10 @@ JiraRepositoryConnector.JiraPathMustBegi
 JiraRepositoryConnector.JiraQueryColon=JIRA query:
 JiraRepositoryConnector.SeedQueryCannotBeNull=Seed query cannot be null
 
+JiraRepositoryConnector.SecurityColon=Security:
+JiraRepositoryConnector.Enabled=Enabled
+JiraRepositoryConnector.Disabled=Disabled
+
 JiraRepositoryConnector.NoAccessTokensPresent=No access tokens present
 JiraRepositoryConnector.Add=Add
 JiraRepositoryConnector.AddAccessToken=Add access token

Modified: manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_ja_JP.properties?rev=1500554&r1=1500553&r2=1500554&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_ja_JP.properties
(original)
+++ manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_ja_JP.properties
Mon Jul  8 00:20:17 2013
@@ -32,6 +32,10 @@ JiraRepositoryConnector.JiraPathMustBegi
 JiraRepositoryConnector.JiraQueryColon=JIRA query:
 JiraRepositoryConnector.SeedQueryCannotBeNull=Seed query cannot be null
 
+JiraRepositoryConnector.SecurityColon=Security:
+JiraRepositoryConnector.Enabled=Enabled
+JiraRepositoryConnector.Disabled=Disabled
+
 JiraRepositoryConnector.NoAccessTokensPresent=No access tokens present
 JiraRepositoryConnector.Add=Add
 JiraRepositoryConnector.AddAccessToken=Add access token

Modified: manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraSecurity.html
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraSecurity.html?rev=1500554&r1=1500553&r2=1500554&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraSecurity.html
(original)
+++ manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editSpecification_jiraSecurity.html
Mon Jul  8 00:20:17 2013
@@ -20,6 +20,26 @@
 <table class="displaytable">
   <tr><td class="separator" colspan="2"><hr/></td></tr>
   
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.SecurityColon'))</nobr></td>
+    <td class="value">
+  #if($SECURITYON == 'on')
+      <input type="radio" name="specsecurity" value="on" checked="true"/>
+  #else
+      <input type="radio" name="specsecurity" value="on"/>
+  #end
+      $Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.Enabled'))
+  #if($SECURITYON == 'off')
+      <input type="radio" name="specsecurity" value="off" checked="true"/>
+  #else
+      <input type="radio" name="specsecurity" value="off"/>
+  #end
+      $Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.Disabled'))
+    </td>
+  </tr>
+  
+  <tr><td class="separator" colspan="2"><hr/></td></tr>
+
   #set($atcounter = 0)
   #foreach($atoken in $ACCESSTOKENS)
 

Modified: manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/viewSpecification_jira.html
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/viewSpecification_jira.html?rev=1500554&r1=1500553&r2=1500554&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/viewSpecification_jira.html
(original)
+++ manifoldcf/branches/CONNECTORS-731/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/viewSpecification_jira.html
Mon Jul  8 00:20:17 2013
@@ -26,6 +26,19 @@
   </tr>
   <tr><td class="separator" colspan="2"><hr/></td></tr>
   <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.SecurityColon'))</nobr>
+    </td>
+    <td class="value">
+#if($SECURITYON == 'on')
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.Enabled'))</nobr>
+#else
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.Disabled'))</nobr>
+#end
+    </td>
+  </tr>
+  <tr><td class="separator" colspan="2"><hr/></td></tr>
+  <tr>
 #if($ACCESSTOKENS.size() == 0)
     <td class="message" colspan="2">
       $Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.NoAccessTokensPresent'))



Mime
View raw message