From ac19d987075ac9b569be719d492bd87d79056e2d Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Sun, 19 Feb 2006 21:38:59 +0000 Subject: [PATCH] Warn if 'protectDays' property is 0. In-transaction writes can have content removed. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2447 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/content/cleanup/ContentStoreCleaner.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/java/org/alfresco/repo/content/cleanup/ContentStoreCleaner.java b/source/java/org/alfresco/repo/content/cleanup/ContentStoreCleaner.java index 973b479c78..adfedf0767 100644 --- a/source/java/org/alfresco/repo/content/cleanup/ContentStoreCleaner.java +++ b/source/java/org/alfresco/repo/content/cleanup/ContentStoreCleaner.java @@ -136,6 +136,18 @@ public class ContentStoreCleaner { throw new AlfrescoRuntimeException("Property 'listeners' not set"); } + + // check the protect days + if (protectDays < 0) + { + throw new AlfrescoRuntimeException("Property 'protectDays' must be 0 or greater (0 is not recommended)"); + } + else if (protectDays == 0) + { + logger.warn( + "Property 'protectDays' is set to 0. " + + "It is possible that in-transaction content will be deleted."); + } } private Set getValidUrls()