@Override protected void defineApplication( ApplicationAssembly applicationAssembly ) throws AssemblyException { LayerAssembly layer = applicationAssembly.layer( "Layer 1" ); ModuleAssembly module = layer.module( "Module 1" ); module.objects( AbstractQi4jTest.this.getClass() ); assemble( module ); }
@Override @SuppressWarnings( "unchecked" ) protected final void onAssemble( ApplicationAssembly app ) throws AssemblyException { ModuleAssembly config = app.layer( LAYER_CONFIGURATION ).module( MODULE_CONFIGURATION ); LayerAssembly presentation = app.layer( LAYER_PRESENTATION ); HttpModuleAssembler httpAssembler = new HttpModuleAssembler().withInterface( iface ).withPort( port ).withDocRoot( docRoot ); httpAssembler.assemble( presentation.module( MODULE_HTTP ) ); httpAssembler.assembleConfigModule( config ); RestApiModuleAssembler restApiAssembler = new RestApiModuleAssembler(); restApiAssembler.assemble( presentation.module( MODULE_REST_API ) ); restApiAssembler.assembleConfigModule( config ); if ( webClientAssembler != null ) { webClientAssembler.assemble( presentation.module( MODULE_WEB_CLIENT ) ); } }
LayerAssembly presentation = app.layer( LAYER_PRESENTATION ); if ( presentationTestsAssembler != null ) { presentationTestsAssembler.assemble( presentation.module( MODULE_TESTS_IN_PRESENTATION ) ); LayerAssembly configuration = app.layer( LAYER_CONFIGURATION ); final LayerAssembly management = app.layer( LAYER_MANAGEMENT ); LayerAssembly application = app.layer( LAYER_APPLICATION ); LayerAssembly domain = app.layer( LAYER_DOMAIN ); LayerAssembly crypto = app.layer( LAYER_CRYPTO ); LayerAssembly infrastructure = app.layer( LAYER_INFRASTRUCTURE ); final LayerAssembly management = app.layer( LAYER_MANAGEMENT ); app.visit( new AssemblyVisitorAdapter<InvalidApplicationException>()