Class RepoXMLConfigService

  • All Implemented Interfaces:
    java.util.EventListener, org.alfresco.repo.tenant.TenantDeployer, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener, org.springframework.extensions.config.ConfigService, org.springframework.extensions.config.xml.XMLConfigConstants

    public class RepoXMLConfigService
    extends org.springframework.extensions.config.xml.XMLConfigService
    implements org.alfresco.repo.tenant.TenantDeployer
    XML-based configuration service which can optionally read config from the Repository
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.springframework.extensions.config.xml.XMLConfigService

        org.springframework.extensions.config.xml.XMLConfigService.PlaceholderResolvingStringValueResolver, org.springframework.extensions.config.xml.XMLConfigService.PropertyConfigurer
    • Field Summary

      • Fields inherited from class org.springframework.extensions.config.BaseConfigService

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

        log
      • Fields inherited from interface org.springframework.extensions.config.xml.XMLConfigConstants

        ATTR_CLASS, ATTR_CONDITION, ATTR_ELEMENT_NAME, ATTR_EVALUATOR, ATTR_ID, ATTR_NAME, ATTR_REPLACE, ATTR_VALUE, ELEMENT_CONFIG, ELEMENT_ELEMENT_READER, ELEMENT_ELEMENT_READERS, ELEMENT_EVALUATOR, ELEMENT_EVALUATORS, ELEMENT_PLUG_INS
    • Constructor Summary

      Constructors 
      Constructor Description
      RepoXMLConfigService​(org.springframework.extensions.config.ConfigSource configSource)
      Constructs an XMLConfigService using the given config source
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()  
      protected java.util.Map<java.lang.String,​org.springframework.extensions.config.xml.elementreader.ConfigElementReader> getElementReaders()  
      protected java.util.Map<java.lang.String,​org.springframework.extensions.config.evaluator.Evaluator> getEvaluators()  
      protected org.springframework.extensions.config.ConfigImpl getGlobalConfigImpl()  
      ConfigDataCache.ConfigData getRepoConfig​(java.lang.String tenantDomain)
      Get the repository configuration data for a given tenant.
      java.util.List<org.springframework.extensions.config.ConfigSection> getSections()  
      java.util.Map<java.lang.String,​java.util.List<org.springframework.extensions.config.ConfigSection>> getSectionsByArea()  
      java.util.List<org.springframework.extensions.config.ConfigDeployment> initConfig()  
      protected void onBootstrap​(org.springframework.context.ApplicationEvent event)  
      void onDisableTenant()  
      void onEnableTenant()  
      protected void onShutdown​(org.springframework.context.ApplicationEvent event)  
      protected void putElementReaders​(java.util.Map<java.lang.String,​org.springframework.extensions.config.xml.elementreader.ConfigElementReader> elementReaders)  
      protected void putEvaluators​(java.util.Map<java.lang.String,​org.springframework.extensions.config.evaluator.Evaluator> evaluators)  
      protected void putGlobalConfig​(org.springframework.extensions.config.ConfigImpl globalConfig)  
      protected void putSections​(java.util.List<org.springframework.extensions.config.ConfigSection> sections)  
      protected void putSectionsByArea​(java.util.Map<java.lang.String,​java.util.List<org.springframework.extensions.config.ConfigSection>> sectionsByArea)  
      protected void removeElementReaders()  
      protected void removeEvaluators()  
      protected void removeGlobalConfig()  
      protected void removeSections()  
      protected void removeSectionsByArea()  
      void reset()
      Resets the config values for the current tenant
      void setConfigDataCache​(ConfigDataCache configDataCache)
      Set the asynchronously-controlled cache.
      void setTransactionService​(TransactionService transactionService)  
      • Methods inherited from class org.springframework.extensions.config.xml.XMLConfigService

        parse, parseFragment, setProperties, setSystemPropertiesModeName
      • Methods inherited from class org.springframework.extensions.config.BaseConfigService

        addConfigSection, addConfigSection, addDeployer, addEvaluator, appendConfig, createEvaluator, getConfig, getConfig, getConfig, getEvaluator, getGlobalConfig, init, parse, processSection
      • 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, toString, wait, wait, wait
      • Methods inherited from interface org.alfresco.repo.tenant.TenantDeployer

        init
    • Constructor Detail

      • RepoXMLConfigService

        public RepoXMLConfigService​(org.springframework.extensions.config.ConfigSource configSource)
        Constructs an XMLConfigService using the given config source
    • Method Detail

      • setTransactionService

        public void setTransactionService​(TransactionService transactionService)
      • setConfigDataCache

        public void setConfigDataCache​(ConfigDataCache configDataCache)
        Set the asynchronously-controlled cache.
      • initConfig

        public java.util.List<org.springframework.extensions.config.ConfigDeployment> initConfig()
        Overrides:
        initConfig in class org.springframework.extensions.config.xml.XMLConfigService
      • getRepoConfig

        public ConfigDataCache.ConfigData getRepoConfig​(java.lang.String tenantDomain)
        Get the repository configuration data for a given tenant. This does the low-level initialization of the configuration and does not do any caching.
        Parameters:
        tenantDomain - the current tenant domain
        Returns:
        return the repository configuration for the given tenant (never null)
      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.alfresco.repo.tenant.TenantDeployer
        Overrides:
        destroy in class org.springframework.extensions.config.xml.XMLConfigService
      • reset

        public void reset()
        Resets the config values for the current tenant
        Specified by:
        reset in interface org.springframework.extensions.config.ConfigService
        Overrides:
        reset in class org.springframework.extensions.config.BaseConfigService
      • onBootstrap

        protected void onBootstrap​(org.springframework.context.ApplicationEvent event)
        Overrides:
        onBootstrap in class org.springframework.extensions.config.BaseConfigService
      • onShutdown

        protected void onShutdown​(org.springframework.context.ApplicationEvent event)
        Overrides:
        onShutdown in class org.springframework.extensions.config.BaseConfigService
      • onEnableTenant

        public void onEnableTenant()
        Specified by:
        onEnableTenant in interface org.alfresco.repo.tenant.TenantDeployer
      • onDisableTenant

        public void onDisableTenant()
        Specified by:
        onDisableTenant in interface org.alfresco.repo.tenant.TenantDeployer
      • getGlobalConfigImpl

        protected org.springframework.extensions.config.ConfigImpl getGlobalConfigImpl()
        Overrides:
        getGlobalConfigImpl in class org.springframework.extensions.config.BaseConfigService
      • putGlobalConfig

        protected void putGlobalConfig​(org.springframework.extensions.config.ConfigImpl globalConfig)
        Overrides:
        putGlobalConfig in class org.springframework.extensions.config.BaseConfigService
      • removeGlobalConfig

        protected void removeGlobalConfig()
        Overrides:
        removeGlobalConfig in class org.springframework.extensions.config.BaseConfigService
      • getEvaluators

        protected java.util.Map<java.lang.String,​org.springframework.extensions.config.evaluator.Evaluator> getEvaluators()
        Overrides:
        getEvaluators in class org.springframework.extensions.config.BaseConfigService
      • putEvaluators

        protected void putEvaluators​(java.util.Map<java.lang.String,​org.springframework.extensions.config.evaluator.Evaluator> evaluators)
        Overrides:
        putEvaluators in class org.springframework.extensions.config.BaseConfigService
      • removeEvaluators

        protected void removeEvaluators()
        Overrides:
        removeEvaluators in class org.springframework.extensions.config.BaseConfigService
      • getSectionsByArea

        public java.util.Map<java.lang.String,​java.util.List<org.springframework.extensions.config.ConfigSection>> getSectionsByArea()
        Overrides:
        getSectionsByArea in class org.springframework.extensions.config.BaseConfigService
      • putSectionsByArea

        protected void putSectionsByArea​(java.util.Map<java.lang.String,​java.util.List<org.springframework.extensions.config.ConfigSection>> sectionsByArea)
        Overrides:
        putSectionsByArea in class org.springframework.extensions.config.BaseConfigService
      • removeSectionsByArea

        protected void removeSectionsByArea()
        Overrides:
        removeSectionsByArea in class org.springframework.extensions.config.BaseConfigService
      • getSections

        public java.util.List<org.springframework.extensions.config.ConfigSection> getSections()
        Overrides:
        getSections in class org.springframework.extensions.config.BaseConfigService
      • putSections

        protected void putSections​(java.util.List<org.springframework.extensions.config.ConfigSection> sections)
        Overrides:
        putSections in class org.springframework.extensions.config.BaseConfigService
      • removeSections

        protected void removeSections()
        Overrides:
        removeSections in class org.springframework.extensions.config.BaseConfigService
      • getElementReaders

        protected java.util.Map<java.lang.String,​org.springframework.extensions.config.xml.elementreader.ConfigElementReader> getElementReaders()
        Overrides:
        getElementReaders in class org.springframework.extensions.config.xml.XMLConfigService
      • putElementReaders

        protected void putElementReaders​(java.util.Map<java.lang.String,​org.springframework.extensions.config.xml.elementreader.ConfigElementReader> elementReaders)
        Overrides:
        putElementReaders in class org.springframework.extensions.config.xml.XMLConfigService
      • removeElementReaders

        protected void removeElementReaders()
        Overrides:
        removeElementReaders in class org.springframework.extensions.config.xml.XMLConfigService