Class SOLRAdminClient

  • All Implemented Interfaces:
    SolrAdminClientInterface, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationEventPublisherAware

    public class SOLRAdminClient
    extends AbstractSolrAdminHTTPClient
    implements org.springframework.context.ApplicationEventPublisherAware, org.springframework.beans.factory.DisposableBean, SolrAdminClientInterface
    Provides an interface to the Solr admin APIs, used by the Alfresco Enterprise JMX layer. Also tracks whether Solr is available, sending Spring events when its availability changes.
    Since:
    4.0
    • Constructor Detail

      • SOLRAdminClient

        public SOLRAdminClient()
    • Method Detail

      • setApplicationEventPublisher

        public void setApplicationEventPublisher​(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
        Specified by:
        setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAware
      • setSolrPingCronExpression

        public void setSolrPingCronExpression​(java.lang.String solrPingCronExpression)
      • setBaseUrl

        public void setBaseUrl​(java.lang.String baseUrl)
      • setScheduler

        public void setScheduler​(org.quartz.Scheduler scheduler)
        Parameters:
        scheduler - the scheduler to set
      • setStoreMappings

        public void setStoreMappings​(java.util.List<SolrStoreMapping> storeMappings)
        SOLR properties identified by store like "alfresco" or "archive"
        Parameters:
        storeMappings -
      • setBeanFactory

        public void setBeanFactory​(org.springframework.beans.factory.BeanFactory beanFactory)
                            throws org.springframework.beans.BeansException
        Specified by:
        setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
        Throws:
        org.springframework.beans.BeansException
      • setShardRegistry

        public void setShardRegistry​(ShardRegistry shardRegistry)
      • setUseDynamicShardRegistration

        public void setUseDynamicShardRegistration​(boolean useDynamicShardRegistration)
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • init

        public void init()
      • executeAction

        public JSONAPIResult executeAction​(java.lang.String core,
                                           JSONAPIResultFactory.ACTION action,
                                           java.util.Map<java.lang.String,​java.lang.String> parameters)
        Description copied from interface: SolrAdminClientInterface
        Execute an ACTION from the SOLR CoreAdmin API
        Specified by:
        executeAction in interface SolrAdminClientInterface
        Parameters:
        core - Name of the core to execute the command, when null the action is executed for all existing cores
        action - SOLR CoreAdmin API Action name
        parameters - Action parameters in pairs of key, value
        Returns:
      • getRegisteredCores

        public java.util.List<java.lang.String> getRegisteredCores()
      • destroy

        public void destroy()
                     throws java.lang.Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        java.lang.Exception