Common Library

Shared Java library providing core abstractions, utilities, and infrastructure components for all ERP processor implementations (Folder, Kafka, Pub/Sub).

Purpose

Centralizes common functionality: - Eliminates code duplication across processor implementations - Provides standardized abstractions for message processing and error handling - Ensures consistency in configuration, entity management, and metrics collection - Facilitates maintenance through single source of truth

Note: JAR library module - not executable on its own.

Architecture

Template pattern approach - abstract base classes extended by implementations:

Diagram

Provided Resources

This module provides shared resources for all processor application modules to use:

Spring Context

All applications load comerzzia-*context.xml files in classpath for custom spring configuration.

Entities Configuration

The entities configuration is loaded from spring config configuration import property. The default value of ´spring.config.input´ is `classpath:entities-config.yml´.

Entities default configuration example
erp-to-czz:
  entities:
    - type: items
      name: Items
      service-bean: erpToCzzItemService
    - type: promotions
      name: Promotions
      service-bean: erpToCzzPromotionsService
    - type: rates
      name: Rates
      service-bean: erpToCzzRatesService
    - type: warehouse
      name: Warehouse
      service-bean: erpToCzzWarehouseService
    - type: sales
      name: Sales
      service-bean: erpToCzzSalesService
    - type: salesfiles
      name: SalesFiles
      service-bean: erpToCzzSalesFilesService
    - type: saleschannels
      name: SalesChannels
      service-bean: erpToCzzSaleschannelsService

Defines supported entities types and maps them to integration service beans from - Processor integration services.