org.qi4j.bootstrap

## Interface ApplicationAssembly

-     public interface ApplicationAssembly

  An application assembly. This can be used by Assemblers to programmatically set the name of the application and create new layers.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `LayerAssembly` | `layer(String name)` Create a new layer assembly
    `Application.Mode` | `mode()` Get the currently set mode of the application
    `ModuleAssembly` | `module(String layerName, String moduleName)` Get an assembly for a particular Module.
    `String` | `name()` Get the currently set name of the application
    `ApplicationAssembly` | `setMetaInfo(Object info)`
    `ApplicationAssembly` | `setMode(Application.Mode mode)` Set the application mode.
    `ApplicationAssembly` | `setName(String name)` Set the name of the application
    `ApplicationAssembly` | `setVersion(String version)` Set the version of the application.
    `<ThrowableType extends Throwable> void` | `visit(AssemblyVisitor<ThrowableType> visitor)`
    `ApplicationAssembly` | `withActivators(Class<? extends Activator<Application>>... activators)` Set the application activators.

- - ### Method Detail

    - #### layer

          LayerAssembly layer(String name)

      Create a new layer assembly
      Parameters:
        `name` - of the new layer
      Returns:
        a LayerAssembly instance

    - #### module

          ModuleAssembly module(String layerName,
                              String moduleName)

      Get an assembly for a particular Module. If this is called many times with the same names, then the same module is affected.
      Parameters:
        `layerName` - The name of the Layer
        `moduleName` - The name of the Module to retrieve or create.
      Returns:
        The ModuleAssembly for the Module.

    - #### name

          String name()

      Get the currently set name of the application
      Returns:
        the name of the application

    - #### mode

          Application.Mode mode()

      Get the currently set mode of the application
      Returns:
        the application mode

    - #### setName

          ApplicationAssembly setName(String name)

      Set the name of the application
      Parameters:
        `name` - of the application
      Returns:
        the assembly

    - #### setVersion

          ApplicationAssembly setVersion(String version)

      Set the version of the application. This can be in any format, but most likely will follow the Dewey format, i.e. x.y.z.
      Parameters:
        `version` - of the application
      Returns:
        the assembly

    - #### setMode

          ApplicationAssembly setMode(Application.Mode mode)

      Set the application mode. This will be set to "production" by default. You can set the system property "mode" to either "development", "satisfiedBy" or "production" to explicitly set the mode. If that is not an option, then call this method during assembly to set the mode. The mode may then be queried by assemblers, and they may assemble the application differentlly depending on this setting.
      Parameters:
        `mode` - the application mode
      Returns:
        the assembly

    - #### setMetaInfo

          ApplicationAssembly setMetaInfo(Object info)

    - #### withActivators

          ApplicationAssembly withActivators(Class<? extends Activator<Application>>... activators)

      Set the application activators. Activators are executed in order around the Application activation and passivation.
      Parameters:
        `activators` - the application activators
      Returns:
        the assembly

    - #### visit

          <ThrowableType extends Throwable> void visit(AssemblyVisitor<ThrowableType> visitor)
                     throws ThrowableType extends Throwable

      Throws:
        `ThrowableType extends Throwable`