manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1522760 - in /manifoldcf/trunk: ./ connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/ connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/ connectors/jira/connector...
Date Fri, 13 Sep 2013 01:32:10 GMT
Author: kwright
Date: Fri Sep 13 01:32:09 2013
New Revision: 1522760

URL: http://svn.apache.org/r1522760
Log:
Fix for CONNECTORS-773.

Added:
    manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/jira/editConfiguration_jira.js
      - copied unchanged from r1522759, manifoldcf/branches/CONNECTORS-773/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/jira/editConfiguration_jira.js
    manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/jira/editConfiguration_jira_proxy.html
      - copied unchanged from r1522759, manifoldcf/branches/CONNECTORS-773/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/jira/editConfiguration_jira_proxy.html
    manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editConfiguration_jira.js
      - copied unchanged from r1522759, manifoldcf/branches/CONNECTORS-773/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editConfiguration_jira.js
    manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editConfiguration_jira_proxy.html
      - copied unchanged from r1522759, manifoldcf/branches/CONNECTORS-773/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editConfiguration_jira_proxy.html
Removed:
    manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/jira/editConfiguration_jira_server.js
    manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editConfiguration_jira_server.js
Modified:
    manifoldcf/trunk/   (props changed)
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraAuthorityConnector.java
    manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraConfig.java
    manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraSession.java
    manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraConfig.java
    manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
    manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraSession.java
    manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/authorities/jira/common_en_US.properties
    manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/authorities/jira/common_ja_JP.properties
    manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_en_US.properties
    manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_ja_JP.properties
    manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/jira/viewConfiguration_jira.html
    manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/viewConfiguration_jira.html

Propchange: manifoldcf/trunk/
------------------------------------------------------------------------------
  Merged /manifoldcf/branches/CONNECTORS-773:r1521767-1522759

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1522760&r1=1522759&r2=1522760&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Fri Sep 13 01:32:09 2013
@@ -3,6 +3,9 @@ $Id$
 
 ======================= 1.4-dev =====================
 
+CONNECTORS-773: Add support for proxies to Jira connectors.
+(Karl Wright)
+
 CONNECTORS-772: SharePoint connector wasn't working against
 AWS SharePoint instances.  Added a new AWS pulldown selection
 to deal with the funky configuration there.

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraAuthorityConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraAuthorityConnector.java?rev=1522760&r1=1522759&r2=1522760&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraAuthorityConnector.java
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraAuthorityConnector.java
Fri Sep 13 01:32:09 2013
@@ -53,16 +53,21 @@ public class JiraAuthorityConnector exte
 
   // Configuration tabs
   private static final String JIRA_SERVER_TAB_PROPERTY = "JiraAuthorityConnector.Server";
+  private static final String JIRA_PROXY_TAB_PROPERTY = "JiraAuthorityConnector.Proxy";
   
   // Template names for configuration
   /**
    * Forward to the javascript to check the configuration parameters
    */
-  private static final String EDIT_CONFIG_HEADER_FORWARD = "editConfiguration_jira_server.js";
+  private static final String EDIT_CONFIG_HEADER_FORWARD = "editConfiguration_jira.js";
   /**
    * Server tab template
    */
   private static final String EDIT_CONFIG_FORWARD_SERVER = "editConfiguration_jira_server.html";
+  /**
+   * Proxy tab template
+   */
+  private static final String EDIT_CONFIG_FORWARD_PROXY = "editConfiguration_jira_proxy.html";
   
   /**
    * Forward to the HTML template to view the configuration parameters
@@ -82,6 +87,12 @@ public class JiraAuthorityConnector exte
   protected String clientid = null;
   protected String clientsecret = null;
 
+  protected String jiraproxyhost = null;
+  protected String jiraproxyport = null;
+  protected String jiraproxydomain = null;
+  protected String jiraproxyusername = null;
+  protected String jiraproxypassword = null;
+  
   public JiraAuthorityConnector() {
     super();
   }
@@ -103,6 +114,12 @@ public class JiraAuthorityConnector exte
     jirapath = null;
     clientid = null;
     clientsecret = null;
+    
+    jiraproxyhost = null;
+    jiraproxyport = null;
+    jiraproxydomain = null;
+    jiraproxyusername = null;
+    jiraproxypassword = null;
   }
 
   /**
@@ -125,6 +142,13 @@ public class JiraAuthorityConnector exte
     jirapath = params.getParameter(JiraConfig.JIRA_PATH_PARAM);
     clientid = params.getParameter(JiraConfig.CLIENT_ID_PARAM);
     clientsecret = params.getObfuscatedParameter(JiraConfig.CLIENT_SECRET_PARAM);
+    
+    jiraproxyhost = params.getParameter(JiraConfig.JIRA_PROXYHOST_PARAM);
+    jiraproxyport = params.getParameter(JiraConfig.JIRA_PROXYPORT_PARAM);
+    jiraproxydomain = params.getParameter(JiraConfig.JIRA_PROXYDOMAIN_PARAM);
+    jiraproxyusername = params.getParameter(JiraConfig.JIRA_PROXYUSERNAME_PARAM);
+    jiraproxypassword = params.getObfuscatedParameter(JiraConfig.JIRA_PROXYPASSWORD_PARAM);
+    
   }
 
   /**
@@ -191,7 +215,8 @@ public class JiraAuthorityConnector exte
       }
 
       String jiraurl = jiraprotocol + "://" + jirahost + (StringUtils.isEmpty(jiraport)?"":":"+jiraport)
+ jirapath;
-      session = new JiraSession(clientid, clientsecret, jiraurl);
+      session = new JiraSession(clientid, clientsecret, jiraurl,
+        jiraproxyhost, jiraproxyport, jiraproxydomain, jiraproxyusername, jiraproxypassword);
 
     }
     lastSessionFetch = System.currentTimeMillis();
@@ -252,6 +277,41 @@ public class JiraAuthorityConnector exte
   }
 
   /**
+   * Fill in a Proxy tab configuration parameter map for calling a Velocity
+   * template.
+   *
+   * @param newMap is the map to fill in
+   * @param parameters is the current set of configuration parameters
+   */
+  private static void fillInProxyConfigurationMap(Map<String, Object> newMap, IPasswordMapperActivity
mapper, ConfigParams parameters) {
+    String jiraproxyhost = parameters.getParameter(JiraConfig.JIRA_PROXYHOST_PARAM);
+    String jiraproxyport = parameters.getParameter(JiraConfig.JIRA_PROXYPORT_PARAM);
+    String jiraproxydomain = parameters.getParameter(JiraConfig.JIRA_PROXYDOMAIN_PARAM);
+    String jiraproxyusername = parameters.getParameter(JiraConfig.JIRA_PROXYUSERNAME_PARAM);
+    String jiraproxypassword = parameters.getObfuscatedParameter(JiraConfig.JIRA_PROXYPASSWORD_PARAM);
+
+    if (jiraproxyhost == null)
+      jiraproxyhost = JiraConfig.JIRA_PROXYHOST_DEFAULT;
+    if (jiraproxyport == null)
+      jiraproxyport = JiraConfig.JIRA_PROXYPORT_DEFAULT;
+
+    if (jiraproxydomain == null)
+      jiraproxydomain = JiraConfig.JIRA_PROXYDOMAIN_DEFAULT;
+    if (jiraproxyusername == null)
+      jiraproxyusername = JiraConfig.JIRA_PROXYUSERNAME_DEFAULT;
+    if (jiraproxypassword == null)
+      jiraproxypassword = JiraConfig.JIRA_PROXYPASSWORD_DEFAULT;
+    else
+      jiraproxypassword = mapper.mapPasswordToKey(jiraproxypassword);
+
+    newMap.put("JIRAPROXYHOST", jiraproxyhost);
+    newMap.put("JIRAPROXYPORT", jiraproxyport);
+    newMap.put("JIRAPROXYDOMAIN", jiraproxydomain);
+    newMap.put("JIRAPROXYUSERNAME", jiraproxyusername);
+    newMap.put("JIRAPROXYPASSWORD", jiraproxypassword);
+  }
+
+  /**
    * View configuration. This method is called in the body section of the
    * connector's view configuration page. Its purpose is to present the
    * connection information to the user. The coder can presume that the HTML
@@ -270,6 +330,7 @@ public class JiraAuthorityConnector exte
 
     // Fill in map from each tab
     fillInServerConfigurationMap(paramMap, out, parameters);
+    fillInProxyConfigurationMap(paramMap, out, parameters);
 
     Messages.outputResourceWithVelocity(out,locale,VIEW_CONFIG_FORWARD,paramMap);
   }
@@ -294,12 +355,15 @@ public class JiraAuthorityConnector exte
       throws ManifoldCFException, IOException {
     // Add the Server tab
     tabsArray.add(Messages.getString(locale, JIRA_SERVER_TAB_PROPERTY));
+    // Add the Proxy tab
+    tabsArray.add(Messages.getString(locale, JIRA_PROXY_TAB_PROPERTY));
     // Map the parameters
     Map<String, Object> paramMap = new HashMap<String, Object>();
 
     // Fill in the parameters from each tab
     fillInServerConfigurationMap(paramMap, out, parameters);
-
+    fillInProxyConfigurationMap(paramMap, out, parameters);
+        
     // Output the Javascript - only one Velocity template for all tabs
     Messages.outputResourceWithVelocity(out,locale,EDIT_CONFIG_HEADER_FORWARD,paramMap);
   }
@@ -315,10 +379,15 @@ public class JiraAuthorityConnector exte
     // Set the tab name
     paramMap.put("TabName", tabName);
 
-    // Server tab
     // Fill in the parameters
     fillInServerConfigurationMap(paramMap, out, parameters);
+    fillInProxyConfigurationMap(paramMap, out, parameters);
+        
+    // Server tab
     Messages.outputResourceWithVelocity(out,locale,EDIT_CONFIG_FORWARD_SERVER,paramMap);
+    // Proxy tab
+    Messages.outputResourceWithVelocity(out,locale,EDIT_CONFIG_FORWARD_PROXY,paramMap);
+
   }
 
   /**
@@ -343,6 +412,8 @@ public class JiraAuthorityConnector exte
     IPostParameters variableContext, ConfigParams parameters)
     throws ManifoldCFException {
 
+    // Server tab parameters
+
     String jiraprotocol = variableContext.getParameter("jiraprotocol");
     if (jiraprotocol != null)
       parameters.setParameter(JiraConfig.JIRA_PROTOCOL_PARAM, jiraprotocol);
@@ -367,6 +438,28 @@ public class JiraAuthorityConnector exte
     if (clientsecret != null)
       parameters.setObfuscatedParameter(JiraConfig.CLIENT_SECRET_PARAM, variableContext.mapKeyToPassword(clientsecret));
 
+    // Proxy tab parameters
+    
+    String jiraproxyhost = variableContext.getParameter("jiraproxyhost");
+    if (jiraproxyhost != null)
+      parameters.setParameter(JiraConfig.JIRA_PROXYHOST_PARAM, jiraproxyhost);
+
+    String jiraproxyport = variableContext.getParameter("jiraproxyport");
+    if (jiraproxyport != null)
+      parameters.setParameter(JiraConfig.JIRA_PROXYPORT_PARAM, jiraproxyport);
+    
+    String jiraproxydomain = variableContext.getParameter("jiraproxydomain");
+    if (jiraproxydomain != null)
+      parameters.setParameter(JiraConfig.JIRA_PROXYDOMAIN_PARAM, jiraproxydomain);
+
+    String jiraproxyusername = variableContext.getParameter("jiraproxyusername");
+    if (jiraproxyusername != null)
+      parameters.setParameter(JiraConfig.JIRA_PROXYUSERNAME_PARAM, jiraproxyusername);
+
+    String jiraproxypassword = variableContext.getParameter("jiraproxypassword");
+    if (jiraproxypassword != null)
+      parameters.setObfuscatedParameter(JiraConfig.JIRA_PROXYPASSWORD_PARAM, variableContext.mapKeyToPassword(jiraproxypassword));
+
     return null;
   }
 

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraConfig.java?rev=1522760&r1=1522759&r2=1522760&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraConfig.java
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraConfig.java
Fri Sep 13 01:32:09 2013
@@ -30,6 +30,12 @@ public class JiraConfig {
   public static final String JIRA_PORT_PARAM = "jiraport";
   public static final String JIRA_PATH_PARAM = "jirapath";
   
+  public static final String JIRA_PROXYHOST_PARAM = "jiraproxyhost";
+  public static final String JIRA_PROXYPORT_PARAM = "jiraproxyport";
+  public static final String JIRA_PROXYDOMAIN_PARAM = "jiraproxydomain";
+  public static final String JIRA_PROXYUSERNAME_PARAM = "jiraproxyusername";
+  public static final String JIRA_PROXYPASSWORD_PARAM = "jiraproxypassword";
+  
   public static final String CLIENT_ID_DEFAULT = "";
   public static final String CLIENT_SECRET_DEFAULT = "";
   public static final String JIRA_PROTOCOL_DEFAULT = "http";
@@ -37,4 +43,10 @@ public class JiraConfig {
   public static final String JIRA_PORT_DEFAULT = "";
   public static final String JIRA_PATH_DEFAULT = "/rest/api/2/";
     
+  public static final String JIRA_PROXYHOST_DEFAULT = "";
+  public static final String JIRA_PROXYPORT_DEFAULT = "";
+  public static final String JIRA_PROXYDOMAIN_DEFAULT = "";
+  public static final String JIRA_PROXYUSERNAME_DEFAULT = "";
+  public static final String JIRA_PROXYPASSWORD_DEFAULT = "";
+
 }

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraSession.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraSession.java?rev=1522760&r1=1522759&r2=1522760&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraSession.java
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/jira/JiraSession.java
Fri Sep 13 01:32:09 2013
@@ -43,8 +43,10 @@ import org.apache.http.client.HttpClient
 import org.apache.http.impl.conn.PoolingClientConnectionManager;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
+import org.apache.http.HttpHost;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.UsernamePasswordCredentials;
+import org.apache.http.auth.NTCredentials;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpRequestBase;
 import org.apache.http.impl.client.DefaultHttpClient;
@@ -53,6 +55,7 @@ import org.apache.http.util.EntityUtils;
 import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.CoreConnectionPNames;
+import org.apache.http.conn.params.ConnRoutePNames;
 import org.apache.http.client.params.ClientPNames;
 import org.apache.http.client.HttpRequestRetryHandler;
 import org.apache.http.protocol.HttpContext;
@@ -78,10 +81,28 @@ public class JiraSession {
   private ClientConnectionManager connectionManager;
   private HttpClient httpClient;
   
+  // Current host name
+  private static String currentHost = null;
+  static
+  {
+    // Find the current host name
+    try
+    {
+      java.net.InetAddress addr = java.net.InetAddress.getLocalHost();
+
+      // Get hostname
+      currentHost = addr.getHostName();
+    }
+    catch (java.net.UnknownHostException e)
+    {
+    }
+  }
+
   /**
    * Constructor. Create a session.
    */
-  public JiraSession(String clientId, String clientSecret, String URLbase)
+  public JiraSession(String clientId, String clientSecret, String URLbase,
+    String proxyHost, String proxyPort, String proxyDomain, String proxyUsername, String
proxyPassword)
     throws ManifoldCFException {
     this.URLbase = URLbase;
     this.clientId = clientId;
@@ -123,12 +144,51 @@ public class JiraSession {
        
       });
     localHttpClient.setRedirectStrategy(new DefaultRedirectStrategy());
+    
+    // If authentication needed, set that
     if (clientId != null)
     {
       localHttpClient.getCredentialsProvider().setCredentials(
         AuthScope.ANY,
         new UsernamePasswordCredentials(clientId,clientSecret));
     }
+    
+    // If there's a proxy, set that too.
+    if (proxyHost != null && proxyHost.length() > 0)
+    {
+
+      int proxyPortInt;
+      if (proxyPort != null && proxyPort.length() > 0)
+      {
+        try
+        {
+          proxyPortInt = Integer.parseInt(proxyPort);
+        }
+        catch (NumberFormatException e)
+        {
+          throw new ManifoldCFException("Bad number: "+e.getMessage(),e);
+        }
+      }
+      else
+        proxyPortInt = 8080;
+
+      // Configure proxy authentication
+      if (proxyUsername != null && proxyUsername.length() > 0)
+      {
+        if (proxyPassword == null)
+          proxyPassword = "";
+        if (proxyDomain == null)
+          proxyDomain = "";
+
+        localHttpClient.getCredentialsProvider().setCredentials(
+          new AuthScope(proxyHost, proxyPortInt),
+          new NTCredentials(proxyUsername, proxyPassword, currentHost, proxyDomain));
+      }
+
+      HttpHost proxy = new HttpHost(proxyHost, proxyPortInt);
+
+      localHttpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
+    }
 
     httpClient = localHttpClient;
   }

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraConfig.java?rev=1522760&r1=1522759&r2=1522760&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraConfig.java
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraConfig.java
Fri Sep 13 01:32:09 2013
@@ -32,6 +32,12 @@ public class JiraConfig {
   public static final String JIRA_PORT_PARAM = "jiraport";
   public static final String JIRA_PATH_PARAM = "jirapath";
   
+  public static final String JIRA_PROXYHOST_PARAM = "jiraproxyhost";
+  public static final String JIRA_PROXYPORT_PARAM = "jiraproxyport";
+  public static final String JIRA_PROXYDOMAIN_PARAM = "jiraproxydomain";
+  public static final String JIRA_PROXYUSERNAME_PARAM = "jiraproxyusername";
+  public static final String JIRA_PROXYPASSWORD_PARAM = "jiraproxypassword";
+
   public static final String JIRA_QUERY_PARAM = "jiraquery";
   
   public static final String CLIENT_ID_DEFAULT = "";
@@ -41,6 +47,12 @@ public class JiraConfig {
   public static final String JIRA_PORT_DEFAULT = "";
   public static final String JIRA_PATH_DEFAULT = "/rest/api/2/";
   
+  public static final String JIRA_PROXYHOST_DEFAULT = "";
+  public static final String JIRA_PROXYPORT_DEFAULT = "";
+  public static final String JIRA_PROXYDOMAIN_DEFAULT = "";
+  public static final String JIRA_PROXYUSERNAME_DEFAULT = "";
+  public static final String JIRA_PROXYPASSWORD_DEFAULT = "";
+
   public static final String JIRA_QUERY_DEFAULT = "ORDER BY createdDate Asc";
 
     

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java?rev=1522760&r1=1522759&r2=1522760&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraRepositoryConnector.java
Fri Sep 13 01:32:09 2013
@@ -60,7 +60,7 @@ public class JiraRepositoryConnector ext
   protected final static String ACTIVITY_READ = "read document";
   
   /** Deny access token for default authority */
-  private final static String defaultAuthorityDenyToken = "DEAD_AUTHORITY";
+  private final static String defaultAuthorityDenyToken = GLOBAL_DENY_TOKEN;
 
   // Nodes
   private static final String JOB_STARTPOINT_NODE_TYPE = "startpoint";
@@ -72,7 +72,8 @@ public class JiraRepositoryConnector ext
 
   // Configuration tabs
   private static final String JIRA_SERVER_TAB_PROPERTY = "JiraRepositoryConnector.Server";
-  
+  private static final String JIRA_PROXY_TAB_PROPERTY = "JiraRepositoryConnector.Proxy";
+
   // Specification tabs
   private static final String JIRA_QUERY_TAB_PROPERTY = "JiraRepositoryConnector.JiraQuery";
   private static final String JIRA_SECURITY_TAB_PROPERTY = "JiraRepositoryConnector.Security";
@@ -81,12 +82,16 @@ public class JiraRepositoryConnector ext
   /**
    * Forward to the javascript to check the configuration parameters
    */
-  private static final String EDIT_CONFIG_HEADER_FORWARD = "editConfiguration_jira_server.js";
+  private static final String EDIT_CONFIG_HEADER_FORWARD = "editConfiguration_jira.js";
   /**
    * Server tab template
    */
   private static final String EDIT_CONFIG_FORWARD_SERVER = "editConfiguration_jira_server.html";
-  
+  /**
+   * Proxy tab template
+   */
+  private static final String EDIT_CONFIG_FORWARD_PROXY = "editConfiguration_jira_proxy.html";
+
   /**
    * Forward to the HTML template to view the configuration parameters
    */
@@ -124,6 +129,12 @@ public class JiraRepositoryConnector ext
   protected String clientid = null;
   protected String clientsecret = null;
 
+  protected String jiraproxyhost = null;
+  protected String jiraproxyport = null;
+  protected String jiraproxydomain = null;
+  protected String jiraproxyusername = null;
+  protected String jiraproxypassword = null;
+
   public JiraRepositoryConnector() {
     super();
   }
@@ -176,6 +187,12 @@ public class JiraRepositoryConnector ext
     jirapath = null;
     clientid = null;
     clientsecret = null;
+    
+    jiraproxyhost = null;
+    jiraproxyport = null;
+    jiraproxydomain = null;
+    jiraproxyusername = null;
+    jiraproxypassword = null;
   }
 
   /**
@@ -198,6 +215,13 @@ public class JiraRepositoryConnector ext
     jirapath = params.getParameter(JiraConfig.JIRA_PATH_PARAM);
     clientid = params.getParameter(JiraConfig.CLIENT_ID_PARAM);
     clientsecret = params.getObfuscatedParameter(JiraConfig.CLIENT_SECRET_PARAM);
+    
+    jiraproxyhost = params.getParameter(JiraConfig.JIRA_PROXYHOST_PARAM);
+    jiraproxyport = params.getParameter(JiraConfig.JIRA_PROXYPORT_PARAM);
+    jiraproxydomain = params.getParameter(JiraConfig.JIRA_PROXYDOMAIN_PARAM);
+    jiraproxyusername = params.getParameter(JiraConfig.JIRA_PROXYUSERNAME_PARAM);
+    jiraproxypassword = params.getObfuscatedParameter(JiraConfig.JIRA_PROXYPASSWORD_PARAM);
+
   }
 
   /**
@@ -266,7 +290,8 @@ public class JiraRepositoryConnector ext
       }
 
       String jiraurl = jiraprotocol + "://" + jirahost + (StringUtils.isEmpty(jiraport)?"":":"+jiraport)
+ jirapath;
-      session = new JiraSession(clientid, clientsecret, jiraurl);
+      session = new JiraSession(clientid, clientsecret, jiraurl,
+        jiraproxyhost, jiraproxyport, jiraproxydomain, jiraproxyusername, jiraproxypassword);
 
     }
     lastSessionFetch = System.currentTimeMillis();
@@ -348,6 +373,41 @@ public class JiraRepositoryConnector ext
   }
 
   /**
+   * Fill in a Proxy tab configuration parameter map for calling a Velocity
+   * template.
+   *
+   * @param newMap is the map to fill in
+   * @param parameters is the current set of configuration parameters
+   */
+  private static void fillInProxyConfigurationMap(Map<String, Object> newMap, IPasswordMapperActivity
mapper, ConfigParams parameters) {
+    String jiraproxyhost = parameters.getParameter(JiraConfig.JIRA_PROXYHOST_PARAM);
+    String jiraproxyport = parameters.getParameter(JiraConfig.JIRA_PROXYPORT_PARAM);
+    String jiraproxydomain = parameters.getParameter(JiraConfig.JIRA_PROXYDOMAIN_PARAM);
+    String jiraproxyusername = parameters.getParameter(JiraConfig.JIRA_PROXYUSERNAME_PARAM);
+    String jiraproxypassword = parameters.getObfuscatedParameter(JiraConfig.JIRA_PROXYPASSWORD_PARAM);
+
+    if (jiraproxyhost == null)
+      jiraproxyhost = JiraConfig.JIRA_PROXYHOST_DEFAULT;
+    if (jiraproxyport == null)
+      jiraproxyport = JiraConfig.JIRA_PROXYPORT_DEFAULT;
+
+    if (jiraproxydomain == null)
+      jiraproxydomain = JiraConfig.JIRA_PROXYDOMAIN_DEFAULT;
+    if (jiraproxyusername == null)
+      jiraproxyusername = JiraConfig.JIRA_PROXYUSERNAME_DEFAULT;
+    if (jiraproxypassword == null)
+      jiraproxypassword = JiraConfig.JIRA_PROXYPASSWORD_DEFAULT;
+    else
+      jiraproxypassword = mapper.mapPasswordToKey(jiraproxypassword);
+
+    newMap.put("JIRAPROXYHOST", jiraproxyhost);
+    newMap.put("JIRAPROXYPORT", jiraproxyport);
+    newMap.put("JIRAPROXYDOMAIN", jiraproxydomain);
+    newMap.put("JIRAPROXYUSERNAME", jiraproxyusername);
+    newMap.put("JIRAPROXYPASSWORD", jiraproxypassword);
+  }
+
+  /**
    * View configuration. This method is called in the body section of the
    * connector's view configuration page. Its purpose is to present the
    * connection information to the user. The coder can presume that the HTML
@@ -366,6 +426,7 @@ public class JiraRepositoryConnector ext
 
     // Fill in map from each tab
     fillInServerConfigurationMap(paramMap, out, parameters);
+    fillInProxyConfigurationMap(paramMap, out, parameters);
 
     Messages.outputResourceWithVelocity(out,locale,VIEW_CONFIG_FORWARD,paramMap);
   }
@@ -390,11 +451,14 @@ public class JiraRepositoryConnector ext
       throws ManifoldCFException, IOException {
     // Add the Server tab
     tabsArray.add(Messages.getString(locale, JIRA_SERVER_TAB_PROPERTY));
+    // Add the Proxy tab
+    tabsArray.add(Messages.getString(locale, JIRA_PROXY_TAB_PROPERTY));
     // Map the parameters
     Map<String, Object> paramMap = new HashMap<String, Object>();
 
     // Fill in the parameters from each tab
     fillInServerConfigurationMap(paramMap, out, parameters);
+    fillInProxyConfigurationMap(paramMap, out, parameters);
 
     // Output the Javascript - only one Velocity template for all tabs
     Messages.outputResourceWithVelocity(out,locale,EDIT_CONFIG_HEADER_FORWARD,paramMap);
@@ -411,10 +475,15 @@ public class JiraRepositoryConnector ext
     // Set the tab name
     paramMap.put("TabName", tabName);
 
-    // Server tab
     // Fill in the parameters
     fillInServerConfigurationMap(paramMap, out, parameters);
+    fillInProxyConfigurationMap(paramMap, out, parameters);
+
+    // Server tab
     Messages.outputResourceWithVelocity(out,locale,EDIT_CONFIG_FORWARD_SERVER,paramMap);
+    // Proxy tab
+    Messages.outputResourceWithVelocity(out,locale,EDIT_CONFIG_FORWARD_PROXY,paramMap);
+
   }
 
   /**
@@ -439,6 +508,8 @@ public class JiraRepositoryConnector ext
     IPostParameters variableContext, ConfigParams parameters)
     throws ManifoldCFException {
 
+    // Server tab parameters
+
     String jiraprotocol = variableContext.getParameter("jiraprotocol");
     if (jiraprotocol != null)
       parameters.setParameter(JiraConfig.JIRA_PROTOCOL_PARAM, jiraprotocol);
@@ -463,6 +534,28 @@ public class JiraRepositoryConnector ext
     if (clientsecret != null)
       parameters.setObfuscatedParameter(JiraConfig.CLIENT_SECRET_PARAM, variableContext.mapKeyToPassword(clientsecret));
 
+    // Proxy tab parameters
+    
+    String jiraproxyhost = variableContext.getParameter("jiraproxyhost");
+    if (jiraproxyhost != null)
+      parameters.setParameter(JiraConfig.JIRA_PROXYHOST_PARAM, jiraproxyhost);
+
+    String jiraproxyport = variableContext.getParameter("jiraproxyport");
+    if (jiraproxyport != null)
+      parameters.setParameter(JiraConfig.JIRA_PROXYPORT_PARAM, jiraproxyport);
+    
+    String jiraproxydomain = variableContext.getParameter("jiraproxydomain");
+    if (jiraproxydomain != null)
+      parameters.setParameter(JiraConfig.JIRA_PROXYDOMAIN_PARAM, jiraproxydomain);
+
+    String jiraproxyusername = variableContext.getParameter("jiraproxyusername");
+    if (jiraproxyusername != null)
+      parameters.setParameter(JiraConfig.JIRA_PROXYUSERNAME_PARAM, jiraproxyusername);
+
+    String jiraproxypassword = variableContext.getParameter("jiraproxypassword");
+    if (jiraproxypassword != null)
+      parameters.setObfuscatedParameter(JiraConfig.JIRA_PROXYPASSWORD_PARAM, variableContext.mapKeyToPassword(jiraproxypassword));
+
     return null;
   }
 

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraSession.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraSession.java?rev=1522760&r1=1522759&r2=1522760&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraSession.java
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jira/JiraSession.java
Fri Sep 13 01:32:09 2013
@@ -43,8 +43,10 @@ import org.apache.http.client.HttpClient
 import org.apache.http.impl.conn.PoolingClientConnectionManager;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
+import org.apache.http.HttpHost;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.UsernamePasswordCredentials;
+import org.apache.http.auth.NTCredentials;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpRequestBase;
 import org.apache.http.impl.client.DefaultHttpClient;
@@ -53,6 +55,7 @@ import org.apache.http.util.EntityUtils;
 import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.CoreConnectionPNames;
+import org.apache.http.conn.params.ConnRoutePNames;
 import org.apache.http.client.params.ClientPNames;
 import org.apache.http.client.HttpRequestRetryHandler;
 import org.apache.http.protocol.HttpContext;
@@ -78,10 +81,28 @@ public class JiraSession {
   private ClientConnectionManager connectionManager;
   private HttpClient httpClient;
   
+  // Current host name
+  private static String currentHost = null;
+  static
+  {
+    // Find the current host name
+    try
+    {
+      java.net.InetAddress addr = java.net.InetAddress.getLocalHost();
+
+      // Get hostname
+      currentHost = addr.getHostName();
+    }
+    catch (java.net.UnknownHostException e)
+    {
+    }
+  }
+
   /**
    * Constructor. Create a session.
    */
-  public JiraSession(String clientId, String clientSecret, String URLbase)
+  public JiraSession(String clientId, String clientSecret, String URLbase,
+    String proxyHost, String proxyPort, String proxyDomain, String proxyUsername, String
proxyPassword)
     throws ManifoldCFException {
     this.URLbase = URLbase;
     this.clientId = clientId;
@@ -123,6 +144,8 @@ public class JiraSession {
        
       });
     localHttpClient.setRedirectStrategy(new DefaultRedirectStrategy());
+      
+    // If authentication needed, set that
     if (clientId != null)
     {
       localHttpClient.getCredentialsProvider().setCredentials(
@@ -130,6 +153,43 @@ public class JiraSession {
         new UsernamePasswordCredentials(clientId,clientSecret));
     }
 
+    // If there's a proxy, set that too.
+    if (proxyHost != null && proxyHost.length() > 0)
+    {
+
+      int proxyPortInt;
+      if (proxyPort != null && proxyPort.length() > 0)
+      {
+        try
+        {
+          proxyPortInt = Integer.parseInt(proxyPort);
+        }
+        catch (NumberFormatException e)
+        {
+          throw new ManifoldCFException("Bad number: "+e.getMessage(),e);
+        }
+      }
+      else
+        proxyPortInt = 8080;
+
+      // Configure proxy authentication
+      if (proxyUsername != null && proxyUsername.length() > 0)
+      {
+        if (proxyPassword == null)
+          proxyPassword = "";
+        if (proxyDomain == null)
+          proxyDomain = "";
+
+        localHttpClient.getCredentialsProvider().setCredentials(
+          new AuthScope(proxyHost, proxyPortInt),
+          new NTCredentials(proxyUsername, proxyPassword, currentHost, proxyDomain));
+      }
+
+      HttpHost proxy = new HttpHost(proxyHost, proxyPortInt);
+
+      localHttpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
+    }
+
     httpClient = localHttpClient;
   }
 

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/authorities/jira/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/authorities/jira/common_en_US.properties?rev=1522760&r1=1522759&r2=1522760&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/authorities/jira/common_en_US.properties
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/authorities/jira/common_en_US.properties
Fri Sep 13 01:32:09 2013
@@ -14,6 +14,7 @@
 # limitations under the License.
 
 JiraAuthorityConnector.Server=Server
+JiraAuthorityConnector.Proxy=Proxy
 
 JiraAuthorityConnector.JiraProtocolColon=JIRA protocol:
 JiraAuthorityConnector.JiraHostColon=JIRA host:
@@ -21,9 +22,19 @@ JiraAuthorityConnector.JiraPortColon=JIR
 JiraAuthorityConnector.JiraRESTAPIPathColon=JIRA REST API path:
 JiraAuthorityConnector.ClientIDColon=Client ID (Optional):
 JiraAuthorityConnector.ClientSecretColon=Client Secret (Optional):
+
+JiraAuthorityConnector.JiraProxyHostColon=Proxy host:
+JiraAuthorityConnector.JiraProxyPortColon=Proxy port:
+JiraAuthorityConnector.JiraProxyDomainColon=Proxy authentication domain:
+JiraAuthorityConnector.JiraProxyUsernameColon=Proxy authentication user name:
+JiraAuthorityConnector.JiraProxyPasswordColon=Proxy authentication password:
+
 JiraAuthorityConnector.JiraHostMustNotBeNull=JIRA host must not be null
 JiraAuthorityConnector.JiraHostMustNotIncludeSlash=JIRA host must not include a '/' character
 JiraAuthorityConnector.JiraPortMustBeAnInteger=JIRA port must be an integer
 JiraAuthorityConnector.JiraPathMustNotBeNull=JIRA path must not be null
 JiraAuthorityConnector.JiraPathMustBeginWithASlash=JIRA path must begin with a '/' character
 
+JiraAuthorityConnector.JiraProxyPortMustBeAnInteger=Proxy port must be an integer
+JiraAuthorityConnector.JiraProxyHostMustNotIncludeSlash=Proxy host cannot include a '/' character
+

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/authorities/jira/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/authorities/jira/common_ja_JP.properties?rev=1522760&r1=1522759&r2=1522760&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/authorities/jira/common_ja_JP.properties
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/authorities/authorities/jira/common_ja_JP.properties
Fri Sep 13 01:32:09 2013
@@ -14,6 +14,7 @@
 # limitations under the License.
 
 JiraAuthorityConnector.Server=Server
+JiraAuthorityConnector.Proxy=Proxy
 
 JiraAuthorityConnector.JiraProtocolColon=JIRA protocol:
 JiraAuthorityConnector.JiraHostColon=JIRA host:
@@ -21,8 +22,18 @@ JiraAuthorityConnector.JiraPortColon=JIR
 JiraAuthorityConnector.JiraRESTAPIPathColon=JIRA REST API path:
 JiraAuthorityConnector.ClientIDColon=Client ID (Optional):
 JiraAuthorityConnector.ClientSecretColon=Client Secret (Optional):
+
+JiraAuthorityConnector.JiraProxyHostColon=Proxy host:
+JiraAuthorityConnector.JiraProxyPortColon=Proxy port:
+JiraAuthorityConnector.JiraProxyDomainColon=Proxy authentication domain:
+JiraAuthorityConnector.JiraProxyUsernameColon=Proxy authentication user name:
+JiraAuthorityConnector.JiraProxyPasswordColon=Proxy authentication password:
+
 JiraAuthorityConnector.JiraHostMustNotBeNull=JIRA host must not be null
 JiraAuthorityConnector.JiraHostMustNotIncludeSlash=JIRA host must not include a '/' character
 JiraAuthorityConnector.JiraPortMustBeAnInteger=JIRA port must be an integer
 JiraAuthorityConnector.JiraPathMustNotBeNull=JIRA path must not be null
 JiraAuthorityConnector.JiraPathMustBeginWithASlash=JIRA path must begin with a '/' character
+
+JiraAuthorityConnector.JiraProxyPortMustBeAnInteger=Proxy port must be an integer
+JiraAuthorityConnector.JiraProxyHostMustNotIncludeSlash=Proxy host cannot include a '/' character

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_en_US.properties?rev=1522760&r1=1522759&r2=1522760&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_en_US.properties
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_en_US.properties
Fri Sep 13 01:32:09 2013
@@ -14,6 +14,7 @@
 # limitations under the License.
 
 JiraRepositoryConnector.Server=Server
+JiraRepositoryConnector.Proxy=Proxy
 JiraRepositoryConnector.JiraQuery=Seed Query
 JiraRepositoryConnector.Security=Security
 
@@ -23,12 +24,22 @@ JiraRepositoryConnector.JiraPortColon=JI
 JiraRepositoryConnector.JiraRESTAPIPathColon=JIRA REST API path:
 JiraRepositoryConnector.ClientIDColon=Client ID (Optional):
 JiraRepositoryConnector.ClientSecretColon=Client Secret (Optional):
+
+JiraRepositoryConnector.JiraProxyHostColon=Proxy host:
+JiraRepositoryConnector.JiraProxyPortColon=Proxy port:
+JiraRepositoryConnector.JiraProxyDomainColon=Proxy authentication domain:
+JiraRepositoryConnector.JiraProxyUsernameColon=Proxy authentication user name:
+JiraRepositoryConnector.JiraProxyPasswordColon=Proxy authentication password:
+
 JiraRepositoryConnector.JiraHostMustNotBeNull=JIRA host must not be null
 JiraRepositoryConnector.JiraHostMustNotIncludeSlash=JIRA host must not include a '/' character
 JiraRepositoryConnector.JiraPortMustBeAnInteger=JIRA port must be an integer
 JiraRepositoryConnector.JiraPathMustNotBeNull=JIRA path must not be null
 JiraRepositoryConnector.JiraPathMustBeginWithASlash=JIRA path must begin with a '/' character
 
+JiraRepositoryConnector.JiraProxyPortMustBeAnInteger=Proxy port must be an integer
+JiraRepositoryConnector.JiraProxyHostMustNotIncludeSlash=Proxy host cannot include a '/'
character
+
 JiraRepositoryConnector.JiraQueryColon=JIRA query:
 JiraRepositoryConnector.SeedQueryCannotBeNull=Seed query cannot be null
 

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_ja_JP.properties?rev=1522760&r1=1522759&r2=1522760&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_ja_JP.properties
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/jira/common_ja_JP.properties
Fri Sep 13 01:32:09 2013
@@ -14,6 +14,7 @@
 # limitations under the License.
 
 JiraRepositoryConnector.Server=Server
+JiraRepositoryConnector.Proxy=Proxy
 JiraRepositoryConnector.JiraQuery=Seed Query
 JiraRepositoryConnector.Security=Security
 
@@ -23,12 +24,22 @@ JiraRepositoryConnector.JiraPortColon=JI
 JiraRepositoryConnector.JiraRESTAPIPathColon=JIRA REST API path:
 JiraRepositoryConnector.ClientIDColon=Client ID (Optional):
 JiraRepositoryConnector.ClientSecretColon=Client Secret (Optional):
+
+JiraRepositoryConnector.JiraProxyHostColon=Proxy host:
+JiraRepositoryConnector.JiraProxyPortColon=Proxy port:
+JiraRepositoryConnector.JiraProxyDomainColon=Proxy authentication domain:
+JiraRepositoryConnector.JiraProxyUsernameColon=Proxy authentication user name:
+JiraRepositoryConnector.JiraProxyPasswordColon=Proxy authentication password:
+
 JiraRepositoryConnector.JiraHostMustNotBeNull=JIRA host must not be null
 JiraRepositoryConnector.JiraHostMustNotIncludeSlash=JIRA host must not include a '/' character
 JiraRepositoryConnector.JiraPortMustBeAnInteger=JIRA port must be an integer
 JiraRepositoryConnector.JiraPathMustNotBeNull=JIRA path must not be null
 JiraRepositoryConnector.JiraPathMustBeginWithASlash=JIRA path must begin with a '/' character
 
+JiraRepositoryConnector.JiraProxyPortMustBeAnInteger=Proxy port must be an integer
+JiraRepositoryConnector.JiraProxyHostMustNotIncludeSlash=Proxy host cannot include a '/'
character
+
 JiraRepositoryConnector.JiraQueryColon=JIRA query:
 JiraRepositoryConnector.SeedQueryCannotBeNull=Seed query cannot be null
 

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/jira/viewConfiguration_jira.html
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/jira/viewConfiguration_jira.html?rev=1522760&r1=1522759&r2=1522760&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/jira/viewConfiguration_jira.html
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/jira/viewConfiguration_jira.html
Fri Sep 13 01:32:09 2013
@@ -71,5 +71,55 @@
       <nobr>********</nobr>
     </td>
   </tr>
+  
+  <tr><td class="separator" colspan="2"><hr/></td></tr>
+
+  <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraAuthorityConnector.JiraProxyHostColon'))</nobr>
+    </td>
+    <td class="value">
+      <nobr>$Encoder.bodyEscape($JIRAPROXYHOST)</nobr>
+    </td>
+  </tr>
+
+  <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraAuthorityConnector.JiraProxyPortColon'))</nobr>
+    </td>
+    <td class="value">
+      <nobr>$Encoder.bodyEscape($JIRAPROXYPORT)</nobr>
+    </td>
+  </tr>
+
+  <tr><td class="separator" colspan="2"><hr/></td></tr>
+
+  <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraAuthorityConnector.JiraProxyDomainColon'))</nobr>
+    </td>
+    <td class="value">
+      <nobr>$Encoder.bodyEscape($JIRAPROXYDOMAIN)</nobr>
+    </td>
+  </tr>
+
+  <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraAuthorityConnector.JiraProxyUsernameColon'))</nobr>
+    </td>
+    <td class="value">
+      <nobr>$Encoder.bodyEscape($JIRAPROXYUSERNAME)</nobr>
+    </td>
+  </tr>
+
+  <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraAuthorityConnector.JiraProxyPasswordColon'))</nobr>
+    </td>
+    <td class="value">
+      <nobr>********</nobr>
+    </td>
+  </tr>
+
 </table>
 

Modified: manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/viewConfiguration_jira.html
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/viewConfiguration_jira.html?rev=1522760&r1=1522759&r2=1522760&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/viewConfiguration_jira.html
(original)
+++ manifoldcf/trunk/connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/viewConfiguration_jira.html
Fri Sep 13 01:32:09 2013
@@ -63,6 +63,7 @@
       <nobr>$Encoder.bodyEscape($CLIENTID)</nobr>
     </td>
   </tr>
+
   <tr>
     <td class="description">
       <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.ClientSecretColon'))</nobr>
@@ -71,5 +72,55 @@
       <nobr>********</nobr>
     </td>
   </tr>
+  
+  <tr><td class="separator" colspan="2"><hr/></td></tr>
+
+  <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.JiraProxyHostColon'))</nobr>
+    </td>
+    <td class="value">
+      <nobr>$Encoder.bodyEscape($JIRAPROXYHOST)</nobr>
+    </td>
+  </tr>
+
+  <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.JiraProxyPortColon'))</nobr>
+    </td>
+    <td class="value">
+      <nobr>$Encoder.bodyEscape($JIRAPROXYPORT)</nobr>
+    </td>
+  </tr>
+
+  <tr><td class="separator" colspan="2"><hr/></td></tr>
+
+  <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.JiraProxyDomainColon'))</nobr>
+    </td>
+    <td class="value">
+      <nobr>$Encoder.bodyEscape($JIRAPROXYDOMAIN)</nobr>
+    </td>
+  </tr>
+
+  <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.JiraProxyUsernameColon'))</nobr>
+    </td>
+    <td class="value">
+      <nobr>$Encoder.bodyEscape($JIRAPROXYUSERNAME)</nobr>
+    </td>
+  </tr>
+
+  <tr>
+    <td class="description">
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('JiraRepositoryConnector.JiraProxyPasswordColon'))</nobr>
+    </td>
+    <td class="value">
+      <nobr>********</nobr>
+    </td>
+  </tr>
+
 </table>
 



Mime
View raw message