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 2011/12/28 01:42:25 UTC
svn commit: r1225063 [10/10] - in /incubator/lcf/trunk: ./
connectors/activedirectory/
connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/
connectors/activedirectory/connector/src/main/nativ...
Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnector.java?rev=1225063&r1=1225062&r2=1225063&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnector.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IRepositoryConnector.java Wed Dec 28 00:42:19 2011
@@ -240,10 +240,11 @@ public interface IRepositoryConnector ex
* that might be needed by the job editing HTML.
* The connector will be connected before this method can be called.
*@param out is the output to which any HTML should be sent.
+ *@param locale is the locale the output is preferred to be in.
*@param ds is the current document specification for this job.
*@param tabsArray is an array of tab names. Add to this array any tab names that are specific to the connector.
*/
- public void outputSpecificationHeader(IHTTPOutput out, DocumentSpecification ds, List<String> tabsArray)
+ public void outputSpecificationHeader(IHTTPOutput out, Locale locale, DocumentSpecification ds, List<String> tabsArray)
throws ManifoldCFException, IOException;
/** Output the specification body section.
@@ -253,10 +254,11 @@ public interface IRepositoryConnector ex
* <html>, <body>, and <form> tags. The name of the form is always "editjob".
* The connector will be connected before this method can be called.
*@param out is the output to which any HTML should be sent.
+ *@param locale is the locale the output is preferred to be in.
*@param ds is the current document specification for this job.
*@param tabName is the current tab name.
*/
- public void outputSpecificationBody(IHTTPOutput out, DocumentSpecification ds, String tabName)
+ public void outputSpecificationBody(IHTTPOutput out, Locale locale, DocumentSpecification ds, String tabName)
throws ManifoldCFException, IOException;
/** Process a specification post.
@@ -265,11 +267,12 @@ public interface IRepositoryConnector ex
* document specification accordingly. The name of the posted form is always "editjob".
* The connector will be connected before this method can be called.
*@param variableContext contains the post data, including binary file-upload information.
+ *@param locale is the locale the output is preferred to be in.
*@param ds is the current document specification for this job.
*@return null if all is well, or a string error message if there is an error that should prevent saving of
* the job (and cause a redirection to an error page).
*/
- public String processSpecificationPost(IPostParameters variableContext, DocumentSpecification ds)
+ public String processSpecificationPost(IPostParameters variableContext, Locale locale, DocumentSpecification ds)
throws ManifoldCFException;
/** View specification.
@@ -278,9 +281,10 @@ public interface IRepositoryConnector ex
* this configuration will be within appropriate <html> and <body> tags.
* The connector will be connected before this method can be called.
*@param out is the output to which any HTML should be sent.
+ *@param locale is the locale the output is preferred to be in.
*@param ds is the current document specification for this job.
*/
- public void viewSpecification(IHTTPOutput out, DocumentSpecification ds)
+ public void viewSpecification(IHTTPOutput out, Locale locale, DocumentSpecification ds)
throws ManifoldCFException, IOException;
}
Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/RepositoryConnectorFactory.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/RepositoryConnectorFactory.java?rev=1225063&r1=1225062&r2=1225063&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/RepositoryConnectorFactory.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/RepositoryConnectorFactory.java Wed Dec 28 00:42:19 2011
@@ -108,47 +108,47 @@ public class RepositoryConnectorFactory
/** Output the configuration header section.
*/
- public static void outputConfigurationHeader(IThreadContext threadContext, String className, IHTTPOutput out, ConfigParams parameters, ArrayList tabsArray)
+ public static void outputConfigurationHeader(IThreadContext threadContext, String className, IHTTPOutput out, Locale locale, ConfigParams parameters, ArrayList tabsArray)
throws ManifoldCFException, IOException
{
IRepositoryConnector connector = getConnector(threadContext, className);
if (connector == null)
return;
- connector.outputConfigurationHeader(threadContext,out,parameters,tabsArray);
+ connector.outputConfigurationHeader(threadContext,out,locale,parameters,tabsArray);
}
/** Output the configuration body section.
*/
- public static void outputConfigurationBody(IThreadContext threadContext, String className, IHTTPOutput out, ConfigParams parameters, String tabName)
+ public static void outputConfigurationBody(IThreadContext threadContext, String className, IHTTPOutput out, Locale locale, ConfigParams parameters, String tabName)
throws ManifoldCFException, IOException
{
IRepositoryConnector connector = getConnector(threadContext, className);
if (connector == null)
return;
- connector.outputConfigurationBody(threadContext,out,parameters,tabName);
+ connector.outputConfigurationBody(threadContext,out,locale,parameters,tabName);
}
/** Process configuration post data for a connector.
*/
- public static String processConfigurationPost(IThreadContext threadContext, String className, IPostParameters variableContext, ConfigParams configParams)
+ public static String processConfigurationPost(IThreadContext threadContext, String className, IPostParameters variableContext, Locale locale, ConfigParams configParams)
throws ManifoldCFException
{
IRepositoryConnector connector = getConnector(threadContext, className);
if (connector == null)
return null;
- return connector.processConfigurationPost(threadContext,variableContext,configParams);
+ return connector.processConfigurationPost(threadContext,variableContext,locale,configParams);
}
/** View connector configuration.
*/
- public static void viewConfiguration(IThreadContext threadContext, String className, IHTTPOutput out, ConfigParams configParams)
+ public static void viewConfiguration(IThreadContext threadContext, String className, IHTTPOutput out, Locale locale, ConfigParams configParams)
throws ManifoldCFException, IOException
{
IRepositoryConnector connector = getConnector(threadContext, className);
// We want to be able to view connections even if they have unregistered connectors.
if (connector == null)
return;
- connector.viewConfiguration(threadContext,out,configParams);
+ connector.viewConfiguration(threadContext,out,locale,configParams);
}
/** Get a repository connector instance, without checking for installed connector.
Modified: incubator/lcf/trunk/framework/ui-core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/ui-core/pom.xml?rev=1225063&r1=1225062&r2=1225063&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/ui-core/pom.xml (original)
+++ incubator/lcf/trunk/framework/ui-core/pom.xml Wed Dec 28 00:42:19 2011
@@ -51,6 +51,11 @@
</dependency>
<!-- other dependencies -->
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ </dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
Modified: incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Encoder.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Encoder.java?rev=1225063&r1=1225062&r2=1225063&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Encoder.java (original)
+++ incubator/lcf/trunk/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/util/Encoder.java Wed Dec 28 00:42:19 2011
@@ -46,6 +46,31 @@ public class Encoder
return attributeEscape(rval.toString());
}
+ /** Escape a string that's in an html body (script) area and thence inside javascript.
+ *@param value is the input.
+ *@return the escaped string.
+ */
+ public static String bodyJavascriptEscape(String value)
+ {
+ StringBuilder rval = new StringBuilder();
+ int i = 0;
+ while (i < value.length())
+ {
+ char x = value.charAt(i++);
+ // First level of encoding: javascript string
+ if (x == '\\' || x == '"' || x == '\'')
+ {
+ rval.append("\\").append(x);
+ }
+ else
+ rval.append(x);
+ }
+ // Body escaping does not seem to be necessary inside <script></script>
+ // blocks, at least when <!-- and //--> surround it.
+ //return bodyEscape(rval.toString());
+ return rval.toString();
+ }
+
/** Escape a string that's inside an html attribute.
*@param value is the input.
*@return the escaped string.
Modified: incubator/lcf/trunk/tests/alfresco/pom.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/alfresco/pom.xml?rev=1225063&r1=1225062&r2=1225063&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/alfresco/pom.xml (original)
+++ incubator/lcf/trunk/tests/alfresco/pom.xml Wed Dec 28 00:42:19 2011
@@ -109,6 +109,7 @@
</systemPropertyVariables>
<excludes>
<exclude>**/*Postgresql*.java</exclude>
+ <exclude>**/*MySQL*.java</exclude>
</excludes>
<forkMode>always</forkMode>
<workingDirectory>target/test-output</workingDirectory>
Modified: incubator/lcf/trunk/tests/cmis/pom.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/cmis/pom.xml?rev=1225063&r1=1225062&r2=1225063&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/cmis/pom.xml (original)
+++ incubator/lcf/trunk/tests/cmis/pom.xml Wed Dec 28 00:42:19 2011
@@ -108,6 +108,7 @@
</systemPropertyVariables>
<excludes>
<exclude>**/*Postgresql*.java</exclude>
+ <exclude>**/*MySQL*.java</exclude>
</excludes>
<forkMode>always</forkMode>
<workingDirectory>target/test-output</workingDirectory>
Modified: incubator/lcf/trunk/tests/filesystem/pom.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/filesystem/pom.xml?rev=1225063&r1=1225062&r2=1225063&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/filesystem/pom.xml (original)
+++ incubator/lcf/trunk/tests/filesystem/pom.xml Wed Dec 28 00:42:19 2011
@@ -83,6 +83,7 @@
</systemPropertyVariables>
<excludes>
<exclude>**/*Postgresql*.java</exclude>
+ <exclude>**/*MySQL*.java</exclude>
</excludes>
<forkMode>always</forkMode>
<workingDirectory>target/test-output</workingDirectory>
Modified: incubator/lcf/trunk/tests/wiki/pom.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/wiki/pom.xml?rev=1225063&r1=1225062&r2=1225063&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/wiki/pom.xml (original)
+++ incubator/lcf/trunk/tests/wiki/pom.xml Wed Dec 28 00:42:19 2011
@@ -82,6 +82,7 @@
</systemPropertyVariables>
<excludes>
<exclude>**/*Postgresql*.java</exclude>
+ <exclude>**/*MySQL*.java</exclude>
</excludes>
<forkMode>always</forkMode>
<workingDirectory>target/test-output</workingDirectory>