Merged 5.0.N (5.0.3) to HEAD (5.1/Cloud)

108512: Merged DEV to 5.0.N (5.0.3)
      107232: MNT-14195 : Replication Jobs: An error is thrown every time that a scheduled job should be run if it was disabled
      108319: MNT-14195 : Replication Jobs: An error is thrown every time that a scheduled job should be run if it was disabled
         - added tests


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@108535 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-07-18 08:45:23 +00:00
parent 6d2b4d29a7
commit 9441ab7bd9
3 changed files with 67 additions and 13 deletions

View File

@@ -35,6 +35,7 @@ import org.alfresco.repo.transfer.ContentClassFilter;
import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.action.ActionTrackingService;
import org.alfresco.service.cmr.action.ParameterDefinition;
import org.alfresco.service.cmr.replication.DisabledReplicationJobException;
import org.alfresco.service.cmr.replication.ReplicationDefinition;
import org.alfresco.service.cmr.replication.ReplicationServiceException;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -270,7 +271,7 @@ public class ReplicationActionExecutor extends ActionExecuterAbstractBase {
}
if(!replicationDef.isEnabled())
{
throw new ReplicationServiceException(I18NUtil.getMessage(MSG_ERR_REPLICATION_DEF_DISABLED));
throw new DisabledReplicationJobException(I18NUtil.getMessage(MSG_ERR_REPLICATION_DEF_DISABLED));
}
if(!replicationParams.isEnabled())
{
@@ -373,7 +374,7 @@ public class ReplicationActionExecutor extends ActionExecuterAbstractBase {
@Override
public boolean onLogException(Log logger, Throwable t, String message)
{
if(t instanceof ActionCancelledException)
if(t instanceof ActionCancelledException || t instanceof DisabledReplicationJobException)
{
logger.debug(message);
return true;