Registration Client Developers Guide
Overview
Registration Client is a thick Java-based client where the resident's demographic and biometric details are captured along with the supporting documents in online or offline mode.
The documentation here will guide you through the prerequisites required for the developer' setup.
Software setup
Below are a list of tools required in Resident Services:
JDK 11
Any IDE (like Eclipse, IntelliJ IDEA)
Apache Maven (zip folder)
pgAdmin
Git
Notepad++ (optional)
Postman (optional)
lombok.jar (file)
settings.xml (document)
Follow the steps below to set up Registration Client on your local system:
Download
lombok.jar
andsettings.xml
from here.Unzip Apache Maven and move the unzipped folder in
C:\Program Files
andsettings.xml
toconf
folderC:\Program Files\apache-maven-3.8.4\conf
.Install Eclipse, open the
lombok.jar
file and wait for some time until it completes the scan for Eclipse IDE and then clickInstall/Update
.
Check the Eclipse installation folder
C:\Users\userName\eclipse\jee-2021-12\eclipse
to see if thelombok.jar
is added. By doing this, you don't have to add the dependency oflombok
in yourpom.xml
file separately as it is auto-configured by Eclipse.Configure the JDK (Standard VM) with your Eclipse by traversing through
Preferences → Java → Installed JREs
.
Code setup
For the code setup, clone the Registration Client repository and follow the guidelines mentioned in the Code Contributions.
Importing and building of a project
Open the project folder where
pom.xml
is present.Open command prompt from the same folder.
Run the command
mvn clean install -Dgpg.skip=true -DskipTests=true
to build the project and wait for the build to complete successfully.After building of a project, open Eclipse and select
Import Projects → Maven → Existing Maven Projects → Next → Browse to project directory → Finish
.After successful importing of project, update the project by right-click on
Project → Maven → Update Project
.
Environment setup
For the environment setup, you need an external dependency that is available here with different versions. (E.g.: You can download
mock-sdk.jar
and add to registration-services projectLibraries → Classpath → Add External JARs → Select Downloaded JAR → Add → Apply and Close
).
Registration Client UI is developed using JavaFX and the UI pages are fxml files which can be opened using a tool called
Scene Builder
. The JavaFX integration with the Eclipse IDE is provided with the e(fx)clipse tool. Go toHelp → Install New Software → Work with → Add
. Give Name and Location as mentioned in below image.
Once the software is installed, you will be prompted to restart your IDE.
Download
openjfx-11.0.2_windows-x64_bin-sdk.zip
from here, unzip and place it in your local file system. This folder contains list of javafx related jars that are necessary for running Registration Client UI.We can change the application environment in the file
registration-services\src\main\resources\props\mosip-application.properties
by modifying the propertymosip.hostname
Below are the configurations to be done in Eclipse:
Open Eclipse and run the project for one time as
Java application
, so that it creates a Java application which you can see in debug configurations.
Open the arguments and pass this
--module-path C:\Users\<USER_NAME>\Downloads\openjfx-11.0.2_windows-x64_bin-sdk\javafx-sdk-11.0.2\lib --add-modules=javafx.controls,javafx.fxml,javafx.base,javafx.web,javafx.swing,javafx.graphics --add-exports javafx.graphics/com.sun.javafx.application=ALL-UNNAMED
in VM arguments.
Click Apply and then debug it (starts running). You can see a popup which shows informative messages of what is happening in background while Registration Client UI is loading and the application will be launched.
Last updated