org.alfresco.repo.admin
Class ConfigurationChecker
java.lang.Object
org.springframework.extensions.surf.util.AbstractLifecycleBean
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:
- Get all stores from the NodeService
- Get each root node
- Perform a Lucene query for each root node
- Query Lucene for a small set of content nodes
- Get content readers for each node
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.
Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean |
log |
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 |
ConfigurationChecker
public ConfigurationChecker()
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.