com.holonplatform.datastore.mongo.spring.internal

## Class MongoSyncDatastoreRegistrar

- java.lang.Object
- - com.holonplatform.spring.internal.AbstractConfigPropertyRegistrar
  - - com.holonplatform.datastore.mongo.spring.internal.MongoSyncDatastoreRegistrar

- All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.annotation.ImportBeanDefinitionRegistrar, org.springframework.context.EnvironmentAware

      public class MongoSyncDatastoreRegistrar
      extends com.holonplatform.spring.internal.AbstractConfigPropertyRegistrar
      implements org.springframework.beans.factory.BeanClassLoaderAware

  Registrar for MongoDB sync Datastore bean registration using the `EnableMongoDatastore` annotation.
  Since:
    5.2.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MongoSyncDatastoreRegistrar()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata annotationMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry)`
    `static String` | `registerSyncDatastore(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, org.springframework.core.env.Environment environment, String dataContextId, String mongoClientBeanName, MongoDatastoreConfigProperties defaultConfig, ClassLoader beanClassLoader)` Register a `MongoDatastore` bean.
    `void` | `setBeanClassLoader(ClassLoader classLoader)`

    - ### Methods inherited from class com.holonplatform.spring.internal.AbstractConfigPropertyRegistrar

      `setEnvironment`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MongoSyncDatastoreRegistrar

          public MongoSyncDatastoreRegistrar()

  - ### Method Detail

    - #### setBeanClassLoader

          public void setBeanClassLoader(ClassLoader classLoader)

      Specified by:
        `setBeanClassLoader` in interface `org.springframework.beans.factory.BeanClassLoaderAware`

    - #### registerBeanDefinitions

          public void registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata annotationMetadata,
                                              org.springframework.beans.factory.support.BeanDefinitionRegistry registry)

      Specified by:
        `registerBeanDefinitions` in interface `org.springframework.context.annotation.ImportBeanDefinitionRegistrar`

    - #### registerSyncDatastore

          public static String registerSyncDatastore(org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
                                                     org.springframework.core.env.Environment environment,
                                                     String dataContextId,
                                                     String mongoClientBeanName,
                                                     MongoDatastoreConfigProperties defaultConfig,
                                                     ClassLoader beanClassLoader)

      Register a `MongoDatastore` bean.
      Parameters:
        `registry` - BeanDefinitionRegistry
        `environment` - Spring environment
        `dataContextId` - Data context id
        `mongoClientBeanName` - MongoClient bean name reference
        `defaultConfig` - Default configuration properties
        `beanClassLoader` - Bean class loader
      Returns:
        Registered Datastore bean name

Copyright © 2019 The Holon Platform. All rights reserved.