Package org.qi4j.bootstrap

Examples of org.qi4j.bootstrap.Assembler


    public void whenCreateEntityWithComplexTypeInBatchThenRecordIterationsPerSecond()
        throws Exception
    {
        try
        {
            Assembler assembler = new Assembler()
            {
                @Override
                public void assemble( ModuleAssembly module )
                    throws AssemblyException
                {
View Full Code Here


    public void whenReadEntityWithComplexTypeThenRecordIterationsPerSecond()
        throws Exception
    {
        try
        {
            Assembler assembler = new Assembler()
            {
                @Override
                public void assemble( ModuleAssembly module )
                    throws AssemblyException
                {
View Full Code Here

    @Test
    public void testPassivationExceptionsAccrossStructure()
        throws AssemblyException, ActivationException
    {
        ApplicationBuilder appBuilder = new ApplicationBuilder( "TestApplication" );
        appBuilder.withLayer( "Layer 1" ).withModule( "Module A" ).withAssembler( new Assembler()
        {
            @Override
            public void assemble( ModuleAssembly module )
                throws AssemblyException
            {
                module.services( TestService.class ).
                    identifiedBy( "TestService_Module.A" ).
                    withActivators( FailBeforePassivationServiceActivator.class ).
                    instantiateOnStartup();
            }
        } );
        appBuilder.withLayer( "Layer 2" ).withModule( "Module B" ).withAssembler( new Assembler()
        {
            @Override
            public void assemble( ModuleAssembly module )
                throws AssemblyException
            {
View Full Code Here

        module.entities( ExampleEntity.class );

        EntityTestAssembler testAss = new EntityTestAssembler();
        testAss.assemble( module );

        Assembler rdfAssembler = new RdfNativeSesameStoreAssembler();
        rdfAssembler.assemble( module );
    }
View Full Code Here

        }

        public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
            throws AssemblyException
        {
            return applicationFactory.newApplicationAssembly( new Assembler()
            {
                public void assemble( ModuleAssembly module )
                    throws AssemblyException
                {
                    new LayerName( "Plugin layer" ).assemble( module );
                    new ModuleName( "Plugin module" ).assemble( module );

                    LayerAssembly layer = module.layer();

                    // In a real case you would "detect" the plugins somehow. Here the plugin assembler is hardcoded
                    List<Assembler> pluginAssemblers = Collections.<Assembler>singletonList( new SimonAssembler() );

                    for( int i = 0; i < pluginAssemblers.size(); i++ )
                    {
                        ModuleAssembly pluginModule = layer.module( "Plugin " + ( i + 1 ) );
                        Assembler assembler = pluginAssemblers.get( i );
                        assembler.assemble( pluginModule );
                    }

                    // Import host services
                    module.importedServices( HelloWorld.class )
                        .importedBy( ServiceFinderImporter.class )
View Full Code Here

                }
            };
// END SNIPPET: application1
        }
        {
            Assembler customerListEditAssembler = new DummyAssembler();
            Assembler customerEditAssembler = new DummyAssembler();
            Assembler customerSearchAssembler = new DummyAssembler();
            Assembler accountsListEditAssembler = new DummyAssembler();
            Assembler accountsEditAssembler = new DummyAssembler();
            Assembler accountsSearchAssembler = new DummyAssembler();
            Assembler customerDomainAssembler = new DummyAssembler();
            Assembler accountsDomainAssembler = new DummyAssembler();
// START SNIPPET: application2
            final Assembler[][][] assemblers =
                {
                    { // web layer
                      { // Customer Module
View Full Code Here

            {
                Assembler[][][] pancakes = new Assembler[][][]
                {
                    {
                        {
                            new Assembler()
                            {
                                @Override
                                public void assemble( ModuleAssembly valuesModule )
                                    throws AssemblyException
                                {
                                    valuesModule.layer().setName( "SINGLE-Layer" );
                                    valuesModule.setName( "VALUES-Module" );

                                    valuesModule.values( SomeValue.class );
                                }
                            }
                        },
                        {
                            new Assembler()
                            {
                                @Override
                                public void assemble( ModuleAssembly servicesModule )
                                    throws AssemblyException
                                {
View Full Code Here

                throws AssemblyException
            {
                return applicationFactory.newApplicationAssembly( new Assembler[][][]{
                    {
                        {
                            new Assembler()
                            {
                                public void assemble( ModuleAssembly module )
                                    throws AssemblyException
                                {
                                    module.objects( PrivateEntityUnitOfWorkTest.class );
                                }
                            }
                        }
                    },
                    {
                        {
                            new Assembler()
                            {
                                public void assemble( ModuleAssembly module )
                                    throws AssemblyException
                                {
                                    module.entities( ProductEntity.class );
View Full Code Here

        Energy4Java boot = new Energy4Java();
        Assembler[][][] assemblers = new Assembler[][][]
            {
                { // Layer
                  // Module 1
                     new Assembler()
                     {
                         public void assemble( ModuleAssembly module )
                             throws AssemblyException
                         {
                             module.setName( "Module A" );
View Full Code Here

        Energy4Java boot = new Energy4Java();
        Assembler[][][] assemblers = new Assembler[][][]
            {
                { // Layer
                  // Module 1
                     new Assembler()
                     {
                         public void assemble( ModuleAssembly module )
                             throws AssemblyException
                         {
                             module.setName( "Module A" );
View Full Code Here

TOP

Related Classes of org.qi4j.bootstrap.Assembler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.