diff --git a/config/alfresco/action-services-context.xml b/config/alfresco/action-services-context.xml
index 9be5d613ce..4acaba3192 100644
--- a/config/alfresco/action-services-context.xml
+++ b/config/alfresco/action-services-context.xml
@@ -521,6 +521,15 @@
false
+
+ 5
+
+
+ 10000
+
+
+ 30000
+
diff --git a/source/java/org/alfresco/linkvalidation/LinkValidationAction.java b/source/java/org/alfresco/linkvalidation/LinkValidationAction.java
index 0f678b333a..71d4cb1df9 100644
--- a/source/java/org/alfresco/linkvalidation/LinkValidationAction.java
+++ b/source/java/org/alfresco/linkvalidation/LinkValidationAction.java
@@ -55,6 +55,9 @@ public class LinkValidationAction extends ActionExecuterAbstractBase
public static final String PARAM_COMPARE_TO_STAGING = "compare-to-staging";
public static final String PARAM_MONITOR = "monitor";
+ private int noThreads = 5;
+ private int readTimeout = 30000;
+ private int connectionTimeout = 10000;
private LinkValidationService linkValidationService;
private AVMService avmService;
@@ -79,6 +82,36 @@ public class LinkValidationAction extends ActionExecuterAbstractBase
{
this.avmService = service;
}
+
+ /**
+ * Sets the number of millseconds to wait for a connection
+ *
+ * @param connectionTimeout Number of milliseconds to wait for connection
+ */
+ public void setConnectionTimeout(int connectionTimeout)
+ {
+ this.connectionTimeout = connectionTimeout;
+ }
+
+ /**
+ * Sets the number of milliseconds to wait for a response
+ *
+ * @param readTimeout Number of milliseconds to wait for a response
+ */
+ public void setReadTimeout(int readTimeout)
+ {
+ this.readTimeout = readTimeout;
+ }
+
+ /**
+ * Sets the number of threads to use to gather broken links
+ *
+ * @param threads Number of threads to use to gather broken links
+ */
+ public void setNoThreads(int threads)
+ {
+ this.noThreads = threads;
+ }
@Override
protected void addParameterDefinitions(List paramList)
@@ -151,7 +184,7 @@ public class LinkValidationAction extends ActionExecuterAbstractBase
{
// get the object to represent the broken files
HrefDifference hdiff = this.linkValidationService.getHrefDifference(webappPath, destWebappPath,
- 10000, 30000, 5, monitor);
+ this.connectionTimeout, this.readTimeout, this.noThreads, monitor);
// get the broken files created due to deletions and new/modified files
HrefManifest brokenByDelete = this.linkValidationService.getHrefManifestBrokenByDelete(hdiff);
@@ -164,7 +197,8 @@ public class LinkValidationAction extends ActionExecuterAbstractBase
{
// firstly call updateHrefInfo to scan the whole store for broken links
// NOTE: currently this is NOT done incrementally
- this.linkValidationService.updateHrefInfo(webappPath, false, 10000, 30000, 5, monitor);
+ this.linkValidationService.updateHrefInfo(webappPath, false, this.connectionTimeout,
+ this.readTimeout, this.noThreads, monitor);
// retrieve the manifest of all the broken links and files for the webapp
List manifests = this.linkValidationService.getBrokenHrefManifestEntries(webappPath);