mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.2 to HEAD
10640: Fixed ETWOTWO-688: Node Path.Element strings are returned with numerical ordering suffix 10641: Fix for ETWOTWO-640: Cannot login through FTP 10665: Fix to generate legal Faces component IDs (in turn output as HTML element IDs). Fixes ETWOTWO-687 and ALFCOM-1756. 10666: Fix for ETWOTWO-539. 10675: Merged V2.1 to V2.2 10649: Fix for ETWOONE-98 and extra error/debug logging. ... other linkvalidation enable/disable changes 10711: Merged V2.1 to V2.2 10615: Fix to keep org.alfresco.repo.workflow.jbpm.* in the session git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10712 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2008 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -29,6 +29,7 @@ import java.util.List;
|
||||
|
||||
import org.alfresco.config.JNDIConstants;
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
|
||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||
@@ -51,6 +52,8 @@ import org.apache.commons.logging.LogFactory;
|
||||
*/
|
||||
public class LinkValidationAction extends ActionExecuterAbstractBase
|
||||
{
|
||||
private static final String MSG_DISABLED = "linkvalidation.disabled";
|
||||
|
||||
public static final String NAME = "avm-link-validation";
|
||||
|
||||
public static final String PARAM_COMPARE_TO_STAGING = "compare-to-staging";
|
||||
@@ -163,12 +166,13 @@ 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");
|
||||
}
|
||||
|
||||
if (this.linkValidationService.isLinkValidationDisabled())
|
||||
{
|
||||
String warnMsg = I18NUtil.getMessage(MSG_DISABLED);
|
||||
logger.warn(warnMsg);
|
||||
throw new AlfrescoRuntimeException(warnMsg);
|
||||
}
|
||||
|
||||
// determine which API to call depending on whether there is a destination webapp present
|
||||
if (destWebappPath != null)
|
||||
{
|
||||
|
@@ -29,9 +29,10 @@ package org.alfresco.linkvalidation;
|
||||
|
||||
import java.net.SocketException;
|
||||
import java.util.List;
|
||||
|
||||
import javax.net.ssl.SSLException;
|
||||
|
||||
import org.alfresco.service.cmr.avm.AVMNotFoundException;
|
||||
import org.alfresco.util.NameMatcher;
|
||||
|
||||
public interface LinkValidationService
|
||||
{
|
||||
@@ -189,7 +190,6 @@ public interface LinkValidationService
|
||||
//-------------------------------------------------------------------------
|
||||
public List<String> getHrefsDependentUponFile(String path);
|
||||
|
||||
|
||||
public void setLinkValidationDisabled(boolean disabled);
|
||||
|
||||
public boolean isLinkValidationDisabled();
|
||||
|
Reference in New Issue
Block a user