Documentation Index
Fetch the complete documentation index at: https://mintlify.com/idempiere/idempiere/llms.txt
Use this file to discover all available pages before exploring further.
Overview
iDempiere uses Eclipse’s plugin extension framework to provide extensibility throughout the system. Extension points allow plugins to contribute functionality without modifying core code.Extension Point Architecture
Extension points are defined in theplugin.xml file of the org.adempiere.base bundle. Each extension point has:
- ID: Unique identifier for the extension point
- Name: Human-readable name
- Schema: XML schema defining the structure (
.exsdfiles)
Core Extension Points
iDempiere provides several key extension points defined inorg.adempiere.base/plugin.xml:
Business Logic Extensions
- org.adempiere.base.IColumnCallout: Column callout implementations
- org.adempiere.base.Process: Business process implementations
- org.adempiere.base.ModelValidator: Model event listeners
Integration Extensions
- org.compiere.model.PaymentProcessor: Payment gateway integrations
- org.adempiere.model.ITaxProvider: Tax calculation services
- org.adempiere.model.IShipmentProcessor: Shipping carrier integrations
- org.adempiere.model.IAddressValidation: Address validation services
Data Exchange Extensions
- org.adempiere.base.IGridTabExporter: Grid data export formats
- org.adempiere.base.IGridTabImporter: Grid data import formats
Extension Point Definition
Fromorg.adempiere.base/plugin.xml:
Creating an Extension
1. Define Extension in plugin.xml
In your plugin’splugin.xml file:
2. Extension Attributes
Required Attributes:id: Unique identifier for your extensionpoint: The extension point ID you’re extendingclass: Fully qualified class name of your implementation
name: Human-readable namepriority: Numeric priority (higher values = higher priority, default: 0)
3. Priority System
When multiple extensions exist for the same extension point:- Higher priority values are selected first
- Extensions with equal priority are selected in load order
- Default priority is 0
Built-in Extensions
iDempiere includes several built-in extensions inplugin.xml:
Grid Data Exporters
Standard Tax Provider
Extension Discovery
iDempiere discovers extensions through:- OSGi Bundle Scanning: Reads
plugin.xmlfrom all active bundles - Extension Registry: Eclipse extension registry manages all extensions
- Factory Pattern: Core classes use factories to instantiate extensions
Example: Core Class Integration
Fromorg.compiere.model.PaymentProcessor:
Core class uses the extension registry to find and instantiate the appropriate implementation based on configuration.
Database Configuration
Many extensions are configured through database tables:- C_PaymentProcessor.PayProcessorClass: Payment processor class name
- C_TaxProvider.TaxProviderClass: Tax provider class name
- X_ShippingProcessor.ShippingProcessorClass: Shipment processor class name
class attribute.
Best Practices
Extension Design
- Single Responsibility: Each extension should have one clear purpose
- Loose Coupling: Depend on interfaces, not implementations
- Error Handling: Handle errors gracefully and provide meaningful messages
- Logging: Use iDempiere’s logging framework for debugging
Priority Management
- Use Default Priority (0): For most extensions
- Higher Priority (10+): Only for replacements of default implementations
- Document Priority: Explain why non-zero priority is needed
Testing
- Unit Tests: Test extension logic independently
- Integration Tests: Test within iDempiere environment
- Priority Testing: Test behavior with multiple implementations
Plugin Structure
A typical plugin bundle structure:Related Topics
- Payment Processors: Payment gateway integration
- Tax Providers: Tax calculation integration
- Shipment Processors: Shipping carrier integration
- Model Validators: Database event handling
- Callouts: UI field event handling