You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2013/07/14 16:03:14 UTC

svn commit: r1502977 [1/2] - in /manifoldcf/branches/CONNECTORS-737: connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/craw...

Author: kwright
Date: Sun Jul 14 14:03:13 2013
New Revision: 1502977

URL: http://svn.apache.org/r1502977
Log:
Finish implementation, including doc.  Just need to port connectors now.

Added:
    manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHTTPOutputActivity.java   (with props)
    manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IParameterActivity.java   (with props)
    manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IPasswordMapperActivity.java   (with props)
    manifoldcf/branches/CONNECTORS-737/site/src/documentation/resources/images/en_US/login.PNG   (with props)
Modified:
    manifoldcf/branches/CONNECTORS-737/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java
    manifoldcf/branches/CONNECTORS-737/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java
    manifoldcf/branches/CONNECTORS-737/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveRepositoryConnector.java
    manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHTTPOutput.java
    manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IPostParameters.java
    manifoldcf/branches/CONNECTORS-737/framework/core/src/test/resources/org/apache/manifoldcf/core/tests/VirtualBrowser.py
    manifoldcf/branches/CONNECTORS-737/framework/crawler-ui/src/main/webapp/adminDefaults.jsp
    manifoldcf/branches/CONNECTORS-737/framework/crawler-ui/src/main/webapp/adminHeaders.jsp
    manifoldcf/branches/CONNECTORS-737/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/jsp/JspWrapper.java
    manifoldcf/branches/CONNECTORS-737/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/multipart/MultipartWrapper.java
    manifoldcf/branches/CONNECTORS-737/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml
    manifoldcf/branches/CONNECTORS-737/site/src/documentation/content/xdocs/en_US/how-to-build-and-deploy.xml
    manifoldcf/branches/CONNECTORS-737/tests/activedirectory/src/test/java/org/apache/manifoldcf/activedirectory_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-737/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-737/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-737/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-737/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUITester.java
    manifoldcf/branches/CONNECTORS-737/tests/gts/src/test/java/org/apache/manifoldcf/gts_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-737/tests/hdfs/src/test/java/org/apache/manifoldcf/hdfs_tests/NavigationUITester.java
    manifoldcf/branches/CONNECTORS-737/tests/jcifs/src/test/java/org/apache/manifoldcf/jcifs_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-737/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-737/tests/ldap/src/test/java/org/apache/manifoldcf/ldap_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-737/tests/nullauthority/src/test/java/org/apache/manifoldcf/nullauthority_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-737/tests/opensearchserver/src/test/java/org/apache/manifoldcf/opensearchserver_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-737/tests/rss/src/test/java/org/apache/manifoldcf/rss_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-737/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-737/tests/webcrawler/src/test/java/org/apache/manifoldcf/webcrawler_tests/NavigationDerbyUI.java
    manifoldcf/branches/CONNECTORS-737/tests/wiki/src/test/java/org/apache/manifoldcf/wiki_tests/NavigationDerbyUI.java

Modified: manifoldcf/branches/CONNECTORS-737/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java (original)
+++ manifoldcf/branches/CONNECTORS-737/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java Sun Jul 14 14:03:13 2013
@@ -480,13 +480,13 @@ public class ActiveDirectoryAuthority ex
   {
     Map<String,Object> velocityContext = new HashMap<String,Object>();
     velocityContext.put("TabName",tabName);
-    fillInDomainControllerTab(velocityContext,parameters);
-    fillInCacheTab(velocityContext,parameters);
+    fillInDomainControllerTab(velocityContext,out,parameters);
+    fillInCacheTab(velocityContext,out,parameters);
     Messages.outputResourceWithVelocity(out,locale,"editConfiguration_DomainController.html",velocityContext);
     Messages.outputResourceWithVelocity(out,locale,"editConfiguration_Cache.html",velocityContext);
   }
   
-  protected static void fillInDomainControllerTab(Map<String,Object> velocityContext, ConfigParams parameters)
+  protected static void fillInDomainControllerTab(Map<String,Object> velocityContext, IPasswordMapperActivity mapper, ConfigParams parameters)
   {
     String domainControllerName = parameters.getParameter(ActiveDirectoryConfig.PARAM_DOMAINCONTROLLER);
     String userName = parameters.getParameter(ActiveDirectoryConfig.PARAM_USERNAME);
@@ -498,7 +498,7 @@ public class ActiveDirectoryAuthority ex
     // Backwards compatibility: if domain controller parameter is set, create an entry in the map.
     if (domainControllerName != null)
     {
-      domainControllers.add(createDomainControllerMap("",domainControllerName,userName,password,authentication,userACLsUsername));
+      domainControllers.add(createDomainControllerMap(mapper,"",domainControllerName,userName,password,authentication,userACLsUsername));
     }
     else
     {
@@ -516,14 +516,14 @@ public class ActiveDirectoryAuthority ex
           String dcPassword = deobfuscate(cn.getAttributeValue(ActiveDirectoryConfig.ATTR_PASSWORD));
           String dcAuthentication = cn.getAttributeValue(ActiveDirectoryConfig.ATTR_AUTHENTICATION);
           String dcUserACLsUsername = cn.getAttributeValue(ActiveDirectoryConfig.ATTR_USERACLsUSERNAME);
-          domainControllers.add(createDomainControllerMap(dcSuffix,dcDomainController,dcUserName,dcPassword,dcAuthentication,dcUserACLsUsername));
+          domainControllers.add(createDomainControllerMap(mapper,dcSuffix,dcDomainController,dcUserName,dcPassword,dcAuthentication,dcUserACLsUsername));
         }
       }
     }
     velocityContext.put("DOMAINCONTROLLERS",domainControllers);
   }
 
-  protected static Map<String,String> createDomainControllerMap(String suffix, String domainControllerName,
+  protected static Map<String,String> createDomainControllerMap(IPasswordMapperActivity mapper, String suffix, String domainControllerName,
     String userName, String password, String authentication, String userACLsUsername)
   {
     Map<String,String> defaultMap = new HashMap<String,String>();
@@ -534,7 +534,7 @@ public class ActiveDirectoryAuthority ex
     if (userName != null)
       defaultMap.put("USERNAME",userName);
     if (password != null)
-      defaultMap.put("PASSWORD",password);
+      defaultMap.put("PASSWORD",mapper.mapPasswordToKey(password));
     if (authentication != null)
       defaultMap.put("AUTHENTICATION",authentication);
     if (userACLsUsername != null)
@@ -542,7 +542,7 @@ public class ActiveDirectoryAuthority ex
     return defaultMap;
   }
   
-  protected static void fillInCacheTab(Map<String,Object> velocityContext, ConfigParams parameters)
+  protected static void fillInCacheTab(Map<String,Object> velocityContext, IPasswordMapperActivity mapper, ConfigParams parameters)
   {
     String cacheLifetime = parameters.getParameter(ActiveDirectoryConfig.PARAM_CACHELIFETIME);
     if (cacheLifetime == null)
@@ -603,7 +603,7 @@ public class ActiveDirectoryAuthority ex
             variableContext.getParameter("dcrecord_suffix"),
             variableContext.getParameter("dcrecord_domaincontrollername"),
             variableContext.getParameter("dcrecord_username"),
-            variableContext.getParameter("dcrecord_password"),
+            variableContext.mapKeyToPassword(variableContext.getParameter("dcrecord_password")),
             variableContext.getParameter("dcrecord_authentication"),
             variableContext.getParameter("dcrecord_userACLsUsername"));
         }
@@ -614,7 +614,7 @@ public class ActiveDirectoryAuthority ex
             variableContext.getParameter("dcrecord_suffix_"+i),
             variableContext.getParameter("dcrecord_domaincontrollername_"+i),
             variableContext.getParameter("dcrecord_username_"+i),
-            variableContext.getParameter("dcrecord_password_"+i),
+            variableContext.mapKeyToPassword(variableContext.getParameter("dcrecord_password_"+i)),
             variableContext.getParameter("dcrecord_authentication_"+i),
             variableContext.getParameter("dcrecord_userACLsUsername_"+i));
         }
@@ -675,8 +675,8 @@ public class ActiveDirectoryAuthority ex
     throws ManifoldCFException, IOException
   {
     Map<String,Object> velocityContext = new HashMap<String,Object>();
-    fillInDomainControllerTab(velocityContext,parameters);
-    fillInCacheTab(velocityContext,parameters);
+    fillInDomainControllerTab(velocityContext,out,parameters);
+    fillInCacheTab(velocityContext,out,parameters);
     Messages.outputResourceWithVelocity(out,locale,"viewConfiguration.html",velocityContext);
   }
 

Modified: manifoldcf/branches/CONNECTORS-737/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java (original)
+++ manifoldcf/branches/CONNECTORS-737/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java Sun Jul 14 14:03:13 2013
@@ -43,6 +43,7 @@ import org.apache.manifoldcf.core.common
 import org.apache.commons.lang.StringUtils;
 import org.apache.manifoldcf.agents.interfaces.RepositoryDocument;
 import org.apache.manifoldcf.core.interfaces.IHTTPOutput;
+import org.apache.manifoldcf.core.interfaces.IPasswordMapperActivity;
 import org.apache.manifoldcf.core.interfaces.IPostParameters;
 import org.apache.manifoldcf.core.interfaces.IThreadContext;
 import org.apache.manifoldcf.core.interfaces.SpecificationNode;
@@ -347,7 +348,7 @@ public class DropboxRepositoryConnector 
    * @param newMap is the map to fill in
    * @param parameters is the current set of configuration parameters
    */
-  private static void fillInServerConfigurationMap(Map<String, Object> newMap, ConfigParams parameters) {
+  private static void fillInServerConfigurationMap(Map<String, Object> newMap, IPasswordMapperActivity mapper, ConfigParams parameters) {
     
     String app_key = parameters.getParameter(DropboxConfig.APP_KEY_PARAM);
     String app_secret = parameters.getObfuscatedParameter(DropboxConfig.APP_SECRET_PARAM);
@@ -361,6 +362,8 @@ public class DropboxRepositoryConnector 
     
     if (app_secret == null) {
       app_secret = StringUtils.EMPTY;
+    } else {
+      app_secret = mapper.mapPasswordToKey(app_secret);
     }
     
     if (username == null) {
@@ -368,6 +371,8 @@ public class DropboxRepositoryConnector 
     }
     if (password == null) {
       password = StringUtils.EMPTY;
+    } else {
+      password = mapper.mapPasswordToKey(password);
     }
     
     newMap.put("APP_KEY", app_key);
@@ -395,7 +400,7 @@ public class DropboxRepositoryConnector 
     Map<String, Object> paramMap = new HashMap<String, Object>();
 
     // Fill in map from each tab
-    fillInServerConfigurationMap(paramMap, parameters);
+    fillInServerConfigurationMap(paramMap, out, parameters);
 
     Messages.outputResourceWithVelocity(out,locale,VIEW_CONFIG_FORWARD,paramMap);
   }
@@ -425,7 +430,7 @@ public class DropboxRepositoryConnector 
     Map<String, Object> paramMap = new HashMap<String, Object>();
 
     // Fill in the parameters from each tab
-    fillInServerConfigurationMap(paramMap, parameters);
+    fillInServerConfigurationMap(paramMap, out, parameters);
 
     // Output the Javascript - only one Velocity template for all tabs
     Messages.outputResourceWithVelocity(out,locale,EDIT_CONFIG_HEADER_FORWARD,paramMap);
@@ -443,7 +448,7 @@ public class DropboxRepositoryConnector 
     // Set the tab name
     paramMap.put("TabName", tabName);
     // Fill in the parameters
-    fillInServerConfigurationMap(paramMap, parameters);
+    fillInServerConfigurationMap(paramMap, out, parameters);
     Messages.outputResourceWithVelocity(out,locale,EDIT_CONFIG_FORWARD_SERVER,paramMap);
 
   }
@@ -478,7 +483,7 @@ public class DropboxRepositoryConnector 
     
     String app_secret = variableContext.getParameter("app_secret");
     if (app_secret != null) {
-      parameters.setObfuscatedParameter(DropboxConfig.APP_SECRET_PARAM, app_secret);
+      parameters.setObfuscatedParameter(DropboxConfig.APP_SECRET_PARAM, variableContext.mapKeyToPassword(app_secret));
     }
     
     String key = variableContext.getParameter("key");
@@ -488,7 +493,7 @@ public class DropboxRepositoryConnector 
 
     String secret = variableContext.getParameter("secret");
     if (secret != null) {
-      parameters.setObfuscatedParameter(DropboxConfig.SECRET_PARAM, secret);
+      parameters.setObfuscatedParameter(DropboxConfig.SECRET_PARAM, variableContext.mapKeyToPassword(secret));
     }
 
     return null;

Modified: manifoldcf/branches/CONNECTORS-737/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveRepositoryConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveRepositoryConnector.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveRepositoryConnector.java (original)
+++ manifoldcf/branches/CONNECTORS-737/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveRepositoryConnector.java Sun Jul 14 14:03:13 2013
@@ -41,6 +41,7 @@ import org.apache.manifoldcf.core.interf
 import org.apache.commons.lang.StringUtils;
 import org.apache.manifoldcf.agents.interfaces.RepositoryDocument;
 import org.apache.manifoldcf.core.interfaces.IHTTPOutput;
+import org.apache.manifoldcf.core.interfaces.IPasswordMapperActivity;
 import org.apache.manifoldcf.core.interfaces.IPostParameters;
 import org.apache.manifoldcf.core.interfaces.IThreadContext;
 import org.apache.manifoldcf.core.interfaces.SpecificationNode;
@@ -411,7 +412,7 @@ public class GoogleDriveRepositoryConnec
    * @param newMap is the map to fill in
    * @param parameters is the current set of configuration parameters
    */
-  private static void fillInServerConfigurationMap(Map<String, Object> newMap, ConfigParams parameters) {
+  private static void fillInServerConfigurationMap(Map<String, Object> newMap, IPasswordMapperActivity mapper, ConfigParams parameters) {
     String clientid = parameters.getParameter(GoogleDriveConfig.CLIENT_ID_PARAM);
     String clientsecret = parameters.getObfuscatedParameter(GoogleDriveConfig.CLIENT_SECRET_PARAM);
     String refreshtoken = parameters.getParameter(GoogleDriveConfig.REFRESH_TOKEN_PARAM);
@@ -422,6 +423,8 @@ public class GoogleDriveRepositoryConnec
     
     if (clientsecret == null) {
       clientsecret = StringUtils.EMPTY;
+    } else {
+      clientsecret = mapper.mapPasswordToKey(clientsecret);
     }
 
     if (refreshtoken == null) {
@@ -451,7 +454,7 @@ public class GoogleDriveRepositoryConnec
     Map<String, Object> paramMap = new HashMap<String, Object>();
 
     // Fill in map from each tab
-    fillInServerConfigurationMap(paramMap, parameters);
+    fillInServerConfigurationMap(paramMap, out, parameters);
 
     Messages.outputResourceWithVelocity(out,locale,VIEW_CONFIG_FORWARD,paramMap);
   }
@@ -480,7 +483,7 @@ public class GoogleDriveRepositoryConnec
     Map<String, Object> paramMap = new HashMap<String, Object>();
 
     // Fill in the parameters from each tab
-    fillInServerConfigurationMap(paramMap, parameters);
+    fillInServerConfigurationMap(paramMap, out, parameters);
 
     // Output the Javascript - only one Velocity template for all tabs
     Messages.outputResourceWithVelocity(out,locale,EDIT_CONFIG_HEADER_FORWARD,paramMap);
@@ -499,7 +502,7 @@ public class GoogleDriveRepositoryConnec
 
     // Server tab
     // Fill in the parameters
-    fillInServerConfigurationMap(paramMap, parameters);
+    fillInServerConfigurationMap(paramMap, out, parameters);
     Messages.outputResourceWithVelocity(out,locale,EDIT_CONFIG_FORWARD_SERVER,paramMap);
   }
 
@@ -532,7 +535,7 @@ public class GoogleDriveRepositoryConnec
 
     String clientsecret = variableContext.getParameter(GoogleDriveConfig.CLIENT_SECRET_PARAM);
     if (clientsecret != null) {
-      parameters.setObfuscatedParameter(GoogleDriveConfig.CLIENT_SECRET_PARAM, clientsecret);
+      parameters.setObfuscatedParameter(GoogleDriveConfig.CLIENT_SECRET_PARAM, variableContext.mapKeyToPassword(clientsecret));
     }
 
     String refreshtoken = variableContext.getParameter(GoogleDriveConfig.REFRESH_TOKEN_PARAM);

Modified: manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHTTPOutput.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHTTPOutput.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHTTPOutput.java (original)
+++ manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHTTPOutput.java Sun Jul 14 14:03:13 2013
@@ -24,115 +24,8 @@ import java.io.*;
 * HTML output for a web interface.  More broadly, it provides the services that all
 * connectors will need in order to provide UI components.
 */
-public interface IHTTPOutput
+public interface IHTTPOutput extends IHTTPOutputActivity, IPasswordMapperActivity
 {
   public static final String _rcsid = "@(#)$Id: IHTTPOutput.java 988245 2010-08-23 18:39:35Z kwright $";
 
-  // Output services
-
-  /** Flush the stream */
-  public void flush()
-    throws IOException;
-  
-  /** Write a newline */
-  public void newLine()
-    throws IOException;
-  
-  /** Write a boolean */
-  public void print(boolean b)
-    throws IOException;
-  
-  /** Write a char */
-  public void print(char c)
-    throws IOException;
-  
-  /** Write an array of chars */
-  public void print(char[] c)
-    throws IOException;
-  
-  /** Write a double */
-  public void print(double d)
-    throws IOException;
-  
-  /** Write a float */
-  public void print(float f)
-    throws IOException;
-  
-  /** Write an int */
-  public void print(int i)
-    throws IOException;
-  
-  /** Write a long */
-  public void print(long l)
-    throws IOException;
-  
-  /** Write an object */
-  public void print(Object o)
-    throws IOException;
-  
-  /** Write a string */
-  public void print(String s)
-    throws IOException;
-  
-  /** Write a boolean */
-  public void println(boolean b)
-    throws IOException;
-  
-  /** Write a char */
-  public void println(char c)
-    throws IOException;
-  
-  /** Write an array of chars */
-  public void println(char[] c)
-    throws IOException;
-  
-  /** Write a double */
-  public void println(double d)
-    throws IOException;
-  
-  /** Write a float */
-  public void println(float f)
-    throws IOException;
-  
-  /** Write an int */
-  public void println(int i)
-    throws IOException;
-  
-  /** Write a long */
-  public void println(long l)
-    throws IOException;
-  
-  /** Write an object */
-  public void println(Object o)
-    throws IOException;
-  
-  /** Write a string */
-  public void println(String s)
-    throws IOException;
-
-  // Password management services.
-  // Passwords should not appear in any data sent from the crawler UI to the browser.  The
-  // following methods are provided to assist the connector UI components in this task.
-  // A connector coder should use these services as follows:
-  // - When the password would ordinarily be put into a form element as the current password,
-  //   instead use mapPasswordToKey() to create a key and put that in instead.
-  // - When the "password" is posted, and the post is processed, use mapKeyToPassword() to
-  //   restore the correct password.
-  
-  /** Map a password to a unique key.
-  * This method works within a specific given browser session to replace an existing password with
-  * a key which can be used to look up the password at a later time.
-  *@param password is the password.
-  *@return the key.
-  */
-  public String mapPasswordToKey(String password);
-  
-  /** Convert a key, created by mapPasswordToKey, back to the original password, within
-  * the lifetime of the browser session.  If the provided key is not an actual key, instead
-  * the key value is assumed to be a new password value.
-  *@param key is the key.
-  *@return the password.
-  */
-  public String mapKeyToPassword(String key);
-  
 }

Added: manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHTTPOutputActivity.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHTTPOutputActivity.java?rev=1502977&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHTTPOutputActivity.java (added)
+++ manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHTTPOutputActivity.java Sun Jul 14 14:03:13 2013
@@ -0,0 +1,110 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.core.interfaces;
+
+import java.io.*;
+
+/** This interface abstracts from the output character stream used to construct
+* HTML output for a web interface.
+*/
+public interface IHTTPOutputActivity
+{
+  public static final String _rcsid = "@(#)$Id$";
+
+  /** Flush the stream */
+  public void flush()
+    throws IOException;
+  
+  /** Write a newline */
+  public void newLine()
+    throws IOException;
+  
+  /** Write a boolean */
+  public void print(boolean b)
+    throws IOException;
+  
+  /** Write a char */
+  public void print(char c)
+    throws IOException;
+  
+  /** Write an array of chars */
+  public void print(char[] c)
+    throws IOException;
+  
+  /** Write a double */
+  public void print(double d)
+    throws IOException;
+  
+  /** Write a float */
+  public void print(float f)
+    throws IOException;
+  
+  /** Write an int */
+  public void print(int i)
+    throws IOException;
+  
+  /** Write a long */
+  public void print(long l)
+    throws IOException;
+  
+  /** Write an object */
+  public void print(Object o)
+    throws IOException;
+  
+  /** Write a string */
+  public void print(String s)
+    throws IOException;
+  
+  /** Write a boolean */
+  public void println(boolean b)
+    throws IOException;
+  
+  /** Write a char */
+  public void println(char c)
+    throws IOException;
+  
+  /** Write an array of chars */
+  public void println(char[] c)
+    throws IOException;
+  
+  /** Write a double */
+  public void println(double d)
+    throws IOException;
+  
+  /** Write a float */
+  public void println(float f)
+    throws IOException;
+  
+  /** Write an int */
+  public void println(int i)
+    throws IOException;
+  
+  /** Write a long */
+  public void println(long l)
+    throws IOException;
+  
+  /** Write an object */
+  public void println(Object o)
+    throws IOException;
+  
+  /** Write a string */
+  public void println(String s)
+    throws IOException;
+
+}

Propchange: manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHTTPOutputActivity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHTTPOutputActivity.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IParameterActivity.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IParameterActivity.java?rev=1502977&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IParameterActivity.java (added)
+++ manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IParameterActivity.java Sun Jul 14 14:03:13 2013
@@ -0,0 +1,66 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.core.interfaces;
+
+import java.util.*;
+
+/** This interface represents parameters that get posted during UI interaction.
+*/
+public interface IParameterActivity
+{
+  public static final String _rcsid = "@(#)$Id$";
+
+  /** Read an array of parameter values.
+  *@param name is the parameter name.
+  *@return the array of values, or null if it doesn't exist.
+  */
+  public String[] getParameterValues(String name);
+  
+  /** Get single parameter value.
+  *@param name is the parameter name.
+  *@return the value, or null if it doesn't exist.
+  */
+  public String getParameter(String name);
+  
+  /** Get a file parameter, as a binary input stream.
+  *@param name is the parameter name.
+  *@return the value, or null if it doesn't exist.
+  */
+  public BinaryInput getBinaryStream(String name)
+    throws ManifoldCFException;
+  
+  /** Get file parameter, as a byte array.
+  *@param name is the parameter name.
+  *@return the binary parameter as an array of bytes.
+  */
+  public byte[] getBinaryBytes(String name);
+  
+  /** Set a parameter value.
+  *@param name is the parameter name.
+  *@param value is the desired value.
+  */
+  public void setParameter(String name, String value);
+  
+  /** Set an array of parameter values.
+  *@param name is the parameter name.
+  *@param values is the array of desired values.
+  */
+  public void setParameterValues(String name, String[] values);
+
+}

Propchange: manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IParameterActivity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IParameterActivity.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IPasswordMapperActivity.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IPasswordMapperActivity.java?rev=1502977&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IPasswordMapperActivity.java (added)
+++ manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IPasswordMapperActivity.java Sun Jul 14 14:03:13 2013
@@ -0,0 +1,53 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.core.interfaces;
+
+import java.io.*;
+
+/** This interface abstracts from password mapping activity, available for
+* all connector-provided UI components.
+* Passwords should not appear in any data sent from the crawler UI to the browser.  The
+* following methods are provided to assist the connector UI components in this task.
+* A connector coder should use these services as follows:
+* - When the password would ordinarily be put into a form element as the current password,
+*    instead use mapPasswordToKey() to create a key and put that in instead.
+* - When the "password" is posted, and the post is processed, use mapKeyToPassword() to
+*    restore the correct password.
+*/
+public interface IPasswordMapperActivity
+{
+  public static final String _rcsid = "@(#)$Id$";
+
+  /** Map a password to a unique key.
+  * This method works within a specific given browser session to replace an existing password with
+  * a key which can be used to look up the password at a later time.
+  *@param password is the password.
+  *@return the key.
+  */
+  public String mapPasswordToKey(String password);
+  
+  /** Convert a key, created by mapPasswordToKey, back to the original password, within
+  * the lifetime of the browser session.  If the provided key is not an actual key, instead
+  * the key value is assumed to be a new password value.
+  *@param key is the key.
+  *@return the password.
+  */
+  public String mapKeyToPassword(String key);
+  
+}

Propchange: manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IPasswordMapperActivity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IPasswordMapperActivity.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IPostParameters.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IPostParameters.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IPostParameters.java (original)
+++ manifoldcf/branches/CONNECTORS-737/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IPostParameters.java Sun Jul 14 14:03:13 2013
@@ -20,47 +20,11 @@ package org.apache.manifoldcf.core.inter
 
 import java.util.*;
 
-/** This interface represents parameters that get posted during UI interaction.
+/** This interface represents resources that are made available to connector methods
+* during UI post operations.
 */
-public interface IPostParameters
+public interface IPostParameters extends IParameterActivity, IPasswordMapperActivity
 {
   public static final String _rcsid = "@(#)$Id: IPostParameters.java 988245 2010-08-23 18:39:35Z kwright $";
 
-  /** Read an array of parameter values.
-  *@param name is the parameter name.
-  *@return the array of values, or null if it doesn't exist.
-  */
-  public String[] getParameterValues(String name);
-  
-  /** Get single parameter value.
-  *@param name is the parameter name.
-  *@return the value, or null if it doesn't exist.
-  */
-  public String getParameter(String name);
-  
-  /** Get a file parameter, as a binary input stream.
-  *@param name is the parameter name.
-  *@return the value, or null if it doesn't exist.
-  */
-  public BinaryInput getBinaryStream(String name)
-    throws ManifoldCFException;
-  
-  /** Get file parameter, as a byte array.
-  *@param name is the parameter name.
-  *@return the binary parameter as an array of bytes.
-  */
-  public byte[] getBinaryBytes(String name);
-  
-  /** Set a parameter value.
-  *@param name is the parameter name.
-  *@param value is the desired value.
-  */
-  public void setParameter(String name, String value);
-  
-  /** Set an array of parameter values.
-  *@param name is the parameter name.
-  *@param values is the array of desired values.
-  */
-  public void setParameterValues(String name, String[] values);
-
 }

Modified: manifoldcf/branches/CONNECTORS-737/framework/core/src/test/resources/org/apache/manifoldcf/core/tests/VirtualBrowser.py
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/framework/core/src/test/resources/org/apache/manifoldcf/core/tests/VirtualBrowser.py?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/framework/core/src/test/resources/org/apache/manifoldcf/core/tests/VirtualBrowser.py (original)
+++ manifoldcf/branches/CONNECTORS-737/framework/core/src/test/resources/org/apache/manifoldcf/core/tests/VirtualBrowser.py Sun Jul 14 14:03:13 2013
@@ -19,6 +19,8 @@
 import Javascript
 import urllib
 import urllib2
+import httplib
+import cookielib
 import HTMLParser
 import base64
 import re
@@ -735,18 +737,60 @@ class VirtualLink:
     def set_bodytext( self, bodytext ):
         self.linktext = bodytext
 
+# Dummy request (so we can use cookiejar)
+class DummyRequest:
+    """
+    Dummy request (for interfacing with cookiejar).
+    """
+
+    def __init__( self, protocol, host, url ):
+        self.protocol = protocol
+        self.host = host
+        self.url = url
+        self.headers = {}
+
+    def has_header( self, name ):
+        return name in self.headers
+
+    def add_header( self, key, val ):
+        self.headers[key.capitalize()] = val
+
+    def add_unredirected_header(self, key, val):
+        self.headers[key.capitalize()] = val
+
+    def is_unverifiable( self ):
+        return True
+
+    def get_type( self ):
+        return self.protocol
+
+    def get_full_url( self ):
+        return self.url
+
+    def get_header( self, header_name, default=None ):
+        return self.headers.get( header_name, default )
+
+    def get_host( self ):
+        return self.host
+
+    get_origin_req_host = get_host
+
+    def get_headers( self ):
+        return self.headers
+
 # Class that describes a virtual browser window.  Each virtual window has some set of forms and links,
 # as well as a set of dialog boxes (which can be popped up due to various actions, and dismissed
 # by virtual user activity)
 class VirtualWindow:
 
     def __init__( self, browser_instance, window_name, data, parent, current_url ):
-        print "Loading window '%s' with data from url %s" % (window_name, current_url)
+        print >>sys.stderr, "Loading window '%s' with data from url %s" % (window_name, current_url)
         self.links = { }
         self.buttons = { }
         self.forms = { }
         self.window_name = window_name
         self.data = data
+        #print >>sys.stderr, data
         self.parent = parent
         self.browser_instance = browser_instance
         self.is_open = True
@@ -993,16 +1037,19 @@ class VirtualBrowser:
         self.password = password
         self.win_host = win_host
         self.language = language
+        self.cookiejar = cookielib.CookieJar()
         if win_host == None and username != None:
             # Set up basic auth
-            self.urllibopener = urllib2.build_opener( urllib2.HTTPHandler ( ) )
+            pass
+            #self.urllibopener = urllib2.build_opener( urllib2.HTTPHandler ( ) )
         elif win_host != None and username != None:
             # Proxy-based auth
             # MHL
             raise Exception("Feature not yet implemented")
         else:
             # Use standard opener
-            self.urllibopener = urllib2.build_opener( urllib2.HTTPHandler ( ) )
+            pass
+            #self.urllibopener = urllib2.build_opener( urllib2.HTTPHandler ( ) )
 
     # Public part of the Virtual Browser interface
 
@@ -1073,6 +1120,7 @@ class VirtualBrowser:
         window_data = self.fetch_data_with_get( url )
         self.reload_window( window_name, window_data, url )
 
+    """
     def fetch_and_decode( self, req ):
         f = self.urllibopener.open( req )
         fetch_info = f.info()
@@ -1083,10 +1131,13 @@ class VirtualBrowser:
             if charset_index != -1:
                 encoding = content_type[charset_index+8:len(content_type)]
         return f.read( ).decode(encoding)
+    """
 
     # Read a url with get.  Returns the data as a string.
     def fetch_data_with_get( self, url ):
         print >> sys.stderr, "Getting url '%s'..." % url
+        return self.talk_to_server(url)
+        """
         req = urllib2.Request( url )
         if self.language != None:
             req.add_header("Accept-Language", self.language)
@@ -1097,11 +1148,14 @@ class VirtualBrowser:
         # MHL - not yet implemented
         # req.add_header('Referer', 'http://www.python.org/')
         return self.fetch_and_decode( req )
+        """
 
     # Read a url with post.  Pass the parameters as an array of ( name, value ) tuples.
     def fetch_data_with_post( self, parameters, url ):
         paramstring = urllib.urlencode( parameters, doseq=True )
         print >> sys.stderr, "Posting url '%s' with parameters '%s'..." % (url, paramstring)
+        return self.talk_to_server( url, method="POST", body=paramstring, content_type="application/x-www-form-urlencoded" )
+        """
         req = urllib2.Request( url, paramstring )
         if self.language != None:
             req.add_header("Accept-Language", self.language)
@@ -1111,6 +1165,7 @@ class VirtualBrowser:
         # Add cookies by domain
         # MHL
         return self.fetch_and_decode( req )
+        """
 
     # Private method to post using multipart forms
     def fetch_data_with_multipart_post( self, parameters, files, url ):
@@ -1121,17 +1176,6 @@ class VirtualBrowser:
             filecount = len(files)
         print >> sys.stderr, "Multipart posting url '%s' with parameters '%s' and %d files..." % (url, paramstring, filecount)
 
-        # Turn URL into protocol, host, and selector
-        urlpieces = url.split("://")
-        protocol = urlpieces[0]
-        uri = urlpieces[1]
-        # Split uri at the first /
-        uripieces = uri.split("/")
-        host = uripieces[0]
-        selector = uri[len(host):len(uri)]
-
-        import httplib
-
         """
         Post fields and files to an http host as multipart/form-data.
         fields is a sequence of (name, value) elements for regular form fields.
@@ -1139,52 +1183,100 @@ class VirtualBrowser:
         Return the server's response page.
         """
         content_type, body = encode_multipart_formdata(parameters, files)
-        if protocol == "http":
-            h = httplib.HTTPConnection(host)
-        elif protocol == "https":
-            h = httplib.HTTPSConnection(host)
-        else:
-            raise Exception("Unknown protocol: %s" % protocol)
-
-        h.connect()
-        try:
-            # Set the request type and url
-            h.putrequest("POST", selector)
+        return self.talk_to_server(url, method="POST", content_type=content_type, body=body)
 
-            # Set the content type and length
-            h.putheader("content-type", content_type)
-            h.putheader("content-length", str(len(body)))
-
-            # Add cookies by domain
-            # MHL
-
-            if self.language != None:
-                h.putheader("Accept-Language", self.language)
+    def talk_to_server(self, url, method="GET", content_type=None, body=None):
+        
+        # Redirection loop
+        while True:
+
+            # Turn URL into protocol, host, and selector
+            urlpieces = url.split("://")
+            protocol = urlpieces[0]
+            uri = urlpieces[1]
+            # Split uri at the first /
+            uripieces = uri.split("/")
+            host = uripieces[0]
+            selector = uri[len(host):len(uri)]
+
+            if protocol == "http":
+                h = httplib.HTTPConnection(host)
+            elif protocol == "https":
+                h = httplib.HTTPSConnection(host)
+            else:
+                raise Exception("Unknown protocol: %s" % protocol)
 
-            # Add basic auth credentials, if needed.
-            if self.username != None:
-                base64string = base64.encodestring("%s:%s" % (self.username, self.password))[:-1]
-                h.putheader("Authorization", "Basic %s" % base64string)
-
-            h.endheaders()
-
-            # Send the body
-            h.send(body)
-            response = h.getresponse()
-            status = response.status
-            headers = response.getheaders()
-            encoding = "iso-8859-1"
-            content_type = response.getheader("Content-type","text/html; charset=iso-8859-1")
-            charset_index = content_type.find("charset=")
-            if charset_index != -1:
-                encoding = content_type[charset_index+8:len(content_type)]
+            h.connect()
+            try:
+                # Set the request type and url
+                h.putrequest(method, selector)
 
-            value = response.read().decode(encoding)
-            if status != 200:
-                raise Exception("Received an error response %d from url: '%s'" % (status,url) )
-            return value
-        finally:
-            h.close()
+                # Set the content type and length
+                if content_type != None:
+                    h.putheader("content-type", content_type)
+                if body != None:
+                    h.putheader("content-length", str(len(body)))
+
+                # Add cookies by domain.  To do this with httplib and cookielib,
+                # we create a dummy urllib2 request.
+                urllib2_request = DummyRequest( protocol, host, url )
+
+                # add cookies to fake request
+                self.cookiejar.add_cookie_header( urllib2_request )
+                
+                # apply cookie headers to actual request
+                for header in urllib2_request.get_headers().keys():
+                    header_value = urllib2_request.get_headers()[header]
+                    h.putheader( header, header_value )
+
+                if self.language != None:
+                    h.putheader("Accept-Language", self.language)
+
+                # Add basic auth credentials, if needed.
+                if self.username != None:
+                    base64string = base64.encodestring("%s:%s" % (self.username, self.password))[:-1]
+                    h.putheader("Authorization", "Basic %s" % base64string)
+
+                h.endheaders()
+
+                # Send the body
+                if body != None:
+                    h.send(body)
+                response = h.getresponse()
+                status = response.status
+                headers = response.getheaders()
+                encoding = "iso-8859-1"
+                content_type = response.getheader("Content-type","text/html; charset=iso-8859-1")
+                charset_index = content_type.find("charset=")
+                if charset_index != -1:
+                    encoding = content_type[charset_index+8:len(content_type)]
+
+                value = response.read().decode(encoding)
+
+                # HACK: pretend we're urllib2 response for cookielib
+                response.info = lambda : response.msg
+
+                # read and store cookies from response
+                self.cookiejar.extract_cookies(response, urllib2_request)
+
+                # If redirection, go around again
+                if status == 301 or status == 302:
+                    # Redirection!  New url to process.
+                    location_header = response.msg.getheader("location")
+                    if location_header != None:
+                        print >>sys.stderr, "Redirecting from url '%s' to url '%s'..." % ( url, location_header )
+                        url = location_header
+                        continue
+                    else:
+                        raise Exception("Missing redirection location header")
+
+                # If NOT a redirection, handle it.
+                if status != 200:
+                    raise Exception("Received an error response %d from url: '%s'" % (status,url) )
+
+                return value
+            finally:
+                h.close()
 
 # Static method for multipart encoding
 def encode_multipart_formdata(fields, files):
@@ -1236,7 +1328,7 @@ class JSConfirmMethod( Javascript.JSObje
             raise Exception("confirm method requires one string argument")
         # Evaluate to string
         message = argset[0].str_value( )
-        print "CONFIRM: "+message
+        print >>sys.stderr, "CONFIRM: "+message
         # Now, decide whether we return true or false.
         return Javascript.JSBoolean( self.window_instance.get_answer( message, True ) )
 
@@ -1254,7 +1346,7 @@ class JSAlertMethod( Javascript.JSObject
             raise Exception("alert method requires one string argument")
         # Evaluate just to be sure there's no error
         message = argset[0].str_value( )
-        print "ALERT: "+message
+        print >>sys.stderr, "ALERT: "+message
         # Always click "OK"
         return Javascript.JSBoolean( True )
 
@@ -1299,7 +1391,7 @@ class JSFocusMethod( Javascript.JSObject
         self.owner = owner
 
     def call( self, argset, context ):
-        print "FOCUS: On field '%s'" % self.owner.get_name( )
+        print >>sys.stderr, "FOCUS: On field '%s'" % self.owner.get_name( )
         return Javascript.JSBoolean( True )
 
 # JS object representing a window in Javascript
@@ -1556,7 +1648,7 @@ class VirtualActionParser( HTMLParser.HT
                 multipart = False
             if method == "POST" and multipart == True:
                 method = "MULTIPART"
-            print "Form of type %s detected" % method
+            print >>sys.stderr, "Form of type %s detected" % method
             self.current_form_instance = VirtualForm( self.window_instance, name, action, method )
             self.window_instance.add_form( self.current_form_instance )
         except:

Modified: manifoldcf/branches/CONNECTORS-737/framework/crawler-ui/src/main/webapp/adminDefaults.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/framework/crawler-ui/src/main/webapp/adminDefaults.jsp?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/framework/crawler-ui/src/main/webapp/adminDefaults.jsp (original)
+++ manifoldcf/branches/CONNECTORS-737/framework/crawler-ui/src/main/webapp/adminDefaults.jsp Sun Jul 14 14:03:13 2013
@@ -42,7 +42,7 @@
 	org.apache.manifoldcf.ui.multipart.MultipartWrapper variableContext = (org.apache.manifoldcf.ui.multipart.MultipartWrapper)threadContext.get("__WRAPPER__");
 	if (variableContext == null)
 	{
-		variableContext = new org.apache.manifoldcf.ui.multipart.MultipartWrapper(request);
+		variableContext = new org.apache.manifoldcf.ui.multipart.MultipartWrapper(request,adminprofile);
 		threadContext.save("__WRAPPER__",variableContext);
 	}
 %>

Modified: manifoldcf/branches/CONNECTORS-737/framework/crawler-ui/src/main/webapp/adminHeaders.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/framework/crawler-ui/src/main/webapp/adminHeaders.jsp?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/framework/crawler-ui/src/main/webapp/adminHeaders.jsp (original)
+++ manifoldcf/branches/CONNECTORS-737/framework/crawler-ui/src/main/webapp/adminHeaders.jsp Sun Jul 14 14:03:13 2013
@@ -56,7 +56,7 @@ response.setContentType("text/html;chars
 	org.apache.manifoldcf.ui.multipart.MultipartWrapper variableContext = (org.apache.manifoldcf.ui.multipart.MultipartWrapper)threadContext.get("__WRAPPER__");
 	if (variableContext == null)
 	{
-		variableContext = new org.apache.manifoldcf.ui.multipart.MultipartWrapper(request);
+		variableContext = new org.apache.manifoldcf.ui.multipart.MultipartWrapper(request,adminprofile);
 		threadContext.save("__WRAPPER__",variableContext);
 	}
 %>

Modified: manifoldcf/branches/CONNECTORS-737/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/jsp/JspWrapper.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/jsp/JspWrapper.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/jsp/JspWrapper.java (original)
+++ manifoldcf/branches/CONNECTORS-737/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/jsp/JspWrapper.java Sun Jul 14 14:03:13 2013
@@ -43,6 +43,7 @@ public class JspWrapper implements IHTTP
   }
 
   /** Flush the stream */
+  @Override
   public void flush()
     throws IOException
   {
@@ -50,6 +51,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write a newline */
+  @Override
   public void newLine()
     throws IOException
   {
@@ -57,6 +59,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write a boolean */
+  @Override
   public void print(boolean b)
     throws IOException
   {
@@ -64,6 +67,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write a char */
+  @Override
   public void print(char c)
     throws IOException
   {
@@ -71,6 +75,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write an array of chars */
+  @Override
   public void print(char[] c)
     throws IOException
   {
@@ -78,6 +83,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write a double */
+  @Override
   public void print(double d)
     throws IOException
   {
@@ -85,6 +91,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write a float */
+  @Override
   public void print(float f)
     throws IOException
   {
@@ -92,6 +99,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write an int */
+  @Override
   public void print(int i)
     throws IOException
   {
@@ -99,6 +107,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write a long */
+  @Override
   public void print(long l)
     throws IOException
   {
@@ -106,6 +115,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write an object */
+  @Override
   public void print(Object o)
     throws IOException
   {
@@ -113,6 +123,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write a string */
+  @Override
   public void print(String s)
     throws IOException
   {
@@ -120,6 +131,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write a boolean */
+  @Override
   public void println(boolean b)
     throws IOException
   {
@@ -127,6 +139,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write a char */
+  @Override
   public void println(char c)
     throws IOException
   {
@@ -134,6 +147,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write an array of chars */
+  @Override
   public void println(char[] c)
     throws IOException
   {
@@ -141,6 +155,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write a double */
+  @Override
   public void println(double d)
     throws IOException
   {
@@ -148,6 +163,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write a float */
+  @Override
   public void println(float f)
     throws IOException
   {
@@ -155,6 +171,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write an int */
+  @Override
   public void println(int i)
     throws IOException
   {
@@ -162,6 +179,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write a long */
+  @Override
   public void println(long l)
     throws IOException
   {
@@ -169,6 +187,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write an object */
+  @Override
   public void println(Object o)
     throws IOException
   {
@@ -176,6 +195,7 @@ public class JspWrapper implements IHTTP
   }
   
   /** Write a string */
+  @Override
   public void println(String s)
     throws IOException
   {
@@ -188,6 +208,7 @@ public class JspWrapper implements IHTTP
   *@param password is the password.
   *@return the key.
   */
+  @Override
   public String mapPasswordToKey(String password)
   {
     return adminProfile.getPasswordMapper().mapPasswordToKey(password);
@@ -199,6 +220,7 @@ public class JspWrapper implements IHTTP
   *@param key is the key.
   *@return the password.
   */
+  @Override
   public String mapKeyToPassword(String key)
   {
     return adminProfile.getPasswordMapper().mapKeyToPassword(key);

Modified: manifoldcf/branches/CONNECTORS-737/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/multipart/MultipartWrapper.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/multipart/MultipartWrapper.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/multipart/MultipartWrapper.java (original)
+++ manifoldcf/branches/CONNECTORS-737/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/multipart/MultipartWrapper.java Sun Jul 14 14:03:13 2013
@@ -19,6 +19,7 @@
 package org.apache.manifoldcf.ui.multipart;
 
 import org.apache.manifoldcf.core.interfaces.*;
+import org.apache.manifoldcf.ui.beans.AdminProfile;
 import org.apache.commons.fileupload.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
@@ -33,6 +34,8 @@ public class MultipartWrapper implements
 {
   public static final String _rcsid = "@(#)$Id: MultipartWrapper.java 988245 2010-08-23 18:39:35Z kwright $";
 
+  /** The Admin Profile bean, for password mapping. */
+  protected final AdminProfile adminProfile;
   /** This is the HttpServletRequest object, which will be used for parameters only if
   * the form is not multipart. */
   protected HttpServletRequest request = null;
@@ -41,9 +44,11 @@ public class MultipartWrapper implements
 
   /** Constructor.
   */
-  public MultipartWrapper(HttpServletRequest request)
+  public MultipartWrapper(HttpServletRequest request, AdminProfile adminProfile)
     throws ManifoldCFException
   {
+    this.adminProfile = adminProfile;
+
     // Check that we have a file upload request
     boolean isMultipart = FileUpload.isMultipartContent(request);
     if (!isMultipart)
@@ -95,6 +100,7 @@ public class MultipartWrapper implements
 
   /** Get multiple parameter values.
   */
+  @Override
   public String[] getParameterValues(String name)
   {
     // Expect multiple items, all strings
@@ -136,6 +142,7 @@ public class MultipartWrapper implements
 
   /** Get single parameter value.
   */
+  @Override
   public String getParameter(String name)
   {
     // Get it as a parameter.
@@ -167,6 +174,7 @@ public class MultipartWrapper implements
 
   /** Get a file parameter, as a binary input.
   */
+  @Override
   public BinaryInput getBinaryStream(String name)
     throws ManifoldCFException
   {
@@ -205,6 +213,7 @@ public class MultipartWrapper implements
 
   /** Get file parameter, as a byte array.
   */
+  @Override
   public byte[] getBinaryBytes(String name)
   {
     if (request != null)
@@ -227,6 +236,7 @@ public class MultipartWrapper implements
 
   /** Set a parameter value
   */
+  @Override
   public void setParameter(String name, String value)
   {
     ArrayList values = new ArrayList();
@@ -237,6 +247,7 @@ public class MultipartWrapper implements
 
   /** Set an array of parameter values
   */
+  @Override
   public void setParameterValues(String name, String[] values)
   {
     ArrayList valueArray = new ArrayList();
@@ -248,4 +259,30 @@ public class MultipartWrapper implements
     variableMap.put(name,valueArray);
   }
 
+  // Password mapping
+  
+  /** Map a password to a unique key.
+  * This method works within a specific given browser session to replace an existing password with
+  * a key which can be used to look up the password at a later time.
+  *@param password is the password.
+  *@return the key.
+  */
+  @Override
+  public String mapPasswordToKey(String password)
+  {
+    return adminProfile.getPasswordMapper().mapPasswordToKey(password);
+  }
+  
+  /** Convert a key, created by mapPasswordToKey, back to the original password, within
+  * the lifetime of the browser session.  If the provided key is not an actual key, instead
+  * the key value is assumed to be a new password value.
+  *@param key is the key.
+  *@return the password.
+  */
+  @Override
+  public String mapKeyToPassword(String key)
+  {
+    return adminProfile.getPasswordMapper().mapKeyToPassword(key);
+  }
+  
 }

Modified: manifoldcf/branches/CONNECTORS-737/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml (original)
+++ manifoldcf/branches/CONNECTORS-737/site/src/documentation/content/xdocs/en_US/end-user-documentation.xml Sun Jul 14 14:03:13 2013
@@ -34,7 +34,13 @@
             </p>
             <p>The ManifoldCF UI has been tested with Firefox and various incarnations of Internet Explorer.  If you use another browser, there is a small chance that the UI
                   will not work properly.  Please let your system integrator know if you find any browser incompatibility problems.</p>
-            <p>When you do manage to enter the Framework user interface the first time, you should see a screen that looks something like this:</p>
+            <p>When you enter the Framework user interface the first time, you will first be asked to log in:</p>
+            <br/><br/>
+            <figure src="images/en_US/login.PNG" alt="Login Screen" width="80%"/>
+            <br/><br/>
+            <p>Enter the login user name and password for your system.  By default, the user name is "admin" and the password is "admin", although your
+                  system administrator can (and should) change this.  Then, click the "Login" button.  If you entered the correct credentials, you should see a
+                  screen that looks something like this:</p>
             <br/><br/>
             <figure src="images/en_US/welcome-screen.PNG" alt="Welcome Screen" width="80%"/>
             <br/><br/>

Modified: manifoldcf/branches/CONNECTORS-737/site/src/documentation/content/xdocs/en_US/how-to-build-and-deploy.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/site/src/documentation/content/xdocs/en_US/how-to-build-and-deploy.xml?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/site/src/documentation/content/xdocs/en_US/how-to-build-and-deploy.xml (original)
+++ manifoldcf/branches/CONNECTORS-737/site/src/documentation/content/xdocs/en_US/how-to-build-and-deploy.xml Sun Jul 14 14:03:13 2013
@@ -554,6 +554,14 @@ cd example
               correct arguments and settings.</p>
             <p></p>
             <table>
+              <tr><th>User Mapping Command Class</th><th>Arguments</th><th>Function</th></tr>
+              <tr><td>org.apache.manifoldcf.authorities.RegisterMapper</td><td><em>classname</em> <em>description</em></td><td>Register a mapping connector class</td></tr>
+              <tr><td>org.apache.manifoldcf.authorities.UnRegisterMapper</td><td><em>classname</em></td><td>Un-register a mapping connector class</td></tr>
+              <tr><td>org.apache.manifoldcf.authorities.UnRegisterAllMappers</td><td>None</td><td>Un-register all mapping connector classes</td></tr>
+              <tr><td>org.apache.manifoldcf.authorities.SynchronizeMappers</td><td>None</td><td>Un-register all registered mapping connector classes that can't be found</td></tr>
+            </table>
+            <p></p>
+            <table>
               <tr><th>Authority Command Class</th><th>Arguments</th><th>Function</th></tr>
               <tr><td>org.apache.manifoldcf.authorities.RegisterAuthority</td><td><em>classname</em> <em>description</em></td><td>Register an authority connector class</td></tr>
               <tr><td>org.apache.manifoldcf.authorities.UnRegisterAuthority</td><td><em>classname</em></td><td>Un-register an authority connector class</td></tr>
@@ -785,6 +793,8 @@ cd example
           <table>
             <caption>Property.xml properties</caption>
             <tr><th>Property</th><th>Required?</th><th>Function</th></tr>
+            <tr><td>org.apache.manifoldcf.login.name</td><td>No</td><td>Crawler UI login user ID (defaults to "admin")</td></tr>
+            <tr><td>org.apache.manifoldcf.login.password</td><td>No</td><td>Crawler UI login user password (defaults to "admin")</td></tr>
             <tr><td>org.apache.manifoldcf.crawleruiwarpath</td><td>Yes, for Jetty</td><td>Location of Crawler UI war</td></tr>
             <tr><td>org.apache.manifoldcf.authorityservicewarpath</td><td>Yes, for Jetty</td><td>Location of Authority Service war</td></tr>
             <tr><td>org.apache.manifoldcf.apiservicewarpath</td><td>Yes, for Jetty</td><td>Location of API Service war</td></tr>

Added: manifoldcf/branches/CONNECTORS-737/site/src/documentation/resources/images/en_US/login.PNG
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/site/src/documentation/resources/images/en_US/login.PNG?rev=1502977&view=auto
==============================================================================
Binary file - no diff available.

Propchange: manifoldcf/branches/CONNECTORS-737/site/src/documentation/resources/images/en_US/login.PNG
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: manifoldcf/branches/CONNECTORS-737/tests/activedirectory/src/test/java/org/apache/manifoldcf/activedirectory_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/activedirectory/src/test/java/org/apache/manifoldcf/activedirectory_tests/NavigationDerbyUI.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/activedirectory/src/test/java/org/apache/manifoldcf/activedirectory_tests/NavigationDerbyUI.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/activedirectory/src/test/java/org/apache/manifoldcf/activedirectory_tests/NavigationDerbyUI.java Sun Jul 14 14:03:13 2013
@@ -49,7 +49,16 @@ public class NavigationDerbyUI extends B
     HTMLTester.Loop loop;
     
     window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
-    
+
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+
     // Define an authority connection via the UI
     window = testerInstance.findWindow(null);
     link = window.findLink(testerInstance.createStringDescription("List authorities"));

Modified: manifoldcf/branches/CONNECTORS-737/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/NavigationDerbyUI.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/NavigationDerbyUI.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/alfresco/src/test/java/org/apache/manifoldcf/alfresco_tests/NavigationDerbyUI.java Sun Jul 14 14:03:13 2013
@@ -44,6 +44,16 @@ public class NavigationDerbyUI extends B
     
     window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
     
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+    window = testerInstance.findWindow(null);
+
     // Define an output connection via the UI
     link = window.findLink(testerInstance.createStringDescription("List output connections"));
     link.click();

Modified: manifoldcf/branches/CONNECTORS-737/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/NavigationDerbyUI.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/NavigationDerbyUI.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/NavigationDerbyUI.java Sun Jul 14 14:03:13 2013
@@ -43,7 +43,17 @@ public class NavigationDerbyUI extends B
     HTMLTester.Loop loop;
     
     window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
-    
+
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+    window = testerInstance.findWindow(null);
+
     // Define an output connection via the UI
     link = window.findLink(testerInstance.createStringDescription("List output connections"));
     link.click();

Modified: manifoldcf/branches/CONNECTORS-737/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/NavigationDerbyUI.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/NavigationDerbyUI.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/elasticsearch/src/test/java/org/apache/manifoldcf/elasticsearch_tests/NavigationDerbyUI.java Sun Jul 14 14:03:13 2013
@@ -43,7 +43,17 @@ public class NavigationDerbyUI extends B
     HTMLTester.Loop loop;
     
     window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
-    
+
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+    window = testerInstance.findWindow(null);
+
     // Define an output connection via the UI
     link = window.findLink(testerInstance.createStringDescription("List output connections"));
     link.click();

Modified: manifoldcf/branches/CONNECTORS-737/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUITester.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUITester.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUITester.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUITester.java Sun Jul 14 14:03:13 2013
@@ -57,6 +57,16 @@ public class NavigationUITester
     
     window = testerInstance.openMainWindow(startURL);
     
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+    window = testerInstance.findWindow(null);
+
     // Define an output connection via the UI
     link = window.findLink(testerInstance.createStringDescription("List output connections"));
     link.click();

Modified: manifoldcf/branches/CONNECTORS-737/tests/gts/src/test/java/org/apache/manifoldcf/gts_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/gts/src/test/java/org/apache/manifoldcf/gts_tests/NavigationDerbyUI.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/gts/src/test/java/org/apache/manifoldcf/gts_tests/NavigationDerbyUI.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/gts/src/test/java/org/apache/manifoldcf/gts_tests/NavigationDerbyUI.java Sun Jul 14 14:03:13 2013
@@ -50,6 +50,16 @@ public class NavigationDerbyUI extends B
     
     window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
     
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+    window = testerInstance.findWindow(null);
+
     // Define an output connection via the UI
     link = window.findLink(testerInstance.createStringDescription("List output connections"));
     link.click();

Modified: manifoldcf/branches/CONNECTORS-737/tests/hdfs/src/test/java/org/apache/manifoldcf/hdfs_tests/NavigationUITester.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/hdfs/src/test/java/org/apache/manifoldcf/hdfs_tests/NavigationUITester.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/hdfs/src/test/java/org/apache/manifoldcf/hdfs_tests/NavigationUITester.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/hdfs/src/test/java/org/apache/manifoldcf/hdfs_tests/NavigationUITester.java Sun Jul 14 14:03:13 2013
@@ -57,6 +57,16 @@ public class NavigationUITester
     
     window = testerInstance.openMainWindow(startURL);
     
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+    window = testerInstance.findWindow(null);
+
     // Define an output connection via the UI
     link = window.findLink(testerInstance.createStringDescription("List output connections"));
     link.click();

Modified: manifoldcf/branches/CONNECTORS-737/tests/jcifs/src/test/java/org/apache/manifoldcf/jcifs_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/jcifs/src/test/java/org/apache/manifoldcf/jcifs_tests/NavigationDerbyUI.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/jcifs/src/test/java/org/apache/manifoldcf/jcifs_tests/NavigationDerbyUI.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/jcifs/src/test/java/org/apache/manifoldcf/jcifs_tests/NavigationDerbyUI.java Sun Jul 14 14:03:13 2013
@@ -50,6 +50,16 @@ public class NavigationDerbyUI extends B
     
     window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
     
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+    window = testerInstance.findWindow(null);
+
     // Define an output connection via the UI
     link = window.findLink(testerInstance.createStringDescription("List output connections"));
     link.click();

Modified: manifoldcf/branches/CONNECTORS-737/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/NavigationDerbyUI.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/NavigationDerbyUI.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/jdbc/src/test/java/org/apache/manifoldcf/jdbc_tests/NavigationDerbyUI.java Sun Jul 14 14:03:13 2013
@@ -50,6 +50,16 @@ public class NavigationDerbyUI extends B
     
     window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
     
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+    window = testerInstance.findWindow(null);
+
     // Define an output connection via the UI
     link = window.findLink(testerInstance.createStringDescription("List output connections"));
     link.click();

Modified: manifoldcf/branches/CONNECTORS-737/tests/ldap/src/test/java/org/apache/manifoldcf/ldap_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/ldap/src/test/java/org/apache/manifoldcf/ldap_tests/NavigationDerbyUI.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/ldap/src/test/java/org/apache/manifoldcf/ldap_tests/NavigationDerbyUI.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/ldap/src/test/java/org/apache/manifoldcf/ldap_tests/NavigationDerbyUI.java Sun Jul 14 14:03:13 2013
@@ -49,7 +49,17 @@ public class NavigationDerbyUI extends B
     HTMLTester.Loop loop;
     
     window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
-    
+
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+    window = testerInstance.findWindow(null);
+
     // Define an authority connection via the UI
     window = testerInstance.findWindow(null);
     link = window.findLink(testerInstance.createStringDescription("List authorities"));

Modified: manifoldcf/branches/CONNECTORS-737/tests/nullauthority/src/test/java/org/apache/manifoldcf/nullauthority_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/nullauthority/src/test/java/org/apache/manifoldcf/nullauthority_tests/NavigationDerbyUI.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/nullauthority/src/test/java/org/apache/manifoldcf/nullauthority_tests/NavigationDerbyUI.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/nullauthority/src/test/java/org/apache/manifoldcf/nullauthority_tests/NavigationDerbyUI.java Sun Jul 14 14:03:13 2013
@@ -50,6 +50,16 @@ public class NavigationDerbyUI extends B
     
     window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
     
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+    window = testerInstance.findWindow(null);
+
     // Define an authority connection via the UI
     link = window.findLink(testerInstance.createStringDescription("List authorities"));
     link.click();

Modified: manifoldcf/branches/CONNECTORS-737/tests/opensearchserver/src/test/java/org/apache/manifoldcf/opensearchserver_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/opensearchserver/src/test/java/org/apache/manifoldcf/opensearchserver_tests/NavigationDerbyUI.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/opensearchserver/src/test/java/org/apache/manifoldcf/opensearchserver_tests/NavigationDerbyUI.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/opensearchserver/src/test/java/org/apache/manifoldcf/opensearchserver_tests/NavigationDerbyUI.java Sun Jul 14 14:03:13 2013
@@ -50,6 +50,16 @@ public class NavigationDerbyUI extends B
     
     window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
     
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+    window = testerInstance.findWindow(null);
+
     // Define an output connection via the UI
     link = window.findLink(testerInstance.createStringDescription("List output connections"));
     link.click();

Modified: manifoldcf/branches/CONNECTORS-737/tests/rss/src/test/java/org/apache/manifoldcf/rss_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/rss/src/test/java/org/apache/manifoldcf/rss_tests/NavigationDerbyUI.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/rss/src/test/java/org/apache/manifoldcf/rss_tests/NavigationDerbyUI.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/rss/src/test/java/org/apache/manifoldcf/rss_tests/NavigationDerbyUI.java Sun Jul 14 14:03:13 2013
@@ -50,6 +50,16 @@ public class NavigationDerbyUI extends B
     
     window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
     
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+    window = testerInstance.findWindow(null);
+
     // Define an output connection via the UI
     link = window.findLink(testerInstance.createStringDescription("List output connections"));
     link.click();

Modified: manifoldcf/branches/CONNECTORS-737/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-737/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/NavigationDerbyUI.java?rev=1502977&r1=1502976&r2=1502977&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-737/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/NavigationDerbyUI.java (original)
+++ manifoldcf/branches/CONNECTORS-737/tests/solr/src/test/java/org/apache/manifoldcf/solr_tests/NavigationDerbyUI.java Sun Jul 14 14:03:13 2013
@@ -50,6 +50,16 @@ public class NavigationDerbyUI extends B
     
     window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
     
+    // Login
+    form = window.findForm(testerInstance.createStringDescription("loginform"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("userID"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("admin"));
+    button = window.findButton(testerInstance.createStringDescription("Login"));
+    button.click();
+    window = testerInstance.findWindow(null);
+
     // Define an output connection via the UI
     link = window.findLink(testerInstance.createStringDescription("List output connections"));
     link.click();