org.qi4j.library.spring.importer

## Class SpringImporterAssembler

- java.lang.Object
- - org.qi4j.library.spring.importer.SpringImporterAssembler

- All Implemented Interfaces:
    Assembler

      public class SpringImporterAssembler
      extends Object
      implements Assembler

  Imports all services in the given Spring ApplicationContext into a module.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpringImporterAssembler(org.springframework.context.ApplicationContext context)` Import all beans from the given ApplicationContext as services in Zest, using Module as Visibility.
    `SpringImporterAssembler(org.springframework.context.ApplicationContext context, Visibility defaultVisibility)` Import all beans from the given ApplicationContext as services in Zest, using the specified Visibility level.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `assemble(ModuleAssembly module)` Assemblers receive a callback to the ModuleAssembly they are supposed to configure.

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

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

- - ### Constructor Detail

    - #### SpringImporterAssembler

          public SpringImporterAssembler(org.springframework.context.ApplicationContext context)

      Import all beans from the given ApplicationContext as services in Zest, using Module as Visibility.
      Parameters:
        `context` - the Spring ApplicationContext

    - #### SpringImporterAssembler

          public SpringImporterAssembler(org.springframework.context.ApplicationContext context,
                                 Visibility defaultVisibility)

      Import all beans from the given ApplicationContext as services in Zest, using the specified Visibility level.
      Parameters:
        `context` - the Spring ApplicationContext
        `defaultVisibility` - the visibility level for the imported services

  - ### Method Detail

    - #### assemble

          public void assemble(ModuleAssembly module)
                        throws AssemblyException

      Description copied from interface: `Assembler`
      Assemblers receive a callback to the ModuleAssembly they are supposed to configure. They can use this to register objects, composites, services etc. and the additional metadata that may exist for these artifacts.

      An Assembler may create new Modules by calling `ModuleAssembly.layer()` and then `LayerAssembly.module(String)` (String)}. This allows an Assembler to bootstrap an entire Layer with more Modules.

      Specified by:
        `assemble` in interface `Assembler`
      Parameters:
        `module` - the Module to assemble
      Throws:
        `AssemblyException` - thrown if the assembler tries to do something illegal