Title: Message Title
|
|
|
|
|
|
To simplify the integration of the Mifos X Platform a Java based Client API is to be implemented.
This first evolution will cover all functions needed for individual lending.
This API will wrap all necessary REST calls and provides Domain Objects and a clean Object Oriented Interface for an Implementor to integrate the Mifos X Platform seamlessly.
Retrofit and OkHttp should be used to implement thes REST-Service handling.
The design pattern should follow these rules:
All classes a consumer is faced with are Interfaces, Factories or Domain Objects.
All implementations are located in a sub package internal and should not be used by a consumer.
The following package pattern should be used through out all code:
* org.mifos.sdk ** contains main interfaces, classes and exceptions * org.mifos.sdk.internal ** contains implementations for all interfaces * org.mifos.sdk.[module] ** contains all module specific interfaces (e.g. office, staff) * org.mifos.sdk.[module].domain ** contains all module specific domain objects * org.mifos.sdk.[module].internal ** contains all module specific implementations
For further details see attached UML diagram.
See the following sample code faced by a consumer: {code:title=Sample usage|borderStyle=solid} import org.mifos.sdk.MifosXClient; import org.mifos.sdk.MifosXClientFactory; import org.mifos.sdk.MifosXConnectException; import org.mifos.sdk.MifosXProperties; import org.mifos.sdk.MifosXResourceException; import org.mifos.sdk.office.OfficeService; import org.mifos.sdk.office.domain.Office; ... final MifosXProperties properties = MifosXProperties .url("http://demo.openmf.org") .tenant("default") .username("mifos") .password("password") .build();
final MifosXClient client = MifosXClientFactory.get(properties); try { client.login();
final OfficeService officeService = client.officeService(); final Office office = officeService.findOffice(1L);
client.logout(); } catch (final MifosXConnectException mcex) { System.out.println(mcex); } catch (MifosXResourceException mrex) { System.out.println(mrex); } ... {code}
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues