Package org.qi4j.bootstrap

Examples of org.qi4j.bootstrap.ModuleAssembly


    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        super.assemble( module );
        ModuleAssembly config = module.layer().module( "config" );
        new EntityTestAssembler().assemble( config );
        new OrgJsonValueSerializationAssembler().assemble( module );

        new VoldemortAssembler().
            visibleIn( Visibility.layer ).
View Full Code Here


        throws AssemblyException
    {
        // END SNIPPET: assembly
        super.assemble( module );

        ModuleAssembly config = module.layer().module( "config" );
        new EntityTestAssembler().assemble( config );

        new OrgJsonValueSerializationAssembler().assemble( module );

        // START SNIPPET: assembly
        new MongoMapEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
        // END SNIPPET: assembly

        MongoEntityStoreConfiguration mongoConfig = config.forMixin( MongoEntityStoreConfiguration.class ).declareDefaults();
        mongoConfig.writeConcern().set( MongoEntityStoreConfiguration.WriteConcern.FSYNC_SAFE );
        mongoConfig.database().set( "qi4j:test" );
        mongoConfig.collection().set( "qi4j:test:entities" );
        // START SNIPPET: assembly
    }
View Full Code Here

    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        // END SNIPPET: assembly
        super.assemble( module );
        ModuleAssembly configModule = module.layer().module( "config" );
        new EntityTestAssembler().assemble( configModule );
        new OrgJsonValueSerializationAssembler().assemble( module );
        // START SNIPPET: assembly
        new HazelcastEntityStoreAssembler().withConfig( configModule, Visibility.layer ).assemble( module );
    }
View Full Code Here

    }

    protected static void doCommonAssembling( ModuleAssembly mainModule )
        throws AssemblyException
    {
        ModuleAssembly config = mainModule.layer().module( "config" );
        new EntityTestAssembler().assemble( config );

        // START SNIPPET: assembly
        // DataSourceService
        new DBCPDataSourceServiceAssembler().
            identifiedBy( "postgres-datasource-service" ).
            visibleIn( Visibility.module ).
            withConfig( config, Visibility.layer ).
            assemble( mainModule );

        // DataSource
        new DataSourceAssembler().
            withDataSourceServiceIdentity( "postgres-datasource-service" ).
            identifiedBy( "postgres-datasource" ).
            visibleIn( Visibility.module ).
            withCircuitBreaker().
            assemble( mainModule );

        // SQL Index/Query
        new PostgreSQLIndexQueryAssembler().
            visibleIn( Visibility.module ).
            withConfig( config, Visibility.layer ).
            assemble( mainModule );
        // END SNIPPET: assembly

        // Always re-build schema in test scenarios because of possibly different app structure in
        // various tests
        mainModule.services( RebuildingStrategy.class ).
            withMixins( RebuildingStrategy.AlwaysNeed.class ).
            visibleIn( Visibility.module );

        // Always re-index in test scenarios
        mainModule.services( ReindexingStrategy.class ).
            withMixins( ReindexingStrategy.AlwaysNeed.class ).
            visibleIn( Visibility.module );
        config.entities( ReindexerConfiguration.class ).
            visibleIn( Visibility.layer );
    }
View Full Code Here

    // START SNIPPET: assembly
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
      // END SNIPPET: assembly
        ModuleAssembly confModule = module.layer().module( "confModule" );
        new EntityTestAssembler().visibleIn( Visibility.layer ).assemble( confModule );

        // START SNIPPET: assembly
        new EhCacheAssembler().
            withConfig( confModule, Visibility.layer ).
View Full Code Here

    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        module.services( FileConfigurationService.class );
        ModuleAssembly prefModule = module.layer().module( "PrefModule" );
        prefModule.entities( NativeConfiguration.class ).visibleIn( Visibility.application );
        prefModule.forMixin( NativeConfiguration.class ).declareDefaults().dataDirectory().set( DATA_DIR.getAbsolutePath() );
        new EntityTestAssembler().assemble( prefModule );

        module.entities( ExampleEntity.class );
        module.values( ExampleValue.class, ExampleValue2.class );
View Full Code Here

   @Override
   public void assemble(ModuleAssembly module) throws AssemblyException
   {
       module.services( FileConfigurationService.class );
      ModuleAssembly prefModule = module.layer().module( "PrefModule" );
      prefModule.entities( NativeConfiguration.class ).visibleIn(Visibility.application);
      prefModule.forMixin( NativeConfiguration.class ).declareDefaults().dataDirectory().set( DATA_DIR.getAbsolutePath() );
      new EntityTestAssembler().assemble( prefModule );

      module.entities( ExampleEntity.class );
      module.values( ExampleValue.class, ExampleValue2.class );
View Full Code Here

        // Reindexer
        module.services( ReindexerService.class );

        // Configuration
        ModuleAssembly config = module.layer().module( "config" );
        new EntityTestAssembler().assemble( config );
        config.entities( JdbmConfiguration.class, NativeConfiguration.class, ReindexerConfiguration.class ).visibleIn( Visibility.layer );

        // Test entity
        module.entities( MyEntity.class );

    }
View Full Code Here

        module.services( NativeRepositoryService.class, RdfQueryParserFactory.class ).instantiateOnStartup();
        module.services( RdfIndexingEngineService.class ).instantiateOnStartup();
        module.services( OrgJsonValueSerializationService.class ).taggedWith( ValueSerialization.Formats.JSON );
        module.objects( EntityStateSerializer.class, EntityTypeSerializer.class );

        ModuleAssembly config = module.layer().module( "Config" );
        config.entities( NativeConfiguration.class ).visibleIn( Visibility.layer );
        config.forMixin( NativeConfiguration.class ).declareDefaults().dataDirectory().set( DATA_DIR.getAbsolutePath() );
        new EntityTestAssembler().assemble( config );
    }
View Full Code Here

    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        super.assemble( module );

        ModuleAssembly config = module.layer().module( "config" );
        config.services( FileConfigurationService.class ).visibleIn( Visibility.layer ).instantiateOnStartup();
        new EntityTestAssembler().assemble( config );

        new OrgJsonValueSerializationAssembler().assemble( module );
        new JdbmEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
    }
View Full Code Here

TOP

Related Classes of org.qi4j.bootstrap.ModuleAssembly

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.