org.alfresco.repo.admin
Class ConfigurationChecker

java.lang.Object
  extended by org.springframework.extensions.surf.util.AbstractLifecycleBean
      extended by org.alfresco.repo.admin.ConfigurationChecker
All Implemented Interfaces:
java.util.EventListener, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener

public class ConfigurationChecker
extends org.springframework.extensions.surf.util.AbstractLifecycleBean

Component to perform a bootstrap check of the alignment of the database, Lucene indexes and content store.

The algorithm is:

If any of the steps fail then the bootstrap bean will fail, except if the indexes are marked for full recovery. In this case, the Lucene checks are not required as the indexes will be due for a rebuild.


Field Summary
 
Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
log
 
Constructor Summary
ConfigurationChecker()
           
 
Method Summary
 org.alfresco.service.cmr.repository.NodeRef getSystemDescriptor()
           
protected  void onBootstrap(org.springframework.context.ApplicationEvent event)
           
protected  void onShutdown(org.springframework.context.ApplicationEvent event)
           
 void setContentService(ContentService contentService)
           
 void setDirRoot(java.lang.String dirRoot)
           
 void setIndexConfigurationChecker(IndexConfigurationChecker indexConfigurationChecker)
           
 void setIndexRecoveryMode(java.lang.String indexRecoveryMode)
          Set the index recovery mode.
 void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
           
 void setStrict(boolean strict)
          This flag controls the behaviour of the component in the event of problems being found.
 void setSystemBootstrap(ImporterBootstrap systemBootstrap)
           
 void setTransactionService(TransactionService transactionService)
           
 java.lang.String toString()
           
 
Methods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean
getApplicationContext, onApplicationEvent, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigurationChecker

public ConfigurationChecker()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setStrict

public void setStrict(boolean strict)
This flag controls the behaviour of the component in the event of problems being found. Generally, the system should be strict, but this can be changed if indexes are going to be recovered, or if missing content is acceptable.

Parameters:
strict - true to prevent system startup if problems are found, otherwise false to allow the system to startup regardless.

setIndexRecoveryMode

public void setIndexRecoveryMode(java.lang.String indexRecoveryMode)
Set the index recovery mode. If this is FULL then the index checks are ignored as the indexes will be scheduled for a rebuild anyway.

See Also:
FullIndexRecoveryComponent.RecoveryMode

setDirRoot

public void setDirRoot(java.lang.String dirRoot)

setSystemBootstrap

public void setSystemBootstrap(ImporterBootstrap systemBootstrap)

setTransactionService

public void setTransactionService(TransactionService transactionService)

setNamespaceService

public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)

setSearchService

public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)

setContentService

public void setContentService(ContentService contentService)

setIndexConfigurationChecker

public void setIndexConfigurationChecker(IndexConfigurationChecker indexConfigurationChecker)

onBootstrap

protected void onBootstrap(org.springframework.context.ApplicationEvent event)
Specified by:
onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBean

getSystemDescriptor

public org.alfresco.service.cmr.repository.NodeRef getSystemDescriptor()
Returns:
Returns the system descriptor node or null

onShutdown

protected void onShutdown(org.springframework.context.ApplicationEvent event)
Specified by:
onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBean


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