Class ConfigurationChecker

  • All Implemented Interfaces:
    java.util.EventListener, org.springframework.beans.factory.Aware, 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 and content store.

    The algorithm is:

    • Checks that an absolute path is used
    • Ensures that the system descriptor content is available (created at bootstrap)
    Author:
    Derek Hulley
    • Field Summary

      • Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean

        log
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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 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.
      • 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)
      • 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