org.alfresco.repo.node.cleanup
Class AbstractNodeCleanupWorker

java.lang.Object
  extended by org.alfresco.repo.node.cleanup.AbstractNodeCleanupWorker
All Implemented Interfaces:
NodeCleanupWorker
Direct Known Subclasses:
DeletedNodeCleanupWorker, IndexChildrenWhereRequiredWorker

public abstract class AbstractNodeCleanupWorker
extends java.lang.Object
implements NodeCleanupWorker

Base class for Node cleaners. This class ensures calls through after having created a read-write transaction that is authenticated as system.

Since:
2.2 SP2

Field Summary
protected  DbNodeServiceImpl dbNodeService
           
protected  org.apache.commons.logging.Log logger
           
protected  NodeDaoService nodeDaoService
           
protected  TransactionService transactionService
           
 
Constructor Summary
AbstractNodeCleanupWorker()
           
 
Method Summary
 java.util.List doClean()
          Calls AbstractNodeCleanupWorker.doCleanInternal() in a System-user authenticated read-write transaction.
protected abstract  java.util.List doCleanInternal()
          Do the actual cleanup.
 void register()
           
 void setDbNodeService(DbNodeServiceImpl dbNodeService)
           
 void setNodeDaoService(NodeDaoService nodeDaoService)
           
 void setRegistry(NodeCleanupRegistry registry)
           
 void setTransactionService(TransactionService transactionService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger

transactionService

protected TransactionService transactionService

dbNodeService

protected DbNodeServiceImpl dbNodeService

nodeDaoService

protected NodeDaoService nodeDaoService
Constructor Detail

AbstractNodeCleanupWorker

public AbstractNodeCleanupWorker()
Method Detail

setRegistry

public void setRegistry(NodeCleanupRegistry registry)

setTransactionService

public void setTransactionService(TransactionService transactionService)

setDbNodeService

public void setDbNodeService(DbNodeServiceImpl dbNodeService)

setNodeDaoService

public void setNodeDaoService(NodeDaoService nodeDaoService)

register

public void register()

doClean

public java.util.List doClean()
Calls AbstractNodeCleanupWorker.doCleanInternal() in a System-user authenticated read-write transaction. This method is non-blocking but passes all second and subsequent concurrent invocations straight through.

Specified by:
doClean in interface NodeCleanupWorker
Returns:
Returns a list of informational messages.

doCleanInternal

protected abstract java.util.List doCleanInternal()
                                           throws java.lang.Throwable
Do the actual cleanup. Any errors are handled by this base class.

Returns:
Returns the cleanup messages.
Throws:
java.lang.Throwable


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