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
 LayerAssembly layer(String name)
          Create a new layer assembly
 Application.Mode mode()
          Get the currently set mode of the application
 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)
           
 

Method Detail

layer

LayerAssembly layer(String name)
Create a new layer assembly

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

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 current application mode

setMetaInfo

ApplicationAssembly setMetaInfo(Object info)

visit

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