Class OpenSearchAdminServiceFactory

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.craftercms.deployer.utils.opensearch.legacy.AbstractOpenSearchFactory<org.craftercms.search.opensearch.OpenSearchAdminService>
org.craftercms.deployer.utils.opensearch.legacy.OpenSearchAdminServiceFactory
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<org.craftercms.search.opensearch.OpenSearchAdminService>, org.springframework.beans.factory.InitializingBean

public class OpenSearchAdminServiceFactory extends AbstractOpenSearchFactory<org.craftercms.search.opensearch.OpenSearchAdminService>
Implementation of AbstractOpenSearchFactory for OpenSearchAdminService
Since:
3.1.5
Author:
joseross
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.core.io.Resource
    Index mapping file for authoring indices
    protected String
     
    protected org.springframework.core.io.Resource
    Index mapping file for preview indices

    Fields inherited from class org.craftercms.deployer.utils.opensearch.legacy.AbstractOpenSearchFactory

    config, name

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE
  • Constructor Summary

    Constructors
    Constructor
    Description
    OpenSearchAdminServiceFactory(OpenSearchConfig config, org.springframework.core.io.Resource authoringMapping, org.springframework.core.io.Resource previewMapping, String authoringNamePattern)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.craftercms.search.opensearch.OpenSearchAdminService
    doCreateMultiInstance(org.opensearch.client.RestHighLevelClient readClient, org.opensearch.client.RestHighLevelClient[] writeClients)
    Creates a service instance for a multiple cluster
    protected org.craftercms.search.opensearch.OpenSearchAdminService
    doCreateSingleInstance(org.opensearch.client.RestHighLevelClient client)
    Creates a service instance for a single cluster
     

    Methods inherited from class org.craftercms.deployer.utils.opensearch.legacy.AbstractOpenSearchFactory

    createInstance, destroyInstance, setBeanName

    Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • authoringMapping

      protected org.springframework.core.io.Resource authoringMapping
      Index mapping file for authoring indices
    • previewMapping

      protected org.springframework.core.io.Resource previewMapping
      Index mapping file for preview indices
    • authoringNamePattern

      protected String authoringNamePattern
  • Constructor Details

    • OpenSearchAdminServiceFactory

      @ConstructorProperties({"config","authoringMapping","previewMapping","authoringNamePattern"}) public OpenSearchAdminServiceFactory(OpenSearchConfig config, org.springframework.core.io.Resource authoringMapping, org.springframework.core.io.Resource previewMapping, String authoringNamePattern)
  • Method Details

    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<org.craftercms.search.opensearch.OpenSearchAdminService>
      Specified by:
      getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<org.craftercms.search.opensearch.OpenSearchAdminService>
    • doCreateSingleInstance

      protected org.craftercms.search.opensearch.OpenSearchAdminService doCreateSingleInstance(org.opensearch.client.RestHighLevelClient client)
      Description copied from class: AbstractOpenSearchFactory
      Creates a service instance for a single cluster
      Specified by:
      doCreateSingleInstance in class AbstractOpenSearchFactory<org.craftercms.search.opensearch.OpenSearchAdminService>
      Parameters:
      client - the OpenSearch client
      Returns:
      the service instance
    • doCreateMultiInstance

      protected org.craftercms.search.opensearch.OpenSearchAdminService doCreateMultiInstance(org.opensearch.client.RestHighLevelClient readClient, org.opensearch.client.RestHighLevelClient[] writeClients)
      Description copied from class: AbstractOpenSearchFactory
      Creates a service instance for a multiple cluster
      Specified by:
      doCreateMultiInstance in class AbstractOpenSearchFactory<org.craftercms.search.opensearch.OpenSearchAdminService>
      Parameters:
      readClient - the OpenSearch client for read-related operations
      writeClients - the OpenSearch clients for write-related operations
      Returns:
      the service instance