public void to( ModuleAssembly module ) throws AssemblyException { // TODO Refactor adding Map<ServiceAssembly,T> ServiceDeclaration.getMetaInfos( Class<T> type ); in bootstrap & runtime // This would allow removing the ConstraintServices instances and this horrible hack with random UUIDs for ( ConstraintAssembler eachAssembler : constraintAssemblers ) { module.addServices( ConstraintService.class ).identifiedBy( UUID.randomUUID().toString() ).setMetaInfo( eachAssembler.constraintInfo() ); } }
public void to( ModuleAssembly module ) throws AssemblyException { for ( ContextListenerDeclaration contextListenerDeclaration : contextListenerDeclarations ) { module.services( contextListenerDeclaration.contextListener() ). setMetaInfo( contextListenerDeclaration.contextListenerInfo() ). instantiateOnStartup().visibleIn( layer ); } }
public void to( ModuleAssembly module ) throws AssemblyException { for ( ServletDeclaration servletDeclaration : servletDeclarations ) { module.services( servletDeclaration.servlet() ). setMetaInfo( servletDeclaration.servletInfo() ). instantiateOnStartup().visibleIn( layer ); } }
@SuppressWarnings( "unchecked" ) public void to( ModuleAssembly module ) throws AssemblyException { for ( FilterAssembler filterAssembler : filterAssemblers ) { module.services( filterAssembler.filter() ). setMetaInfo( filterAssembler.filterInfo() ). instantiateOnStartup().visibleIn( layer ); } }
@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 ); } } }
@Override @SuppressWarnings( "unchecked" ) public void assemble( ModuleAssembly module ) throws AssemblyException { module.objects( MigrationEventLogger.class ); module.importedServices( MigrationEventLogger.class ).importedBy( NewObjectImporter.class ); MigrationBuilder pre_1_0_migration = new Pre_1_0_QiPkiCaMigrationBuilder(); module.services( MigrationService.class ).setMetaInfo( pre_1_0_migration ); module.entities( MigrationConfiguration.class ); module.forMixin( MigrationConfiguration.class ).declareDefaults().lastStartupVersion().set( "1.0-alpha1" ); }
@Override public void assemble( ModuleAssembly module ) throws AssemblyException { if( valuesModuleFinder == null ) { module.services( OrgJsonValueSerializationService.class ). visibleIn( visibility() ). taggedWith( ValueSerialization.Formats.JSON ); } else { module.services( OrgJsonValueSerializationService.class ). visibleIn( visibility() ). taggedWith( ValueSerialization.Formats.JSON ). setMetaInfo( valuesModuleFinder ); } } }
config.services( FileConfiguration.class ).visibleIn( Visibility.application ); if ( fileConfigOverride != null ) { config.services( FileConfiguration.class ).setMetaInfo( fileConfigOverride );