Add base interface and class that uses generic type and lambda function for osgi factory that create new instance by class name or a string key

Description

iDempiere have many OSGi factory that create the requested instance by class name or a string key (IProcessFactory, IModelValidatorFactory, IPaymentProcessorFactory, etc). This ticket add generic typed, lambda function based interface and class that help to simplify the development of such factory class.

New interface and class:

  1. org.adempiere.base.IMappedByNameFactory<T> interface

  2. org.adempiere.base.MappedByNameFactory<T> class (implements IMappedByNameFactory<T>)

Example Usage:

To add new implementation of BankStatementMatcherInterface.

  1. Create class that implement the BankStatementMatcherInterface interface

  2. Create factory class that implement the IBankStatementMatcherFactory interface.

Environment

None

Activity

Show:
Carlos Ruiz
February 17, 2021, 10:51 AM

Hi , the MappedByNameFactoryTest is throwing error in jenkins
https://jenkins.idempiere.org/job/iDempiereDaily/407/console
says:

Fixed

Assignee

Heng Sin Low

Reporter

Heng Sin Low

Labels

None

Tested By

None

Components

Fix versions

Priority

Major