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/03/18 20:42:13 UTC
svn commit: r1457935 - in
/manifoldcf/branches/CONNECTORS-664/connectors/livelink:
build-stub/src/main/java/com/opentext/api/
connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/
connector/src/main/native2ascii/org/apache/manifold...
Author: kwright
Date: Mon Mar 18 19:42:12 2013
New Revision: 1457935
URL: http://svn.apache.org/r1457935
Log:
Rearrange so that protocol is explicitly specified
Modified:
manifoldcf/branches/CONNECTORS-664/connectors/livelink/build-stub/src/main/java/com/opentext/api/LLValue.java
manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LLSERVER.java
manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LiveLinkParameters.java
manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkAuthority.java
manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_en_US.properties
manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_ja_JP.properties
Modified: manifoldcf/branches/CONNECTORS-664/connectors/livelink/build-stub/src/main/java/com/opentext/api/LLValue.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-664/connectors/livelink/build-stub/src/main/java/com/opentext/api/LLValue.java?rev=1457935&r1=1457934&r2=1457935&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-664/connectors/livelink/build-stub/src/main/java/com/opentext/api/LLValue.java (original)
+++ manifoldcf/branches/CONNECTORS-664/connectors/livelink/build-stub/src/main/java/com/opentext/api/LLValue.java Mon Mar 18 19:42:12 2013
@@ -69,6 +69,10 @@ public class LLValue
public void add(String attributeName, int intValue)
{
}
+
+ public void add(String attributeName, String strValue)
+ {
+ }
public boolean isTable()
{
Modified: manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LLSERVER.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LLSERVER.java?rev=1457935&r1=1457934&r2=1457935&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LLSERVER.java (original)
+++ manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LLSERVER.java Mon Mar 18 19:42:12 2013
@@ -40,33 +40,83 @@ public class LLSERVER
{
public static final String _rcsid = "@(#)$Id: LLSERVER.java 988245 2010-08-23 18:39:35Z kwright $";
- private String LLServer;
- private int LLPort;
- private String LLUser;
- private String LLPwd;
- private LLValue LLConfig;
+ private final boolean useHttp;
+ private final boolean useSSL;
+ private final String LLServer;
+ private final int LLPort;
+ private final String LLUser;
+ private final String LLPwd;
+ private final String httpCgiPath;
+ private final String httpNtlmDomain;
+ private final String httpNtlmUser;
+ private final String httpNtlmPassword;
+ private final IKeystoreManager keystore;
+
private LLSession session;
- public LLSERVER()
- {
-
- session = null;
- }
-
- public LLSERVER(String server, int port, String user, String pwd)
+ public LLSERVER(boolean useHttp, boolean useSSL, String server, int port, String user, String pwd,
+ String httpCgiPath, String httpNtlmDomain, String httpNtlmUser, String httpNtlmPassword,
+ IKeystoreManager keystoreManager)
{
+ this.useHttp = useHttp;
+ this.useSSL = useSSL;
LLServer = server;
LLPort = port;
LLUser = user;
LLPwd = pwd;
+ this.httpCgiPath = httpCgiPath;
+ this.httpNtlmDomain = httpNtlmDomain;
+ this.httpNtlmUser = httpNtlmUser;
+ this.httpNtlmPassword = httpNtlmPassword;
+ this.keystore = keystoreManager;
connect();
}
private void connect()
{
- session = new LLSession (this.LLServer, this.LLPort, "", this.LLUser, this.LLPwd, null);
+
+ LLValue configuration;
+
+ if (useHttp)
+ {
+ boolean useNTLM;
+ String userNameAndDomain;
+
+ if (httpNtlmDomain != null)
+ {
+ useNTLM = true;
+ userNameAndDomain = httpNtlmUser + "@" + httpNtlmDomain;
+ }
+ else
+ {
+ useNTLM = false;
+ userNameAndDomain = httpNtlmUser;
+ }
+ configuration = new LLValue();
+ configuration.setAssoc();
+ configuration.add("Encoding","UTF-8");
+ configuration.add("LivelinkCGI", httpCgiPath);
+ if (useNTLM)
+ {
+ configuration.add("HTTPUserName", userNameAndDomain);
+ configuration.add("HTTPPassword", httpNtlmPassword);
+ configuration.add("EnableNTLM", LLValue.LL_TRUE);
+ }
+ else
+ configuration.add("EnableNTLM", LLValue.LL_FALSE);
+
+ if (useSSL)
+ {
+ configuration.add("HTTPS", LLValue.LL_TRUE);
+ // MHL to create temporary folder with trust certs
+ }
+ }
+ else
+ configuration = null;
+
+ session = new LLSession (this.LLServer, this.LLPort, "", this.LLUser, this.LLPwd, configuration);
}
@@ -76,7 +126,7 @@ public class LLSERVER
*/
public void disconnect()
{
-
+ // MHL to delete temporary folder with trust certs
session = null;
}
Modified: manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LiveLinkParameters.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LiveLinkParameters.java?rev=1457935&r1=1457934&r2=1457935&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LiveLinkParameters.java (original)
+++ manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LiveLinkParameters.java Mon Mar 18 19:42:12 2013
@@ -53,20 +53,26 @@ public class LiveLinkParameters
public final static String viewCgiPath = "View CGI path";
// These parameters are for LAPI
+ /** Connection options; choices are "internal", "http", "https" */
+ public final static String serverProtocol = "Server protocol";
/** Server name */
public final static String serverName = "Server name";
/** Server port */
public final static String serverPort = "Server port";
- /** Server domain, if NTLM */
- public final static String serverDomain = "Server domain";
/** Server user */
public final static String serverUsername = "Server user name";
/** Server password */
public final static String serverPassword = "Server password";
- /** Use SSL flag */
- public final static String serverSSL = "Server use SSL";
+ /** Server CGI path (path to use for viewing) */
+ public final static String serverHTTPCgiPath = "Server HTTP CGI path";
+ /** Server domain, if NTLM */
+ public final static String serverHTTPNTLMDomain = "Server HTTP NTLM domain";
+ /** Server HTTP user */
+ public final static String serverHTTPNTLMUsername = "Server HTTP NTLM user name";
+ /** Server password */
+ public final static String serverHTTPNTLMPassword = "Server HTTP NTLM password";
/** Keystore for LAPI */
- public final static String serverKeystore = "Server SSL truststore";
+ public final static String serverHTTPSKeystore = "Server HTTPS truststore";
// These parameters are for the LiveLink Authority
Modified: manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkAuthority.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkAuthority.java?rev=1457935&r1=1457934&r2=1457935&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkAuthority.java (original)
+++ manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkAuthority.java Mon Mar 18 19:42:12 2013
@@ -46,11 +46,17 @@ public class LivelinkAuthority extends o
public static final String _rcsid = "@(#)$Id: LivelinkAuthority.java 988245 2010-08-23 18:39:35Z kwright $";
// Data from the parameters
+ private String serverProtocol = null;
private String serverName = null;
private String serverPortString = null;
private int serverPort = -1;
private String serverUsername = null;
private String serverPassword = null;
+ private String serverHTTPCgi = null;
+ private String serverHTTPNTLMDomain = null;
+ private String serverHTTPNTLMUsername = null;
+ private String serverHTTPNTLMPassword = null;
+ private IKeystoreManager serverHTTPSKeystore = null;
// Data required for maintaining livelink connection
private LAPI_USERS LLUsers = null;
@@ -179,7 +185,11 @@ public class LivelinkAuthority extends o
{
try
{
- llServer = new LLSERVER(serverName,serverPort,serverUsername,serverPassword);
+ // Create the session
+ llServer = new LLSERVER(!serverProtocol.equals("internal"),serverProtocol.equals("https"),
+ serverName,serverPort,serverUsername,serverPassword,
+ serverHTTPCgi,serverHTTPNTLMDomain,serverHTTPNTLMUsername,serverHTTPNTLMPassword,
+ serverHTTPSKeystore);
LLUsers = new LAPI_USERS(llServer.getLLSession());
if (Logging.authorityConnectors.isDebugEnabled())
@@ -601,30 +611,39 @@ public class LivelinkAuthority extends o
throws ManifoldCFException, IOException
{
// LAPI parameters
+ String serverProtocol = parameters.getParameter(LiveLinkParameters.serverProtocol);
+ if (serverProtocol == null)
+ serverProtocol = "internal";
String serverName = parameters.getParameter(LiveLinkParameters.serverName);
if (serverName == null)
serverName = "localhost";
String serverPort = parameters.getParameter(LiveLinkParameters.serverPort);
if (serverPort == null)
serverPort = "2099";
- String serverDomain = parameters.getParameter(LiveLinkParameters.serverDomain);
- if (serverDomain == null)
- serverDomain = "";
String serverUserName = parameters.getParameter(LiveLinkParameters.serverUsername);
if (serverUserName == null)
serverUserName = "";
String serverPassword = parameters.getObfuscatedParameter(LiveLinkParameters.serverPassword);
if (serverPassword == null)
serverPassword = "";
- String serverUseSSL = parameters.getParameter(LiveLinkParameters.serverSSL);
- if (serverUseSSL == null)
- serverUseSSL = "no";
- String serverKeystore = parameters.getParameter(LiveLinkParameters.serverKeystore);
- IKeystoreManager localServerKeystore;
- if (serverKeystore == null)
- localServerKeystore = KeystoreManagerFactory.make("");
+ String serverHTTPCgiPath = parameters.getParameter(LiveLinkParameters.serverHTTPCgiPath);
+ if (serverHTTPCgiPath == null)
+ serverHTTPCgiPath = "";
+ String serverHTTPNTLMDomain = parameters.getParameter(LiveLinkParameters.serverHTTPNTLMDomain);
+ if (serverHTTPNTLMDomain == null)
+ serverHTTPNTLMDomain = "";
+ String serverHTTPNTLMUserName = parameters.getParameter(LiveLinkParameters.serverHTTPNTLMUsername);
+ if (serverHTTPNTLMUserName == null)
+ serverHTTPNTLMUserName = "";
+ String serverHTTPNTLMPassword = parameters.getObfuscatedParameter(LiveLinkParameters.serverHTTPNTLMPassword);
+ if (serverHTTPNTLMPassword == null)
+ serverHTTPNTLMPassword = "";
+ String serverHTTPSKeystore = parameters.getParameter(LiveLinkParameters.serverHTTPSKeystore);
+ IKeystoreManager localServerHTTPSKeystore;
+ if (serverHTTPSKeystore == null)
+ localServerHTTPSKeystore = KeystoreManagerFactory.make("");
else
- localServerKeystore = KeystoreManagerFactory.make("",serverKeystore);
+ localServerHTTPSKeystore = KeystoreManagerFactory.make("",serverHTTPSKeystore);
// Cache parameters
String cacheLifetime = parameters.getParameter(LiveLinkParameters.cacheLifetime);
@@ -660,10 +679,10 @@ public class LivelinkAuthority extends o
out.print(
"<input name=\"serverconfigop\" type=\"hidden\" value=\"Continue\"/>\n"
);
- if (serverKeystore != null)
+ if (serverHTTPSKeystore != null)
{
out.print(
-"<input type=\"hidden\" name=\"serverkeystoredata\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverKeystore)+"\"/>\n"
+"<input type=\"hidden\" name=\"serverhttpskeystoredata\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPSKeystore)+"\"/>\n"
);
}
if (tabName.equals(Messages.getString(locale,"LivelinkConnector.Server")))
@@ -672,28 +691,53 @@ public class LivelinkAuthority extends o
"<table class=\"displaytable\">\n"+
" <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
" <tr>\n"+
-" <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"LivelinkConnector.ServerName") + "</nobr></td>\n"+
-" <td class=\"value\"><input type=\"text\" size=\"64\" name=\"servername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverName)+"\"/></td>\n"+
+" <td class=\"description\">"+Messages.getBodyString(locale,"LivelinkConnector.ServerProtocol")+"</td>\n"+
+" <td class=\"value\">\n"+
+" <select name=\"serverprotocol\" size=\"2\">\n"+
+" <option value=\"internal\" "+((serverProtocol.equals("internal"))?"selected=\"selected\"":"")+">"+Messages.getBodyString(locale,"LivelinkConnector.internal")+"</option>\n"+
+" <option value=\"http\" "+((serverProtocol.equals("http"))?"selected=\"selected\"":"")+">http</option>\n"+
+" <option value=\"https\" "+((serverProtocol.equals("https"))?"selected=\"selected\"":"")+">https</option>\n"+
+" </select>\n"+
+" </td>\n"+
" </tr>\n"+
" <tr>\n"+
-" <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"LivelinkConnector.ServerPort") + "</nobr></td>\n"+
-" <td class=\"value\"><input type=\"text\" size=\"5\" name=\"serverport\" value=\""+serverPort+"\"/></td>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerName")+"</nobr></td>\n"+
+" <td class=\"value\"><input type=\"text\" size=\"64\" name=\"servername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverName)+"\"/></td>\n"+
" </tr>\n"+
" <tr>\n"+
-" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerDomain")+"</nobr></td>\n"+
-" <td class=\"value\"><input type=\"text\" size=\"32\" name=\"serverdomain\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverDomain)+"\"/></td>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerPort")+"</nobr></td>\n"+
+" <td class=\"value\"><input type=\"text\" size=\"5\" name=\"serverport\" value=\""+serverPort+"\"/></td>\n"+
" </tr>\n"+
" <tr>\n"+
-" <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"LivelinkConnector.ServerUserName") + "</nobr></td>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerUserName")+"</nobr></td>\n"+
" <td class=\"value\"><input type=\"text\" size=\"32\" name=\"serverusername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverUserName)+"\"/></td>\n"+
" </tr>\n"+
" <tr>\n"+
-" <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"LivelinkConnector.ServerPassword") + "</nobr></td>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerPassword")+"</nobr></td>\n"+
" <td class=\"value\"><input type=\"password\" size=\"32\" name=\"serverpassword\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverPassword)+"\"/></td>\n"+
" </tr>\n"+
+" <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
+" <tr>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerHTTPCGIPath")+"</nobr></td>\n"+
+" <td class=\"value\"><input type=\"text\" size=\"32\" name=\"serverhttpcgipath\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPCgiPath)+"\"/></td>\n"+
+" </tr>\n"+
+" <tr>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerHTTPNTLMDomain")+"</nobr><br/><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.SetIfNTLMAuthDesired")+"</nobr></td>\n"+
+" <td class=\"value\">\n"+
+" <input type=\"text\" size=\"32\" name=\"serverhttpntlmdomain\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPNTLMDomain)+"\"/>\n"+
+" </td>\n"+
+" </tr>\n"+
+" <tr>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerHTTPNTLMUserName")+"</nobr><br/><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.SetIfDifferentFromServerUserName")+"</nobr></td>\n"+
+" <td class=\"value\">\n"+
+" <input type=\"text\" size=\"32\" name=\"serverhttpntlmusername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPNTLMUsername)+"\"/>\n"+
+" </td>\n"+
+" </tr>\n"+
" <tr>\n"+
-" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerUseSSL")+"</nobr></td>\n"+
-" <td class=\"value\"><input type=\"checkbox\" name=\"serverssl\" value=\"yes\""+(serverUseSSL.equals("yes")?" checked=\"\"":"")+"/><input type=\"hidden\" name=\"serverssl_present\" value=\"true\"/></td>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerHTTPNTLMPassword")+"</nobr><br/><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.SetIfDifferentFromServerPassword")+"</nobr></td>\n"+
+" <td class=\"value\">\n"+
+" <input type=\"password\" size=\"32\" name=\"serverhttpntlmpassword\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPNTLMPassword)+"\"/>\n"+
+" </td>\n"+
" </tr>\n"+
" <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"
);
@@ -705,7 +749,7 @@ public class LivelinkAuthority extends o
" <table class=\"displaytable\">\n"
);
// List the individual certificates in the store, with a delete button for each
- String[] contents = localServerKeystore.getContents();
+ String[] contents = localServerHTTPSKeystore.getContents();
if (contents.length == 0)
{
out.print(
@@ -718,7 +762,7 @@ public class LivelinkAuthority extends o
while (i < contents.length)
{
String alias = contents[i];
- String description = localServerKeystore.getDescription(alias);
+ String description = localServerHTTPSKeystore.getDescription(alias);
if (description.length() > 128)
description = description.substring(0,125) + "...";
out.print(
@@ -745,13 +789,15 @@ public class LivelinkAuthority extends o
{
// Hiddens for Server tab
out.print(
+"<input type=\"hidden\" name=\"serverprotocol\" value=\""+serverProtocol+"\"/>\n"+
"<input type=\"hidden\" name=\"servername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverName)+"\"/>\n"+
"<input type=\"hidden\" name=\"serverport\" value=\""+serverPort+"\"/>\n"+
-"<input type=\"hidden\" name=\"serverdomain\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverDomain)+"\"/>\n"+
"<input type=\"hidden\" name=\"serverusername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverUserName)+"\"/>\n"+
"<input type=\"hidden\" name=\"serverpassword\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverPassword)+"\"/>\n"+
-"<input type=\"hidden\" name=\"serverssl\" value=\""+serverUseSSL+"\"/>\n"+
-"<input type=\"hidden\" name=\"serverssl_present\" value=\"true\"/>\n"
+"<input type=\"hidden\" name=\"serverhttpcgipath\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPCgiPath)+"\"/>\n"+
+"<input type=\"hidden\" name=\"serverhttpntlmdomain\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPNTLMDomain)+"\"/>\n"+
+"<input type=\"hidden\" name=\"serverhttpntlmusername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPNTLMUsername)+"\"/>\n"+
+"<input type=\"hidden\" name=\"serverhttpntlmpassword\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPNTLMPassword)+"\"/>\n"
);
}
@@ -824,32 +870,36 @@ public class LivelinkAuthority extends o
throws ManifoldCFException
{
// Server parameters
+ String serverProtocol = variableContext.getParameter("serverprotocol");
+ if (serverProtocol != null)
+ parameters.setParameter(LiveLinkParameters.serverProtocol,serverProtocol);
String serverName = variableContext.getParameter("servername");
if (serverName != null)
parameters.setParameter(LiveLinkParameters.serverName,serverName);
String serverPort = variableContext.getParameter("serverport");
if (serverPort != null)
parameters.setParameter(LiveLinkParameters.serverPort,serverPort);
- String serverDomain = variableContext.getParameter("serverdomain");
- if (serverDomain != null)
- parameters.setParameter(LiveLinkParameters.serverDomain,serverDomain);
String serverUserName = variableContext.getParameter("serverusername");
if (serverUserName != null)
parameters.setParameter(LiveLinkParameters.serverUsername,serverUserName);
String serverPassword = variableContext.getParameter("serverpassword");
if (serverPassword != null)
parameters.setObfuscatedParameter(LiveLinkParameters.serverPassword,serverPassword);
- String serverKeystoreValue = variableContext.getParameter("serverkeystoredata");
- if (serverKeystoreValue != null)
- parameters.setParameter(LiveLinkParameters.serverKeystore,serverKeystoreValue);
- String serverSSLPresent = variableContext.getParameter("serverssl_present");
- if (serverSSLPresent != null)
- {
- String serverSSL = variableContext.getParameter("serverssl");
- if (serverSSL == null)
- serverSSL = "no";
- parameters.setParameter(LiveLinkParameters.serverSSL,serverSSL);
- }
+ String serverHTTPCgiPath = variableContext.getParameter("serverhttpcgipath");
+ if (serverHTTPCgiPath != null)
+ parameters.setParameter(LiveLinkParameters.serverHTTPCgiPath,serverHTTPCgiPath);
+ String serverHTTPNTLMDomain = variableContext.getParameter("serverhttpntlmdomain");
+ if (serverHTTPNTLMDomain != null)
+ parameters.setParameter(LiveLinkParameters.serverHTTPNTLMDomain,serverHTTPNTLMDomain);
+ String serverHTTPNTLMUserName = variableContext.getParameter("serverhttpntlmusername");
+ if (serverHTTPNTLMUserName != null)
+ parameters.setParameter(LiveLinkParameters.serverHTTPNTLMUsername,serverHTTPNTLMUserName);
+ String serverHTTPNTLMPassword = variableContext.getParameter("serverhttpntlmpassword");
+ if (serverHTTPNTLMPassword != null)
+ parameters.setObfuscatedParameter(LiveLinkParameters.serverHTTPNTLMPassword,serverHTTPNTLMPassword);
+ String serverHTTPSKeystoreValue = variableContext.getParameter("serverhttpskeystoredata");
+ if (serverHTTPSKeystoreValue != null)
+ parameters.setParameter(LiveLinkParameters.serverHTTPSKeystore,serverHTTPSKeystoreValue);
String serverConfigOp = variableContext.getParameter("serverconfigop");
if (serverConfigOp != null)
@@ -857,23 +907,23 @@ public class LivelinkAuthority extends o
if (serverConfigOp.equals("Delete"))
{
String alias = variableContext.getParameter("serverkeystorealias");
- serverKeystoreValue = parameters.getParameter(LiveLinkParameters.serverKeystore);
+ serverHTTPSKeystoreValue = parameters.getParameter(LiveLinkParameters.serverHTTPSKeystore);
IKeystoreManager mgr;
- if (serverKeystoreValue != null)
- mgr = KeystoreManagerFactory.make("",serverKeystoreValue);
+ if (serverHTTPSKeystoreValue != null)
+ mgr = KeystoreManagerFactory.make("",serverHTTPSKeystoreValue);
else
mgr = KeystoreManagerFactory.make("");
mgr.remove(alias);
- parameters.setParameter(LiveLinkParameters.serverKeystore,mgr.getString());
+ parameters.setParameter(LiveLinkParameters.serverHTTPSKeystore,mgr.getString());
}
else if (serverConfigOp.equals("Add"))
{
String alias = IDFactory.make(threadContext);
byte[] certificateValue = variableContext.getBinaryBytes("servercertificate");
- serverKeystoreValue = parameters.getParameter(LiveLinkParameters.serverKeystore);
+ serverHTTPSKeystoreValue = parameters.getParameter(LiveLinkParameters.serverHTTPSKeystore);
IKeystoreManager mgr;
- if (serverKeystoreValue != null)
- mgr = KeystoreManagerFactory.make("",serverKeystoreValue);
+ if (serverHTTPSKeystoreValue != null)
+ mgr = KeystoreManagerFactory.make("",serverHTTPSKeystoreValue);
else
mgr = KeystoreManagerFactory.make("");
java.io.InputStream is = new java.io.ByteArrayInputStream(certificateValue);
@@ -902,7 +952,7 @@ public class LivelinkAuthority extends o
{
return "Illegal certificate: "+certError;
}
- parameters.setParameter(LiveLinkParameters.serverKeystore,mgr.getString());
+ parameters.setParameter(LiveLinkParameters.serverHTTPSKeystore,mgr.getString());
}
}
@@ -959,7 +1009,8 @@ public class LivelinkAuthority extends o
" <nobr>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(param)+"=********</nobr><br/>\n"
);
}
- else if (param.length() >="keystore".length() && param.substring(param.length()-"keystore".length()).equalsIgnoreCase("keystore"))
+ else if (param.length() >="keystore".length() && param.substring(param.length()-"keystore".length()).equalsIgnoreCase("keystore") ||
+ param.length() > "truststore".length() && param.substring(param.length()-"truststore".length()).equalsIgnoreCase("truststore"))
{
IKeystoreManager kmanager = KeystoreManagerFactory.make("",value);
out.print(
Modified: manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java?rev=1457935&r1=1457934&r2=1457935&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java (original)
+++ manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java Mon Mar 18 19:42:12 2013
@@ -132,10 +132,16 @@ public class LivelinkConnector extends o
private int LLCATWK_ID;
// Parameter values we need
+ private String serverProtocol = null;
private String serverName = null;
private int serverPort = -1;
private String serverUsername = null;
private String serverPassword = null;
+ private String serverHTTPCgi = null;
+ private String serverHTTPNTLMDomain = null;
+ private String serverHTTPNTLMUsername = null;
+ private String serverHTTPNTLMPassword = null;
+ private IKeystoreManager serverHTTPSKeystore = null;
private String ingestProtocol = null;
private String ingestPort = null;
@@ -223,7 +229,10 @@ public class LivelinkConnector extends o
try
{
// Create the session
- llServer = new LLSERVER(serverName,serverPort,serverUsername,serverPassword);
+ llServer = new LLSERVER(!serverProtocol.equals("internal"),serverProtocol.equals("https"),
+ serverName,serverPort,serverUsername,serverPassword,
+ serverHTTPCgi,serverHTTPNTLMDomain,serverHTTPNTLMUsername,serverHTTPNTLMPassword,
+ serverHTTPSKeystore);
LLDocs = new LAPI_DOCUMENTS(llServer.getLLSession());
LLAttributes = new LAPI_ATTRIBUTES(llServer.getLLSession());
@@ -1562,30 +1571,39 @@ public class LivelinkConnector extends o
{
// LAPI parameters
+ String serverProtocol = parameters.getParameter(LiveLinkParameters.serverProtocol);
+ if (serverProtocol == null)
+ serverProtocol = "internal";
String serverName = parameters.getParameter(LiveLinkParameters.serverName);
if (serverName == null)
serverName = "localhost";
String serverPort = parameters.getParameter(LiveLinkParameters.serverPort);
if (serverPort == null)
serverPort = "2099";
- String serverDomain = parameters.getParameter(LiveLinkParameters.serverDomain);
- if (serverDomain == null)
- serverDomain = "";
String serverUserName = parameters.getParameter(LiveLinkParameters.serverUsername);
if (serverUserName == null)
serverUserName = "";
String serverPassword = parameters.getObfuscatedParameter(LiveLinkParameters.serverPassword);
if (serverPassword == null)
serverPassword = "";
- String serverUseSSL = parameters.getParameter(LiveLinkParameters.serverSSL);
- if (serverUseSSL == null)
- serverUseSSL = "no";
- String serverKeystore = parameters.getParameter(LiveLinkParameters.serverKeystore);
- IKeystoreManager localServerKeystore;
- if (serverKeystore == null)
- localServerKeystore = KeystoreManagerFactory.make("");
+ String serverHTTPCgiPath = parameters.getParameter(LiveLinkParameters.serverHTTPCgiPath);
+ if (serverHTTPCgiPath == null)
+ serverHTTPCgiPath = "";
+ String serverHTTPNTLMDomain = parameters.getParameter(LiveLinkParameters.serverHTTPNTLMDomain);
+ if (serverHTTPNTLMDomain == null)
+ serverHTTPNTLMDomain = "";
+ String serverHTTPNTLMUserName = parameters.getParameter(LiveLinkParameters.serverHTTPNTLMUsername);
+ if (serverHTTPNTLMUserName == null)
+ serverHTTPNTLMUserName = "";
+ String serverHTTPNTLMPassword = parameters.getObfuscatedParameter(LiveLinkParameters.serverHTTPNTLMPassword);
+ if (serverHTTPNTLMPassword == null)
+ serverHTTPNTLMPassword = "";
+ String serverHTTPSKeystore = parameters.getParameter(LiveLinkParameters.serverHTTPSKeystore);
+ IKeystoreManager localServerHTTPSKeystore;
+ if (serverHTTPSKeystore == null)
+ localServerHTTPSKeystore = KeystoreManagerFactory.make("");
else
- localServerKeystore = KeystoreManagerFactory.make("",serverKeystore);
+ localServerHTTPSKeystore = KeystoreManagerFactory.make("",serverHTTPSKeystore);
// Document access parameters
String ingestProtocol = parameters.getParameter(LiveLinkParameters.ingestProtocol);
@@ -1632,10 +1650,10 @@ public class LivelinkConnector extends o
out.print(
"<input name=\"serverconfigop\" type=\"hidden\" value=\"Continue\"/>\n"
);
- if (serverKeystore != null)
+ if (serverHTTPSKeystore != null)
{
out.print(
-"<input type=\"hidden\" name=\"serverkeystoredata\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverKeystore)+"\"/>\n"
+"<input type=\"hidden\" name=\"serverhttpskeystoredata\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPSKeystore)+"\"/>\n"
);
}
if (tabName.equals(Messages.getString(locale,"LivelinkConnector.Server")))
@@ -1644,6 +1662,16 @@ public class LivelinkConnector extends o
"<table class=\"displaytable\">\n"+
" <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
" <tr>\n"+
+" <td class=\"description\">"+Messages.getBodyString(locale,"LivelinkConnector.ServerProtocol")+"</td>\n"+
+" <td class=\"value\">\n"+
+" <select name=\"serverprotocol\" size=\"2\">\n"+
+" <option value=\"internal\" "+((serverProtocol.equals("internal"))?"selected=\"selected\"":"")+">"+Messages.getBodyString(locale,"LivelinkConnector.internal")+"</option>\n"+
+" <option value=\"http\" "+((serverProtocol.equals("http"))?"selected=\"selected\"":"")+">http</option>\n"+
+" <option value=\"https\" "+((serverProtocol.equals("https"))?"selected=\"selected\"":"")+">https</option>\n"+
+" </select>\n"+
+" </td>\n"+
+" </tr>\n"+
+" <tr>\n"+
" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerName")+"</nobr></td>\n"+
" <td class=\"value\"><input type=\"text\" size=\"64\" name=\"servername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverName)+"\"/></td>\n"+
" </tr>\n"+
@@ -1652,10 +1680,6 @@ public class LivelinkConnector extends o
" <td class=\"value\"><input type=\"text\" size=\"5\" name=\"serverport\" value=\""+serverPort+"\"/></td>\n"+
" </tr>\n"+
" <tr>\n"+
-" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerDomain")+"</nobr></td>\n"+
-" <td class=\"value\"><input type=\"text\" size=\"32\" name=\"serverdomain\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverDomain)+"\"/></td>\n"+
-" </tr>\n"+
-" <tr>\n"+
" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerUserName")+"</nobr></td>\n"+
" <td class=\"value\"><input type=\"text\" size=\"32\" name=\"serverusername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverUserName)+"\"/></td>\n"+
" </tr>\n"+
@@ -1663,9 +1687,28 @@ public class LivelinkConnector extends o
" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerPassword")+"</nobr></td>\n"+
" <td class=\"value\"><input type=\"password\" size=\"32\" name=\"serverpassword\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverPassword)+"\"/></td>\n"+
" </tr>\n"+
+" <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
+" <tr>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerHTTPCGIPath")+"</nobr></td>\n"+
+" <td class=\"value\"><input type=\"text\" size=\"32\" name=\"serverhttpcgipath\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPCgiPath)+"\"/></td>\n"+
+" </tr>\n"+
" <tr>\n"+
-" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerUseSSL")+"</nobr></td>\n"+
-" <td class=\"value\"><input type=\"checkbox\" name=\"serverssl\" value=\"yes\""+(serverUseSSL.equals("yes")?" checked=\"\"":"")+"/><input type=\"hidden\" name=\"serverssl_present\" value=\"true\"/></td>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerHTTPNTLMDomain")+"</nobr><br/><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.SetIfNTLMAuthDesired")+"</nobr></td>\n"+
+" <td class=\"value\">\n"+
+" <input type=\"text\" size=\"32\" name=\"serverhttpntlmdomain\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPNTLMDomain)+"\"/>\n"+
+" </td>\n"+
+" </tr>\n"+
+" <tr>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerHTTPNTLMUserName")+"</nobr><br/><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.SetIfDifferentFromServerUserName")+"</nobr></td>\n"+
+" <td class=\"value\">\n"+
+" <input type=\"text\" size=\"32\" name=\"serverhttpntlmusername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPNTLMUsername)+"\"/>\n"+
+" </td>\n"+
+" </tr>\n"+
+" <tr>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.ServerHTTPNTLMPassword")+"</nobr><br/><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.SetIfDifferentFromServerPassword")+"</nobr></td>\n"+
+" <td class=\"value\">\n"+
+" <input type=\"password\" size=\"32\" name=\"serverhttpntlmpassword\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPNTLMPassword)+"\"/>\n"+
+" </td>\n"+
" </tr>\n"+
" <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"
);
@@ -1677,7 +1720,7 @@ public class LivelinkConnector extends o
" <table class=\"displaytable\">\n"
);
// List the individual certificates in the store, with a delete button for each
- String[] contents = localServerKeystore.getContents();
+ String[] contents = localServerHTTPSKeystore.getContents();
if (contents.length == 0)
{
out.print(
@@ -1690,7 +1733,7 @@ public class LivelinkConnector extends o
while (i < contents.length)
{
String alias = contents[i];
- String description = localServerKeystore.getDescription(alias);
+ String description = localServerHTTPSKeystore.getDescription(alias);
if (description.length() > 128)
description = description.substring(0,125) + "...";
out.print(
@@ -1717,13 +1760,15 @@ public class LivelinkConnector extends o
{
// Hiddens for Server tab
out.print(
+"<input type=\"hidden\" name=\"serverprotocol\" value=\""+serverProtocol+"\"/>\n"+
"<input type=\"hidden\" name=\"servername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverName)+"\"/>\n"+
"<input type=\"hidden\" name=\"serverport\" value=\""+serverPort+"\"/>\n"+
-"<input type=\"hidden\" name=\"serverdomain\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverDomain)+"\"/>\n"+
"<input type=\"hidden\" name=\"serverusername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverUserName)+"\"/>\n"+
"<input type=\"hidden\" name=\"serverpassword\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverPassword)+"\"/>\n"+
-"<input type=\"hidden\" name=\"serverssl\" value=\""+serverUseSSL+"\"/>\n"+
-"<input type=\"hidden\" name=\"serverssl_present\" value=\"true\"/>\n"
+"<input type=\"hidden\" name=\"serverhttpcgipath\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPCgiPath)+"\"/>\n"+
+"<input type=\"hidden\" name=\"serverhttpntlmdomain\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPNTLMDomain)+"\"/>\n"+
+"<input type=\"hidden\" name=\"serverhttpntlmusername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPNTLMUsername)+"\"/>\n"+
+"<input type=\"hidden\" name=\"serverhttpntlmpassword\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(serverHTTPNTLMPassword)+"\"/>\n"
);
}
@@ -1755,7 +1800,31 @@ public class LivelinkConnector extends o
" <tr>\n"+
" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.DocumentFetchPort")+"</nobr></td>\n"+
" <td class=\"value\"><input type=\"text\" size=\"5\" name=\"ingestport\" value=\""+ingestPort+"\"/></td>\n"+
-" </tr>\n"
+" </tr>\n"+
+" <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
+" <tr>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.DocumentFetchCGIPath")+"</nobr></td>\n"+
+" <td class=\"value\"><input type=\"text\" size=\"32\" name=\"ingestcgipath\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(ingestCgiPath)+"\"/></td>\n"+
+" </tr>\n"+
+" <tr>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.DocumentFetchNTLMDomain")+"</nobr><br/><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.SetIfNTLMAuthDesired")+"</nobr></td>\n"+
+" <td class=\"value\">\n"+
+" <input type=\"text\" size=\"32\" name=\"ingestntlmdomain\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(ingestNtlmDomain)+"\"/>\n"+
+" </td>\n"+
+" </tr>\n"+
+" <tr>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.DocumentFetchNTLMUserName")+"</nobr><br/><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.SetIfDifferentFromServerUserName")+"</nobr></td>\n"+
+" <td class=\"value\">\n"+
+" <input type=\"text\" size=\"32\" name=\"ingestntlmusername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(ingestNtlmUsername)+"\"/>\n"+
+" </td>\n"+
+" </tr>\n"+
+" <tr>\n"+
+" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.DocumentFetchNTLMPassword")+"</nobr><br/><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.SetIfDifferentFromServerPassword")+"</nobr></td>\n"+
+" <td class=\"value\">\n"+
+" <input type=\"password\" size=\"32\" name=\"ingestntlmpassword\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(ingestNtlmPassword)+"\"/>\n"+
+" </td>\n"+
+" </tr>\n"+
+" <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"
);
out.print(
" <tr>\n"+
@@ -1798,29 +1867,6 @@ public class LivelinkConnector extends o
" </tr>\n"
);
out.print(
-" <tr><td class=\"separator\" colspan=\"2\"><hr/></td></tr>\n"+
-" <tr>\n"+
-" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.DocumentFetchCGIPath")+"</nobr></td>\n"+
-" <td class=\"value\"><input type=\"text\" size=\"32\" name=\"ingestcgipath\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(ingestCgiPath)+"\"/></td>\n"+
-" </tr>\n"+
-" <tr>\n"+
-" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.DocumentFetchNTLMDomain")+"</nobr><br/><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.SetIfNTLMAuthDesired")+"</nobr></td>\n"+
-" <td class=\"value\">\n"+
-" <input type=\"text\" size=\"32\" name=\"ingestntlmdomain\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(ingestNtlmDomain)+"\"/>\n"+
-" </td>\n"+
-" </tr>\n"+
-" <tr>\n"+
-" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.DocumentFetchNTLMUserName")+"</nobr><br/><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.SetIfDifferentFromServerUserName")+"</nobr></td>\n"+
-" <td class=\"value\">\n"+
-" <input type=\"text\" size=\"32\" name=\"ingestntlmusername\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(ingestNtlmUsername)+"\"/>\n"+
-" </td>\n"+
-" </tr>\n"+
-" <tr>\n"+
-" <td class=\"description\"><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.DocumentFetchNTLMPassword")+"</nobr><br/><nobr>"+Messages.getBodyString(locale,"LivelinkConnector.SetIfDifferentFromServerPassword")+"</nobr></td>\n"+
-" <td class=\"value\">\n"+
-" <input type=\"password\" size=\"32\" name=\"ingestntlmpassword\" value=\""+org.apache.manifoldcf.ui.util.Encoder.attributeEscape(ingestNtlmPassword)+"\"/>\n"+
-" </td>\n"+
-" </tr>\n"+
"</table>\n"
);
}
@@ -1909,32 +1955,36 @@ public class LivelinkConnector extends o
parameters.setParameter(LiveLinkParameters.viewCgiPath,viewCgiPath);
// Server parameters
+ String serverProtocol = variableContext.getParameter("serverprotocol");
+ if (serverProtocol != null)
+ parameters.setParameter(LiveLinkParameters.serverProtocol,serverProtocol);
String serverName = variableContext.getParameter("servername");
if (serverName != null)
parameters.setParameter(LiveLinkParameters.serverName,serverName);
String serverPort = variableContext.getParameter("serverport");
if (serverPort != null)
parameters.setParameter(LiveLinkParameters.serverPort,serverPort);
- String serverDomain = variableContext.getParameter("serverdomain");
- if (serverDomain != null)
- parameters.setParameter(LiveLinkParameters.serverDomain,serverDomain);
String serverUserName = variableContext.getParameter("serverusername");
if (serverUserName != null)
parameters.setParameter(LiveLinkParameters.serverUsername,serverUserName);
String serverPassword = variableContext.getParameter("serverpassword");
if (serverPassword != null)
parameters.setObfuscatedParameter(LiveLinkParameters.serverPassword,serverPassword);
- String serverKeystoreValue = variableContext.getParameter("serverkeystoredata");
- if (serverKeystoreValue != null)
- parameters.setParameter(LiveLinkParameters.serverKeystore,serverKeystoreValue);
- String serverSSLPresent = variableContext.getParameter("serverssl_present");
- if (serverSSLPresent != null)
- {
- String serverSSL = variableContext.getParameter("serverssl");
- if (serverSSL == null)
- serverSSL = "no";
- parameters.setParameter(LiveLinkParameters.serverSSL,serverSSL);
- }
+ String serverHTTPCgiPath = variableContext.getParameter("serverhttpcgipath");
+ if (serverHTTPCgiPath != null)
+ parameters.setParameter(LiveLinkParameters.serverHTTPCgiPath,serverHTTPCgiPath);
+ String serverHTTPNTLMDomain = variableContext.getParameter("serverhttpntlmdomain");
+ if (serverHTTPNTLMDomain != null)
+ parameters.setParameter(LiveLinkParameters.serverHTTPNTLMDomain,serverHTTPNTLMDomain);
+ String serverHTTPNTLMUserName = variableContext.getParameter("serverhttpntlmusername");
+ if (serverHTTPNTLMUserName != null)
+ parameters.setParameter(LiveLinkParameters.serverHTTPNTLMUsername,serverHTTPNTLMUserName);
+ String serverHTTPNTLMPassword = variableContext.getParameter("serverhttpntlmpassword");
+ if (serverHTTPNTLMPassword != null)
+ parameters.setObfuscatedParameter(LiveLinkParameters.serverHTTPNTLMPassword,serverHTTPNTLMPassword);
+ String serverHTTPSKeystoreValue = variableContext.getParameter("serverhttpskeystoredata");
+ if (serverHTTPSKeystoreValue != null)
+ parameters.setParameter(LiveLinkParameters.serverHTTPSKeystore,serverHTTPSKeystoreValue);
String serverConfigOp = variableContext.getParameter("serverconfigop");
if (serverConfigOp != null)
@@ -1942,23 +1992,23 @@ public class LivelinkConnector extends o
if (serverConfigOp.equals("Delete"))
{
String alias = variableContext.getParameter("serverkeystorealias");
- serverKeystoreValue = parameters.getParameter(LiveLinkParameters.serverKeystore);
+ serverHTTPSKeystoreValue = parameters.getParameter(LiveLinkParameters.serverHTTPSKeystore);
IKeystoreManager mgr;
- if (serverKeystoreValue != null)
- mgr = KeystoreManagerFactory.make("",serverKeystoreValue);
+ if (serverHTTPSKeystoreValue != null)
+ mgr = KeystoreManagerFactory.make("",serverHTTPSKeystoreValue);
else
mgr = KeystoreManagerFactory.make("");
mgr.remove(alias);
- parameters.setParameter(LiveLinkParameters.serverKeystore,mgr.getString());
+ parameters.setParameter(LiveLinkParameters.serverHTTPSKeystore,mgr.getString());
}
else if (serverConfigOp.equals("Add"))
{
String alias = IDFactory.make(threadContext);
byte[] certificateValue = variableContext.getBinaryBytes("servercertificate");
- serverKeystoreValue = parameters.getParameter(LiveLinkParameters.serverKeystore);
+ serverHTTPSKeystoreValue = parameters.getParameter(LiveLinkParameters.serverHTTPSKeystore);
IKeystoreManager mgr;
- if (serverKeystoreValue != null)
- mgr = KeystoreManagerFactory.make("",serverKeystoreValue);
+ if (serverHTTPSKeystoreValue != null)
+ mgr = KeystoreManagerFactory.make("",serverHTTPSKeystoreValue);
else
mgr = KeystoreManagerFactory.make("");
java.io.InputStream is = new java.io.ByteArrayInputStream(certificateValue);
@@ -1987,7 +2037,7 @@ public class LivelinkConnector extends o
{
return "Illegal certificate: "+certError;
}
- parameters.setParameter(LiveLinkParameters.serverKeystore,mgr.getString());
+ parameters.setParameter(LiveLinkParameters.serverHTTPSKeystore,mgr.getString());
}
}
@@ -2101,7 +2151,8 @@ public class LivelinkConnector extends o
" <nobr>"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(param)+"=********</nobr><br/>\n"
);
}
- else if (param.length() >="keystore".length() && param.substring(param.length()-"keystore".length()).equalsIgnoreCase("keystore"))
+ else if (param.length() >="keystore".length() && param.substring(param.length()-"keystore".length()).equalsIgnoreCase("keystore") ||
+ param.length() > "truststore".length() && param.substring(param.length()-"truststore".length()).equalsIgnoreCase("truststore"))
{
IKeystoreManager kmanager = KeystoreManagerFactory.make("",value);
out.print(
Modified: manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_en_US.properties?rev=1457935&r1=1457934&r2=1457935&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_en_US.properties (original)
+++ manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_en_US.properties Mon Mar 18 19:42:12 2013
@@ -53,7 +53,7 @@ LivelinkConnector.DocumentFetchSSLCertif
LivelinkConnector.NoCertificatesPresent=No certificates present
LivelinkConnector.DeleteCert=Delete cert
LivelinkConnector.AddCert=Add cert
-LivelinkConnector.Certificate=Certificate:
+LivelinkConnector.Certificate=Certificate:
LivelinkConnector.DocumentFetchCGIPath=Document fetch CGI path:
LivelinkConnector.DocumentFetchNTLMDomain=Document fetch NTLM domain:
LivelinkConnector.SetIfNTLMAuthDesired=(set if NTLM auth desired)
@@ -132,6 +132,10 @@ LivelinkConnector.CacheLifetimeMustBeAnI
LivelinkConnector.CacheLRUSizeCannotBeNull=Cache LRU size cannot be null
LivelinkConnector.CacheLRUSizeMustBeAnInteger=Cache LRU size must be an integer
-LivelinkConnector.ServerDomain=Server domain (if using NTLM):
+LivelinkConnector.ServerProtocol=Server protocol:
+LivelinkConnector.internal=internal
+LivelinkConnector.ServerHTTPCGIPath=Server HTTP CGI path:
+LivelinkConnector.ServerHTTPNTLMDomain=Server HTTP domain:
+LivelinkConnector.ServerHTTPNTLMUsername=Server HTTP NTLM user name:
+LivelinkConnector.ServerHTTPNTLMPassword=Server HTTP NTLM password:
LivelinkConnector.ServerSSLCertificateList=Server SSL certificate list:
-LivelinkConnector.ServerUseSSL=Use SSL to communicate with server:
Modified: manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_ja_JP.properties?rev=1457935&r1=1457934&r2=1457935&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_ja_JP.properties (original)
+++ manifoldcf/branches/CONNECTORS-664/connectors/livelink/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/livelink/common_ja_JP.properties Mon Mar 18 19:42:12 2013
@@ -99,7 +99,7 @@ LivelinkConnector.DeleteMetadata=�
LivelinkConnector.NoMetadataSpecified=ã¡ã¿ãã¼ã¿ã¯é¸æããã¦ãã¾ãã
LivelinkConnector.AddMetadataItem=ã¡ã¿ãã¼ã¿ã追å
LivelinkConnector.BackUpMetadataPath=ããã¯ã¢ããã¡ã¿ãã¼ã¿ãã¹
-LivelinkConnector.AllAttributesInThisCategory= ã«ãã´ãªã®ãã¹ã¦ã®å±æ§
+LivelinkConnector.AllAttributesInThisCategory=ã«ãã´ãªã®ãã¹ã¦ã®å±æ§
LivelinkConnector.PickAttributes=-- å±æ§ãé¸æãã¦ãã ãã --
LivelinkConnector.AddToMetadataPath=ã¡ã¿ãã¼ã¿ãã¹ã«è¿½å
LivelinkConnector.PickWorkspace=-- ã¯ã¼ã¯ã¹ãã¼ã¹ãé¸æãã¦ãã ãã --
@@ -132,6 +132,10 @@ LivelinkConnector.CacheLifetimeMustBeAnI
LivelinkConnector.CacheLRUSizeCannotBeNull=ãã£ãã·ã¥LRUãµã¤ãºãå
¥åãã¦ãã ãã
LivelinkConnector.CacheLRUSizeMustBeAnInteger=ãã£ãã·ã¥LRUãµã¤ãºã«ã¯æ´æ°ãå
¥åãã¦ãã ãã
-LivelinkConnector.ServerDomain=Server domain (if using NTLM):
+LivelinkConnector.ServerProtocol=Server protocol:
+LivelinkConnector.internal=internal
+LivelinkConnector.ServerHTTPCGIPath=Server HTTP CGI path:
+LivelinkConnector.ServerHTTPNTLMDomain=Server HTTP domain:
+LivelinkConnector.ServerHTTPNTLMUsername=Server HTTP NTLM user name:
+LivelinkConnector.ServerHTTPNTLMPassword=Server HTTP NTLM password:
LivelinkConnector.ServerSSLCertificateList=Server SSL certificate list:
-LivelinkConnector.ServerUseSSL=Use SSL to communicate with server: