Merged V2.2 to HEAD

7276: Add specific login error messages (as opposed to "unknown username...') in cases where users are disallowed and/or max users exceeded
   7277: Update to JMX-based admin: option to disable (and re-enable) link validation service

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8254 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2008-02-12 11:43:42 +00:00
parent 751fcbb1fa
commit 1633ef3132
9 changed files with 159 additions and 9 deletions

View File

@@ -28,6 +28,7 @@ package org.alfresco.linkvalidation;
import java.util.List;
import org.alfresco.config.JNDIConstants;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.action.ParameterDefinitionImpl;
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
import org.alfresco.repo.avm.AVMNodeConverter;
@@ -162,6 +163,12 @@ public class LinkValidationAction extends ActionExecuterAbstractBase
LinkValidationReport report = null;
try
{
if (this.linkValidationService.isLinkValidationDisabled())
{
logger.warn("Link validation (action) not performed - currently disabled by system administrator");
throw new AlfrescoRuntimeException("Link validation not performed - currently disabled by the system administrator");
}
// determine which API to call depending on whether there is a destination webapp present
if (destWebappPath != null)
{

View File

@@ -213,4 +213,8 @@ public interface LinkValidationService
//-------------------------------------------------------------------------
public List<String> getHrefsDependentUponFile(String path);
public void setLinkValidationDisabled(boolean disabled);
public boolean isLinkValidationDisabled();
}