mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged V3.2 to HEAD
17574: Merged in DEV work for ContentStoreCleaner: ETHREEOH-2813 17432: Build up for fix of ETHREEOH-2813: ContentStoreCleaner doesn't scale 17546: ContentStoreCleaner fixes and further tests 17524: Unit tests and bulk queries for orphaned content 17506: W.I.P. for content cleaner for V3.2: ETHREEOH-2813 17575: Missed check-in (other DB create scripts look OK) 17577: Re-activated 'contentStoreCleanerTrigger' - Added system property: system.content.orphanCleanup.cronExpression=0 0 4 * * ? - Other useful properties: system.content.eagerOrphanCleanup=false system.content.orphanProtectDays=14 17578: Fixed MT test and sample contexts after recent content cleaner changes 17579: Fixed DB2 unique index creation for content URLs 17580: First pass at fix for ETHREEOH-3454: Port enterprise upgrade scripts for ContentStoreCleaner changes ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.2:r17574-17575,17577-17580 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18151 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -37,6 +37,7 @@ import org.alfresco.repo.avm.AVMNodeConverter;
|
||||
import org.alfresco.repo.content.ContentServicePolicies.OnContentPropertyUpdatePolicy;
|
||||
import org.alfresco.repo.content.ContentServicePolicies.OnContentReadPolicy;
|
||||
import org.alfresco.repo.content.ContentServicePolicies.OnContentUpdatePolicy;
|
||||
import org.alfresco.repo.content.cleanup.EagerContentStoreCleaner;
|
||||
import org.alfresco.repo.content.filestore.FileContentStore;
|
||||
import org.alfresco.repo.content.transform.ContentTransformer;
|
||||
import org.alfresco.repo.content.transform.ContentTransformerRegistry;
|
||||
@@ -63,7 +64,6 @@ import org.alfresco.service.cmr.repository.TransformationOptions;
|
||||
import org.alfresco.service.cmr.usage.ContentQuotaException;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.service.transaction.TransactionService;
|
||||
import org.alfresco.util.EqualsHelper;
|
||||
import org.springframework.extensions.surf.util.Pair;
|
||||
import org.alfresco.util.TempFileProvider;
|
||||
@@ -71,7 +71,6 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
|
||||
|
||||
/**
|
||||
* Service implementation acting as a level of indirection between the client
|
||||
* and the underlying content store.
|
||||
@@ -95,6 +94,8 @@ public class ContentServiceImpl implements ContentService
|
||||
|
||||
/** a registry of all available content transformers */
|
||||
private ContentTransformerRegistry transformerRegistry;
|
||||
/** The cleaner that will ensure that rollbacks clean up after themselves */
|
||||
private EagerContentStoreCleaner eagerContentStoreCleaner;
|
||||
/** the store to use. Any multi-store support is provided by the store implementation. */
|
||||
private ContentStore store;
|
||||
/** the store for all temporarily created content */
|
||||
@@ -113,14 +114,6 @@ public class ContentServiceImpl implements ContentService
|
||||
ClassPolicyDelegate<ContentServicePolicies.OnContentPropertyUpdatePolicy> onContentPropertyUpdateDelegate;
|
||||
ClassPolicyDelegate<ContentServicePolicies.OnContentReadPolicy> onContentReadDelegate;
|
||||
|
||||
/**
|
||||
* @deprecated Replaced by {@link #setRetryingTransactionHelper(RetryingTransactionHelper)}
|
||||
*/
|
||||
public void setTransactionService(TransactionService transactionService)
|
||||
{
|
||||
logger.warn("Property 'transactionService' has been replaced by 'retryingTransactionHelper'.");
|
||||
}
|
||||
|
||||
public void setRetryingTransactionHelper(RetryingTransactionHelper helper)
|
||||
{
|
||||
this.transactionHelper = helper;
|
||||
@@ -141,6 +134,11 @@ public class ContentServiceImpl implements ContentService
|
||||
this.transformerRegistry = transformerRegistry;
|
||||
}
|
||||
|
||||
public void setEagerContentStoreCleaner(EagerContentStoreCleaner eagerContentStoreCleaner)
|
||||
{
|
||||
this.eagerContentStoreCleaner = eagerContentStoreCleaner;
|
||||
}
|
||||
|
||||
public void setStore(ContentStore store)
|
||||
{
|
||||
this.store = store;
|
||||
@@ -428,6 +426,8 @@ public class ContentServiceImpl implements ContentService
|
||||
ContentContext ctx = new ContentContext(null, null);
|
||||
// for this case, we just give back a valid URL into the content store
|
||||
ContentWriter writer = store.getWriter(ctx);
|
||||
// Register the new URL for rollback cleanup
|
||||
eagerContentStoreCleaner.registerNewContentUrl(writer.getContentUrl());
|
||||
// done
|
||||
return writer;
|
||||
}
|
||||
@@ -439,6 +439,8 @@ public class ContentServiceImpl implements ContentService
|
||||
// can be wherever the store decides.
|
||||
ContentContext ctx = new NodeContentContext(existingContentReader, null, nodeRef, propertyQName);
|
||||
ContentWriter writer = store.getWriter(ctx);
|
||||
// Register the new URL for rollback cleanup
|
||||
eagerContentStoreCleaner.registerNewContentUrl(writer.getContentUrl());
|
||||
|
||||
// Special case for AVM repository.
|
||||
Serializable contentValue = null;
|
||||
|
Reference in New Issue
Block a user