@Override public ServiceDeclaration withConcerns( Class<?>... concerns ) { for( ServiceDeclaration declaration : declarations ) { declaration.withConcerns( concerns ); } return this; }
public void assemble( ModuleAssembly module ) { ServiceDeclaration decl = module.addServices( PinSearchService.class ); if( Boolean.getBoolean( "trace.all" ) ) { decl.withConcerns( TraceAllConcern.class ); } } }
@Override public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module ) throws AssemblyException { module.services( ExpensiveOperation.class ) .withMixins( SimpleInvocationCacheMixin.class ) .withConcerns( ReturnCachedValueConcern.class ); return module; } }
public void assemble( ModuleAssembly module ) throws AssemblyException { module.addServices(ImportantRepository.class) .withConcerns( TraceAllConcern.class ) .withMixins( Debug.class ); }
public void assemble( ModuleAssembly module ) throws AssemblyException { module.services( Some.class ).withMixins( NoopMixin.class ).withConcerns( OtherConcern.class ); // module.services( Some.class ); module.services( Result.class ); }
@Override public void assemble( ModuleAssembly module ) throws AssemblyException { module.entities( Person.class ); module.values( Person.class ); module.services( PersonRepository.class ).withConcerns( UnitOfWorkConcern.class ); module.services( Runnable.class ) .withMixins( LoadData.class ) .withConcerns( UnitOfWorkConcern.class ) .instantiateOnStartup(); new EntityTestAssembler().assemble( module ); }
@Override public void assemble( ModuleAssembly module ) { super.assemble( module ); ServiceDeclaration declaration = module .addServices( repositoryType ) .visibleIn( Visibility.application ) .withMixins( SmallCrudRepositoryMixin.class ) .withConcerns( UnitOfWorkConcern.class ) .taggedWith( type.getSimpleName() ) .setMetaInfo( new EntityTypeDescriptor( type ) ); if( hasIdentity() ) { declaration.identifiedBy( identity() ); } else { declaration.identifiedBy( "repository_" + type.getSimpleName() ); } module.entities( type ).visibleIn( Visibility.layer ); module.values( type ).visibleIn( Visibility.layer ); } }
public void assemble( ModuleAssembly module ) throws AssemblyException { module.services( DebuggingServiceComposite.class ); new EntityTestAssembler().assemble( module ); module.services( SomeService.class ).withMixins( Debug.class ).withConcerns( DebugConcern.class ); module.entities( DebugServiceConfiguration.class ); module.entities( ServiceDebugRecordEntity.class ); }