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 Details

    • SOLRAdminClient

      public SOLRAdminClient()
  • Method Details

    • setApplicationEventPublisher

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

      public void setSolrPingCronExpression(String solrPingCronExpression)
    • setBaseUrl

      public void setBaseUrl(String baseUrl)
    • setScheduler

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

      public void setStoreMappings(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 Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • init

      public void init()
    • executeAction

      public JSONAPIResult executeAction(String core, JSONAPIResultFactory.ACTION action, Map<String,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:
    • executeCommand

      public JSONAPIResult executeCommand(String core, JSONAPIResultFactory.HANDLER handler, JSONAPIResultFactory.COMMAND command, Map<String,String> parameters)
      Description copied from interface: SolrAdminClientInterface
      Execute a COMMAND from the SOLR API
      Specified by:
      executeCommand in interface SolrAdminClientInterface
      Parameters:
      core - Name of the core to execute the command
      handler - Name of the handler for the SOLR REST API
      command - Name of the command to be invoked
      parameters - Action parameters in pairs of key, value
      Returns:
    • getRegisteredCores

      public List<String> getRegisteredCores()
    • destroy

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