Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOSIP-33037 : Updated readme for developer guide java21 #240

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@
# Print Service

## Overview
A reference implementation to print `euin`, `reprint`, `qrcode` [credential types](https://docs.mosip.io/1.2.0/modules/id-repository#credential-types) in PDF format. This service is intended to be custimized and used by a card printing agency who need to onboard onto MOSIP as [Credential Partner](https://docs.mosip.io/1.2.0/partners#credential-partner-cp) before deploying the service.
A reference implementation to print `euin`, `reprint`, `qrcode` [credential types](https://docs.mosip.io/1.2.0/modules/id-repository#credential-types) in PDF format. This service is intended to be customized and used by a card printing agency who need to onboard onto MOSIP as [Credential Partner](https://docs.mosip.io/1.2.0/partners#credential-partner-cp) before deploying the service.

![](docs/print-service.png)

1. Receives events from WebSub.
2. Fetches templates from Masterdata.
3. After creating PDF card print service upload the same to [Datashare](https://docs.mosip.io/1.2.0/modules/data-share).
4. Publishes event to WebSub with updated status and Datashare link.
3. After creating PDF card print service upload the same to [DataShare](https://docs.mosip.io/1.2.0/modules/data-share).
4. Publishes event to WebSub with updated status and DataShare link.

The card data in JSON format is publised as WebSub event. The print service consumes the data from event, decrypts using partner private key and converts into PDF using a predefined [template](docs/configuration.md#template).
The card data in JSON format is published as WebSub event. The print service consumes the data from event, decrypts using partner private key and converts into PDF using a predefined [template](docs/configuration.md#template).

## Build and run (for developers)
Refer [Build and Run](docs/build-and-run.md).

## Deploy
The deploy print service in production follow the given steps:
To deploy print service in production follow the given steps:

1. Onboard your organisation as [Credential Partner](https://docs.mosip.io/1.2.0/partners).
1. Place your `.p12` file in `../src/main/resources` folder.
1. Set configuration as in given [here](docs/configuation.md).
1. Build and run as given [here](docs/build-and-run.md).
2. Place your `.p12` file in `../src/main/resources` folder.
3. Set configuration as in given [here](docs/configuation.md).
4. Build and run as given [here](docs/build-and-run.md).

## Configuration
Refer to the [configuration guide](docs/configuration.md).

## Test
Automated functaionl tests available in [Functional Tests repo](https://github.com/mosip/mosip-functional-tests).
Automated functional tests available in [Functional Tests repo](https://github.com/mosip/mosip-functional-tests).

## License
This project is licensed under the terms of [Mozilla Public License 2.0](LICENSE).
8 changes: 4 additions & 4 deletions docs/build-and-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
Following tools required to run the print service locally.

1. _Ngrok_ to expose local port to remote to communicate with websub
1. Java 11.
1. [Config Server](https://docs.mosip.io/1.2.0/modules/module-configuration) running in respective environment.
2. The project requires Java 21 and mvn version - 3.9.6.
3. [Config Server](https://docs.mosip.io/1.2.0/modules/module-configuration) running in respective environment.

## Build
1. To build jars:
```
$ cd print
$ mvn clean install
```
1. To skip JUnit tests and Java Docs:
2. To skip JUnit tests and Java Docs:
```
$ mvn install -DskipTests=true -Dmaven.javadoc.skip=true
```
1. To build Docker for a service:
3. To build Docker for a service:
```
$ cd <service folder>
$ docker build -f Dockerfile
Expand Down
10 changes: 8 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Print Service Configuration Guide

## Overview
The guide here lists down some of the important properties that may be customised for a given installation. Note that the listing here is not exhaustive, but a checklist to review properties that are likely to be different from default. If you would like to see all the properites, then refer to the files listed below.
The guide here lists down some of the important properties that may be customised for a given installation. Note that the listing here is not exhaustive, but a checklist to review properties that are likely to be different from default. If you would like to see all the properties, then refer to the files listed below.

## Configuration files
Print service uses the following configuration files:
Expand All @@ -11,6 +11,12 @@ print-default.properties
registration-processor-print-text-file.json
identity-mapping.json
```
## Configuration
[Configuration-Application](https://github.com/mosip/mosip-config/blob/develop/application-default.properties),
[Configuration-Print](https://github.com/mosip/mosip-config/blob/develop/print-default.properties),
[Configuration-RegProcPrintTextFile](https://github.com/mosip/mosip-config/blob/develop/registration-processor-print-text-file.json) and
[Configuration-IdMapping](https://github.com/mosip/mosip-config/blob/develop/identity-mapping.json) defined here.

Refer [Module Configuration](https://docs.mosip.io/1.2.0/modules/module-configuration) for location of these files.

## Template
Expand All @@ -34,7 +40,7 @@ print-WebSub-resubscription-delay-millisecs = // resubscription delay time.
mosip.event.secret = //secret key
```

## Datashare
## DataShare
```
mosip.datashare.partner.id = /your partner id from partner portal
mosip.datashare.policy.id = /your policy id from partner portal
Expand Down