@Override public ModuleAssembly module(String layerName, String moduleName) { return layerAssembly.application().module(layerName, moduleName); }
@Override public void assemble( ModuleAssembly module ) { module.layer().application().setName( name ); } }
@Override public void assemble( ModuleAssembly module ) { module.layer().application().setName( name ); } }
public void assemble( ModuleAssembly module ) throws AssemblyException { module.layer().application().setMode( Application.Mode.test ); } }.application().mode();
public void assemble( ModuleAssembly module ) throws AssemblyException { module.layer().application().setMode( Application.Mode.development ); } }.application().mode();
public void assemble( ModuleAssembly module ) throws AssemblyException { module.layer().application().setMode( Application.Mode.production ); } }.application().mode();
public void assemble( ModuleAssembly module ) throws AssemblyException { module.layer().application().setMode( Application.Mode.staging ); } }.application().mode();
@Override public void assemble( ModuleAssembly module ) throws AssemblyException { module.layer().application().withActivators( AlphaApplicationActivator.class, BetaApplicationActivator.class ); }
public void assemble( ModuleAssembly module ) throws AssemblyException { LayerAssembly layerAssembly = module.layer(); layerAssembly.application().setName( "testapp" ); module.transients( TestComposite.class ); }
public static InfrastructureLayer create( LayerAssembly layer ) { ModuleAssembly config = layer.application().layer( ConfigurationLayer.NAME ).module( ConfigurationModule.NAME ); return new InfrastructureLayer( config ); }
public void assemble( ModuleAssembly module ) throws AssemblyException { module.transients( FooComposite.class ); module.layer().application().visit( new AssemblyVisitorAdapter<RuntimeException>() { @Override public void visitComposite( TransientDeclaration declaration ) { declaration.withConcerns( TraceConcern.class ); } } ); }
@Override public void assemble( ModuleAssembly module ) { module.layer().application().setName( "SomeApplication" ); module.transients( Country1.class ); module.transients( Country2.class ).withConcerns( TimingCaptureAllConcern.class ); module.transients( Country3.class ).withConcerns( TimingCaptureConcern.class ); metricsAssembler().assemble( module ); }
@Override public void assemble( ModuleAssembly module ) { module.layer().application().setName( "SomeApplication" ); module.transients( Country1.class ); module.transients( Country2.class ).withConcerns( TimingCaptureAllConcern.class ); module.transients( Country3.class ).withConcerns( TimingCaptureConcern.class ); metricsAssembler().assemble( module ); }
@Override protected void defineStorageModule( ModuleAssembly module ) { module.defaultServices(); String applicationName = module.layer().application().name(); rootNode = Preferences.userRoot().node( applicationName ); new PreferencesEntityStoreAssembler() .visibleIn( Visibility.application ) .assemble( module ); }
@Override public void assemble( ModuleAssembly module ) { super.assemble( module ); String applicationName = module.layer().application().name(); Preferences root = Preferences.userRoot(); Preferences node = root.node( applicationName ); PreferencesEntityStoreInfo info = new PreferencesEntityStoreInfo( node ); ServiceDeclaration service = module.services( PreferencesEntityStoreService.class ) .setMetaInfo( info ) .visibleIn( visibility() ) .instantiateOnStartup(); if( hasIdentity() ) { service.identifiedBy( identity() ); } } }
@Override public void assemble( ModuleAssembly module ) { super.assemble( module ); String applicationName = module.layer().application().name(); Preferences root = Preferences.userRoot(); Preferences node = root.node( applicationName ); PreferencesEntityStoreInfo info = new PreferencesEntityStoreInfo( node ); ServiceDeclaration service = module.services( PreferencesEntityStoreService.class ) .setMetaInfo( info ) .visibleIn( visibility() ) .instantiateOnStartup(); if( hasIdentity() ) { service.identifiedBy( identity() ); } } }
@Override public void assemble( ModuleAssembly module ) throws AssemblyException { module.layer().application().withActivators( AlphaApplicationActivator.class, BetaApplicationActivator.class ); module.layer().withActivators( AlphaLayerActivator.class, BetaLayerActivator.class ); module.withActivators( AlphaModuleActivator.class, BetaModuleActivator.class ); }
@Test public void testApplicationActivator() throws Exception { SingletonAssembler assembly = new SingletonAssembler( module -> module.layer().application().withActivators( TestedActivator.class ) ); // Activate Application application = assembly.application(); // Assert activated Assert.assertEquals( "Activation Level", 2, activationLevel ); // Passivate application.passivate(); // Assert passivated Assert.assertEquals( "Passivation Level", 2, passivationLevel ); }
public void assemble( ModuleAssembly module ) throws AssemblyException { LayerAssembly layer = module.layer(); layer.application().setName( "Script Test" ); module.transients( DomainType.class ).setMetaInfo( Scripting.JAVASCRIPT ).withMixins( ScriptMixin.class ); module.transients( HelloSpeaker.class ).setMetaInfo( Scripting.GROOVY ).withMixins( ScriptMixin.class ); module.values( HelloSpeaker.class ).setMetaInfo( Scripting.JAVASCRIPT ).withMixins( ScriptMixin.class ); }
@Override public void assemble( ModuleAssembly module ) throws AssemblyException { module.layer().application().setMode( Application.Mode.test ); new FileConfigurationAssembler() .withOverride( new FileConfigurationOverride().withConventionalRoot( tmpDir.getRoot() ) ) .assemble( module ); new EntityTestAssembler().assemble( module ); // START SNIPPET: assembly new SolrIndexingAssembler().assemble( module ); // END SNIPPET: assembly module.entities( TestEntity.class ); }