Package org.qi4j.bootstrap

Examples of org.qi4j.bootstrap.ServiceDeclaration


                LayerAssembly layer2Assembly = applicationAssembly.layer( "Other layer" );
                layerAssembly.uses( layer2Assembly );

                ModuleAssembly module2 = layer2Assembly.module( "Other module" );

                ServiceDeclaration service2Decl = module2.services( MyServiceComposite2.class );
                service2Decl.identifiedBy( "Bar" ).setMetaInfo( new ServiceName( "Bar" ) ).visibleIn( application );
            }
        };

        testInjection( assembly );
    }
View Full Code Here


{
    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        ServiceDeclaration service = module.services( EntityToValueService.class ).visibleIn( visibility() );
        if( hasIdentity() )
        {
            service.identifiedBy( identity() );
        }
    }
View Full Code Here

        assembly.entities( Schedules.class );
        EntityDeclaration scheduleEntities = assembly.entities( CronSchedule.class, OnceSchedule.class );

        ValueDeclaration scheduleValues = assembly.values( CronSchedule.class, OnceSchedule.class );

        ServiceDeclaration schedulerDeclaration = assembly.services( SchedulerService.class )
            .visibleIn( visibility() )
            .instantiateOnStartup();

        if( timeline )
        {
            scheduleEntities.withTypes( Timeline.class )
                .withMixins( TimelineScheduleMixin.class )
                .withConcerns( TimelineForScheduleConcern.class );

            scheduleValues.withTypes( Timeline.class )
                .withMixins( TimelineScheduleMixin.class )
                .withConcerns( TimelineForScheduleConcern.class );

            // Internal
            assembly.values( TimelineRecord.class );
            schedulerDeclaration.withTypes( Timeline.class ).withMixins( TimelineSchedulerServiceMixin.class );
        }

        if( hasConfig() )
        {
            configModule().entities( SchedulerConfiguration.class ).visibleIn( configVisibility() );
View Full Code Here

{
    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        ServiceDeclaration alarmSystem = module.services( AlarmSystemService.class ).visibleIn( visibility() );
        if( hasIdentity() )
        {
            alarmSystem.identifiedBy( identity() );
        }
        module.services( SimpleAlarmModelService.class ).setMetaInfo( new AlarmModelDescriptor( "Simple", false ) );
        module.services( StandardAlarmModelService.class ).setMetaInfo( new AlarmModelDescriptor( "Standard", true ) );
        module.services( ExtendedAlarmModelService.class ).setMetaInfo( new AlarmModelDescriptor( "Extended", false ) );
        module.services( AlarmPointFactory.class );
View Full Code Here

    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        ServiceDeclaration service = module.services( FileConfigurationService.class ).visibleIn( visibility() );
        if( hasIdentity() )
        {
            service.identifiedBy( identity() );
        }
        if( override != null )
        {
            service.setMetaInfo( override );
        }
    }
View Full Code Here

    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        module.entities( PasswordSecurable.class ).visibleIn( visibility() );
        ServiceDeclaration service = module.services( PasswordRealmService.class ).
            instantiateOnStartup().
            visibleIn( visibility() );
        if( hasIdentity() )
        {
            service.identifiedBy( identity() );
        }
        if( hasConfig() )
        {
            configModule().entities( PasswordRealmConfiguration.class ).
                visibleIn( configVisibility() );
View Full Code Here

{
    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        ServiceDeclaration service = module.services( IniSecurityManagerService.class ).
            visibleIn( visibility() ).
            instantiateOnStartup();
        if( hasIdentity() )
        {
            service.identifiedBy( identity() );
        }
        if( hasConfig() )
        {
            configModule().entities( ShiroIniConfiguration.class ).
                visibleIn( configVisibility() );
View Full Code Here

{
    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        ServiceDeclaration service = module.services( LiquibaseService.class ).
            visibleIn( visibility() ).
            instantiateOnStartup();
        if( hasIdentity() )
        {
            service.identifiedBy( identity() );
        }
        if( hasConfig() )
        {
            configModule().entities( LiquibaseConfiguration.class ).visibleIn( configVisibility() );
        }
View Full Code Here

TOP

Related Classes of org.qi4j.bootstrap.ServiceDeclaration

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.