Beispiel #1
0
  public ApplicationAssembly assemble(ApplicationAssemblyFactory applicationFactory)
      throws AssemblyException {
    // Application assembly
    ApplicationAssembly assembly = applicationFactory.newApplicationAssembly();
    assembly.setName("DCI Sample (version A) - TEST");
    assembly.setVersion("B.1.0");
    assembly.setMode(test);

    // Layers
    LayerAssembly infrastructureLayer = assembly.layer("INFRASTRUCTURE");
    LayerAssembly dataLayer = assembly.layer("DATA");
    LayerAssembly contextLayer = assembly.layer("CONTEXT");
    LayerAssembly bootstrapLayer = assembly.layer("BOOTSTRAP");

    // Layer dependencies
    bootstrapLayer.uses(contextLayer, dataLayer, infrastructureLayer);

    contextLayer.uses(dataLayer, infrastructureLayer);

    dataLayer.uses(infrastructureLayer);

    // Assemble
    assembleDomainLayer(dataLayer);
    assembleContextLayer(contextLayer);
    assembleBootstrapLayer(bootstrapLayer);
    assembleInfrastructureLayer(infrastructureLayer);

    return assembly;
  }
Beispiel #2
0
 private static LayerAssembly createInfrastructureLayer(ApplicationAssembly application)
     throws AssemblyException {
   LayerAssembly layer = application.layer("Infrastructure Layer");
   createWebServiceModule(layer);
   createPersistenceModule(layer);
   return layer;
 }
Beispiel #3
0
 private static LayerAssembly createDomainLayer(ApplicationAssembly application) {
   LayerAssembly layer = application.layer("Domain Layer");
   createCustomerDomainModule(layer);
   // :
   // :
   return layer;
 }
Beispiel #4
0
 // START SNIPPET: domainLayer
 private static LayerAssembly createDomainLayer(ApplicationAssembly app) {
   LayerAssembly layer = app.layer("domain-layer");
   createAccountModule(layer);
   createInventoryModule(layer);
   createReceivablesModule(layer);
   createPayablesModule(layer);
   return layer;
 }
Beispiel #5
0
 private static LayerAssembly createWebLayer(ApplicationAssembly application) {
   LayerAssembly layer = application.layer("Web Layer");
   createCustomerWebModule(layer);
   return layer;
 }
Beispiel #6
0
 private static LayerAssembly createPersistenceLayer(ApplicationAssembly app) {
   LayerAssembly layer = app.layer("persistence-layer");
   return layer;
 }
Beispiel #7
0
 private static LayerAssembly createMessagingLayer(ApplicationAssembly app) {
   LayerAssembly layer = app.layer("messaging-layer");
   return layer;
 }
Beispiel #8
0
 private static LayerAssembly createDesignerLayer(ApplicationAssembly app) {
   LayerAssembly layer = app.layer("designer-layer");
   return layer;
 }
Beispiel #9
0
 // END SNIPPET: main
 private static LayerAssembly createRuntimeLayer(ApplicationAssembly app) {
   LayerAssembly layer = app.layer("runtime-layer");
   return layer;
 }