org.alfresco.repo.content.cleanup
Class ContentStoreCleaner

java.lang.Object
  extended by org.alfresco.repo.content.cleanup.ContentStoreCleaner

public class ContentStoreCleaner
extends java.lang.Object

This component is responsible for finding orphaned content in a given content store or stores. Deletion handlers can be provided to ensure that the content is moved to another location prior to being removed from the store(s) being cleaned.


Constructor Summary
ContentStoreCleaner()
           
 
Method Summary
 void execute()
           
 void executeInternal(int currentAttempt, int maxAttempts, long waitTime)
           
 void setAvmNodeDAO(AVMNodeDAO avmNodeDAO)
           
 void setContentUrlDAO(ContentUrlDAO contentUrlDAO)
           
 void setDictionaryService(DictionaryService dictionaryService)
           
 void setListeners(java.util.List listeners)
           
 void setNodeDaoService(NodeDaoService nodeDaoService)
           
 void setProtectDays(int protectDays)
          Set the minimum number of days old that orphaned content must be before deletion is possible.
 void setStores(java.util.List stores)
           
 void setTransactionService(TransactionService transactionService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentStoreCleaner

public ContentStoreCleaner()
Method Detail

setDictionaryService

public void setDictionaryService(DictionaryService dictionaryService)
Parameters:
dictionaryService - used to determine which properties are content properties

setNodeDaoService

public void setNodeDaoService(NodeDaoService nodeDaoService)
Parameters:
nodeDaoService - used to get the property values

setAvmNodeDAO

public void setAvmNodeDAO(AVMNodeDAO avmNodeDAO)
Parameters:
avmNodeDAO - The AVM Node DAO to get urls with.

setContentUrlDAO

public void setContentUrlDAO(ContentUrlDAO contentUrlDAO)
Parameters:
contentUrlDAO - DAO for recording valid Content URLs

setTransactionService

public void setTransactionService(TransactionService transactionService)
Parameters:
transactionService - the component to ensure proper transactional wrapping

setStores

public void setStores(java.util.List stores)
Parameters:
stores - the content stores to clean

setListeners

public void setListeners(java.util.List listeners)
Parameters:
listeners - the listeners that can react to deletions

setProtectDays

public void setProtectDays(int protectDays)
Set the minimum number of days old that orphaned content must be before deletion is possible. The default is 7 days.

Parameters:
protectDays - minimum age (in days) of deleted content

execute

public void execute()

executeInternal

public void executeInternal(int currentAttempt,
                            int maxAttempts,
                            long waitTime)


Copyright © 2005 - 2008 Alfresco Software, Inc. All Rights Reserved.