Esempio n. 1
0
 private static ApplicationAssembly createAssembly(ApplicationAssemblyFactory factory)
     throws AssemblyException {
   String applicationName = "Example Application";
   ApplicationAssembly app = factory.newApplicationAssembly();
   app.setName(applicationName);
   LayerAssembly webLayer = createWebLayer(app);
   LayerAssembly domainLayer = createDomainLayer(app);
   LayerAssembly infraLayer = createInfrastructureLayer(app);
   webLayer.uses(domainLayer);
   webLayer.uses(infraLayer); // Accesses the WebService
   domainLayer.uses(infraLayer); // For persistence
   return app;
 }
Esempio n. 2
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;
  }
Esempio n. 3
0
 private static LayerAssembly createInfrastructureLayer(ApplicationAssembly application)
     throws AssemblyException {
   LayerAssembly layer = application.layer("Infrastructure Layer");
   createWebServiceModule(layer);
   createPersistenceModule(layer);
   return layer;
 }
Esempio n. 4
0
 private static LayerAssembly createDomainLayer(ApplicationAssembly application) {
   LayerAssembly layer = application.layer("Domain Layer");
   createCustomerDomainModule(layer);
   // :
   // :
   return layer;
 }
Esempio n. 5
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;
 }
Esempio n. 6
0
 private static LayerAssembly createWebLayer(ApplicationAssembly application) {
   LayerAssembly layer = application.layer("Web Layer");
   createCustomerWebModule(layer);
   return layer;
 }
Esempio n. 7
0
 private static LayerAssembly createPersistenceLayer(ApplicationAssembly app) {
   LayerAssembly layer = app.layer("persistence-layer");
   return layer;
 }
Esempio n. 8
0
 private static LayerAssembly createMessagingLayer(ApplicationAssembly app) {
   LayerAssembly layer = app.layer("messaging-layer");
   return layer;
 }
Esempio n. 9
0
 private static LayerAssembly createDesignerLayer(ApplicationAssembly app) {
   LayerAssembly layer = app.layer("designer-layer");
   return layer;
 }
Esempio n. 10
0
 // END SNIPPET: main
 private static LayerAssembly createRuntimeLayer(ApplicationAssembly app) {
   LayerAssembly layer = app.layer("runtime-layer");
   return layer;
 }