public class ContentStoreCleaner
extends java.lang.Object
eager cleanup is activated, then this
component listens to all content property change events and recorded for post-transaction
processing. All orphaned content is deleted from the registered store(s). Note that
any listeners are called as normal; backup or scrubbing
procedures should be plugged in as listeners if this is required.
Lazy cleanup:
This is triggered by means of a Quartz job. This process
gets content URLs that have been marked as orphaned and cleans up the various stores.
Once again, the listeners are called appropriately.
How backup policies are affected:
When restoring the system from a backup, the type of restore required is dictated by
the cleanup policy being enforced. If eager cleanup is active, the system mustDeletedContentBackupCleanerListener, or | Modifier and Type | Class and Description |
|---|---|
static class |
ContentStoreCleaner.DeleteFailureAction
Enumeration of actions to take in the even that an orphaned binary fails to get deleted.
|
| Constructor and Description |
|---|
ContentStoreCleaner() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
void |
init()
Initializes the cleaner based on the
eagerCleanup flag. |
void |
setAvmNodeDAO(AVMNodeDAO avmNodeDAO) |
void |
setContentDataDAO(ContentDataDAO contentDataDAO) |
void |
setContentService(ContentService contentService) |
void |
setDeletionFailureAction(ContentStoreCleaner.DeleteFailureAction deletionFailureAction)
Set the action to take in the event that an orphaned binary failed to get deleted.
|
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setEagerContentStoreCleaner(EagerContentStoreCleaner eagerContentStoreCleaner)
Set the component that will do the physical deleting
|
void |
setJobLockService(JobLockService jobLockService) |
void |
setProtectDays(int protectDays)
Set the minimum number of days old that orphaned content must be
before deletion is possible.
|
void |
setTransactionService(TransactionService transactionService) |
public void setEagerContentStoreCleaner(EagerContentStoreCleaner eagerContentStoreCleaner)
public void setJobLockService(JobLockService jobLockService)
jobLockService - service used to ensure that cleanup runs are not duplicatedpublic void setContentDataDAO(ContentDataDAO contentDataDAO)
contentDataDAO - DAO used for enumerating DM content URLspublic void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService - used to determine which properties are content propertiespublic void setContentService(ContentService contentService)
contentService - service to copy content binariespublic void setAvmNodeDAO(AVMNodeDAO avmNodeDAO)
avmNodeDAO - The AVM Node DAO to get urls with.public void setTransactionService(TransactionService transactionService)
transactionService - the component to ensure proper transactional wrappingpublic void setProtectDays(int protectDays)
protectDays - minimum age (in days) of deleted contentpublic void setDeletionFailureAction(ContentStoreCleaner.DeleteFailureAction deletionFailureAction)
ContentStoreCleaner.DeleteFailureAction.IGNORE.deletionFailureAction - the action to take when deletes failpublic void init()
eagerCleanup flag.public void execute()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.