Esempio n. 1
0
  private void assembleContextLayer(LayerAssembly contextLayer) throws AssemblyException {
    ModuleAssembly roleMapModule = contextLayer.module("CONTEXT-RoleMap");

    // Role-playing entities
    roleMapModule
        .entities(CargoRoleMap.class, CargosRoleMap.class, HandlingEventsRoleMap.class)
        .visibleIn(application);

    // Non-role-playing entities
    roleMapModule
        .entities(HandlingEventEntity.class, LocationEntity.class, VoyageEntity.class)
        .visibleIn(application);

    ModuleAssembly interactionModule = contextLayer.module("CONTEXT-Interaction");
    interactionModule.transients(ProcessHandlingEvent.class).visibleIn(application);

    ModuleAssembly contextServiceModule = contextLayer.module("CONTEXT-Service");
    contextServiceModule
        .addServices(
            ParseHandlingEventData.class,
            RoutingService.class,
            RouteSpecificationFactoryService.class)
        .visibleIn(application);

    contextServiceModule.values(ParsedHandlingEventData.class).visibleIn(application);
  }
Esempio n. 2
0
 private static void createCustomerWebModule(LayerAssembly layer) {
   ModuleAssembly assembly = layer.module("Customer Web Module");
   assembly.transients(CustomerViewComposite.class);
   assembly.transients(CustomerEditComposite.class);
   assembly.transients(CustomerListViewComposite.class);
   assembly.transients(CustomerSearchComposite.class);
 }
Esempio n. 3
0
  private void assembleBootstrapLayer(LayerAssembly bootstrapLayer) throws AssemblyException {
    ModuleAssembly bootstrapModule = bootstrapLayer.module("BOOTSTRAP-Bootstrap");

    // Load base data on startup
    bootstrapModule
        .addServices(BaseDataService.class)
        .visibleIn(application)
        .instantiateOnStartup();
  }
Esempio n. 4
0
  private void assembleInfrastructureLayer(LayerAssembly infrastructureLayer)
      throws AssemblyException {
    ModuleAssembly indexingModule = infrastructureLayer.module("INFRASTRUCTURE-Indexing");
    indexingModule.objects(EntityStateSerializer.class, EntityTypeSerializer.class);

    indexingModule
        .addServices(MemoryRepositoryService.class, RdfIndexingEngineService.class)
        .visibleIn(application);

    ModuleAssembly entityStoreModule = infrastructureLayer.module("INFRASTRUCTURE-EntityStore");
    entityStoreModule
        .addServices(MemoryEntityStoreService.class, UuidIdentityGeneratorService.class)
        .visibleIn(application);

    ModuleAssembly externalServiceModule =
        infrastructureLayer.module("INFRASTRUCTURE-ExternalService");
    externalServiceModule
        .importedServices(GraphTraversalService.class)
        .setMetaInfo(new GraphTraversalServiceImpl(new GraphDAO()))
        .visibleIn(application);
  }
Esempio n. 5
0
  // END SNIPPET: domainLayer
  // START SNIPPET: accountModule
  private static void createAccountModule(LayerAssembly layer) {
    ModuleAssembly module = layer.module("account-module");

    module.entities(AccountEntity.class, EntryEntity.class);

    module
        .addServices(
            AccountRepositoryService.class,
            AccountFactoryService.class,
            EntryFactoryService.class,
            EntryRepositoryService.class)
        .visibleIn(Visibility.layer);
  }
Esempio n. 6
0
 private void assembleDomainLayer(LayerAssembly dataLayer) throws AssemblyException {
   // Non-role-playing values
   ModuleAssembly structureModule = dataLayer.module("DATA-Structure");
   structureModule
       .values(
           TrackingId.class,
           RouteSpecification.class,
           Delivery.class,
           NextHandlingEvent.class,
           UnLocode.class,
           Itinerary.class,
           Leg.class,
           CarrierMovement.class,
           Schedule.class,
           VoyageNumber.class)
       .visibleIn(application);
 }
Esempio n. 7
0
 private static void createPersistenceModule(LayerAssembly layer) throws AssemblyException {
   ModuleAssembly assembly = layer.module("Persistence Module");
   // Someone has created an assembler for the Neo EntityStore
   NeoAssembler neo = new NeoAssembler("./neostore");
   neo.assemble(assembly);
 }
Esempio n. 8
0
 private static void createWebServiceModule(LayerAssembly layer) throws AssemblyException {
   ModuleAssembly assembly = layer.module("Web Service Module");
   // Someone has created an assembler for a Jetty Web Service.
   JettyAssembler jetty = new JettyAssembler(8080);
   jetty.assemble(assembly);
 }
Esempio n. 9
0
 private static void createCustomerDomainModule(LayerAssembly layer) {
   ModuleAssembly assembly = layer.module("Customer Domain Module");
   assembly.entities(CustomerEntity.class);
   assembly.entities(CountryEntity.class);
   assembly.transients(AddressComposite.class);
 }
Esempio n. 10
0
 private static void createReceivablesModule(LayerAssembly layer) {
   layer.module("receivables-module");
 }
Esempio n. 11
0
 private static void createInventoryModule(LayerAssembly layer) {
   layer.module("inventory-module");
 }
Esempio n. 12
0
 // END SNIPPET: accountModule
 private static void createPayablesModule(LayerAssembly layer) {
   layer.module("payables-module");
 }