From 155ec985b2d0e0e8e8aaffa4fc549a362ddb42fd Mon Sep 17 00:00:00 2001 From: Sowmya Ujjappa Banakar <43202851+sowmya695@users.noreply.github.com> Date: Thu, 16 Feb 2023 20:07:05 +0530 Subject: [PATCH] Mosip 25748 1.1.5.5 (#1666) * MOSIP-22194 Code changes * updated debug statement to info MOSIP-25748 --------- Co-authored-by: Sowmya Ujjappa Banakar --- pom.xml | 324 +- registration-processor/core-processor/pom.xml | 52 +- .../pom.xml | 202 +- .../pom.xml | 226 +- .../registration-processor-abis/pom.xml | 228 +- .../pom.xml | 224 +- .../pom.xml | 234 +- .../pom.xml | 208 +- .../pom.xml | 288 +- .../pom.xml | 250 +- .../pom.xml | 226 +- .../uingenerator/stage/UinGeneratorStage.java | 2627 +++++++++-------- registration-processor/init/pom.xml | 38 +- .../pom.xml | 304 +- .../pom.xml | 134 +- registration-processor/pom.xml | 974 +++--- registration-processor/post-processor/pom.xml | 44 +- .../pom.xml | 238 +- .../pom.xml | 254 +- .../pom.xml | 144 +- registration-processor/pre-processor/pom.xml | 56 +- .../pom.xml | 180 +- .../pom.xml | 268 +- .../pom.xml | 224 +- .../pom.xml | 296 +- .../pom.xml | 278 +- .../pom.xml | 236 +- .../pom.xml | 244 +- .../pom.xml | 260 +- .../registration-processor-core/pom.xml | 442 +-- 30 files changed, 4853 insertions(+), 4850 deletions(-) diff --git a/pom.xml b/pom.xml index 058fde190e4..e6b3cd87f53 100644 --- a/pom.xml +++ b/pom.xml @@ -1,162 +1,162 @@ - - - - 4.0.0 - io.mosip - registration - 1.1.5.5-P3-rc1 - pom - - MOSIP Registration Parent POM - Mosip Registration Project - https://github.com/mosip/registration - - - MPL 2.0 - https://www.mozilla.org/en-US/MPL/2.0/ - - - - scm:git:git://github.com/mosip/registration.git - scm:git:ssh://github.com:mosip/registration.git - https://github.com/mosip/registration - HEAD - - - - Mosip - mosip.emailnotifier@gmail.com - io.mosip - https://github.com/mosip/registration - - - - - - ossrh - Central Repository - https://oss.sonatype.org/content/repositories/snapshots - default - - true - - - - central - Maven Central - default - https://repo1.maven.org/maven2 - - false - - - - - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - ossrh - https://oss.sonatype.org/ - false - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.2.0 - - - attach-javadocs - - jar - - - - - none - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - --pinentry-mode - loopback - - - - - - - pl.project13.maven - git-commit-id-plugin - 3.0.1 - - - get-the-git-infos - - revision - - validate - - - - true - ${project.build.outputDirectory}/git.properties - - ^git.build.(time|version)$ - ^git.commit.id.(abbrev|full)$ - - full - ${project.basedir}/.git - - - - - - - - - registration-processor - - + + + + 4.0.0 + io.mosip + registration + 1.1.5.5-P3-rc2 + pom + + MOSIP Registration Parent POM + Mosip Registration Project + https://github.com/mosip/registration + + + MPL 2.0 + https://www.mozilla.org/en-US/MPL/2.0/ + + + + scm:git:git://github.com/mosip/registration.git + scm:git:ssh://github.com:mosip/registration.git + https://github.com/mosip/registration + HEAD + + + + Mosip + mosip.emailnotifier@gmail.com + io.mosip + https://github.com/mosip/registration + + + + + + ossrh + Central Repository + https://oss.sonatype.org/content/repositories/snapshots + default + + true + + + + central + Maven Central + default + https://repo1.maven.org/maven2 + + false + + + + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://oss.sonatype.org/ + false + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + attach-javadocs + + jar + + + + + none + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + pl.project13.maven + git-commit-id-plugin + 3.0.1 + + + get-the-git-infos + + revision + + validate + + + + true + ${project.build.outputDirectory}/git.properties + + ^git.build.(time|version)$ + ^git.commit.id.(abbrev|full)$ + + full + ${project.basedir}/.git + + + + + + + + + registration-processor + + diff --git a/registration-processor/core-processor/pom.xml b/registration-processor/core-processor/pom.xml index a442ec28739..74aad240756 100644 --- a/registration-processor/core-processor/pom.xml +++ b/registration-processor/core-processor/pom.xml @@ -1,27 +1,27 @@ - - - 4.0.0 - pom - - io.mosip.registrationprocessor - registration-processor - 1.1.5.5-P3-rc1 - - 1.1.5.5-P3-rc1 - core-processor - core-processor - - UTF-8 - - - registration-processor-demo-dedupe-stage - registration-processor-bio-dedupe-stage - registration-processor-uin-generator-stage - registration-processor-abis - registration-processor-manual-verification-stage - registration-processor-reprocessor-stage - registration-processor-abis-handler-stage - registration-processor-abis-middleware-stage - registration-processor-biometric-authentication-stage - + + + 4.0.0 + pom + + io.mosip.registrationprocessor + registration-processor + 1.1.5.5-P3-rc2 + + 1.1.5.5-P3-rc2 + core-processor + core-processor + + UTF-8 + + + registration-processor-demo-dedupe-stage + registration-processor-bio-dedupe-stage + registration-processor-uin-generator-stage + registration-processor-abis + registration-processor-manual-verification-stage + registration-processor-reprocessor-stage + registration-processor-abis-handler-stage + registration-processor-abis-middleware-stage + registration-processor-biometric-authentication-stage + \ No newline at end of file diff --git a/registration-processor/core-processor/registration-processor-abis-handler-stage/pom.xml b/registration-processor/core-processor/registration-processor-abis-handler-stage/pom.xml index e3146ab6400..2ee78dbcd7e 100644 --- a/registration-processor/core-processor/registration-processor-abis-handler-stage/pom.xml +++ b/registration-processor/core-processor/registration-processor-abis-handler-stage/pom.xml @@ -1,102 +1,102 @@ - - - 4.0.0 - - io.mosip.registrationprocessor - core-processor - 1.1.5.5-P3-rc1 - - - registration-processor-abis-handler-stage - 1.1.5.5-P3-rc1 - - UTF-8 - UTF-8 - - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - 1.4.195 - - - - - - org.springframework - spring-context - ${spring-framework.version} - - - org.springframework - spring-tx - ${spring-framework.version} - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - + + + 4.0.0 + + io.mosip.registrationprocessor + core-processor + 1.1.5.5-P3-rc2 + + + registration-processor-abis-handler-stage + 1.1.5.5-P3-rc2 + + UTF-8 + UTF-8 + + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + 1.4.195 + + + + + + org.springframework + spring-context + ${spring-framework.version} + + + org.springframework + spring-tx + ${spring-framework.version} + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + \ No newline at end of file diff --git a/registration-processor/core-processor/registration-processor-abis-middleware-stage/pom.xml b/registration-processor/core-processor/registration-processor-abis-middleware-stage/pom.xml index 1bfed2adaf6..f88a20ac9d3 100644 --- a/registration-processor/core-processor/registration-processor-abis-middleware-stage/pom.xml +++ b/registration-processor/core-processor/registration-processor-abis-middleware-stage/pom.xml @@ -1,113 +1,113 @@ - - - 4.0.0 - - io.mosip.registrationprocessor - core-processor - 1.1.5.5-P3-rc1 - - registration-processor-abis-middleware-stage - 1.1.5.5-P3-rc1 - - UTF-8 - UTF-8 - - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.springframework.boot - spring-boot-starter-actuator - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - 1.4.195 - - - - - - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - - + + + 4.0.0 + + io.mosip.registrationprocessor + core-processor + 1.1.5.5-P3-rc2 + + registration-processor-abis-middleware-stage + 1.1.5.5-P3-rc2 + + UTF-8 + UTF-8 + + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.springframework.boot + spring-boot-starter-actuator + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + 1.4.195 + + + + + + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + + diff --git a/registration-processor/core-processor/registration-processor-abis/pom.xml b/registration-processor/core-processor/registration-processor-abis/pom.xml index 3e90bbeb80d..f3734626e43 100644 --- a/registration-processor/core-processor/registration-processor-abis/pom.xml +++ b/registration-processor/core-processor/registration-processor-abis/pom.xml @@ -1,114 +1,114 @@ - - - 4.0.0 - jar - - - io.mosip.registrationprocessor - core-processor - 1.1.5.5-P3-rc1 - - registration-processor-abis - 1.1.5.5-P3-rc1 - registration-processor-abis - - UTF-8 - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - ${h2.version} - - - - - - junit - junit - test - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-test - - - io.springfox - springfox-swagger-ui - ${swagger.version} - - - io.springfox - springfox-swagger2 - ${swagger.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - com.h2database - h2 - - - org.postgresql - postgresql - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - + + + 4.0.0 + jar + + + io.mosip.registrationprocessor + core-processor + 1.1.5.5-P3-rc2 + + registration-processor-abis + 1.1.5.5-P3-rc2 + registration-processor-abis + + UTF-8 + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + ${h2.version} + + + + + + junit + junit + test + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-test + + + io.springfox + springfox-swagger-ui + ${swagger.version} + + + io.springfox + springfox-swagger2 + ${swagger.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + com.h2database + h2 + + + org.postgresql + postgresql + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + diff --git a/registration-processor/core-processor/registration-processor-bio-dedupe-stage/pom.xml b/registration-processor/core-processor/registration-processor-bio-dedupe-stage/pom.xml index 9e7cfc59876..1238f1644f8 100644 --- a/registration-processor/core-processor/registration-processor-bio-dedupe-stage/pom.xml +++ b/registration-processor/core-processor/registration-processor-bio-dedupe-stage/pom.xml @@ -1,112 +1,112 @@ - - - 4.0.0 - - io.mosip.registrationprocessor - core-processor - 1.1.5.5-P3-rc1 - - - registration-processor-bio-dedupe-stage - 1.1.5.5-P3-rc1 - - UTF-8 - UTF-8 - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - 1.4.195 - - - - - - org.springframework - spring-context - ${spring-framework.version} - - - org.springframework - spring-tx - ${spring-framework.version} - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - io.mosip.registrationprocessor - registration-processor-bio-dedupe-service-impl - ${packet.bio.dedupe.service.impl.version} - - - junit - junit - test - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - - + + + 4.0.0 + + io.mosip.registrationprocessor + core-processor + 1.1.5.5-P3-rc2 + + + registration-processor-bio-dedupe-stage + 1.1.5.5-P3-rc2 + + UTF-8 + UTF-8 + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + 1.4.195 + + + + + + org.springframework + spring-context + ${spring-framework.version} + + + org.springframework + spring-tx + ${spring-framework.version} + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + io.mosip.registrationprocessor + registration-processor-bio-dedupe-service-impl + ${packet.bio.dedupe.service.impl.version} + + + junit + junit + test + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + + diff --git a/registration-processor/core-processor/registration-processor-biometric-authentication-stage/pom.xml b/registration-processor/core-processor/registration-processor-biometric-authentication-stage/pom.xml index 2d57df60df5..5f361d74032 100644 --- a/registration-processor/core-processor/registration-processor-biometric-authentication-stage/pom.xml +++ b/registration-processor/core-processor/registration-processor-biometric-authentication-stage/pom.xml @@ -1,117 +1,117 @@ - - - 4.0.0 - - io.mosip.registrationprocessor - core-processor - 1.1.5.5-P3-rc1 - - registration-processor-biometric-authentication-stage - 1.1.5.5-P3-rc1 - - UTF-8 - UTF-8 - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - ${h2.version} - - - - - - org.springframework - spring-context - ${spring-framework.version} - - - org.springframework - spring-tx - ${spring-framework.version} - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - io.mosip.kernel - kernel-templatemanager-velocity - ${kernel.templatemanager.velocity.version} - - - javax.servlet - servlet-api - - - dom4j - dom4j - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - - + + + 4.0.0 + + io.mosip.registrationprocessor + core-processor + 1.1.5.5-P3-rc2 + + registration-processor-biometric-authentication-stage + 1.1.5.5-P3-rc2 + + UTF-8 + UTF-8 + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + ${h2.version} + + + + + + org.springframework + spring-context + ${spring-framework.version} + + + org.springframework + spring-tx + ${spring-framework.version} + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + io.mosip.kernel + kernel-templatemanager-velocity + ${kernel.templatemanager.velocity.version} + + + javax.servlet + servlet-api + + + dom4j + dom4j + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + + diff --git a/registration-processor/core-processor/registration-processor-demo-dedupe-stage/pom.xml b/registration-processor/core-processor/registration-processor-demo-dedupe-stage/pom.xml index 8b74026717a..076b53e5a87 100644 --- a/registration-processor/core-processor/registration-processor-demo-dedupe-stage/pom.xml +++ b/registration-processor/core-processor/registration-processor-demo-dedupe-stage/pom.xml @@ -1,104 +1,104 @@ - - 4.0.0 - - io.mosip.registrationprocessor - core-processor - 1.1.5.5-P3-rc1 - - registration-processor-demo-dedupe-stage - 1.1.5.5-P3-rc1 - - UTF-8 - UTF-8 - - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - ${h2.version} - - - - - - org.springframework - spring-context - ${spring-framework.version} - - - org.springframework - spring-tx - ${spring-framework.version} - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - - + + 4.0.0 + + io.mosip.registrationprocessor + core-processor + 1.1.5.5-P3-rc2 + + registration-processor-demo-dedupe-stage + 1.1.5.5-P3-rc2 + + UTF-8 + UTF-8 + + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + ${h2.version} + + + + + + org.springframework + spring-context + ${spring-framework.version} + + + org.springframework + spring-tx + ${spring-framework.version} + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + + diff --git a/registration-processor/core-processor/registration-processor-manual-verification-stage/pom.xml b/registration-processor/core-processor/registration-processor-manual-verification-stage/pom.xml index 5468193cf84..6b7d6834910 100644 --- a/registration-processor/core-processor/registration-processor-manual-verification-stage/pom.xml +++ b/registration-processor/core-processor/registration-processor-manual-verification-stage/pom.xml @@ -1,144 +1,144 @@ - - - 4.0.0 - jar - - io.mosip.registrationprocessor - core-processor - 1.1.5.5-P3-rc1 - - - registration-processor-manual-verification-stage - 1.1.5.5-P3-rc1 - - UTF-8 - - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.springframework.boot - spring-boot-starter-actuator - - - com.h2database - h2 - 1.4.195 - - - - - - - org.apache.httpcomponents - httpmime - 4.3.1 - - - org.springframework - spring-context - 5.0.6.RELEASE - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - junit - junit - test - ${junit.version} - - - io.springfox - springfox-swagger-ui - ${swagger.version} - - - io.springfox - springfox-swagger2 - ${swagger.version} - - - org.postgresql - postgresql - - - com.h2database - h2 - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - org.scala-lang - scala-library - 2.11.0 - - - io.mosip.kernel - kernel-core - ${kernel.core.version} - - - org.mockito - mockito-core - ${mockito.version} - test - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - + + + 4.0.0 + jar + + io.mosip.registrationprocessor + core-processor + 1.1.5.5-P3-rc2 + + + registration-processor-manual-verification-stage + 1.1.5.5-P3-rc2 + + UTF-8 + + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.springframework.boot + spring-boot-starter-actuator + + + com.h2database + h2 + 1.4.195 + + + + + + + org.apache.httpcomponents + httpmime + 4.3.1 + + + org.springframework + spring-context + 5.0.6.RELEASE + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + junit + junit + test + ${junit.version} + + + io.springfox + springfox-swagger-ui + ${swagger.version} + + + io.springfox + springfox-swagger2 + ${swagger.version} + + + org.postgresql + postgresql + + + com.h2database + h2 + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + org.scala-lang + scala-library + 2.11.0 + + + io.mosip.kernel + kernel-core + ${kernel.core.version} + + + org.mockito + mockito-core + ${mockito.version} + test + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + diff --git a/registration-processor/core-processor/registration-processor-reprocessor-stage/pom.xml b/registration-processor/core-processor/registration-processor-reprocessor-stage/pom.xml index 7ed6ea30724..84f6dd5cde2 100644 --- a/registration-processor/core-processor/registration-processor-reprocessor-stage/pom.xml +++ b/registration-processor/core-processor/registration-processor-reprocessor-stage/pom.xml @@ -1,125 +1,125 @@ - - - 4.0.0 - - io.mosip.registrationprocessor - core-processor - 1.1.5.5-P3-rc1 - - registration-processor-reprocessor-stage - 1.1.5.5-P3-rc1 - registration-processor-reprocessor-stage - - UTF-8 - UTF-8 - - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - org.springframework - spring-context - - - org.springframework - spring-tx - - - - io.vertx - vertx-core - ${vertx.version} - - - - io.vertx - vertx-lang-ceylon - 3.4.1 - - - org.ceylon-lang - ceylon-complete - - - - - - org.ceylon-lang - ceylon-complete - 1.3.2 - - - com.fasterxml.jackson.core - jackson-databind - 2.9.4 - - - com.fasterxml.jackson.core - jackson-core - 2.9.4 - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.vertx - vertx-unit - ${vertx.version} - test - - - org.mockito - mockito-core - test - - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - 1.4.195 - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - + + + 4.0.0 + + io.mosip.registrationprocessor + core-processor + 1.1.5.5-P3-rc2 + + registration-processor-reprocessor-stage + 1.1.5.5-P3-rc2 + registration-processor-reprocessor-stage + + UTF-8 + UTF-8 + + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + org.springframework + spring-context + + + org.springframework + spring-tx + + + + io.vertx + vertx-core + ${vertx.version} + + + + io.vertx + vertx-lang-ceylon + 3.4.1 + + + org.ceylon-lang + ceylon-complete + + + + + + org.ceylon-lang + ceylon-complete + 1.3.2 + + + com.fasterxml.jackson.core + jackson-databind + 2.9.4 + + + com.fasterxml.jackson.core + jackson-core + 2.9.4 + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.vertx + vertx-unit + ${vertx.version} + test + + + org.mockito + mockito-core + test + + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + 1.4.195 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + diff --git a/registration-processor/core-processor/registration-processor-uin-generator-stage/pom.xml b/registration-processor/core-processor/registration-processor-uin-generator-stage/pom.xml index 6bc5abc5e29..b7a3f87f377 100644 --- a/registration-processor/core-processor/registration-processor-uin-generator-stage/pom.xml +++ b/registration-processor/core-processor/registration-processor-uin-generator-stage/pom.xml @@ -1,113 +1,113 @@ - - 4.0.0 - - io.mosip.registrationprocessor - core-processor - 1.1.5.5-P3-rc1 - - registration-processor-uin-generator-stage - 1.1.5.5-P3-rc1 - - UTF-8 - UTF-8 - - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - 1.4.195 - - - - - - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - io.mosip.registrationprocessor - registration-processor-packet-manager - ${packet.manager.version} - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - - + + 4.0.0 + + io.mosip.registrationprocessor + core-processor + 1.1.5.5-P3-rc2 + + registration-processor-uin-generator-stage + 1.1.5.5-P3-rc2 + + UTF-8 + UTF-8 + + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + 1.4.195 + + + + + + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + io.mosip.registrationprocessor + registration-processor-packet-manager + ${packet.manager.version} + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + + diff --git a/registration-processor/core-processor/registration-processor-uin-generator-stage/src/main/java/io/mosip/registration/processor/stages/uingenerator/stage/UinGeneratorStage.java b/registration-processor/core-processor/registration-processor-uin-generator-stage/src/main/java/io/mosip/registration/processor/stages/uingenerator/stage/UinGeneratorStage.java index 1af5e93243d..34ed8edbb17 100644 --- a/registration-processor/core-processor/registration-processor-uin-generator-stage/src/main/java/io/mosip/registration/processor/stages/uingenerator/stage/UinGeneratorStage.java +++ b/registration-processor/core-processor/registration-processor-uin-generator-stage/src/main/java/io/mosip/registration/processor/stages/uingenerator/stage/UinGeneratorStage.java @@ -1,1312 +1,1315 @@ -package io.mosip.registration.processor.stages.uingenerator.stage; - -import java.io.IOException; -import java.security.NoSuchAlgorithmException; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.exception.ExceptionUtils; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONTokener; -import org.json.simple.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.core.env.Environment; -import org.springframework.http.MediaType; -import org.springframework.stereotype.Service; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.HttpServerErrorException; - -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.gson.Gson; - -import io.mosip.kernel.biometrics.entities.BiometricRecord; -import io.mosip.kernel.core.cbeffutil.spi.CbeffUtil; -import io.mosip.kernel.core.http.RequestWrapper; -import io.mosip.kernel.core.logger.spi.Logger; -import io.mosip.kernel.core.util.CryptoUtil; -import io.mosip.kernel.core.util.DateUtils; -import io.mosip.kernel.core.util.HMACUtils2; -import io.mosip.kernel.core.util.StringUtils; -import io.mosip.registration.processor.core.abstractverticle.MessageBusAddress; -import io.mosip.registration.processor.core.abstractverticle.MessageDTO; -import io.mosip.registration.processor.core.abstractverticle.MosipEventBus; -import io.mosip.registration.processor.core.abstractverticle.MosipRouter; -import io.mosip.registration.processor.core.abstractverticle.MosipVerticleAPIManager; -import io.mosip.registration.processor.core.code.ApiName; -import io.mosip.registration.processor.core.code.ModuleName; -import io.mosip.registration.processor.core.code.RegistrationExceptionTypeCode; -import io.mosip.registration.processor.core.code.RegistrationTransactionStatusCode; -import io.mosip.registration.processor.core.code.RegistrationTransactionTypeCode; -import io.mosip.registration.processor.core.common.rest.dto.ErrorDTO; -import io.mosip.registration.processor.core.constant.EventId; -import io.mosip.registration.processor.core.constant.EventName; -import io.mosip.registration.processor.core.constant.EventType; -import io.mosip.registration.processor.core.constant.LoggerFileConstant; -import io.mosip.registration.processor.core.constant.MappingJsonConstants; -import io.mosip.registration.processor.core.constant.ProviderStageName; -import io.mosip.registration.processor.core.constant.VidType; -import io.mosip.registration.processor.core.exception.ApisResourceAccessException; -import io.mosip.registration.processor.core.exception.PacketManagerException; -import io.mosip.registration.processor.core.exception.RegistrationProcessorCheckedException; -import io.mosip.registration.processor.core.exception.util.PlatformErrorMessages; -import io.mosip.registration.processor.core.exception.util.PlatformSuccessMessages; -import io.mosip.registration.processor.core.http.ResponseWrapper; -import io.mosip.registration.processor.core.idrepo.dto.Documents; -import io.mosip.registration.processor.core.idrepo.dto.VidsInfosDTO; -import io.mosip.registration.processor.core.logger.LogDescription; -import io.mosip.registration.processor.core.logger.RegProcessorLogger; -import io.mosip.registration.processor.core.spi.restclient.RegistrationProcessorRestClientService; -import io.mosip.registration.processor.core.status.util.StatusUtil; -import io.mosip.registration.processor.core.status.util.TrimExceptionMessage; -import io.mosip.registration.processor.core.util.JsonUtil; -import io.mosip.registration.processor.core.util.RegistrationExceptionMapperUtil; -import io.mosip.registration.processor.packet.manager.idreposervice.IdRepoService; -import io.mosip.registration.processor.packet.storage.dto.Document; -import io.mosip.registration.processor.packet.storage.entity.RegLostUinDetEntity; -import io.mosip.registration.processor.packet.storage.repository.BasePacketRepository; -import io.mosip.registration.processor.packet.storage.utils.ABISHandlerUtil; -import io.mosip.registration.processor.packet.storage.utils.BIRConverter; -import io.mosip.registration.processor.packet.storage.utils.IdSchemaUtil; -import io.mosip.registration.processor.packet.storage.utils.PriorityBasedPacketManagerService; -import io.mosip.registration.processor.packet.storage.utils.Utilities; -import io.mosip.registration.processor.rest.client.audit.builder.AuditLogRequestBuilder; -import io.mosip.registration.processor.stages.uingenerator.constants.UINConstants; -import io.mosip.registration.processor.stages.uingenerator.dto.UinDto; -import io.mosip.registration.processor.stages.uingenerator.dto.UinGenResponseDto; -import io.mosip.registration.processor.stages.uingenerator.dto.UinRequestDto; -import io.mosip.registration.processor.stages.uingenerator.dto.UinResponseDto; -import io.mosip.registration.processor.stages.uingenerator.dto.VidRequestDto; -import io.mosip.registration.processor.stages.uingenerator.dto.VidResponseDto; -import io.mosip.registration.processor.stages.uingenerator.exception.VidCreationException; -import io.mosip.registration.processor.stages.uingenerator.exception.VidServiceFailedException; -import io.mosip.registration.processor.stages.uingenerator.idrepo.dto.IdRequestDto; -import io.mosip.registration.processor.stages.uingenerator.idrepo.dto.IdResponseDTO; -import io.mosip.registration.processor.stages.uingenerator.idrepo.dto.RequestDto; -import io.mosip.registration.processor.stages.uingenerator.util.UinStatusMessage; -import io.mosip.registration.processor.status.code.RegistrationStatusCode; -import io.mosip.registration.processor.status.code.RegistrationType; -import io.mosip.registration.processor.status.dto.InternalRegistrationStatusDto; -import io.mosip.registration.processor.status.dto.RegistrationStatusDto; -import io.mosip.registration.processor.status.service.RegistrationStatusService; - -/** - * The Class UinGeneratorStage. - * - * @author Ranjitha Siddegowda - * @author Rishabh Keshari - */ -@Service -public class UinGeneratorStage extends MosipVerticleAPIManager { - - /** The reg proc logger. */ - private static Logger regProcLogger = RegProcessorLogger.getLogger(UinGeneratorStage.class); - private static final String OLD_APPLICATION_ID = "IDR-IDC-011"; - private static final String RECORD_ALREADY_EXISTS_ERROR = "IDR-IDC-012"; - - - @Autowired - private Environment env; - - @Autowired - private IdRepoService idRepoService; - - /** The mosip event bus. */ - MosipEventBus mosipEventBus = null; - - @Value("${registration.processor.id.repo.vidType}") - private String vidType; - - @Value("${mosip.commons.packet.manager.schema.validator.convertIdSchemaToDouble:true}") - private boolean convertIdschemaToDouble; - - /** The cluster manager url. */ - @Value("${vertx.cluster.configuration}") - private String clusterManagerUrl; - - /** The id repo create. */ - @Value("${registration.processor.id.repo.create}") - private String idRepoCreate; - - /** The id repo update. */ - @Value("${registration.processor.id.repo.update}") - private String idRepoUpdate; - - /** server port number. */ - @Value("${server.port}") - private String port; - - /** worker pool size. */ - @Value("${worker.pool.size}") - private Integer workerPoolSize; - - /** After this time intervel, message should be considered as expired (In seconds). */ - @Value("${mosip.regproc.uin.generator.message.expiry-time-limit}") - private Long messageExpiryTimeLimit; - - @Value("${mosip.idrepo.create-identity.enable-force-merge:false}") - private boolean idRepoForceMergeEnabled; - - /** The core audit request builder. */ - @Autowired - private AuditLogRequestBuilder auditLogRequestBuilder; - - /** Mosip router for APIs */ - @Autowired - private MosipRouter router; - - @Autowired - private ObjectMapper mapper; - - /** The registration processor rest client service. */ - @Autowired - RegistrationProcessorRestClientService registrationProcessorRestClientService; - - /** The demographic dedupe repository. */ - @Autowired - private BasePacketRepository regLostUinDetEntity; - - /** The registration status service. */ - @Autowired - private RegistrationStatusService registrationStatusService; - - /** The utility. */ - @Autowired - private Utilities utility; - - @Autowired - private CbeffUtil cbeffutil; - - @Autowired - private RegistrationExceptionMapperUtil registrationStatusMapperUtil; - - @Autowired - private ABISHandlerUtil aBISHandlerUtil; - - @Autowired - private PriorityBasedPacketManagerService packetManagerService; - - @Autowired - private IdSchemaUtil idSchemaUtil; - - private TrimExceptionMessage trimExceptionMessage = new TrimExceptionMessage(); - - /* - * (non-Javadoc) - * - * @see - * io.mosip.registration.processor.core.spi.eventbus.EventBusManager#process( - * java.lang.Object) - */ - @SuppressWarnings("unchecked") - @Override - public MessageDTO process(MessageDTO object) { - boolean isTransactionSuccessful = Boolean.FALSE; - object.setMessageBusAddress(MessageBusAddress.UIN_GENERATION_BUS_IN); - object.setInternalError(Boolean.FALSE); - object.setIsValid(true); - LogDescription description = new LogDescription(); - String registrationId = object.getRid(); - regProcLogger.debug(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, "UinGeneratorStage::process()::entry"); - UinGenResponseDto uinResponseDto = null; - - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, "Started processing rid in UinGeneratorStage"); - - InternalRegistrationStatusDto registrationStatusDto = registrationStatusService.getRegistrationStatus(registrationId); - try { - registrationStatusDto - .setLatestTransactionTypeCode(RegistrationTransactionTypeCode.UIN_GENERATOR.toString()); - registrationStatusDto.setRegistrationStageName(this.getClass().getSimpleName()); - - if ((RegistrationType.LOST.toString()).equalsIgnoreCase(object.getReg_type().name())) { - String lostPacketRegId = object.getRid(); - String matchedRegId = regLostUinDetEntity.getLostUinMatchedRegId(lostPacketRegId); - if (matchedRegId != null) { - linkRegIdWrtUin(lostPacketRegId, matchedRegId, registrationStatusDto.getRegistrationType(), object, description); - } - - } else { - - IdResponseDTO idResponseDTO = new IdResponseDTO(); - String schemaVersion = packetManagerService.getFieldByMappingJsonKey(registrationId, MappingJsonConstants.IDSCHEMA_VERSION, registrationStatusDto.getRegistrationType(), ProviderStageName.UIN_GENERATOR); - - Map fieldMap = packetManagerService.getFields(registrationId, - idSchemaUtil.getDefaultFields(Double.valueOf(schemaVersion)), registrationStatusDto.getRegistrationType(), ProviderStageName.UIN_GENERATOR); - String uinField = fieldMap.get(utility.getMappingJsonValue(MappingJsonConstants.UIN, MappingJsonConstants.IDENTITY)); - - String dateOfBirth = fieldMap - .get(utility.getMappingJsonValue(MappingJsonConstants.DOB, MappingJsonConstants.IDENTITY)); - if (dateOfBirth != null && !dateOfBirth.isEmpty()) { - regProcLogger.debug(LoggerFileConstant.SESSIONID.toString(), - LoggerFileConstant.REGISTRATIONID.toString(), registrationId, - "UinGeneratorStage::process()::Before calling ID-repo api date of birth hash: " - + getHMACHashCode(dateOfBirth)); - } - JSONObject demographicIdentity = new JSONObject(); - demographicIdentity.put(MappingJsonConstants.IDSCHEMA_VERSION, convertIdschemaToDouble ? Double.valueOf(schemaVersion) : schemaVersion); - - loadDemographicIdentity(fieldMap, demographicIdentity); - - if (StringUtils.isEmpty(uinField) || uinField.equalsIgnoreCase("null") ) { - - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, "Calling UINGENERATOR API to get unused uin"); - - String test = (String) registrationProcessorRestClientService.getApi(ApiName.UINGENERATOR, null, "", - "", String.class); - - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, "Received response from UINGENERATOR API"); - - Gson gsonObj = new Gson(); - uinResponseDto = gsonObj.fromJson(test, UinGenResponseDto.class); - - uinField = uinResponseDto.getResponse().getUin(); - demographicIdentity.put("UIN", uinField); - - idResponseDTO = sendIdRepoWithUin(registrationId, registrationStatusDto.getRegistrationType(), demographicIdentity, - uinField, description); - - boolean isUinAlreadyPresent = isUinAlreadyPresent(idResponseDTO, registrationId); - - if (isIdResponseNotNull(idResponseDTO) || isUinAlreadyPresent) { - - if(idRepoForceMergeEnabled && isUinAlreadyPresent) { - handleForceMerge(object, isTransactionSuccessful, description, registrationId, - uinResponseDto, registrationStatusDto, demographicIdentity, isUinAlreadyPresent); - - }else { - handleIdRepoSuccessResponse(registrationStatusDto, registrationId, isUinAlreadyPresent, isTransactionSuccessful, uinResponseDto, object, description); - } - - }else { - handleIdRepoErrorResponse(idResponseDTO, registrationStatusDto, registrationId, isTransactionSuccessful, uinResponseDto, object, description); - } - - }else { - if ((RegistrationType.ACTIVATED.toString()).equalsIgnoreCase(object.getReg_type().toString())) { - isTransactionSuccessful = reActivateUin(idResponseDTO, registrationId, uinField, object, - demographicIdentity, description); - } else if ((RegistrationType.DEACTIVATED.toString()) - .equalsIgnoreCase(object.getReg_type().toString())) { - idResponseDTO = deactivateUin(registrationId, uinField, object, demographicIdentity, - description); - } else if (RegistrationType.UPDATE.toString().equalsIgnoreCase(object.getReg_type().toString()) - || (RegistrationType.RES_UPDATE.toString() - .equalsIgnoreCase(object.getReg_type().toString()))) { - isTransactionSuccessful = uinUpdate(registrationId, registrationStatusDto.getRegistrationType(), uinField, object, demographicIdentity, - description); - } - } - - } - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, description.getMessage()); - registrationStatusDto.setUpdatedBy(UINConstants.USER); - - } catch (io.mosip.kernel.core.util.exception.JsonProcessingException e) { - regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, - RegistrationStatusCode.FAILED.toString() + e.getMessage() + ExceptionUtils.getStackTrace(e)); - registrationStatusDto.setStatusCode(RegistrationStatusCode.FAILED.toString()); - registrationStatusDto.setStatusComment( - trimExceptionMessage.trimExceptionMessage(StatusUtil.JSON_PARSING_EXCEPTION.getMessage() + e.getMessage())); - registrationStatusDto.setSubStatusCode(StatusUtil.JSON_PARSING_EXCEPTION.getCode()); - registrationStatusDto.setLatestTransactionStatusCode( - registrationStatusMapperUtil.getStatusCode(RegistrationExceptionTypeCode.JSON_PROCESSING_EXCEPTION)); - isTransactionSuccessful = false; - description.setMessage(PlatformErrorMessages.RPR_SYS_JSON_PARSING_EXCEPTION.getMessage()); - description.setCode(PlatformErrorMessages.RPR_SYS_JSON_PARSING_EXCEPTION.getCode()); - object.setIsValid(Boolean.FALSE); - object.setInternalError(Boolean.TRUE); - object.setRid(registrationStatusDto.getRegistrationId()); - e.printStackTrace(); - } catch (PacketManagerException e) { - regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, - RegistrationStatusCode.FAILED.toString() + e.getMessage() + ExceptionUtils.getStackTrace(e)); - registrationStatusDto.setStatusCode(RegistrationStatusCode.PROCESSING.name()); - registrationStatusDto.setStatusComment( - trimExceptionMessage.trimExceptionMessage(StatusUtil.PACKET_MANAGER_EXCEPTION.getMessage() + e.getMessage())); - registrationStatusDto.setSubStatusCode(StatusUtil.PACKET_MANAGER_EXCEPTION.getCode()); - registrationStatusDto.setLatestTransactionStatusCode( - registrationStatusMapperUtil.getStatusCode(RegistrationExceptionTypeCode.PACKET_MANAGER_EXCEPTION)); - description.setMessage(PlatformErrorMessages.PACKET_MANAGER_EXCEPTION.getMessage()); - description.setCode(PlatformErrorMessages.PACKET_MANAGER_EXCEPTION.getCode()); - object.setIsValid(Boolean.FALSE); - object.setInternalError(Boolean.TRUE); - object.setRid(registrationStatusDto.getRegistrationId()); - } catch (ApisResourceAccessException ex) { - registrationStatusDto.setStatusCode(RegistrationStatusCode.PROCESSING.name()); - registrationStatusDto.setStatusComment(trimExceptionMessage - .trimExceptionMessage(StatusUtil.API_RESOUCE_ACCESS_FAILED.getMessage() + ex.getMessage())); - registrationStatusDto.setSubStatusCode(StatusUtil.API_RESOUCE_ACCESS_FAILED.getCode()); - registrationStatusDto.setLatestTransactionStatusCode(registrationStatusMapperUtil - .getStatusCode(RegistrationExceptionTypeCode.APIS_RESOURCE_ACCESS_EXCEPTION)); - regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, - RegistrationStatusCode.FAILED.toString() + ex.getMessage() + ExceptionUtils.getStackTrace(ex)); - object.setInternalError(Boolean.TRUE); - object.setIsValid(Boolean.FALSE); - description.setMessage(PlatformErrorMessages.RPR_UGS_API_RESOURCE_EXCEPTION.getMessage()); - description.setCode(PlatformErrorMessages.RPR_UGS_API_RESOURCE_EXCEPTION.getCode()); - - } catch (IOException e) { - registrationStatusDto.setStatusCode(RegistrationStatusCode.FAILED.name()); - registrationStatusDto.setStatusComment( - trimExceptionMessage.trimExceptionMessage(StatusUtil.IO_EXCEPTION.getMessage() + e.getMessage())); - registrationStatusDto.setSubStatusCode(StatusUtil.IO_EXCEPTION.getCode()); - registrationStatusDto.setLatestTransactionStatusCode( - registrationStatusMapperUtil.getStatusCode(RegistrationExceptionTypeCode.IOEXCEPTION)); - regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, - PlatformErrorMessages.RPR_SYS_IO_EXCEPTION.getMessage() + ExceptionUtils.getStackTrace(e)); - object.setInternalError(Boolean.TRUE); - object.setIsValid(Boolean.FALSE); - description.setMessage(PlatformErrorMessages.RPR_SYS_IO_EXCEPTION.getMessage()); - description.setCode(PlatformErrorMessages.RPR_SYS_IO_EXCEPTION.getCode()); - } catch (Exception ex) { - registrationStatusDto.setStatusCode(RegistrationStatusCode.FAILED.name()); - registrationStatusDto.setStatusComment( - trimExceptionMessage.trimExceptionMessage(StatusUtil.UNKNOWN_EXCEPTION_OCCURED.getMessage())); - registrationStatusDto.setSubStatusCode(StatusUtil.UNKNOWN_EXCEPTION_OCCURED.getCode()); - registrationStatusDto.setLatestTransactionStatusCode( - registrationStatusMapperUtil.getStatusCode(RegistrationExceptionTypeCode.EXCEPTION)); - regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, - RegistrationStatusCode.FAILED.toString() + ex.getMessage() + ExceptionUtils.getStackTrace(ex)); - object.setInternalError(Boolean.TRUE); - object.setIsValid(Boolean.FALSE); - description.setMessage(PlatformErrorMessages.RPR_BDD_UNKNOWN_EXCEPTION.getMessage()); - description.setCode(PlatformErrorMessages.RPR_BDD_UNKNOWN_EXCEPTION.getCode()); - } finally { - if (description.getStatusComment() != null) - registrationStatusDto.setStatusComment(description.getStatusComment()); - if (description.getStatusCode() != null) - registrationStatusDto.setStatusCode(description.getStatusCode()); - if (description.getSubStatusCode() != null) - registrationStatusDto.setSubStatusCode(description.getSubStatusCode()); - if (description.getTransactionStatusCode() != null) - registrationStatusDto.setLatestTransactionStatusCode(description.getTransactionStatusCode()); - - String moduleId = isTransactionSuccessful - ? PlatformSuccessMessages.RPR_UIN_GENERATOR_STAGE_SUCCESS.getCode() - : description.getCode(); - String moduleName = ModuleName.UIN_GENERATOR.toString(); - registrationStatusService.updateRegistrationStatus(registrationStatusDto, moduleId, moduleName); - String eventId = isTransactionSuccessful ? EventId.RPR_402.toString() : EventId.RPR_405.toString(); - String eventName = eventId.equalsIgnoreCase(EventId.RPR_402.toString()) ? EventName.UPDATE.toString() - : EventName.EXCEPTION.toString(); - String eventType = eventId.equalsIgnoreCase(EventId.RPR_402.toString()) ? EventType.BUSINESS.toString() - : EventType.SYSTEM.toString(); - - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, "Auditing stage result"); - auditLogRequestBuilder.createAuditRequestBuilder(description.getMessage(), eventId, eventName, eventType, - moduleId, moduleName, registrationId); - - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, "Finished processing rid in UinGeneratorStage"); - - } - - return object; - } - - private void handleForceMerge(MessageDTO object, boolean isTransactionSuccessful, LogDescription description, - String registrationId, UinGenResponseDto uinResponseDto, - InternalRegistrationStatusDto registrationStatusDto, JSONObject demographicIdentity, - boolean isUinAlreadyPresent) throws ApisResourceAccessException, IOException, Exception, - VidCreationException, VidServiceFailedException { - String uin = idRepoService.getUinByRid(registrationId, - utility.getGetRegProcessorDemographicIdentity()); - - demographicIdentity.put("UIN", uin); - - IdResponseDTO sendIdRepoWithUin = sendIdRepoWithUin(registrationId, - registrationStatusDto.getRegistrationType(), demographicIdentity, uin, description); - - if(isIdResponseNotNull(sendIdRepoWithUin)) { - handleIdRepoSuccessResponse( registrationStatusDto, registrationId, isUinAlreadyPresent, isTransactionSuccessful, uinResponseDto, object, description); - }else { - handleIdRepoErrorResponse(sendIdRepoWithUin, registrationStatusDto, registrationId, isTransactionSuccessful, uinResponseDto, object, description); - } - } - - private void loadDemographicIdentity(Map fieldMap, JSONObject demographicIdentity) throws IOException, JSONException { - for (Map.Entry e : fieldMap.entrySet()) { - if (e.getValue() != null) { - String value = e.getValue().toString(); - if (value != null) { - Object json = new JSONTokener(value).nextValue(); - if (json instanceof org.json.JSONObject) { - HashMap hashMap = new ObjectMapper().readValue(value, HashMap.class); - demographicIdentity.putIfAbsent(e.getKey(), hashMap); - } - else if (json instanceof JSONArray) { - List jsonList = new ArrayList<>(); - JSONArray jsonArray = new JSONArray(value); - for (int i = 0; i < jsonArray.length(); i++) { - Object obj = jsonArray.get(i); - HashMap hashMap = new ObjectMapper().readValue(obj.toString(), HashMap.class); - jsonList.add(hashMap); - } - demographicIdentity.putIfAbsent(e.getKey(), jsonList); - } else - demographicIdentity.putIfAbsent(e.getKey(), value); - } else - demographicIdentity.putIfAbsent(e.getKey(), value); - } - } - } - - /** - * Send id repo with uin. - * - * @param regId - * the reg id - * @param uin - * the uin - * @param description - * @return the id response DTO - * @throws ApisResourceAccessException - * @throws IOException - * @throws JsonMappingException - * @throws JsonParseException - * @throws VidCreationException - * @throws io.mosip.kernel.core.exception.IOException - * @throws Exception - */ - private IdResponseDTO sendIdRepoWithUin(String regId, String process, JSONObject demographicIdentity, String uin, - LogDescription description) - throws Exception { - - List documentInfo = getAllDocumentsByRegId(regId, process, demographicIdentity); - RequestDto requestDto = new RequestDto(); - requestDto.setIdentity(demographicIdentity); - requestDto.setDocuments(documentInfo); - requestDto.setRegistrationId(regId); - requestDto.setStatus(RegistrationType.ACTIVATED.toString()); - requestDto.setBiometricReferenceId(uin); - - IdResponseDTO result = null; - IdRequestDto idRequestDTO = new IdRequestDto(); - idRequestDTO.setId(idRepoCreate); - idRequestDTO.setRequest(requestDto); - idRequestDTO.setRequesttime(DateUtils.getUTCCurrentDateTimeString()); - idRequestDTO.setVersion(UINConstants.idRepoApiVersion); - idRequestDTO.setMetadata(null); - - try { - - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - regId, "Calling IDREPOSITORY create API to link uin with applicant"); - - result = (IdResponseDTO) registrationProcessorRestClientService.postApi(ApiName.IDREPOSITORY, "", "", - idRequestDTO, IdResponseDTO.class); - - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - regId, "Received response from IDREPOSITORY create API"); - - } catch (ApisResourceAccessException e) { - - if (e.getCause() instanceof HttpClientErrorException) { - HttpClientErrorException httpClientException = (HttpClientErrorException) e.getCause(); - description.setMessage(UINConstants.UIN_GENERATION_FAILED + regId + "::" - + httpClientException.getResponseBodyAsString()); - throw new ApisResourceAccessException(httpClientException.getResponseBodyAsString(), - httpClientException); - } else if (e.getCause() instanceof HttpServerErrorException) { - HttpServerErrorException httpServerException = (HttpServerErrorException) e.getCause(); - description.setMessage(UINConstants.UIN_GENERATION_FAILED + regId + "::" - + httpServerException.getResponseBodyAsString()); - - throw new ApisResourceAccessException(httpServerException.getResponseBodyAsString(), - httpServerException); - } else { - description.setMessage(UINConstants.UIN_GENERATION_FAILED + regId + "::" + e.getMessage()); - throw e; - } - - } - return result; - - } - -private void handleIdRepoSuccessResponse(InternalRegistrationStatusDto registrationStatusDto, - String registrationId, boolean isUinAlreadyPresent, boolean isTransactionSuccessful, - UinGenResponseDto uinResponseDto, MessageDTO object, LogDescription description) throws ApisResourceAccessException, VidCreationException, VidServiceFailedException, IOException { - - generateVid(registrationId, uinResponseDto.getResponse().getUin(), isUinAlreadyPresent); - registrationStatusDto.setStatusComment(StatusUtil.UIN_GENERATED_SUCCESS.getMessage()); - registrationStatusDto.setSubStatusCode(StatusUtil.UIN_GENERATED_SUCCESS.getCode()); - String uinStatus = isUinAlreadyPresent ? UINConstants.UIN_UNASSIGNED : UINConstants.UIN_ASSIGNED; - sendResponseToUinGenerator(registrationId, uinResponseDto.getResponse().getUin(), uinStatus); - isTransactionSuccessful = true; - registrationStatusDto.setStatusCode(RegistrationStatusCode.PROCESSED.toString()); - description.setMessage(PlatformSuccessMessages.RPR_UIN_GENERATOR_STAGE_SUCCESS.getMessage()); - description.setCode(PlatformSuccessMessages.RPR_UIN_GENERATOR_STAGE_SUCCESS.getCode()); - description.setTransactionStatusCode(RegistrationTransactionStatusCode.PROCESSED.toString()); - } - -private void handleIdRepoErrorResponse(IdResponseDTO idResponseDTO, InternalRegistrationStatusDto registrationStatusDto, - String registrationId,boolean isTransactionSuccessful, - UinGenResponseDto uinResponseDto,MessageDTO object, LogDescription description) throws ApisResourceAccessException, IOException{ - List errors = idResponseDTO != null ? idResponseDTO.getErrors() : null; - - String statusComment = errors != null ? errors.get(0).getMessage() : UINConstants.NULL_IDREPO_RESPONSE; - - if(errors!=null && errors.get(0).getErrorCode().equalsIgnoreCase(RECORD_ALREADY_EXISTS_ERROR)) { - registrationStatusDto.setStatusCode(RegistrationTransactionStatusCode.ERROR.toString()); - registrationStatusDto.setLatestTransactionStatusCode( - RegistrationTransactionStatusCode.IN_PROGRESS.toString()); - registrationStatusDto.setStatusComment(StatusUtil.UIN_ALREADY_EXIST_IN_IDREPO.getMessage()); - registrationStatusDto.setSubStatusCode(StatusUtil.UIN_ALREADY_EXIST_IN_IDREPO.getCode()); - description.setTransactionStatusCode(RegistrationTransactionStatusCode.IN_PROGRESS.toString()); - - }else if(errors!=null && errors.get(0).getErrorCode().equalsIgnoreCase(OLD_APPLICATION_ID)) { - registrationStatusDto.setStatusComment(StatusUtil.OLD_APPLICATION_ID.getMessage()); - registrationStatusDto.setStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); - registrationStatusDto - .setLatestTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); - registrationStatusDto.setSubStatusCode(StatusUtil.OLD_APPLICATION_ID.getCode()); - description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); - - }else { - registrationStatusDto.setStatusComment(trimExceptionMessage - .trimExceptionMessage(StatusUtil.UIN_GENERATION_FAILED.getMessage() + statusComment)); - registrationStatusDto.setSubStatusCode(StatusUtil.UIN_GENERATION_FAILED.getCode()); - registrationStatusDto.setStatusCode(RegistrationStatusCode.REJECTED.toString()); - registrationStatusDto.setLatestTransactionStatusCode(registrationStatusMapperUtil - .getStatusCode(RegistrationExceptionTypeCode.PACKET_UIN_GENERATION_FAILED)); - description.setTransactionStatusCode(registrationStatusMapperUtil - .getStatusCode(RegistrationExceptionTypeCode.PACKET_UIN_GENERATION_FAILED)); - - } - description.setMessage(PlatformErrorMessages.RPR_UGS_UIN_UPDATE_FAILURE.getMessage()); - description.setCode(PlatformErrorMessages.RPR_UGS_UIN_UPDATE_FAILURE.getCode()); - sendResponseToUinGenerator(registrationId, uinResponseDto.getResponse().getUin(), - UINConstants.UIN_UNASSIGNED); - isTransactionSuccessful = false; - String idres = idResponseDTO != null ? idResponseDTO.toString() : UINConstants.NULL_IDREPO_RESPONSE; - - regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, statusComment + " : " + idres); - object.setInternalError(Boolean.TRUE); - object.setIsValid(false); -} - - - - /** - * Gets the all documents by reg id. - * - * @param regId - * the reg id - * @return the all documents by reg id - * @throws IOException - * @throws io.mosip.kernel.core.exception.IOException - * @throws ApisResourceAccessException - * @throws JsonMappingException - * @throws JsonParseException - */ - private List getAllDocumentsByRegId(String regId, String process, JSONObject demographicIdentity) throws Exception { - List applicantDocuments = new ArrayList<>(); - - JSONObject idJSON = demographicIdentity; - JSONObject docJson = utility.getRegistrationProcessorMappingJson(MappingJsonConstants.DOCUMENT); - JSONObject identityJson = utility.getRegistrationProcessorMappingJson(MappingJsonConstants.IDENTITY); - - String proofOfAddressLabel = JsonUtil.getJSONValue(JsonUtil.getJSONObject(docJson, MappingJsonConstants.POA), MappingJsonConstants.VALUE); - String proofOfDateOfBirthLabel = JsonUtil.getJSONValue(JsonUtil.getJSONObject(docJson, MappingJsonConstants.POB), MappingJsonConstants.VALUE); - String proofOfIdentityLabel = JsonUtil.getJSONValue(JsonUtil.getJSONObject(docJson, MappingJsonConstants.POI), MappingJsonConstants.VALUE); - String proofOfRelationshipLabel = JsonUtil.getJSONValue(JsonUtil.getJSONObject(docJson, MappingJsonConstants.POR), MappingJsonConstants.VALUE); - String proofOfExceptionLabel = JsonUtil.getJSONValue(JsonUtil.getJSONObject(docJson, MappingJsonConstants.POE), MappingJsonConstants.VALUE); - String applicantBiometricLabel = JsonUtil.getJSONValue(JsonUtil.getJSONObject(identityJson, MappingJsonConstants.INDIVIDUAL_BIOMETRICS), MappingJsonConstants.VALUE); - - HashMap proofOfAddress = (HashMap) idJSON.get(proofOfAddressLabel); - HashMap proofOfDateOfBirth = (HashMap) idJSON.get(proofOfDateOfBirthLabel); - HashMap proofOfIdentity = (HashMap) idJSON.get(proofOfIdentityLabel); - HashMap proofOfRelationship = (HashMap) idJSON.get(proofOfRelationshipLabel); - HashMap proofOfException = (HashMap) idJSON.get(proofOfExceptionLabel); - HashMap applicantBiometric = (HashMap) idJSON.get(applicantBiometricLabel); - if (proofOfAddress != null) { - applicantDocuments - .add(getIdDocumnet(regId, proofOfAddressLabel, process)); - } - if (proofOfDateOfBirth != null) { - applicantDocuments - .add(getIdDocumnet(regId, proofOfDateOfBirthLabel, process)); - } - if (proofOfIdentity != null) { - applicantDocuments - .add(getIdDocumnet(regId, proofOfIdentityLabel, process)); - } - if (proofOfRelationship != null) { - applicantDocuments - .add(getIdDocumnet(regId, proofOfRelationshipLabel, process)); - } - if (proofOfException != null) { - applicantDocuments - .add(getIdDocumnet(regId, proofOfExceptionLabel, process)); - } - if (applicantBiometric != null) { - applicantDocuments.add(getBiometrics(regId, applicantBiometricLabel, process, applicantBiometricLabel)); - } - return applicantDocuments; - } - - private Documents getIdDocumnet(String registrationId, String dockey, String process) - throws IOException, ApisResourceAccessException, PacketManagerException, io.mosip.kernel.core.util.exception.JsonProcessingException { - Documents documentsInfoDto = new Documents(); - - Document document = - packetManagerService.getDocument(registrationId, dockey, process, ProviderStageName.UIN_GENERATOR); - if (document != null) { - documentsInfoDto.setValue(CryptoUtil.encodeBase64(document.getDocument())); - documentsInfoDto.setCategory(document.getValue()); - return documentsInfoDto; - } - return null; - } - - private Documents getBiometrics(String registrationId, String person, String process, String idDocLabel) throws Exception { - BiometricRecord biometricRecord = packetManagerService.getBiometrics(registrationId, person, process, ProviderStageName.UIN_GENERATOR); - byte[] xml = cbeffutil.createXML(BIRConverter.convertSegmentsToBIRList(biometricRecord.getSegments())); - Documents documentsInfoDto = new Documents(); - documentsInfoDto.setValue(CryptoUtil.encodeBase64(xml)); - documentsInfoDto.setCategory(utility.getMappingJsonValue(idDocLabel, MappingJsonConstants.IDENTITY)); - return documentsInfoDto; - - } - - /** - * Update id repo wit uin. - * - * @param regId the reg id - * @param uin the uin - * @param object the object - * @param description - * @return the id response DTO - * @throws ApisResourceAccessException the apis resource access - * exception - * @throws IOException Signals that an I/O exception - * has occurred. - * @throws RegistrationProcessorCheckedException - * @throws io.mosip.kernel.core.exception.IOException - */ - private boolean uinUpdate(String regId, String process, String uin, MessageDTO object, JSONObject demographicIdentity, LogDescription description) - throws Exception { - IdResponseDTO result; - boolean isTransactionSuccessful = Boolean.FALSE; - List documentInfo = getAllDocumentsByRegId(regId, process, demographicIdentity); - result = idRepoRequestBuilder(RegistrationType.ACTIVATED.toString().toUpperCase(), regId, documentInfo, - demographicIdentity); - if (isIdResponseNotNull(result)) { - - if ((RegistrationType.ACTIVATED.toString().toUpperCase()) - .equalsIgnoreCase(result.getResponse().getStatus())) { - isTransactionSuccessful = true; - description.setStatusCode(RegistrationStatusCode.PROCESSED.toString()); - description.setStatusComment(StatusUtil.UIN_DATA_UPDATION_SUCCESS.getMessage()); - description.setSubStatusCode(StatusUtil.UIN_DATA_UPDATION_SUCCESS.getCode()); - description.setMessage( - StatusUtil.UIN_DATA_UPDATION_SUCCESS.getMessage() + " for registration Id: " + regId); - description.setTransactionStatusCode(RegistrationTransactionStatusCode.PROCESSED.toString()); - object.setIsValid(Boolean.TRUE); - } - } else { - String statusComment = result != null && result.getErrors() != null ? result.getErrors().get(0).getMessage() - : UINConstants.NULL_IDREPO_RESPONSE; - description.setStatusCode(RegistrationStatusCode.FAILED.toString()); - description.setStatusComment(trimExceptionMessage - .trimExceptionMessage(StatusUtil.UIN_DATA_UPDATION_FAILED.getMessage() + statusComment)); - description.setSubStatusCode(StatusUtil.UIN_DATA_UPDATION_FAILED.getCode()); - description - .setMessage(UINConstants.UIN_FAILURE + regId + "::" + result != null && result.getErrors() != null - ? result.getErrors().get(0).getMessage() - : UINConstants.NULL_IDREPO_RESPONSE); - description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); - object.setIsValid(Boolean.FALSE); - } - return isTransactionSuccessful; - } - - /** - * Id repo request builder. - * - * @param status - * the status - * @param regId - * the reg id - * @param demographicIdentity - * the JSONObject - * @param documentInfo - * the document info - * @return the id response DTO - * @throws ApisResourceAccessException - * the apis resource access exception - * @throws IOException - */ - private IdResponseDTO idRepoRequestBuilder(String status, String regId, List documentInfo, - JSONObject demographicIdentity) throws ApisResourceAccessException, IOException { - IdResponseDTO idResponseDto; - List pathsegments = new ArrayList<>(); - RequestDto requestDto = new RequestDto(); - - if (documentInfo != null) { - requestDto.setDocuments(documentInfo); - } - - requestDto.setRegistrationId(regId); - requestDto.setStatus(status); - requestDto.setIdentity(demographicIdentity); - - // pathsegments.add(Long.toString(uin)); - - IdRequestDto idRequestDTO = new IdRequestDto(); - idRequestDTO.setId(idRepoUpdate); - idRequestDTO.setMetadata(null); - idRequestDTO.setRequest(requestDto); - idRequestDTO.setRequesttime(DateUtils.getUTCCurrentDateTimeString()); - idRequestDTO.setVersion(UINConstants.idRepoApiVersion); - - idResponseDto = (IdResponseDTO) registrationProcessorRestClientService.patchApi(ApiName.IDREPOSITORY, - pathsegments, "", "", idRequestDTO, IdResponseDTO.class); - - return idResponseDto; - } - - /** - * Re activate uin. - * - * @param regId - * the reg id - * @param uin - * the uin - * @param object - * the object - * @param description - * @return the id response DTO - * @throws ApisResourceAccessException - * the apis resource access exception - * @throws IOException - */ - private boolean reActivateUin(IdResponseDTO idResponseDTO, String regId, String uin, MessageDTO object, - JSONObject demographicIdentity, LogDescription description) - throws ApisResourceAccessException, IOException { - IdResponseDTO result = getIdRepoDataByUIN(uin, regId, description); - List pathsegments = new ArrayList<>(); - RequestDto requestDto = new RequestDto(); - boolean isTransactionSuccessful = Boolean.FALSE; - - if (isIdResponseNotNull(result)) { - - if ((RegistrationType.ACTIVATED.toString()).equalsIgnoreCase(result.getResponse().getStatus())) { - - description.setStatusCode(RegistrationStatusCode.FAILED.toString()); - description.setStatusComment(StatusUtil.UIN_ALREADY_ACTIVATED.getMessage()); - description.setSubStatusCode(StatusUtil.UIN_ALREADY_ACTIVATED.getCode()); - description.setMessage(PlatformErrorMessages.UIN_ALREADY_ACTIVATED.getMessage()); - description.setCode(PlatformErrorMessages.UIN_ALREADY_ACTIVATED.getCode()); - description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); - object.setIsValid(Boolean.FALSE); - return isTransactionSuccessful; - - } else { - - requestDto.setRegistrationId(regId); - requestDto.setStatus(RegistrationType.ACTIVATED.toString()); - requestDto.setBiometricReferenceId(uin); - requestDto.setIdentity(demographicIdentity); - - IdRequestDto idRequestDTO = new IdRequestDto(); - idRequestDTO.setId(idRepoUpdate); - idRequestDTO.setRequest(requestDto); - idRequestDTO.setMetadata(null); - idRequestDTO.setRequesttime(DateUtils.getUTCCurrentDateTimeString()); - idRequestDTO.setVersion(UINConstants.idRepoApiVersion); - - result = (IdResponseDTO) registrationProcessorRestClientService.patchApi(ApiName.IDREPOSITORY, - pathsegments, "", "", idRequestDTO, IdResponseDTO.class); - - if (isIdResponseNotNull(result)) { - - if ((RegistrationType.ACTIVATED.toString()).equalsIgnoreCase(result.getResponse().getStatus())) { - isTransactionSuccessful = true; - description.setStatusCode(RegistrationStatusCode.PROCESSED.toString()); - description.setStatusComment(StatusUtil.UIN_ACTIVATED_SUCCESS.getMessage()); - description.setSubStatusCode(StatusUtil.UIN_ACTIVATED_SUCCESS.getCode()); - description.setMessage(StatusUtil.UIN_ACTIVATED_SUCCESS.getMessage() + regId); - description.setMessage(PlatformSuccessMessages.RPR_UIN_ACTIVATED_SUCCESS.getMessage()); - description.setCode(PlatformSuccessMessages.RPR_UIN_ACTIVATED_SUCCESS.getCode()); - description.setTransactionStatusCode(RegistrationTransactionStatusCode.PROCESSED.toString()); - object.setIsValid(Boolean.TRUE); - } else { - description.setStatusCode(RegistrationStatusCode.FAILED.toString()); - description.setStatusComment(StatusUtil.UIN_ACTIVATED_FAILED.getMessage()); - description.setSubStatusCode(StatusUtil.UIN_ACTIVATED_FAILED.getCode()); - description.setMessage(StatusUtil.UIN_ACTIVATED_FAILED.getMessage() + regId); - description.setMessage(PlatformErrorMessages.UIN_ACTIVATED_FAILED.getMessage()); - description.setCode(PlatformErrorMessages.UIN_ACTIVATED_FAILED.getCode()); - description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); - object.setIsValid(Boolean.FALSE); - } - } else { - String statusComment = result != null && result.getErrors() != null - ? result.getErrors().get(0).getMessage() - : UINConstants.NULL_IDREPO_RESPONSE; - description.setStatusCode(RegistrationStatusCode.FAILED.toString()); - description.setStatusComment(trimExceptionMessage - .trimExceptionMessage(StatusUtil.UIN_REACTIVATION_FAILED.getMessage() + statusComment)); - description.setSubStatusCode(StatusUtil.UIN_REACTIVATION_FAILED.getCode()); - description.setMessage( - UINConstants.UIN_FAILURE + regId + "::" + result != null && result.getErrors() != null - ? result.getErrors().get(0).getMessage() - : UINConstants.NULL_IDREPO_RESPONSE); - description.setMessage(PlatformErrorMessages.UIN_REACTIVATION_FAILED.getMessage()); - description.setCode(PlatformErrorMessages.UIN_REACTIVATION_FAILED.getCode()); - description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); - object.setIsValid(Boolean.FALSE); - } - - } - - } - - return isTransactionSuccessful; - } - - private boolean isIdResponseNotNull(IdResponseDTO result) { - return result != null && result.getResponse() != null; - } - - private boolean isUinAlreadyPresent(IdResponseDTO result, String rid) { - if (result != null && result.getErrors() != null && result.getErrors().size() > 0 - && result.getErrors().get(0).getErrorCode().equalsIgnoreCase(RECORD_ALREADY_EXISTS_ERROR)) { - ErrorDTO errorDTO = result.getErrors().get(0); - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), - LoggerFileConstant.REGISTRATIONID.toString() + rid, - "Record is already present in IDREPO. Error message received : " + errorDTO.getMessage(), - "The stage will ignore this error and try to generate vid for the existing UIN now. " + - "This is to make sure if the packet processing fails while generating VID then re-processor can process the packet again"); - return true; - } - return false; - } - - /** - * Deactivate uin. - * - * @param regId - * the reg id - * @param uin - * the uin - * @param object - * the object - * @param description - * @return the id response DTO - * @throws ApisResourceAccessException - * @throws IOException - */ - private IdResponseDTO deactivateUin(String regId, String uin, MessageDTO object, JSONObject demographicIdentity, - LogDescription description) throws ApisResourceAccessException, IOException { - IdResponseDTO idResponseDto; - List pathsegments = new ArrayList<>(); - RequestDto requestDto = new RequestDto(); - String statusComment = ""; - - idResponseDto = getIdRepoDataByUIN(uin, regId, description); - - if (idResponseDto.getResponse() != null - && idResponseDto.getResponse().getStatus().equalsIgnoreCase(RegistrationType.DEACTIVATED.toString())) { - description.setStatusCode(RegistrationStatusCode.FAILED.toString()); - description.setStatusComment(StatusUtil.UIN_ALREADY_DEACTIVATED.getMessage()); - description.setSubStatusCode(StatusUtil.UIN_ALREADY_DEACTIVATED.getCode()); - description.setMessage(StatusUtil.UIN_ALREADY_DEACTIVATED.getMessage() + regId); - description.setMessage(PlatformErrorMessages.UIN_ALREADY_DEACTIVATED.getMessage()); - description.setCode(PlatformErrorMessages.UIN_ALREADY_DEACTIVATED.getCode()); - description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); - object.setIsValid(Boolean.FALSE); - return idResponseDto; - - } else { - requestDto.setRegistrationId(regId); - requestDto.setStatus(RegistrationType.DEACTIVATED.toString()); - requestDto.setIdentity(demographicIdentity); - requestDto.setBiometricReferenceId(uin); - - IdRequestDto idRequestDTO = new IdRequestDto(); - idRequestDTO.setId(idRepoUpdate); - idRequestDTO.setMetadata(null); - idRequestDTO.setRequest(requestDto); - idRequestDTO.setRequesttime(DateUtils.getUTCCurrentDateTimeString()); - idRequestDTO.setVersion(UINConstants.idRepoApiVersion); - - idResponseDto = (IdResponseDTO) registrationProcessorRestClientService.patchApi(ApiName.IDREPOSITORY, - pathsegments, "", "", idRequestDTO, IdResponseDTO.class); - - if (isIdResponseNotNull(idResponseDto)) { - if (idResponseDto.getResponse().getStatus().equalsIgnoreCase(RegistrationType.DEACTIVATED.toString())) { - description.setStatusCode(RegistrationStatusCode.PROCESSED.toString()); - description.setStatusComment(StatusUtil.UIN_DEACTIVATION_SUCCESS.getMessage()); - description.setSubStatusCode(StatusUtil.UIN_DEACTIVATION_SUCCESS.getCode()); - description.setMessage(StatusUtil.UIN_DEACTIVATION_SUCCESS.getMessage() + regId); - description.setMessage(PlatformSuccessMessages.RPR_UIN_DEACTIVATION_SUCCESS.getMessage()); - description.setCode(PlatformSuccessMessages.RPR_UIN_DEACTIVATION_SUCCESS.getCode()); - description.setTransactionStatusCode(RegistrationTransactionStatusCode.PROCESSED.toString()); - object.setIsValid(Boolean.TRUE); - statusComment = idResponseDto.getResponse().getStatus().toString(); - - } - } else { - - statusComment = idResponseDto != null && idResponseDto.getErrors() != null - ? idResponseDto.getErrors().get(0).getMessage() - : UINConstants.NULL_IDREPO_RESPONSE; - description.setStatusCode(RegistrationStatusCode.FAILED.toString()); - description.setStatusComment(trimExceptionMessage - .trimExceptionMessage(StatusUtil.UIN_DEACTIVATION_FAILED.getMessage() + statusComment)); - description.setSubStatusCode(StatusUtil.UIN_DEACTIVATION_FAILED.getCode()); - description.setMessage(PlatformErrorMessages.UIN_DEACTIVATION_FAILED.getMessage()); - description.setCode(PlatformErrorMessages.UIN_DEACTIVATION_FAILED.getCode()); - description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); - object.setIsValid(Boolean.FALSE); - } - - } - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), - LoggerFileConstant.REGISTRATIONID.toString() + regId, "Updated Response from IdRepo API", - "is : " + statusComment); - - return idResponseDto; - } - - /** - * Gets the id repo data by UIN. - * - * @param uin - * the uin - * @param description - * @return the id repo data by UIN - * @throws ApisResourceAccessException - * the apis resource access exception - * @throws IOException - */ - private IdResponseDTO getIdRepoDataByUIN(String uin, String regId, LogDescription description) - throws ApisResourceAccessException, IOException { - IdResponseDTO response; - - List pathsegments = new ArrayList<>(); - pathsegments.add(uin); - try { - - response = (IdResponseDTO) registrationProcessorRestClientService.getApi(ApiName.IDREPOGETIDBYUIN, - pathsegments, "", "", IdResponseDTO.class); - - } catch (ApisResourceAccessException e) { - if (e.getCause() instanceof HttpClientErrorException) { - HttpClientErrorException httpClientException = (HttpClientErrorException) e.getCause(); - description.setMessage(PlatformErrorMessages.UIN_GENERATION_FAILED.getMessage()); - description.setCode(PlatformErrorMessages.UIN_GENERATION_FAILED.getCode()); - throw new ApisResourceAccessException(httpClientException.getResponseBodyAsString(), - httpClientException); - } else if (e.getCause() instanceof HttpServerErrorException) { - HttpServerErrorException httpServerException = (HttpServerErrorException) e.getCause(); - description.setMessage(PlatformErrorMessages.UIN_GENERATION_FAILED.getMessage()); - description.setCode(PlatformErrorMessages.UIN_GENERATION_FAILED.getCode()); - - throw new ApisResourceAccessException(httpServerException.getResponseBodyAsString(), - httpServerException); - } else { - description.setMessage(PlatformErrorMessages.UIN_GENERATION_FAILED.getMessage()); - description.setCode(PlatformErrorMessages.UIN_GENERATION_FAILED.getCode()); - throw e; - } - } - return response; - } - - /** - * Send response to uin generator. - * - * @param uin - * the uin - * @param uinStatus - * the uin status - * @throws ApisResourceAccessException - * @throws IOException - * @throws VidCreationException - */ - private void sendResponseToUinGenerator(String registrationId, String uin, String uinStatus) - throws ApisResourceAccessException, IOException { - UinRequestDto uinRequest = new UinRequestDto(); - UinResponseDto uinDto = new UinResponseDto(); - uinDto.setUin(uin); - uinDto.setStatus(uinStatus); - uinRequest.setRequest(uinDto); - String jsonString = null; - ObjectMapper objMapper = new ObjectMapper(); - try { - jsonString = objMapper.writeValueAsString(uinRequest); - String response; - - response = (String) registrationProcessorRestClientService.putApi(ApiName.UINGENERATOR, null, "", "", - jsonString, String.class, MediaType.APPLICATION_JSON); - - Gson gsonValue = new Gson(); - UinDto uinresponse = gsonValue.fromJson(response, UinDto.class); - - if (uinresponse.getResponse() != null) { - String uinSuccessDescription = "Kernel service called successfully to update the uin status as assigned"; - - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), - LoggerFileConstant.REGISTRATIONID.toString(), registrationId, - uinSuccessDescription); - } else { - String uinErrorDescription = "Kernel service called successfully to update the uin status as unassigned"; - regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), - LoggerFileConstant.REGISTRATIONID.toString() + registrationId, "Failure", - "is : " + uinErrorDescription); - } - } catch (JsonProcessingException e) { - regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, PlatformErrorMessages.RPR_SYS_JSON_PARSING_EXCEPTION.getMessage() + e.getMessage() - + ExceptionUtils.getStackTrace(e)); - - throw e; - } catch (ApisResourceAccessException e) { - regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, PlatformErrorMessages.RPR_PVM_API_RESOUCE_ACCESS_FAILED.getMessage() - + e.getMessage() + ExceptionUtils.getStackTrace(e)); - throw e; - } - - } - - /** - * Deploy verticle. - */ - public void deployVerticle() { - - mosipEventBus = this.getEventBus(this, clusterManagerUrl, workerPoolSize); - this.consumeAndSend(mosipEventBus, MessageBusAddress.UIN_GENERATION_BUS_IN, - MessageBusAddress.UIN_GENERATION_BUS_OUT, messageExpiryTimeLimit); - } - - @Override - public void start() { - router.setRoute(this.postUrl(getVertx(), MessageBusAddress.UIN_GENERATION_BUS_IN, - MessageBusAddress.UIN_GENERATION_BUS_OUT)); - this.createServer(router.getRouter(), Integer.parseInt(port)); - - } - - @SuppressWarnings("unchecked") - private void generateVid(String registrationId, String UIN, boolean isUinAlreadyPresent) - throws ApisResourceAccessException, IOException, VidCreationException, VidServiceFailedException { - VidRequestDto vidRequestDto = new VidRequestDto(); - RequestWrapper request = new RequestWrapper(); - ResponseWrapper response; - - try { - String uin = UIN; - if (isUinAlreadyPresent) { - uin = idRepoService.getUinByRid(registrationId, utility.getGetRegProcessorDemographicIdentity()); - if (isPerpetualVidAlreadyPresent(uin)) { - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, "VID already present. Skipping vid generation."); - return; - } - } - vidRequestDto.setUIN(uin); - vidRequestDto.setVidType(vidType); - request.setId(env.getProperty(UINConstants.VID_CREATE_ID)); - request.setRequest(vidRequestDto); - DateTimeFormatter format = DateTimeFormatter.ofPattern(env.getProperty(UINConstants.DATETIME_PATTERN)); - LocalDateTime localdatetime = LocalDateTime.parse( - DateUtils.getUTCCurrentDateTimeString(env.getProperty(UINConstants.DATETIME_PATTERN)), format); - request.setRequesttime(localdatetime); - request.setVersion(env.getProperty(UINConstants.REG_PROC_APPLICATION_VERSION)); - - regProcLogger.debug(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, - "UinGeneratorStage::generateVid():: post CREATEVID service call started with request data : " - + JsonUtil.objectMapperObjectToJson(request)); - - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, "Calling IDREPO CREATEVID API to create new vid"); - - response = (ResponseWrapper) registrationProcessorRestClientService - .postApi(ApiName.CREATEVID, "", "", request, ResponseWrapper.class); - - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, "Received response from CREATEVID API"); - - regProcLogger.debug(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, - "UinGeneratorStage::generateVid():: create Vid response :: "+JsonUtil.objectMapperObjectToJson(response)); - - if (!response.getErrors().isEmpty()) { - throw new VidCreationException(PlatformErrorMessages.RPR_UGS_VID_EXCEPTION.getMessage(), - "VID creation exception"); - - } - - } catch (ApisResourceAccessException | VidServiceFailedException e) { - regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - registrationId, PlatformErrorMessages.RPR_UGS_API_RESOURCE_EXCEPTION.getMessage() + e.getMessage() - + ExceptionUtils.getStackTrace(e)); - throw e; - } - } - - /** - * Link reg id wrt uin. - * - * @param lostPacketRegId - * the lost packet reg id - * @param matchedRegId - * the matched reg id - * @param object - * the object - * @param description - * @return the id response DTO - * @throws ApisResourceAccessException - * the apis resource access exception - * @throws IOException - * Signals that an I/O exception has occurred. - */ - @SuppressWarnings("unchecked") - private IdResponseDTO linkRegIdWrtUin(String lostPacketRegId, String matchedRegId, String process, MessageDTO object, - LogDescription description) throws ApisResourceAccessException, IOException, io.mosip.kernel.core.util.exception.JsonProcessingException, PacketManagerException { - - IdResponseDTO idResponse = null; - String uin = idRepoService.getUinByRid(matchedRegId, utility.getGetRegProcessorDemographicIdentity()); - - - RequestDto requestDto = new RequestDto(); - String statusComment = ""; - - if (uin != null) { - - JSONObject regProcessorIdentityJson = utility.getRegistrationProcessorMappingJson(MappingJsonConstants.IDENTITY); - String idschemaversion = JsonUtil.getJSONValue(JsonUtil.getJSONObject(regProcessorIdentityJson, MappingJsonConstants.IDSCHEMA_VERSION), MappingJsonConstants.VALUE); - - JSONObject identityObject = new JSONObject(); - identityObject.put(UINConstants.UIN, uin); - String schemaVersion = packetManagerService.getFieldByMappingJsonKey(lostPacketRegId, MappingJsonConstants.IDSCHEMA_VERSION, process, ProviderStageName.UIN_GENERATOR); - identityObject.put(idschemaversion, convertIdschemaToDouble ? Double.valueOf(schemaVersion) : schemaVersion); - - requestDto.setRegistrationId(lostPacketRegId); - requestDto.setIdentity(identityObject); - - IdRequestDto idRequestDTO = new IdRequestDto(); - idRequestDTO.setId(idRepoUpdate); - idRequestDTO.setRequest(requestDto); - idRequestDTO.setMetadata(null); - idRequestDTO.setRequesttime(DateUtils.getUTCCurrentDateTimeString()); - idRequestDTO.setVersion(UINConstants.idRepoApiVersion); - - idResponse = (IdResponseDTO) registrationProcessorRestClientService.patchApi(ApiName.IDREPOSITORY, null, "", - "", idRequestDTO, IdResponseDTO.class); - - if (isIdResponseNotNull(idResponse)) { - description.setStatusCode(RegistrationStatusCode.PROCESSED.toString()); - description.setStatusComment(StatusUtil.LINK_RID_FOR_LOST_PACKET_SUCCESS.getMessage()); - description.setSubStatusCode(StatusUtil.LINK_RID_FOR_LOST_PACKET_SUCCESS.getCode()); - description.setMessage(UinStatusMessage.PACKET_LOST_UIN_UPDATION_SUCCESS_MSG + lostPacketRegId); - description.setTransactionStatusCode(RegistrationTransactionStatusCode.PROCESSED.toString()); - object.setIsValid(Boolean.TRUE); - - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), - LoggerFileConstant.REGISTRATIONID.toString() + lostPacketRegId, - " UIN LINKED WITH " + matchedRegId, "is : " + description); - } else { - - statusComment = idResponse != null && idResponse.getErrors() != null - && idResponse.getErrors().get(0) != null ? idResponse.getErrors().get(0).getMessage() - : UinStatusMessage.PACKET_LOST_UIN_UPDATION_FAILURE_MSG + " " - + UINConstants.NULL_IDREPO_RESPONSE + "for lostPacketRegId " + lostPacketRegId; - description.setStatusCode(RegistrationStatusCode.PROCESSING.toString()); - description.setStatusComment(StatusUtil.LINK_RID_FOR_LOST_PACKET_SUCCESS.getMessage() + statusComment); - description.setSubStatusCode(StatusUtil.LINK_RID_FOR_LOST_PACKET_SUCCESS.getCode()); - description.setTransactionStatusCode(registrationStatusMapperUtil - .getStatusCode(RegistrationExceptionTypeCode.PACKET_UIN_GENERATION_ID_REPO_ERROR)); - if (idResponse != null - && idResponse.getErrors() != null) - description.setMessage(idResponse.getErrors().get(0).getMessage()); - else - description.setMessage(UINConstants.NULL_IDREPO_RESPONSE); - object.setIsValid(Boolean.FALSE); - regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), - LoggerFileConstant.REGISTRATIONID.toString() + lostPacketRegId, - " UIN NOT LINKED WITH " + matchedRegId, "is : " + statusComment); - } - - } else { - statusComment = UinStatusMessage.PACKET_LOST_UIN_UPDATION_FAILURE_MSG + " " - + UINConstants.NULL_IDREPO_RESPONSE + " UIN not available for matchedRegId " + matchedRegId; - description.setStatusComment(StatusUtil.LINK_RID_FOR_LOST_PACKET_FAILED.getMessage()); - description.setSubStatusCode(StatusUtil.LINK_RID_FOR_LOST_PACKET_FAILED.getCode()); - description.setStatusCode(RegistrationStatusCode.REJECTED.toString()); - description.setTransactionStatusCode(registrationStatusMapperUtil - .getStatusCode(RegistrationExceptionTypeCode.PACKET_UIN_GENERATION_FAILED)); - description.setMessage(UinStatusMessage.PACKET_LOST_UIN_UPDATION_FAILURE_MSG + " " - + UINConstants.NULL_IDREPO_RESPONSE + " UIN not available for matchedRegId " + matchedRegId); - - object.setIsValid(Boolean.FALSE); - regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), - LoggerFileConstant.REGISTRATIONID.toString() + lostPacketRegId, - " UIN NOT LINKED WITH " + matchedRegId, "is : " + statusComment); - } - - return idResponse; - } - - private boolean isPerpetualVidAlreadyPresent(String uin) throws ApisResourceAccessException, VidServiceFailedException { - List pathsegments = new ArrayList<>(); - pathsegments.add(uin); - - VidsInfosDTO vidsInfosDTO; - - regProcLogger.debug(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), "", - "PrintServiceImpl::getVid():: get GETVIDSBYUIN service call started with request data : " - ); - - vidsInfosDTO = (VidsInfosDTO) registrationProcessorRestClientService.getApi(ApiName.GETVIDSBYUIN, - pathsegments, "", "", VidsInfosDTO.class); - - if (CollectionUtils.isEmpty(vidsInfosDTO.getErrors()) - && CollectionUtils.isNotEmpty(vidsInfosDTO.getResponse())) { - for (io.mosip.registration.processor.core.idrepo.dto.VidInfoDTO VidInfoDTO : vidsInfosDTO.getResponse()) { - if (VidType.PERPETUAL.name().equalsIgnoreCase(VidInfoDTO.getVidType())) { - return true; - } - } - } else if (CollectionUtils.isNotEmpty(vidsInfosDTO.getErrors())) { - throw new VidServiceFailedException(vidsInfosDTO.getErrors().iterator().next().getErrorCode(), - vidsInfosDTO.getErrors().iterator().next().getMessage()); - } - return false; - } - - public static String getHMACHashCode(String value) throws NoSuchAlgorithmException { - if (value == null) - return null; - return CryptoUtil.encodeBase64(HMACUtils2.generateHash(value.getBytes())); - - } - -} +package io.mosip.registration.processor.stages.uingenerator.stage; + +import java.io.IOException; +import java.security.NoSuchAlgorithmException; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.exception.ExceptionUtils; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONTokener; +import org.json.simple.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.core.env.Environment; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Service; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.HttpServerErrorException; + +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; + +import io.mosip.kernel.biometrics.entities.BiometricRecord; +import io.mosip.kernel.core.cbeffutil.spi.CbeffUtil; +import io.mosip.kernel.core.http.RequestWrapper; +import io.mosip.kernel.core.logger.spi.Logger; +import io.mosip.kernel.core.util.CryptoUtil; +import io.mosip.kernel.core.util.DateUtils; +import io.mosip.kernel.core.util.HMACUtils2; +import io.mosip.kernel.core.util.StringUtils; +import io.mosip.registration.processor.core.abstractverticle.MessageBusAddress; +import io.mosip.registration.processor.core.abstractverticle.MessageDTO; +import io.mosip.registration.processor.core.abstractverticle.MosipEventBus; +import io.mosip.registration.processor.core.abstractverticle.MosipRouter; +import io.mosip.registration.processor.core.abstractverticle.MosipVerticleAPIManager; +import io.mosip.registration.processor.core.code.ApiName; +import io.mosip.registration.processor.core.code.ModuleName; +import io.mosip.registration.processor.core.code.RegistrationExceptionTypeCode; +import io.mosip.registration.processor.core.code.RegistrationTransactionStatusCode; +import io.mosip.registration.processor.core.code.RegistrationTransactionTypeCode; +import io.mosip.registration.processor.core.common.rest.dto.ErrorDTO; +import io.mosip.registration.processor.core.constant.EventId; +import io.mosip.registration.processor.core.constant.EventName; +import io.mosip.registration.processor.core.constant.EventType; +import io.mosip.registration.processor.core.constant.LoggerFileConstant; +import io.mosip.registration.processor.core.constant.MappingJsonConstants; +import io.mosip.registration.processor.core.constant.ProviderStageName; +import io.mosip.registration.processor.core.constant.VidType; +import io.mosip.registration.processor.core.exception.ApisResourceAccessException; +import io.mosip.registration.processor.core.exception.PacketManagerException; +import io.mosip.registration.processor.core.exception.RegistrationProcessorCheckedException; +import io.mosip.registration.processor.core.exception.util.PlatformErrorMessages; +import io.mosip.registration.processor.core.exception.util.PlatformSuccessMessages; +import io.mosip.registration.processor.core.http.ResponseWrapper; +import io.mosip.registration.processor.core.idrepo.dto.Documents; +import io.mosip.registration.processor.core.idrepo.dto.VidsInfosDTO; +import io.mosip.registration.processor.core.logger.LogDescription; +import io.mosip.registration.processor.core.logger.RegProcessorLogger; +import io.mosip.registration.processor.core.spi.restclient.RegistrationProcessorRestClientService; +import io.mosip.registration.processor.core.status.util.StatusUtil; +import io.mosip.registration.processor.core.status.util.TrimExceptionMessage; +import io.mosip.registration.processor.core.util.JsonUtil; +import io.mosip.registration.processor.core.util.RegistrationExceptionMapperUtil; +import io.mosip.registration.processor.packet.manager.idreposervice.IdRepoService; +import io.mosip.registration.processor.packet.storage.dto.Document; +import io.mosip.registration.processor.packet.storage.entity.RegLostUinDetEntity; +import io.mosip.registration.processor.packet.storage.repository.BasePacketRepository; +import io.mosip.registration.processor.packet.storage.utils.ABISHandlerUtil; +import io.mosip.registration.processor.packet.storage.utils.BIRConverter; +import io.mosip.registration.processor.packet.storage.utils.IdSchemaUtil; +import io.mosip.registration.processor.packet.storage.utils.PriorityBasedPacketManagerService; +import io.mosip.registration.processor.packet.storage.utils.Utilities; +import io.mosip.registration.processor.rest.client.audit.builder.AuditLogRequestBuilder; +import io.mosip.registration.processor.stages.uingenerator.constants.UINConstants; +import io.mosip.registration.processor.stages.uingenerator.dto.UinDto; +import io.mosip.registration.processor.stages.uingenerator.dto.UinGenResponseDto; +import io.mosip.registration.processor.stages.uingenerator.dto.UinRequestDto; +import io.mosip.registration.processor.stages.uingenerator.dto.UinResponseDto; +import io.mosip.registration.processor.stages.uingenerator.dto.VidRequestDto; +import io.mosip.registration.processor.stages.uingenerator.dto.VidResponseDto; +import io.mosip.registration.processor.stages.uingenerator.exception.VidCreationException; +import io.mosip.registration.processor.stages.uingenerator.exception.VidServiceFailedException; +import io.mosip.registration.processor.stages.uingenerator.idrepo.dto.IdRequestDto; +import io.mosip.registration.processor.stages.uingenerator.idrepo.dto.IdResponseDTO; +import io.mosip.registration.processor.stages.uingenerator.idrepo.dto.RequestDto; +import io.mosip.registration.processor.stages.uingenerator.util.UinStatusMessage; +import io.mosip.registration.processor.status.code.RegistrationStatusCode; +import io.mosip.registration.processor.status.code.RegistrationType; +import io.mosip.registration.processor.status.dto.InternalRegistrationStatusDto; +import io.mosip.registration.processor.status.dto.RegistrationStatusDto; +import io.mosip.registration.processor.status.service.RegistrationStatusService; + +/** + * The Class UinGeneratorStage. + * + * @author Ranjitha Siddegowda + * @author Rishabh Keshari + */ +@Service +public class UinGeneratorStage extends MosipVerticleAPIManager { + + /** The reg proc logger. */ + private static Logger regProcLogger = RegProcessorLogger.getLogger(UinGeneratorStage.class); + private static final String OLD_APPLICATION_ID = "IDR-IDC-011"; + private static final String RECORD_ALREADY_EXISTS_ERROR = "IDR-IDC-012"; + + + @Autowired + private Environment env; + + @Autowired + private IdRepoService idRepoService; + + /** The mosip event bus. */ + MosipEventBus mosipEventBus = null; + + @Value("${registration.processor.id.repo.vidType}") + private String vidType; + + @Value("${mosip.commons.packet.manager.schema.validator.convertIdSchemaToDouble:true}") + private boolean convertIdschemaToDouble; + + /** The cluster manager url. */ + @Value("${vertx.cluster.configuration}") + private String clusterManagerUrl; + + /** The id repo create. */ + @Value("${registration.processor.id.repo.create}") + private String idRepoCreate; + + /** The id repo update. */ + @Value("${registration.processor.id.repo.update}") + private String idRepoUpdate; + + /** server port number. */ + @Value("${server.port}") + private String port; + + /** worker pool size. */ + @Value("${worker.pool.size}") + private Integer workerPoolSize; + + /** After this time intervel, message should be considered as expired (In seconds). */ + @Value("${mosip.regproc.uin.generator.message.expiry-time-limit}") + private Long messageExpiryTimeLimit; + + @Value("${mosip.idrepo.create-identity.enable-force-merge:false}") + private boolean idRepoForceMergeEnabled; + + @Value("${mosip.regproc.uin.generator.dob.log.enable:false}") + private boolean dobLogEnable; + + /** The core audit request builder. */ + @Autowired + private AuditLogRequestBuilder auditLogRequestBuilder; + + /** Mosip router for APIs */ + @Autowired + private MosipRouter router; + + @Autowired + private ObjectMapper mapper; + + /** The registration processor rest client service. */ + @Autowired + RegistrationProcessorRestClientService registrationProcessorRestClientService; + + /** The demographic dedupe repository. */ + @Autowired + private BasePacketRepository regLostUinDetEntity; + + /** The registration status service. */ + @Autowired + private RegistrationStatusService registrationStatusService; + + /** The utility. */ + @Autowired + private Utilities utility; + + @Autowired + private CbeffUtil cbeffutil; + + @Autowired + private RegistrationExceptionMapperUtil registrationStatusMapperUtil; + + @Autowired + private ABISHandlerUtil aBISHandlerUtil; + + @Autowired + private PriorityBasedPacketManagerService packetManagerService; + + @Autowired + private IdSchemaUtil idSchemaUtil; + + private TrimExceptionMessage trimExceptionMessage = new TrimExceptionMessage(); + + /* + * (non-Javadoc) + * + * @see + * io.mosip.registration.processor.core.spi.eventbus.EventBusManager#process( + * java.lang.Object) + */ + @SuppressWarnings("unchecked") + @Override + public MessageDTO process(MessageDTO object) { + boolean isTransactionSuccessful = Boolean.FALSE; + object.setMessageBusAddress(MessageBusAddress.UIN_GENERATION_BUS_IN); + object.setInternalError(Boolean.FALSE); + object.setIsValid(true); + LogDescription description = new LogDescription(); + String registrationId = object.getRid(); + regProcLogger.debug(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, "UinGeneratorStage::process()::entry"); + UinGenResponseDto uinResponseDto = null; + + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, "Started processing rid in UinGeneratorStage"); + + InternalRegistrationStatusDto registrationStatusDto = registrationStatusService.getRegistrationStatus(registrationId); + try { + registrationStatusDto + .setLatestTransactionTypeCode(RegistrationTransactionTypeCode.UIN_GENERATOR.toString()); + registrationStatusDto.setRegistrationStageName(this.getClass().getSimpleName()); + + if ((RegistrationType.LOST.toString()).equalsIgnoreCase(object.getReg_type().name())) { + String lostPacketRegId = object.getRid(); + String matchedRegId = regLostUinDetEntity.getLostUinMatchedRegId(lostPacketRegId); + if (matchedRegId != null) { + linkRegIdWrtUin(lostPacketRegId, matchedRegId, registrationStatusDto.getRegistrationType(), object, description); + } + + } else { + + IdResponseDTO idResponseDTO = new IdResponseDTO(); + String schemaVersion = packetManagerService.getFieldByMappingJsonKey(registrationId, MappingJsonConstants.IDSCHEMA_VERSION, registrationStatusDto.getRegistrationType(), ProviderStageName.UIN_GENERATOR); + + Map fieldMap = packetManagerService.getFields(registrationId, + idSchemaUtil.getDefaultFields(Double.valueOf(schemaVersion)), registrationStatusDto.getRegistrationType(), ProviderStageName.UIN_GENERATOR); + String uinField = fieldMap.get(utility.getMappingJsonValue(MappingJsonConstants.UIN, MappingJsonConstants.IDENTITY)); + + String dateOfBirth = fieldMap + .get(utility.getMappingJsonValue(MappingJsonConstants.DOB, MappingJsonConstants.IDENTITY)); + if ((dateOfBirth != null && !dateOfBirth.isEmpty()) && dobLogEnable) { + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), + LoggerFileConstant.REGISTRATIONID.toString(), registrationId, + "UinGeneratorStage::process()::Before calling ID-repo api date of birth hash: " + + getHMACHashCode(dateOfBirth)); + } + JSONObject demographicIdentity = new JSONObject(); + demographicIdentity.put(MappingJsonConstants.IDSCHEMA_VERSION, convertIdschemaToDouble ? Double.valueOf(schemaVersion) : schemaVersion); + + loadDemographicIdentity(fieldMap, demographicIdentity); + + if (StringUtils.isEmpty(uinField) || uinField.equalsIgnoreCase("null") ) { + + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, "Calling UINGENERATOR API to get unused uin"); + + String test = (String) registrationProcessorRestClientService.getApi(ApiName.UINGENERATOR, null, "", + "", String.class); + + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, "Received response from UINGENERATOR API"); + + Gson gsonObj = new Gson(); + uinResponseDto = gsonObj.fromJson(test, UinGenResponseDto.class); + + uinField = uinResponseDto.getResponse().getUin(); + demographicIdentity.put("UIN", uinField); + + idResponseDTO = sendIdRepoWithUin(registrationId, registrationStatusDto.getRegistrationType(), demographicIdentity, + uinField, description); + + boolean isUinAlreadyPresent = isUinAlreadyPresent(idResponseDTO, registrationId); + + if (isIdResponseNotNull(idResponseDTO) || isUinAlreadyPresent) { + + if(idRepoForceMergeEnabled && isUinAlreadyPresent) { + handleForceMerge(object, isTransactionSuccessful, description, registrationId, + uinResponseDto, registrationStatusDto, demographicIdentity, isUinAlreadyPresent); + + }else { + handleIdRepoSuccessResponse(registrationStatusDto, registrationId, isUinAlreadyPresent, isTransactionSuccessful, uinResponseDto, object, description); + } + + }else { + handleIdRepoErrorResponse(idResponseDTO, registrationStatusDto, registrationId, isTransactionSuccessful, uinResponseDto, object, description); + } + + }else { + if ((RegistrationType.ACTIVATED.toString()).equalsIgnoreCase(object.getReg_type().toString())) { + isTransactionSuccessful = reActivateUin(idResponseDTO, registrationId, uinField, object, + demographicIdentity, description); + } else if ((RegistrationType.DEACTIVATED.toString()) + .equalsIgnoreCase(object.getReg_type().toString())) { + idResponseDTO = deactivateUin(registrationId, uinField, object, demographicIdentity, + description); + } else if (RegistrationType.UPDATE.toString().equalsIgnoreCase(object.getReg_type().toString()) + || (RegistrationType.RES_UPDATE.toString() + .equalsIgnoreCase(object.getReg_type().toString()))) { + isTransactionSuccessful = uinUpdate(registrationId, registrationStatusDto.getRegistrationType(), uinField, object, demographicIdentity, + description); + } + } + + } + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, description.getMessage()); + registrationStatusDto.setUpdatedBy(UINConstants.USER); + + } catch (io.mosip.kernel.core.util.exception.JsonProcessingException e) { + regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, + RegistrationStatusCode.FAILED.toString() + e.getMessage() + ExceptionUtils.getStackTrace(e)); + registrationStatusDto.setStatusCode(RegistrationStatusCode.FAILED.toString()); + registrationStatusDto.setStatusComment( + trimExceptionMessage.trimExceptionMessage(StatusUtil.JSON_PARSING_EXCEPTION.getMessage() + e.getMessage())); + registrationStatusDto.setSubStatusCode(StatusUtil.JSON_PARSING_EXCEPTION.getCode()); + registrationStatusDto.setLatestTransactionStatusCode( + registrationStatusMapperUtil.getStatusCode(RegistrationExceptionTypeCode.JSON_PROCESSING_EXCEPTION)); + isTransactionSuccessful = false; + description.setMessage(PlatformErrorMessages.RPR_SYS_JSON_PARSING_EXCEPTION.getMessage()); + description.setCode(PlatformErrorMessages.RPR_SYS_JSON_PARSING_EXCEPTION.getCode()); + object.setIsValid(Boolean.FALSE); + object.setInternalError(Boolean.TRUE); + object.setRid(registrationStatusDto.getRegistrationId()); + e.printStackTrace(); + } catch (PacketManagerException e) { + regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, + RegistrationStatusCode.FAILED.toString() + e.getMessage() + ExceptionUtils.getStackTrace(e)); + registrationStatusDto.setStatusCode(RegistrationStatusCode.PROCESSING.name()); + registrationStatusDto.setStatusComment( + trimExceptionMessage.trimExceptionMessage(StatusUtil.PACKET_MANAGER_EXCEPTION.getMessage() + e.getMessage())); + registrationStatusDto.setSubStatusCode(StatusUtil.PACKET_MANAGER_EXCEPTION.getCode()); + registrationStatusDto.setLatestTransactionStatusCode( + registrationStatusMapperUtil.getStatusCode(RegistrationExceptionTypeCode.PACKET_MANAGER_EXCEPTION)); + description.setMessage(PlatformErrorMessages.PACKET_MANAGER_EXCEPTION.getMessage()); + description.setCode(PlatformErrorMessages.PACKET_MANAGER_EXCEPTION.getCode()); + object.setIsValid(Boolean.FALSE); + object.setInternalError(Boolean.TRUE); + object.setRid(registrationStatusDto.getRegistrationId()); + } catch (ApisResourceAccessException ex) { + registrationStatusDto.setStatusCode(RegistrationStatusCode.PROCESSING.name()); + registrationStatusDto.setStatusComment(trimExceptionMessage + .trimExceptionMessage(StatusUtil.API_RESOUCE_ACCESS_FAILED.getMessage() + ex.getMessage())); + registrationStatusDto.setSubStatusCode(StatusUtil.API_RESOUCE_ACCESS_FAILED.getCode()); + registrationStatusDto.setLatestTransactionStatusCode(registrationStatusMapperUtil + .getStatusCode(RegistrationExceptionTypeCode.APIS_RESOURCE_ACCESS_EXCEPTION)); + regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, + RegistrationStatusCode.FAILED.toString() + ex.getMessage() + ExceptionUtils.getStackTrace(ex)); + object.setInternalError(Boolean.TRUE); + object.setIsValid(Boolean.FALSE); + description.setMessage(PlatformErrorMessages.RPR_UGS_API_RESOURCE_EXCEPTION.getMessage()); + description.setCode(PlatformErrorMessages.RPR_UGS_API_RESOURCE_EXCEPTION.getCode()); + + } catch (IOException e) { + registrationStatusDto.setStatusCode(RegistrationStatusCode.FAILED.name()); + registrationStatusDto.setStatusComment( + trimExceptionMessage.trimExceptionMessage(StatusUtil.IO_EXCEPTION.getMessage() + e.getMessage())); + registrationStatusDto.setSubStatusCode(StatusUtil.IO_EXCEPTION.getCode()); + registrationStatusDto.setLatestTransactionStatusCode( + registrationStatusMapperUtil.getStatusCode(RegistrationExceptionTypeCode.IOEXCEPTION)); + regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, + PlatformErrorMessages.RPR_SYS_IO_EXCEPTION.getMessage() + ExceptionUtils.getStackTrace(e)); + object.setInternalError(Boolean.TRUE); + object.setIsValid(Boolean.FALSE); + description.setMessage(PlatformErrorMessages.RPR_SYS_IO_EXCEPTION.getMessage()); + description.setCode(PlatformErrorMessages.RPR_SYS_IO_EXCEPTION.getCode()); + } catch (Exception ex) { + registrationStatusDto.setStatusCode(RegistrationStatusCode.FAILED.name()); + registrationStatusDto.setStatusComment( + trimExceptionMessage.trimExceptionMessage(StatusUtil.UNKNOWN_EXCEPTION_OCCURED.getMessage())); + registrationStatusDto.setSubStatusCode(StatusUtil.UNKNOWN_EXCEPTION_OCCURED.getCode()); + registrationStatusDto.setLatestTransactionStatusCode( + registrationStatusMapperUtil.getStatusCode(RegistrationExceptionTypeCode.EXCEPTION)); + regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, + RegistrationStatusCode.FAILED.toString() + ex.getMessage() + ExceptionUtils.getStackTrace(ex)); + object.setInternalError(Boolean.TRUE); + object.setIsValid(Boolean.FALSE); + description.setMessage(PlatformErrorMessages.RPR_BDD_UNKNOWN_EXCEPTION.getMessage()); + description.setCode(PlatformErrorMessages.RPR_BDD_UNKNOWN_EXCEPTION.getCode()); + } finally { + if (description.getStatusComment() != null) + registrationStatusDto.setStatusComment(description.getStatusComment()); + if (description.getStatusCode() != null) + registrationStatusDto.setStatusCode(description.getStatusCode()); + if (description.getSubStatusCode() != null) + registrationStatusDto.setSubStatusCode(description.getSubStatusCode()); + if (description.getTransactionStatusCode() != null) + registrationStatusDto.setLatestTransactionStatusCode(description.getTransactionStatusCode()); + + String moduleId = isTransactionSuccessful + ? PlatformSuccessMessages.RPR_UIN_GENERATOR_STAGE_SUCCESS.getCode() + : description.getCode(); + String moduleName = ModuleName.UIN_GENERATOR.toString(); + registrationStatusService.updateRegistrationStatus(registrationStatusDto, moduleId, moduleName); + String eventId = isTransactionSuccessful ? EventId.RPR_402.toString() : EventId.RPR_405.toString(); + String eventName = eventId.equalsIgnoreCase(EventId.RPR_402.toString()) ? EventName.UPDATE.toString() + : EventName.EXCEPTION.toString(); + String eventType = eventId.equalsIgnoreCase(EventId.RPR_402.toString()) ? EventType.BUSINESS.toString() + : EventType.SYSTEM.toString(); + + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, "Auditing stage result"); + auditLogRequestBuilder.createAuditRequestBuilder(description.getMessage(), eventId, eventName, eventType, + moduleId, moduleName, registrationId); + + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, "Finished processing rid in UinGeneratorStage"); + + } + + return object; + } + + private void handleForceMerge(MessageDTO object, boolean isTransactionSuccessful, LogDescription description, + String registrationId, UinGenResponseDto uinResponseDto, + InternalRegistrationStatusDto registrationStatusDto, JSONObject demographicIdentity, + boolean isUinAlreadyPresent) throws ApisResourceAccessException, IOException, Exception, + VidCreationException, VidServiceFailedException { + String uin = idRepoService.getUinByRid(registrationId, + utility.getGetRegProcessorDemographicIdentity()); + + demographicIdentity.put("UIN", uin); + + IdResponseDTO sendIdRepoWithUin = sendIdRepoWithUin(registrationId, + registrationStatusDto.getRegistrationType(), demographicIdentity, uin, description); + + if(isIdResponseNotNull(sendIdRepoWithUin)) { + handleIdRepoSuccessResponse( registrationStatusDto, registrationId, isUinAlreadyPresent, isTransactionSuccessful, uinResponseDto, object, description); + }else { + handleIdRepoErrorResponse(sendIdRepoWithUin, registrationStatusDto, registrationId, isTransactionSuccessful, uinResponseDto, object, description); + } + } + + private void loadDemographicIdentity(Map fieldMap, JSONObject demographicIdentity) throws IOException, JSONException { + for (Map.Entry e : fieldMap.entrySet()) { + if (e.getValue() != null) { + String value = e.getValue().toString(); + if (value != null) { + Object json = new JSONTokener(value).nextValue(); + if (json instanceof org.json.JSONObject) { + HashMap hashMap = new ObjectMapper().readValue(value, HashMap.class); + demographicIdentity.putIfAbsent(e.getKey(), hashMap); + } + else if (json instanceof JSONArray) { + List jsonList = new ArrayList<>(); + JSONArray jsonArray = new JSONArray(value); + for (int i = 0; i < jsonArray.length(); i++) { + Object obj = jsonArray.get(i); + HashMap hashMap = new ObjectMapper().readValue(obj.toString(), HashMap.class); + jsonList.add(hashMap); + } + demographicIdentity.putIfAbsent(e.getKey(), jsonList); + } else + demographicIdentity.putIfAbsent(e.getKey(), value); + } else + demographicIdentity.putIfAbsent(e.getKey(), value); + } + } + } + + /** + * Send id repo with uin. + * + * @param regId + * the reg id + * @param uin + * the uin + * @param description + * @return the id response DTO + * @throws ApisResourceAccessException + * @throws IOException + * @throws JsonMappingException + * @throws JsonParseException + * @throws VidCreationException + * @throws io.mosip.kernel.core.exception.IOException + * @throws Exception + */ + private IdResponseDTO sendIdRepoWithUin(String regId, String process, JSONObject demographicIdentity, String uin, + LogDescription description) + throws Exception { + + List documentInfo = getAllDocumentsByRegId(regId, process, demographicIdentity); + RequestDto requestDto = new RequestDto(); + requestDto.setIdentity(demographicIdentity); + requestDto.setDocuments(documentInfo); + requestDto.setRegistrationId(regId); + requestDto.setStatus(RegistrationType.ACTIVATED.toString()); + requestDto.setBiometricReferenceId(uin); + + IdResponseDTO result = null; + IdRequestDto idRequestDTO = new IdRequestDto(); + idRequestDTO.setId(idRepoCreate); + idRequestDTO.setRequest(requestDto); + idRequestDTO.setRequesttime(DateUtils.getUTCCurrentDateTimeString()); + idRequestDTO.setVersion(UINConstants.idRepoApiVersion); + idRequestDTO.setMetadata(null); + + try { + + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + regId, "Calling IDREPOSITORY create API to link uin with applicant"); + + result = (IdResponseDTO) registrationProcessorRestClientService.postApi(ApiName.IDREPOSITORY, "", "", + idRequestDTO, IdResponseDTO.class); + + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + regId, "Received response from IDREPOSITORY create API"); + + } catch (ApisResourceAccessException e) { + + if (e.getCause() instanceof HttpClientErrorException) { + HttpClientErrorException httpClientException = (HttpClientErrorException) e.getCause(); + description.setMessage(UINConstants.UIN_GENERATION_FAILED + regId + "::" + + httpClientException.getResponseBodyAsString()); + throw new ApisResourceAccessException(httpClientException.getResponseBodyAsString(), + httpClientException); + } else if (e.getCause() instanceof HttpServerErrorException) { + HttpServerErrorException httpServerException = (HttpServerErrorException) e.getCause(); + description.setMessage(UINConstants.UIN_GENERATION_FAILED + regId + "::" + + httpServerException.getResponseBodyAsString()); + + throw new ApisResourceAccessException(httpServerException.getResponseBodyAsString(), + httpServerException); + } else { + description.setMessage(UINConstants.UIN_GENERATION_FAILED + regId + "::" + e.getMessage()); + throw e; + } + + } + return result; + + } + +private void handleIdRepoSuccessResponse(InternalRegistrationStatusDto registrationStatusDto, + String registrationId, boolean isUinAlreadyPresent, boolean isTransactionSuccessful, + UinGenResponseDto uinResponseDto, MessageDTO object, LogDescription description) throws ApisResourceAccessException, VidCreationException, VidServiceFailedException, IOException { + + generateVid(registrationId, uinResponseDto.getResponse().getUin(), isUinAlreadyPresent); + registrationStatusDto.setStatusComment(StatusUtil.UIN_GENERATED_SUCCESS.getMessage()); + registrationStatusDto.setSubStatusCode(StatusUtil.UIN_GENERATED_SUCCESS.getCode()); + String uinStatus = isUinAlreadyPresent ? UINConstants.UIN_UNASSIGNED : UINConstants.UIN_ASSIGNED; + sendResponseToUinGenerator(registrationId, uinResponseDto.getResponse().getUin(), uinStatus); + isTransactionSuccessful = true; + registrationStatusDto.setStatusCode(RegistrationStatusCode.PROCESSED.toString()); + description.setMessage(PlatformSuccessMessages.RPR_UIN_GENERATOR_STAGE_SUCCESS.getMessage()); + description.setCode(PlatformSuccessMessages.RPR_UIN_GENERATOR_STAGE_SUCCESS.getCode()); + description.setTransactionStatusCode(RegistrationTransactionStatusCode.PROCESSED.toString()); + } + +private void handleIdRepoErrorResponse(IdResponseDTO idResponseDTO, InternalRegistrationStatusDto registrationStatusDto, + String registrationId,boolean isTransactionSuccessful, + UinGenResponseDto uinResponseDto,MessageDTO object, LogDescription description) throws ApisResourceAccessException, IOException{ + List errors = idResponseDTO != null ? idResponseDTO.getErrors() : null; + + String statusComment = errors != null ? errors.get(0).getMessage() : UINConstants.NULL_IDREPO_RESPONSE; + + if(errors!=null && errors.get(0).getErrorCode().equalsIgnoreCase(RECORD_ALREADY_EXISTS_ERROR)) { + registrationStatusDto.setStatusCode(RegistrationTransactionStatusCode.ERROR.toString()); + registrationStatusDto.setLatestTransactionStatusCode( + RegistrationTransactionStatusCode.IN_PROGRESS.toString()); + registrationStatusDto.setStatusComment(StatusUtil.UIN_ALREADY_EXIST_IN_IDREPO.getMessage()); + registrationStatusDto.setSubStatusCode(StatusUtil.UIN_ALREADY_EXIST_IN_IDREPO.getCode()); + description.setTransactionStatusCode(RegistrationTransactionStatusCode.IN_PROGRESS.toString()); + + }else if(errors!=null && errors.get(0).getErrorCode().equalsIgnoreCase(OLD_APPLICATION_ID)) { + registrationStatusDto.setStatusComment(StatusUtil.OLD_APPLICATION_ID.getMessage()); + registrationStatusDto.setStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); + registrationStatusDto + .setLatestTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); + registrationStatusDto.setSubStatusCode(StatusUtil.OLD_APPLICATION_ID.getCode()); + description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); + + }else { + registrationStatusDto.setStatusComment(trimExceptionMessage + .trimExceptionMessage(StatusUtil.UIN_GENERATION_FAILED.getMessage() + statusComment)); + registrationStatusDto.setSubStatusCode(StatusUtil.UIN_GENERATION_FAILED.getCode()); + registrationStatusDto.setStatusCode(RegistrationStatusCode.REJECTED.toString()); + registrationStatusDto.setLatestTransactionStatusCode(registrationStatusMapperUtil + .getStatusCode(RegistrationExceptionTypeCode.PACKET_UIN_GENERATION_FAILED)); + description.setTransactionStatusCode(registrationStatusMapperUtil + .getStatusCode(RegistrationExceptionTypeCode.PACKET_UIN_GENERATION_FAILED)); + + } + description.setMessage(PlatformErrorMessages.RPR_UGS_UIN_UPDATE_FAILURE.getMessage()); + description.setCode(PlatformErrorMessages.RPR_UGS_UIN_UPDATE_FAILURE.getCode()); + sendResponseToUinGenerator(registrationId, uinResponseDto.getResponse().getUin(), + UINConstants.UIN_UNASSIGNED); + isTransactionSuccessful = false; + String idres = idResponseDTO != null ? idResponseDTO.toString() : UINConstants.NULL_IDREPO_RESPONSE; + + regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, statusComment + " : " + idres); + object.setInternalError(Boolean.TRUE); + object.setIsValid(false); +} + + + + /** + * Gets the all documents by reg id. + * + * @param regId + * the reg id + * @return the all documents by reg id + * @throws IOException + * @throws io.mosip.kernel.core.exception.IOException + * @throws ApisResourceAccessException + * @throws JsonMappingException + * @throws JsonParseException + */ + private List getAllDocumentsByRegId(String regId, String process, JSONObject demographicIdentity) throws Exception { + List applicantDocuments = new ArrayList<>(); + + JSONObject idJSON = demographicIdentity; + JSONObject docJson = utility.getRegistrationProcessorMappingJson(MappingJsonConstants.DOCUMENT); + JSONObject identityJson = utility.getRegistrationProcessorMappingJson(MappingJsonConstants.IDENTITY); + + String proofOfAddressLabel = JsonUtil.getJSONValue(JsonUtil.getJSONObject(docJson, MappingJsonConstants.POA), MappingJsonConstants.VALUE); + String proofOfDateOfBirthLabel = JsonUtil.getJSONValue(JsonUtil.getJSONObject(docJson, MappingJsonConstants.POB), MappingJsonConstants.VALUE); + String proofOfIdentityLabel = JsonUtil.getJSONValue(JsonUtil.getJSONObject(docJson, MappingJsonConstants.POI), MappingJsonConstants.VALUE); + String proofOfRelationshipLabel = JsonUtil.getJSONValue(JsonUtil.getJSONObject(docJson, MappingJsonConstants.POR), MappingJsonConstants.VALUE); + String proofOfExceptionLabel = JsonUtil.getJSONValue(JsonUtil.getJSONObject(docJson, MappingJsonConstants.POE), MappingJsonConstants.VALUE); + String applicantBiometricLabel = JsonUtil.getJSONValue(JsonUtil.getJSONObject(identityJson, MappingJsonConstants.INDIVIDUAL_BIOMETRICS), MappingJsonConstants.VALUE); + + HashMap proofOfAddress = (HashMap) idJSON.get(proofOfAddressLabel); + HashMap proofOfDateOfBirth = (HashMap) idJSON.get(proofOfDateOfBirthLabel); + HashMap proofOfIdentity = (HashMap) idJSON.get(proofOfIdentityLabel); + HashMap proofOfRelationship = (HashMap) idJSON.get(proofOfRelationshipLabel); + HashMap proofOfException = (HashMap) idJSON.get(proofOfExceptionLabel); + HashMap applicantBiometric = (HashMap) idJSON.get(applicantBiometricLabel); + if (proofOfAddress != null) { + applicantDocuments + .add(getIdDocumnet(regId, proofOfAddressLabel, process)); + } + if (proofOfDateOfBirth != null) { + applicantDocuments + .add(getIdDocumnet(regId, proofOfDateOfBirthLabel, process)); + } + if (proofOfIdentity != null) { + applicantDocuments + .add(getIdDocumnet(regId, proofOfIdentityLabel, process)); + } + if (proofOfRelationship != null) { + applicantDocuments + .add(getIdDocumnet(regId, proofOfRelationshipLabel, process)); + } + if (proofOfException != null) { + applicantDocuments + .add(getIdDocumnet(regId, proofOfExceptionLabel, process)); + } + if (applicantBiometric != null) { + applicantDocuments.add(getBiometrics(regId, applicantBiometricLabel, process, applicantBiometricLabel)); + } + return applicantDocuments; + } + + private Documents getIdDocumnet(String registrationId, String dockey, String process) + throws IOException, ApisResourceAccessException, PacketManagerException, io.mosip.kernel.core.util.exception.JsonProcessingException { + Documents documentsInfoDto = new Documents(); + + Document document = + packetManagerService.getDocument(registrationId, dockey, process, ProviderStageName.UIN_GENERATOR); + if (document != null) { + documentsInfoDto.setValue(CryptoUtil.encodeBase64(document.getDocument())); + documentsInfoDto.setCategory(document.getValue()); + return documentsInfoDto; + } + return null; + } + + private Documents getBiometrics(String registrationId, String person, String process, String idDocLabel) throws Exception { + BiometricRecord biometricRecord = packetManagerService.getBiometrics(registrationId, person, process, ProviderStageName.UIN_GENERATOR); + byte[] xml = cbeffutil.createXML(BIRConverter.convertSegmentsToBIRList(biometricRecord.getSegments())); + Documents documentsInfoDto = new Documents(); + documentsInfoDto.setValue(CryptoUtil.encodeBase64(xml)); + documentsInfoDto.setCategory(utility.getMappingJsonValue(idDocLabel, MappingJsonConstants.IDENTITY)); + return documentsInfoDto; + + } + + /** + * Update id repo wit uin. + * + * @param regId the reg id + * @param uin the uin + * @param object the object + * @param description + * @return the id response DTO + * @throws ApisResourceAccessException the apis resource access + * exception + * @throws IOException Signals that an I/O exception + * has occurred. + * @throws RegistrationProcessorCheckedException + * @throws io.mosip.kernel.core.exception.IOException + */ + private boolean uinUpdate(String regId, String process, String uin, MessageDTO object, JSONObject demographicIdentity, LogDescription description) + throws Exception { + IdResponseDTO result; + boolean isTransactionSuccessful = Boolean.FALSE; + List documentInfo = getAllDocumentsByRegId(regId, process, demographicIdentity); + result = idRepoRequestBuilder(RegistrationType.ACTIVATED.toString().toUpperCase(), regId, documentInfo, + demographicIdentity); + if (isIdResponseNotNull(result)) { + + if ((RegistrationType.ACTIVATED.toString().toUpperCase()) + .equalsIgnoreCase(result.getResponse().getStatus())) { + isTransactionSuccessful = true; + description.setStatusCode(RegistrationStatusCode.PROCESSED.toString()); + description.setStatusComment(StatusUtil.UIN_DATA_UPDATION_SUCCESS.getMessage()); + description.setSubStatusCode(StatusUtil.UIN_DATA_UPDATION_SUCCESS.getCode()); + description.setMessage( + StatusUtil.UIN_DATA_UPDATION_SUCCESS.getMessage() + " for registration Id: " + regId); + description.setTransactionStatusCode(RegistrationTransactionStatusCode.PROCESSED.toString()); + object.setIsValid(Boolean.TRUE); + } + } else { + String statusComment = result != null && result.getErrors() != null ? result.getErrors().get(0).getMessage() + : UINConstants.NULL_IDREPO_RESPONSE; + description.setStatusCode(RegistrationStatusCode.FAILED.toString()); + description.setStatusComment(trimExceptionMessage + .trimExceptionMessage(StatusUtil.UIN_DATA_UPDATION_FAILED.getMessage() + statusComment)); + description.setSubStatusCode(StatusUtil.UIN_DATA_UPDATION_FAILED.getCode()); + description + .setMessage(UINConstants.UIN_FAILURE + regId + "::" + result != null && result.getErrors() != null + ? result.getErrors().get(0).getMessage() + : UINConstants.NULL_IDREPO_RESPONSE); + description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); + object.setIsValid(Boolean.FALSE); + } + return isTransactionSuccessful; + } + + /** + * Id repo request builder. + * + * @param status + * the status + * @param regId + * the reg id + * @param demographicIdentity + * the JSONObject + * @param documentInfo + * the document info + * @return the id response DTO + * @throws ApisResourceAccessException + * the apis resource access exception + * @throws IOException + */ + private IdResponseDTO idRepoRequestBuilder(String status, String regId, List documentInfo, + JSONObject demographicIdentity) throws ApisResourceAccessException, IOException { + IdResponseDTO idResponseDto; + List pathsegments = new ArrayList<>(); + RequestDto requestDto = new RequestDto(); + + if (documentInfo != null) { + requestDto.setDocuments(documentInfo); + } + + requestDto.setRegistrationId(regId); + requestDto.setStatus(status); + requestDto.setIdentity(demographicIdentity); + + // pathsegments.add(Long.toString(uin)); + + IdRequestDto idRequestDTO = new IdRequestDto(); + idRequestDTO.setId(idRepoUpdate); + idRequestDTO.setMetadata(null); + idRequestDTO.setRequest(requestDto); + idRequestDTO.setRequesttime(DateUtils.getUTCCurrentDateTimeString()); + idRequestDTO.setVersion(UINConstants.idRepoApiVersion); + + idResponseDto = (IdResponseDTO) registrationProcessorRestClientService.patchApi(ApiName.IDREPOSITORY, + pathsegments, "", "", idRequestDTO, IdResponseDTO.class); + + return idResponseDto; + } + + /** + * Re activate uin. + * + * @param regId + * the reg id + * @param uin + * the uin + * @param object + * the object + * @param description + * @return the id response DTO + * @throws ApisResourceAccessException + * the apis resource access exception + * @throws IOException + */ + private boolean reActivateUin(IdResponseDTO idResponseDTO, String regId, String uin, MessageDTO object, + JSONObject demographicIdentity, LogDescription description) + throws ApisResourceAccessException, IOException { + IdResponseDTO result = getIdRepoDataByUIN(uin, regId, description); + List pathsegments = new ArrayList<>(); + RequestDto requestDto = new RequestDto(); + boolean isTransactionSuccessful = Boolean.FALSE; + + if (isIdResponseNotNull(result)) { + + if ((RegistrationType.ACTIVATED.toString()).equalsIgnoreCase(result.getResponse().getStatus())) { + + description.setStatusCode(RegistrationStatusCode.FAILED.toString()); + description.setStatusComment(StatusUtil.UIN_ALREADY_ACTIVATED.getMessage()); + description.setSubStatusCode(StatusUtil.UIN_ALREADY_ACTIVATED.getCode()); + description.setMessage(PlatformErrorMessages.UIN_ALREADY_ACTIVATED.getMessage()); + description.setCode(PlatformErrorMessages.UIN_ALREADY_ACTIVATED.getCode()); + description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); + object.setIsValid(Boolean.FALSE); + return isTransactionSuccessful; + + } else { + + requestDto.setRegistrationId(regId); + requestDto.setStatus(RegistrationType.ACTIVATED.toString()); + requestDto.setBiometricReferenceId(uin); + requestDto.setIdentity(demographicIdentity); + + IdRequestDto idRequestDTO = new IdRequestDto(); + idRequestDTO.setId(idRepoUpdate); + idRequestDTO.setRequest(requestDto); + idRequestDTO.setMetadata(null); + idRequestDTO.setRequesttime(DateUtils.getUTCCurrentDateTimeString()); + idRequestDTO.setVersion(UINConstants.idRepoApiVersion); + + result = (IdResponseDTO) registrationProcessorRestClientService.patchApi(ApiName.IDREPOSITORY, + pathsegments, "", "", idRequestDTO, IdResponseDTO.class); + + if (isIdResponseNotNull(result)) { + + if ((RegistrationType.ACTIVATED.toString()).equalsIgnoreCase(result.getResponse().getStatus())) { + isTransactionSuccessful = true; + description.setStatusCode(RegistrationStatusCode.PROCESSED.toString()); + description.setStatusComment(StatusUtil.UIN_ACTIVATED_SUCCESS.getMessage()); + description.setSubStatusCode(StatusUtil.UIN_ACTIVATED_SUCCESS.getCode()); + description.setMessage(StatusUtil.UIN_ACTIVATED_SUCCESS.getMessage() + regId); + description.setMessage(PlatformSuccessMessages.RPR_UIN_ACTIVATED_SUCCESS.getMessage()); + description.setCode(PlatformSuccessMessages.RPR_UIN_ACTIVATED_SUCCESS.getCode()); + description.setTransactionStatusCode(RegistrationTransactionStatusCode.PROCESSED.toString()); + object.setIsValid(Boolean.TRUE); + } else { + description.setStatusCode(RegistrationStatusCode.FAILED.toString()); + description.setStatusComment(StatusUtil.UIN_ACTIVATED_FAILED.getMessage()); + description.setSubStatusCode(StatusUtil.UIN_ACTIVATED_FAILED.getCode()); + description.setMessage(StatusUtil.UIN_ACTIVATED_FAILED.getMessage() + regId); + description.setMessage(PlatformErrorMessages.UIN_ACTIVATED_FAILED.getMessage()); + description.setCode(PlatformErrorMessages.UIN_ACTIVATED_FAILED.getCode()); + description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); + object.setIsValid(Boolean.FALSE); + } + } else { + String statusComment = result != null && result.getErrors() != null + ? result.getErrors().get(0).getMessage() + : UINConstants.NULL_IDREPO_RESPONSE; + description.setStatusCode(RegistrationStatusCode.FAILED.toString()); + description.setStatusComment(trimExceptionMessage + .trimExceptionMessage(StatusUtil.UIN_REACTIVATION_FAILED.getMessage() + statusComment)); + description.setSubStatusCode(StatusUtil.UIN_REACTIVATION_FAILED.getCode()); + description.setMessage( + UINConstants.UIN_FAILURE + regId + "::" + result != null && result.getErrors() != null + ? result.getErrors().get(0).getMessage() + : UINConstants.NULL_IDREPO_RESPONSE); + description.setMessage(PlatformErrorMessages.UIN_REACTIVATION_FAILED.getMessage()); + description.setCode(PlatformErrorMessages.UIN_REACTIVATION_FAILED.getCode()); + description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); + object.setIsValid(Boolean.FALSE); + } + + } + + } + + return isTransactionSuccessful; + } + + private boolean isIdResponseNotNull(IdResponseDTO result) { + return result != null && result.getResponse() != null; + } + + private boolean isUinAlreadyPresent(IdResponseDTO result, String rid) { + if (result != null && result.getErrors() != null && result.getErrors().size() > 0 + && result.getErrors().get(0).getErrorCode().equalsIgnoreCase(RECORD_ALREADY_EXISTS_ERROR)) { + ErrorDTO errorDTO = result.getErrors().get(0); + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), + LoggerFileConstant.REGISTRATIONID.toString() + rid, + "Record is already present in IDREPO. Error message received : " + errorDTO.getMessage(), + "The stage will ignore this error and try to generate vid for the existing UIN now. " + + "This is to make sure if the packet processing fails while generating VID then re-processor can process the packet again"); + return true; + } + return false; + } + + /** + * Deactivate uin. + * + * @param regId + * the reg id + * @param uin + * the uin + * @param object + * the object + * @param description + * @return the id response DTO + * @throws ApisResourceAccessException + * @throws IOException + */ + private IdResponseDTO deactivateUin(String regId, String uin, MessageDTO object, JSONObject demographicIdentity, + LogDescription description) throws ApisResourceAccessException, IOException { + IdResponseDTO idResponseDto; + List pathsegments = new ArrayList<>(); + RequestDto requestDto = new RequestDto(); + String statusComment = ""; + + idResponseDto = getIdRepoDataByUIN(uin, regId, description); + + if (idResponseDto.getResponse() != null + && idResponseDto.getResponse().getStatus().equalsIgnoreCase(RegistrationType.DEACTIVATED.toString())) { + description.setStatusCode(RegistrationStatusCode.FAILED.toString()); + description.setStatusComment(StatusUtil.UIN_ALREADY_DEACTIVATED.getMessage()); + description.setSubStatusCode(StatusUtil.UIN_ALREADY_DEACTIVATED.getCode()); + description.setMessage(StatusUtil.UIN_ALREADY_DEACTIVATED.getMessage() + regId); + description.setMessage(PlatformErrorMessages.UIN_ALREADY_DEACTIVATED.getMessage()); + description.setCode(PlatformErrorMessages.UIN_ALREADY_DEACTIVATED.getCode()); + description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); + object.setIsValid(Boolean.FALSE); + return idResponseDto; + + } else { + requestDto.setRegistrationId(regId); + requestDto.setStatus(RegistrationType.DEACTIVATED.toString()); + requestDto.setIdentity(demographicIdentity); + requestDto.setBiometricReferenceId(uin); + + IdRequestDto idRequestDTO = new IdRequestDto(); + idRequestDTO.setId(idRepoUpdate); + idRequestDTO.setMetadata(null); + idRequestDTO.setRequest(requestDto); + idRequestDTO.setRequesttime(DateUtils.getUTCCurrentDateTimeString()); + idRequestDTO.setVersion(UINConstants.idRepoApiVersion); + + idResponseDto = (IdResponseDTO) registrationProcessorRestClientService.patchApi(ApiName.IDREPOSITORY, + pathsegments, "", "", idRequestDTO, IdResponseDTO.class); + + if (isIdResponseNotNull(idResponseDto)) { + if (idResponseDto.getResponse().getStatus().equalsIgnoreCase(RegistrationType.DEACTIVATED.toString())) { + description.setStatusCode(RegistrationStatusCode.PROCESSED.toString()); + description.setStatusComment(StatusUtil.UIN_DEACTIVATION_SUCCESS.getMessage()); + description.setSubStatusCode(StatusUtil.UIN_DEACTIVATION_SUCCESS.getCode()); + description.setMessage(StatusUtil.UIN_DEACTIVATION_SUCCESS.getMessage() + regId); + description.setMessage(PlatformSuccessMessages.RPR_UIN_DEACTIVATION_SUCCESS.getMessage()); + description.setCode(PlatformSuccessMessages.RPR_UIN_DEACTIVATION_SUCCESS.getCode()); + description.setTransactionStatusCode(RegistrationTransactionStatusCode.PROCESSED.toString()); + object.setIsValid(Boolean.TRUE); + statusComment = idResponseDto.getResponse().getStatus().toString(); + + } + } else { + + statusComment = idResponseDto != null && idResponseDto.getErrors() != null + ? idResponseDto.getErrors().get(0).getMessage() + : UINConstants.NULL_IDREPO_RESPONSE; + description.setStatusCode(RegistrationStatusCode.FAILED.toString()); + description.setStatusComment(trimExceptionMessage + .trimExceptionMessage(StatusUtil.UIN_DEACTIVATION_FAILED.getMessage() + statusComment)); + description.setSubStatusCode(StatusUtil.UIN_DEACTIVATION_FAILED.getCode()); + description.setMessage(PlatformErrorMessages.UIN_DEACTIVATION_FAILED.getMessage()); + description.setCode(PlatformErrorMessages.UIN_DEACTIVATION_FAILED.getCode()); + description.setTransactionStatusCode(RegistrationTransactionStatusCode.FAILED.toString()); + object.setIsValid(Boolean.FALSE); + } + + } + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), + LoggerFileConstant.REGISTRATIONID.toString() + regId, "Updated Response from IdRepo API", + "is : " + statusComment); + + return idResponseDto; + } + + /** + * Gets the id repo data by UIN. + * + * @param uin + * the uin + * @param description + * @return the id repo data by UIN + * @throws ApisResourceAccessException + * the apis resource access exception + * @throws IOException + */ + private IdResponseDTO getIdRepoDataByUIN(String uin, String regId, LogDescription description) + throws ApisResourceAccessException, IOException { + IdResponseDTO response; + + List pathsegments = new ArrayList<>(); + pathsegments.add(uin); + try { + + response = (IdResponseDTO) registrationProcessorRestClientService.getApi(ApiName.IDREPOGETIDBYUIN, + pathsegments, "", "", IdResponseDTO.class); + + } catch (ApisResourceAccessException e) { + if (e.getCause() instanceof HttpClientErrorException) { + HttpClientErrorException httpClientException = (HttpClientErrorException) e.getCause(); + description.setMessage(PlatformErrorMessages.UIN_GENERATION_FAILED.getMessage()); + description.setCode(PlatformErrorMessages.UIN_GENERATION_FAILED.getCode()); + throw new ApisResourceAccessException(httpClientException.getResponseBodyAsString(), + httpClientException); + } else if (e.getCause() instanceof HttpServerErrorException) { + HttpServerErrorException httpServerException = (HttpServerErrorException) e.getCause(); + description.setMessage(PlatformErrorMessages.UIN_GENERATION_FAILED.getMessage()); + description.setCode(PlatformErrorMessages.UIN_GENERATION_FAILED.getCode()); + + throw new ApisResourceAccessException(httpServerException.getResponseBodyAsString(), + httpServerException); + } else { + description.setMessage(PlatformErrorMessages.UIN_GENERATION_FAILED.getMessage()); + description.setCode(PlatformErrorMessages.UIN_GENERATION_FAILED.getCode()); + throw e; + } + } + return response; + } + + /** + * Send response to uin generator. + * + * @param uin + * the uin + * @param uinStatus + * the uin status + * @throws ApisResourceAccessException + * @throws IOException + * @throws VidCreationException + */ + private void sendResponseToUinGenerator(String registrationId, String uin, String uinStatus) + throws ApisResourceAccessException, IOException { + UinRequestDto uinRequest = new UinRequestDto(); + UinResponseDto uinDto = new UinResponseDto(); + uinDto.setUin(uin); + uinDto.setStatus(uinStatus); + uinRequest.setRequest(uinDto); + String jsonString = null; + ObjectMapper objMapper = new ObjectMapper(); + try { + jsonString = objMapper.writeValueAsString(uinRequest); + String response; + + response = (String) registrationProcessorRestClientService.putApi(ApiName.UINGENERATOR, null, "", "", + jsonString, String.class, MediaType.APPLICATION_JSON); + + Gson gsonValue = new Gson(); + UinDto uinresponse = gsonValue.fromJson(response, UinDto.class); + + if (uinresponse.getResponse() != null) { + String uinSuccessDescription = "Kernel service called successfully to update the uin status as assigned"; + + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), + LoggerFileConstant.REGISTRATIONID.toString(), registrationId, + uinSuccessDescription); + } else { + String uinErrorDescription = "Kernel service called successfully to update the uin status as unassigned"; + regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), + LoggerFileConstant.REGISTRATIONID.toString() + registrationId, "Failure", + "is : " + uinErrorDescription); + } + } catch (JsonProcessingException e) { + regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, PlatformErrorMessages.RPR_SYS_JSON_PARSING_EXCEPTION.getMessage() + e.getMessage() + + ExceptionUtils.getStackTrace(e)); + + throw e; + } catch (ApisResourceAccessException e) { + regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, PlatformErrorMessages.RPR_PVM_API_RESOUCE_ACCESS_FAILED.getMessage() + + e.getMessage() + ExceptionUtils.getStackTrace(e)); + throw e; + } + + } + + /** + * Deploy verticle. + */ + public void deployVerticle() { + + mosipEventBus = this.getEventBus(this, clusterManagerUrl, workerPoolSize); + this.consumeAndSend(mosipEventBus, MessageBusAddress.UIN_GENERATION_BUS_IN, + MessageBusAddress.UIN_GENERATION_BUS_OUT, messageExpiryTimeLimit); + } + + @Override + public void start() { + router.setRoute(this.postUrl(getVertx(), MessageBusAddress.UIN_GENERATION_BUS_IN, + MessageBusAddress.UIN_GENERATION_BUS_OUT)); + this.createServer(router.getRouter(), Integer.parseInt(port)); + + } + + @SuppressWarnings("unchecked") + private void generateVid(String registrationId, String UIN, boolean isUinAlreadyPresent) + throws ApisResourceAccessException, IOException, VidCreationException, VidServiceFailedException { + VidRequestDto vidRequestDto = new VidRequestDto(); + RequestWrapper request = new RequestWrapper(); + ResponseWrapper response; + + try { + String uin = UIN; + if (isUinAlreadyPresent) { + uin = idRepoService.getUinByRid(registrationId, utility.getGetRegProcessorDemographicIdentity()); + if (isPerpetualVidAlreadyPresent(uin)) { + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, "VID already present. Skipping vid generation."); + return; + } + } + vidRequestDto.setUIN(uin); + vidRequestDto.setVidType(vidType); + request.setId(env.getProperty(UINConstants.VID_CREATE_ID)); + request.setRequest(vidRequestDto); + DateTimeFormatter format = DateTimeFormatter.ofPattern(env.getProperty(UINConstants.DATETIME_PATTERN)); + LocalDateTime localdatetime = LocalDateTime.parse( + DateUtils.getUTCCurrentDateTimeString(env.getProperty(UINConstants.DATETIME_PATTERN)), format); + request.setRequesttime(localdatetime); + request.setVersion(env.getProperty(UINConstants.REG_PROC_APPLICATION_VERSION)); + + regProcLogger.debug(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, + "UinGeneratorStage::generateVid():: post CREATEVID service call started with request data : " + + JsonUtil.objectMapperObjectToJson(request)); + + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, "Calling IDREPO CREATEVID API to create new vid"); + + response = (ResponseWrapper) registrationProcessorRestClientService + .postApi(ApiName.CREATEVID, "", "", request, ResponseWrapper.class); + + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, "Received response from CREATEVID API"); + + regProcLogger.debug(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, + "UinGeneratorStage::generateVid():: create Vid response :: "+JsonUtil.objectMapperObjectToJson(response)); + + if (!response.getErrors().isEmpty()) { + throw new VidCreationException(PlatformErrorMessages.RPR_UGS_VID_EXCEPTION.getMessage(), + "VID creation exception"); + + } + + } catch (ApisResourceAccessException | VidServiceFailedException e) { + regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + registrationId, PlatformErrorMessages.RPR_UGS_API_RESOURCE_EXCEPTION.getMessage() + e.getMessage() + + ExceptionUtils.getStackTrace(e)); + throw e; + } + } + + /** + * Link reg id wrt uin. + * + * @param lostPacketRegId + * the lost packet reg id + * @param matchedRegId + * the matched reg id + * @param object + * the object + * @param description + * @return the id response DTO + * @throws ApisResourceAccessException + * the apis resource access exception + * @throws IOException + * Signals that an I/O exception has occurred. + */ + @SuppressWarnings("unchecked") + private IdResponseDTO linkRegIdWrtUin(String lostPacketRegId, String matchedRegId, String process, MessageDTO object, + LogDescription description) throws ApisResourceAccessException, IOException, io.mosip.kernel.core.util.exception.JsonProcessingException, PacketManagerException { + + IdResponseDTO idResponse = null; + String uin = idRepoService.getUinByRid(matchedRegId, utility.getGetRegProcessorDemographicIdentity()); + + + RequestDto requestDto = new RequestDto(); + String statusComment = ""; + + if (uin != null) { + + JSONObject regProcessorIdentityJson = utility.getRegistrationProcessorMappingJson(MappingJsonConstants.IDENTITY); + String idschemaversion = JsonUtil.getJSONValue(JsonUtil.getJSONObject(regProcessorIdentityJson, MappingJsonConstants.IDSCHEMA_VERSION), MappingJsonConstants.VALUE); + + JSONObject identityObject = new JSONObject(); + identityObject.put(UINConstants.UIN, uin); + String schemaVersion = packetManagerService.getFieldByMappingJsonKey(lostPacketRegId, MappingJsonConstants.IDSCHEMA_VERSION, process, ProviderStageName.UIN_GENERATOR); + identityObject.put(idschemaversion, convertIdschemaToDouble ? Double.valueOf(schemaVersion) : schemaVersion); + + requestDto.setRegistrationId(lostPacketRegId); + requestDto.setIdentity(identityObject); + + IdRequestDto idRequestDTO = new IdRequestDto(); + idRequestDTO.setId(idRepoUpdate); + idRequestDTO.setRequest(requestDto); + idRequestDTO.setMetadata(null); + idRequestDTO.setRequesttime(DateUtils.getUTCCurrentDateTimeString()); + idRequestDTO.setVersion(UINConstants.idRepoApiVersion); + + idResponse = (IdResponseDTO) registrationProcessorRestClientService.patchApi(ApiName.IDREPOSITORY, null, "", + "", idRequestDTO, IdResponseDTO.class); + + if (isIdResponseNotNull(idResponse)) { + description.setStatusCode(RegistrationStatusCode.PROCESSED.toString()); + description.setStatusComment(StatusUtil.LINK_RID_FOR_LOST_PACKET_SUCCESS.getMessage()); + description.setSubStatusCode(StatusUtil.LINK_RID_FOR_LOST_PACKET_SUCCESS.getCode()); + description.setMessage(UinStatusMessage.PACKET_LOST_UIN_UPDATION_SUCCESS_MSG + lostPacketRegId); + description.setTransactionStatusCode(RegistrationTransactionStatusCode.PROCESSED.toString()); + object.setIsValid(Boolean.TRUE); + + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), + LoggerFileConstant.REGISTRATIONID.toString() + lostPacketRegId, + " UIN LINKED WITH " + matchedRegId, "is : " + description); + } else { + + statusComment = idResponse != null && idResponse.getErrors() != null + && idResponse.getErrors().get(0) != null ? idResponse.getErrors().get(0).getMessage() + : UinStatusMessage.PACKET_LOST_UIN_UPDATION_FAILURE_MSG + " " + + UINConstants.NULL_IDREPO_RESPONSE + "for lostPacketRegId " + lostPacketRegId; + description.setStatusCode(RegistrationStatusCode.PROCESSING.toString()); + description.setStatusComment(StatusUtil.LINK_RID_FOR_LOST_PACKET_SUCCESS.getMessage() + statusComment); + description.setSubStatusCode(StatusUtil.LINK_RID_FOR_LOST_PACKET_SUCCESS.getCode()); + description.setTransactionStatusCode(registrationStatusMapperUtil + .getStatusCode(RegistrationExceptionTypeCode.PACKET_UIN_GENERATION_ID_REPO_ERROR)); + if (idResponse != null + && idResponse.getErrors() != null) + description.setMessage(idResponse.getErrors().get(0).getMessage()); + else + description.setMessage(UINConstants.NULL_IDREPO_RESPONSE); + object.setIsValid(Boolean.FALSE); + regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), + LoggerFileConstant.REGISTRATIONID.toString() + lostPacketRegId, + " UIN NOT LINKED WITH " + matchedRegId, "is : " + statusComment); + } + + } else { + statusComment = UinStatusMessage.PACKET_LOST_UIN_UPDATION_FAILURE_MSG + " " + + UINConstants.NULL_IDREPO_RESPONSE + " UIN not available for matchedRegId " + matchedRegId; + description.setStatusComment(StatusUtil.LINK_RID_FOR_LOST_PACKET_FAILED.getMessage()); + description.setSubStatusCode(StatusUtil.LINK_RID_FOR_LOST_PACKET_FAILED.getCode()); + description.setStatusCode(RegistrationStatusCode.REJECTED.toString()); + description.setTransactionStatusCode(registrationStatusMapperUtil + .getStatusCode(RegistrationExceptionTypeCode.PACKET_UIN_GENERATION_FAILED)); + description.setMessage(UinStatusMessage.PACKET_LOST_UIN_UPDATION_FAILURE_MSG + " " + + UINConstants.NULL_IDREPO_RESPONSE + " UIN not available for matchedRegId " + matchedRegId); + + object.setIsValid(Boolean.FALSE); + regProcLogger.error(LoggerFileConstant.SESSIONID.toString(), + LoggerFileConstant.REGISTRATIONID.toString() + lostPacketRegId, + " UIN NOT LINKED WITH " + matchedRegId, "is : " + statusComment); + } + + return idResponse; + } + + private boolean isPerpetualVidAlreadyPresent(String uin) throws ApisResourceAccessException, VidServiceFailedException { + List pathsegments = new ArrayList<>(); + pathsegments.add(uin); + + VidsInfosDTO vidsInfosDTO; + + regProcLogger.debug(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), "", + "PrintServiceImpl::getVid():: get GETVIDSBYUIN service call started with request data : " + ); + + vidsInfosDTO = (VidsInfosDTO) registrationProcessorRestClientService.getApi(ApiName.GETVIDSBYUIN, + pathsegments, "", "", VidsInfosDTO.class); + + if (CollectionUtils.isEmpty(vidsInfosDTO.getErrors()) + && CollectionUtils.isNotEmpty(vidsInfosDTO.getResponse())) { + for (io.mosip.registration.processor.core.idrepo.dto.VidInfoDTO VidInfoDTO : vidsInfosDTO.getResponse()) { + if (VidType.PERPETUAL.name().equalsIgnoreCase(VidInfoDTO.getVidType())) { + return true; + } + } + } else if (CollectionUtils.isNotEmpty(vidsInfosDTO.getErrors())) { + throw new VidServiceFailedException(vidsInfosDTO.getErrors().iterator().next().getErrorCode(), + vidsInfosDTO.getErrors().iterator().next().getMessage()); + } + return false; + } + + public static String getHMACHashCode(String value) throws NoSuchAlgorithmException { + if (value == null) + return null; + return CryptoUtil.encodeBase64(HMACUtils2.generateHash(value.getBytes())); + + } + +} diff --git a/registration-processor/init/pom.xml b/registration-processor/init/pom.xml index bdc61ac627f..7ada9cc1581 100644 --- a/registration-processor/init/pom.xml +++ b/registration-processor/init/pom.xml @@ -1,19 +1,19 @@ - - - 4.0.0 - pom - - io.mosip.registrationprocessor - registration-processor - 1.1.5.5-P3-rc1 - - init - - UTF-8 - - - registration-processor-packet-receiver-stage - registration-processor-registration-status-service - - + + + 4.0.0 + pom + + io.mosip.registrationprocessor + registration-processor + 1.1.5.5-P3-rc2 + + init + + UTF-8 + + + registration-processor-packet-receiver-stage + registration-processor-registration-status-service + + diff --git a/registration-processor/init/registration-processor-packet-receiver-stage/pom.xml b/registration-processor/init/registration-processor-packet-receiver-stage/pom.xml index 8c04c84a714..5d999bb95d2 100644 --- a/registration-processor/init/registration-processor-packet-receiver-stage/pom.xml +++ b/registration-processor/init/registration-processor-packet-receiver-stage/pom.xml @@ -1,152 +1,152 @@ - - - 4.0.0 - - io.mosip.registrationprocessor - init - 1.1.5.5-P3-rc1 - - - registration-processor-packet-receiver-stage - 1.1.5.5-P3-rc1 - registration-processor-packet-receiver-stage - - - UTF-8 - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - junit - junit - test - - - - org.mockito - mockito-core - ${mockito.version} - test - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - io.vertx - vertx-unit - ${vertx.version} - test - - - io.vertx - vertx-web-client - 3.6.2 - - - org.apache.httpcomponents - httpmime - 4.3.1 - - - - org.springframework - spring-context - 5.0.6.RELEASE - - - - io.springfox - springfox-swagger-ui - ${swagger.version} - - - io.springfox - springfox-swagger2 - ${swagger.version} - - - org.postgresql - postgresql - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - io.mosip.registrationprocessor - registration-processor-packet-manager - ${packet.manager.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - javax.inject - javax.inject - 1 - - - io.mosip.kernel - kernel-virusscanner-clamav - ${kernel.clamav.version} - - - - - - com.h2database - h2 - ${h2.version} - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - + + + 4.0.0 + + io.mosip.registrationprocessor + init + 1.1.5.5-P3-rc2 + + + registration-processor-packet-receiver-stage + 1.1.5.5-P3-rc2 + registration-processor-packet-receiver-stage + + + UTF-8 + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + junit + junit + test + + + + org.mockito + mockito-core + ${mockito.version} + test + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + io.vertx + vertx-unit + ${vertx.version} + test + + + io.vertx + vertx-web-client + 3.6.2 + + + org.apache.httpcomponents + httpmime + 4.3.1 + + + + org.springframework + spring-context + 5.0.6.RELEASE + + + + io.springfox + springfox-swagger-ui + ${swagger.version} + + + io.springfox + springfox-swagger2 + ${swagger.version} + + + org.postgresql + postgresql + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + io.mosip.registrationprocessor + registration-processor-packet-manager + ${packet.manager.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + javax.inject + javax.inject + 1 + + + io.mosip.kernel + kernel-virusscanner-clamav + ${kernel.clamav.version} + + + + + + com.h2database + h2 + ${h2.version} + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + diff --git a/registration-processor/init/registration-processor-registration-status-service/pom.xml b/registration-processor/init/registration-processor-registration-status-service/pom.xml index 3b1f32ea3c3..059a289f957 100644 --- a/registration-processor/init/registration-processor-registration-status-service/pom.xml +++ b/registration-processor/init/registration-processor-registration-status-service/pom.xml @@ -1,67 +1,67 @@ - - - - 4.0.0 - - - io.mosip.registrationprocessor - init - 1.1.5.5-P3-rc1 - - registration-processor-registration-status-service - 1.1.5.5-P3-rc1 - - registration-processor-registration-status-service - - - UTF-8 - - - - - junit - junit - test - - - org.springframework.boot - spring-boot-starter-web - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - org.springframework.boot - spring-boot-starter-security - - - org.springframework.security - spring-security-test - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - ZIP - - - - - build-info - repackage - - - - - - - + + + + 4.0.0 + + + io.mosip.registrationprocessor + init + 1.1.5.5-P3-rc2 + + registration-processor-registration-status-service + 1.1.5.5-P3-rc2 + + registration-processor-registration-status-service + + + UTF-8 + + + + + junit + junit + test + + + org.springframework.boot + spring-boot-starter-web + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.security + spring-security-test + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + ZIP + + + + + build-info + repackage + + + + + + + diff --git a/registration-processor/pom.xml b/registration-processor/pom.xml index f68b7ff1555..012a65bf62f 100644 --- a/registration-processor/pom.xml +++ b/registration-processor/pom.xml @@ -1,488 +1,488 @@ - - - 4.0.0 - - - io.mosip - registration - 1.1.5.5-P3-rc1 - - - io.mosip.registrationprocessor - registration-processor - 1.1.5.5-P3-rc1 - pom - - registration-processor - Parent project of MOSIP Registration processor - - - none - true - UTF-8 - 11 - 11 - 3.8.0 - 3.0.2 - 3.1.0 - 3.0.0-M5 - 0.8.1 - 3.7.0.1746 - 3.2.0 - - - 5.0.6.RELEASE - 5.0.4.RELEASE - 2.0.2.RELEASE - 2.0.9.RELEASE - 2.0.0.RELEASE - - 4.0.1.RELEASE - 2.0.0.RELEASE - - - 3.0.0 - 2.0.1.Final - 2.9.5 - 6.0.12.Final - 2.1.1 - 1.7.25 - 4.5.6 - - - 2.9.2 - - - 2.5.0 - 5.1.46 - 1.4.195 - 42.2.2 - - - 1.18.8 - - - 2.3.0 - - - 1.60 - 1.6 - - - 3.6.1 - 3.7 - 2.6 - 1.10 - 1.9.2 - 2.2 - 2.6 - 1.7 - 2.0 - - - 4.12 - 1.2.3 - 1.7.19 - 3.4.4 - 2.0.7 - 2.0.7 - 3.1.0 - 1.1.1 - 1.9 - - 1.11.368 - 0.2.4 - - - 3.9.1 - 2.23.0 - 1.0.0 - - 1.1.1 - - - 2.8.1 - - - 0.1.55 - - - 1.1.5.5-P1 - 1.1.5.5-P3-rc1 - 1.1.5.5 - 1.1.5.5-P1 - 1.1.5.5 - 1.1.5.5 - 1.1.5.5 - - - 1.1.5.5 - 1.1.5 - 1.1.5 - 1.1.5 - 1.1.5 - 1.1.3 - 1.1.5 - 1.1.5 - 1.1.5 - 1.1.5 - 1.1.5 - 1.1.5 - 1.1.5 - 1.1.5.4 - 1.1.5 - 1.1.5 - **/dto/**, - **/exception/*Exception.java, - **/config/*Config.java, - **/handler/*ExceptionHandler.java, - **/**/*Application.java, - **/utilities/*.java, - **/validator/*Validator.java, - **/utils/*.java, - **/util/*.java, - **/code/*.java, - **/entity/*.java, - **/config/*.java, - - **/core/code/*.java, - **/packet/storage/entity/*.java, - **/manager/exception/systemexception/*.java, - **/registration/processor/rest/client/*.java, - **/registration/processor/rest/client/audit/builder/*.java, - - **/registration/processor/packet/receiver/*.java, - **/registration/processor/packet/receiver/exception/systemexception/*.java, - **/registration/processor/failoverstage/*.java, - **/registration/processor/stages/*.java, - **/registration/processor/retry/verticle/*.java, - **/registration/processor/retry/verticle/stages/*.java, - **/registration/processor/packet/decrypter/job/stage/*.java, - **/registration/processor/packet/decryptor/job/exception/constant/*.java, - - **/registration/processor/virus/scanner/job/exceptions/*.java, - - - **/registration/processor/stages/app/*.java, - **/registration/processor/camel/bridge/processor/*.java, - **/registration/processor/core/constant/*.java, - **/registration/processor/core/packet/dto/demographicinfo/*.java, - **/registration/processor/core/packet/dto/demographicinfo/identify/*.java, - **/registration/processor/core/packet/dto/regcentermachine/*.java, - - **/registration/processor/quality/check/client/*.java, - **/registration/processor/quality/check/code/*.java, - **/registration/processor/quality/check/entity/*.java, - **/registration/processor/quality/check/exception/*.java, - **/registration/processor/quality/check/*.java, - **/registration/processor/message/sender/*.java, - **/registration/processor/message/sender/utility/*.java, - **/registration/processor/core/logger/*.java, - **/registration/processor/core/notification/template/mapping/*.java, - **/registration/processor/bio/dedupe/service/*.java, - **/registration/processor/bio/dedupe/exception/*.java, - - **/registration/processor/packet/storage/storage/*.java, - **/registration/processor/packet/storage/exception/*.java, - **/registration/processor/status/repositary/*.java, - **/registration/processor/status/entity/*.java, - **/registration/processor/virus/scanner/job/*.java, - - - **/registration/processor/packet/uploader/*.java, - **/registration/processor/biodedupe/*.java, - - - **/registration/processor/abis/config/*.java, - **/registration/processor/abis/controller/*.java, - **/registration/processor/abis/exception/*.java, - **/registration/processor/abis/messagequeue/*.java, - **/registration/processor/abis/service/*.java, - **/registration/processor/abis/service/impl/*.java, - - - **/registration/processor/abis/handler/*.java, - **/registration/processor/abis/handler/config/*.java, - - **/registration/processor/packet/service/**/*.java, - **/registration/processor/packet/upload/**/*.java, - - **/registration/processor/status/code/*.java, - **/registration/processor/rest/client/config/RestConfigBean.java, - **/registration/processor/bio/dedupe/api/BioDedupeApiApp.java, - **/registration/processor/manual/verification/response/builder/*.java, - **/registration/processor/manual/verification/config/*.java, - **/registration/processor/stages/config/OSIConfigBean.java, - **/registration/processor/stages/demo/dedupe/StatusMessage.java, - **/registration/processor/stages/demo/dedupe/DemodedupeStage.java, - **/registration/processor/stages/demo/dedupe/BiometricValidation.java, - **/registration/processor/core/exception/ExceptionJSONInfo.java, - **/registration/processor/core/config/CoreConfigBean.java, - **/registration/processor/core/kernel/beans/KernelConfig.java, - **/registration/processor/core/abstractverticle/MosipVerticleAPIManager.java, - **/registration/processor/core/http/*.java, - **/registration/processor/core/queue/factory/*.java, - **/registration/processor/core/queue/impl/*.java, - **/registration/processor/message/sender/config/MsgNotificationBeanCofig.java, - **/registration/processor/print/exception/QueueConnectionNotFound.java, - **/registration/processor/stages/demodedupe/StatusMessage.java, - **/registration/processor/print/service/utility/UINCardConstant.java, - **/registration/processor/stages/demodedupe/BiometricValidation.java, - **/registration/processor/camel/bridge/MosipBridgeFactory.java, - **/registration/processor/manual/verification/stage/ManualVerificationStage.java, - **/registration/processor/packet/receiver/builder/PacketReceiverResponseBuilder.java, - **/registration/processor/packet/receiver/stage/PacketReceiverStage.java, - **/registration/processor/camel/bridge/**/*.java, - **/registration/processor/stages/connector/stage/**/*.java, - **/registration/processor/stages/demodedupe/DemoDedupeStage.java, - - **/registration/processor/packet/storage/mapper/PacketInfoMapper.java, - **/registration/processor/packet/storage/dao/PacketInfoDao.java, - **/registration/processor/packet/uploader/constants/*.java, - **/registration/processor/packet/manager/constant/*.java, - **/registration/processor/print/exception/PrintGlobalExceptionHandler.java, - **/registration/processor/packet/receiver/constants/*.java, - **/registration/processor/print/service/exception/*.java, - **/registration/processor/print/exception/*.java, - **/registration/processor/packet/uploader/constants/*.java, - **/registration/processor/packet/uploader/decryptor/*.java, - **/registration/processor/core/abstractverticle/MosipRouter.java, - **/registration/processor/packet/uploader/decryptor/*.java, - - **/registration/processor/print/service/impl/PrintPostServiceImpl.java, - - **/registration/processor/message/sender/constants/*.java, - **/registration/processor/core/abstractverticle/BaseHealthCheckModel.java, - **/registration/processor/core/**/TokenValidator.java, - **/registration/processor/core/abstractverticle/StageHealthCheckHandler.java, - **/registration/processor/core/abstractverticle/MessageDTO.java, - **/registration/processor/request/handler/**/*.java - - **/dto/**,**/entity/**,**/config/**,**/handler/**,**/utilities/**, - **/validator/**, **/utils/**,**/util/**,**/code/** - none - - - - - - org.mockito - mockito-core - 3.4.4 - test - - - - net.bytebuddy - byte-buddy - 1.10.13 - - - org.springframework.boot - spring-boot-dependencies - ${spring.boot.version} - pom - import - - - org.projectlombok - lombok - 1.18.8 - provided - - - org.powermock - powermock-core - 2.0.7 - test - - - javax.xml.bind - jaxb-api - 2.3.1 - - - org.javassist - javassist - 3.27.0-GA - - - - - - registration-processor-core - - - registration-processor-common-camel-bridge - - - - - - init - pre-processor - core-processor - post-processor - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.version} - - ${maven.compiler.source} - ${maven.compiler.target} - - - - org.apache.maven.plugins - maven-jar-plugin - ${maven.jar.plugin.version} - - - - true - true - - - ${project.name} - ${project.version} - ${user.name} - ${os.name} - ${maven.build.timestamp} - ${env.BUILD_NUMBER} - ${env.BUILD_ID} - ${env.BUILD_URL} - - - - - - org.apache.maven.plugins - maven-war-plugin - ${maven.war.plugin.version} - - - - true - true - - - ${project.name} - ${project.version} - ${user.name} - ${os.name} - ${maven.build.timestamp} - ${env.BUILD_NUMBER} - ${env.BUILD_ID} - ${env.BUILD_URL} - - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven.surefire.plugin.version} - - false - false - - **/*IntegrationTest.java - - - --illegal-access=permit - - - - - org.jacoco - jacoco-maven-plugin - ${maven.jacoco.plugin.version} - - - org.sonarsource.scanner.maven - sonar-maven-plugin - ${maven.sonar.plugin.version} - - - verify - - sonar - - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - agent-for-ut - - prepare-agent - - - - agent-for-it - - prepare-agent-integration - - - - jacoco-site - verify - - report - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven.javadoc.version} - - true - none - - - - + + + 4.0.0 + + + io.mosip + registration + 1.1.5.5-P3-rc2 + + + io.mosip.registrationprocessor + registration-processor + 1.1.5.5-P3-rc2 + pom + + registration-processor + Parent project of MOSIP Registration processor + + + none + true + UTF-8 + 11 + 11 + 3.8.0 + 3.0.2 + 3.1.0 + 3.0.0-M5 + 0.8.1 + 3.7.0.1746 + 3.2.0 + + + 5.0.6.RELEASE + 5.0.4.RELEASE + 2.0.2.RELEASE + 2.0.9.RELEASE + 2.0.0.RELEASE + + 4.0.1.RELEASE + 2.0.0.RELEASE + + + 3.0.0 + 2.0.1.Final + 2.9.5 + 6.0.12.Final + 2.1.1 + 1.7.25 + 4.5.6 + + + 2.9.2 + + + 2.5.0 + 5.1.46 + 1.4.195 + 42.2.2 + + + 1.18.8 + + + 2.3.0 + + + 1.60 + 1.6 + + + 3.6.1 + 3.7 + 2.6 + 1.10 + 1.9.2 + 2.2 + 2.6 + 1.7 + 2.0 + + + 4.12 + 1.2.3 + 1.7.19 + 3.4.4 + 2.0.7 + 2.0.7 + 3.1.0 + 1.1.1 + 1.9 + + 1.11.368 + 0.2.4 + + + 3.9.1 + 2.23.0 + 1.0.0 + + 1.1.1 + + + 2.8.1 + + + 0.1.55 + + + 1.1.5.5-P1 + 1.1.5.5-P3-rc2 + 1.1.5.5 + 1.1.5.5-P1 + 1.1.5.5 + 1.1.5.5 + 1.1.5.5 + + + 1.1.5.5 + 1.1.5 + 1.1.5 + 1.1.5 + 1.1.5 + 1.1.3 + 1.1.5 + 1.1.5 + 1.1.5 + 1.1.5 + 1.1.5 + 1.1.5 + 1.1.5 + 1.1.5.4 + 1.1.5 + 1.1.5 + **/dto/**, + **/exception/*Exception.java, + **/config/*Config.java, + **/handler/*ExceptionHandler.java, + **/**/*Application.java, + **/utilities/*.java, + **/validator/*Validator.java, + **/utils/*.java, + **/util/*.java, + **/code/*.java, + **/entity/*.java, + **/config/*.java, + + **/core/code/*.java, + **/packet/storage/entity/*.java, + **/manager/exception/systemexception/*.java, + **/registration/processor/rest/client/*.java, + **/registration/processor/rest/client/audit/builder/*.java, + + **/registration/processor/packet/receiver/*.java, + **/registration/processor/packet/receiver/exception/systemexception/*.java, + **/registration/processor/failoverstage/*.java, + **/registration/processor/stages/*.java, + **/registration/processor/retry/verticle/*.java, + **/registration/processor/retry/verticle/stages/*.java, + **/registration/processor/packet/decrypter/job/stage/*.java, + **/registration/processor/packet/decryptor/job/exception/constant/*.java, + + **/registration/processor/virus/scanner/job/exceptions/*.java, + + + **/registration/processor/stages/app/*.java, + **/registration/processor/camel/bridge/processor/*.java, + **/registration/processor/core/constant/*.java, + **/registration/processor/core/packet/dto/demographicinfo/*.java, + **/registration/processor/core/packet/dto/demographicinfo/identify/*.java, + **/registration/processor/core/packet/dto/regcentermachine/*.java, + + **/registration/processor/quality/check/client/*.java, + **/registration/processor/quality/check/code/*.java, + **/registration/processor/quality/check/entity/*.java, + **/registration/processor/quality/check/exception/*.java, + **/registration/processor/quality/check/*.java, + **/registration/processor/message/sender/*.java, + **/registration/processor/message/sender/utility/*.java, + **/registration/processor/core/logger/*.java, + **/registration/processor/core/notification/template/mapping/*.java, + **/registration/processor/bio/dedupe/service/*.java, + **/registration/processor/bio/dedupe/exception/*.java, + + **/registration/processor/packet/storage/storage/*.java, + **/registration/processor/packet/storage/exception/*.java, + **/registration/processor/status/repositary/*.java, + **/registration/processor/status/entity/*.java, + **/registration/processor/virus/scanner/job/*.java, + + + **/registration/processor/packet/uploader/*.java, + **/registration/processor/biodedupe/*.java, + + + **/registration/processor/abis/config/*.java, + **/registration/processor/abis/controller/*.java, + **/registration/processor/abis/exception/*.java, + **/registration/processor/abis/messagequeue/*.java, + **/registration/processor/abis/service/*.java, + **/registration/processor/abis/service/impl/*.java, + + + **/registration/processor/abis/handler/*.java, + **/registration/processor/abis/handler/config/*.java, + + **/registration/processor/packet/service/**/*.java, + **/registration/processor/packet/upload/**/*.java, + + **/registration/processor/status/code/*.java, + **/registration/processor/rest/client/config/RestConfigBean.java, + **/registration/processor/bio/dedupe/api/BioDedupeApiApp.java, + **/registration/processor/manual/verification/response/builder/*.java, + **/registration/processor/manual/verification/config/*.java, + **/registration/processor/stages/config/OSIConfigBean.java, + **/registration/processor/stages/demo/dedupe/StatusMessage.java, + **/registration/processor/stages/demo/dedupe/DemodedupeStage.java, + **/registration/processor/stages/demo/dedupe/BiometricValidation.java, + **/registration/processor/core/exception/ExceptionJSONInfo.java, + **/registration/processor/core/config/CoreConfigBean.java, + **/registration/processor/core/kernel/beans/KernelConfig.java, + **/registration/processor/core/abstractverticle/MosipVerticleAPIManager.java, + **/registration/processor/core/http/*.java, + **/registration/processor/core/queue/factory/*.java, + **/registration/processor/core/queue/impl/*.java, + **/registration/processor/message/sender/config/MsgNotificationBeanCofig.java, + **/registration/processor/print/exception/QueueConnectionNotFound.java, + **/registration/processor/stages/demodedupe/StatusMessage.java, + **/registration/processor/print/service/utility/UINCardConstant.java, + **/registration/processor/stages/demodedupe/BiometricValidation.java, + **/registration/processor/camel/bridge/MosipBridgeFactory.java, + **/registration/processor/manual/verification/stage/ManualVerificationStage.java, + **/registration/processor/packet/receiver/builder/PacketReceiverResponseBuilder.java, + **/registration/processor/packet/receiver/stage/PacketReceiverStage.java, + **/registration/processor/camel/bridge/**/*.java, + **/registration/processor/stages/connector/stage/**/*.java, + **/registration/processor/stages/demodedupe/DemoDedupeStage.java, + + **/registration/processor/packet/storage/mapper/PacketInfoMapper.java, + **/registration/processor/packet/storage/dao/PacketInfoDao.java, + **/registration/processor/packet/uploader/constants/*.java, + **/registration/processor/packet/manager/constant/*.java, + **/registration/processor/print/exception/PrintGlobalExceptionHandler.java, + **/registration/processor/packet/receiver/constants/*.java, + **/registration/processor/print/service/exception/*.java, + **/registration/processor/print/exception/*.java, + **/registration/processor/packet/uploader/constants/*.java, + **/registration/processor/packet/uploader/decryptor/*.java, + **/registration/processor/core/abstractverticle/MosipRouter.java, + **/registration/processor/packet/uploader/decryptor/*.java, + + **/registration/processor/print/service/impl/PrintPostServiceImpl.java, + + **/registration/processor/message/sender/constants/*.java, + **/registration/processor/core/abstractverticle/BaseHealthCheckModel.java, + **/registration/processor/core/**/TokenValidator.java, + **/registration/processor/core/abstractverticle/StageHealthCheckHandler.java, + **/registration/processor/core/abstractverticle/MessageDTO.java, + **/registration/processor/request/handler/**/*.java + + **/dto/**,**/entity/**,**/config/**,**/handler/**,**/utilities/**, + **/validator/**, **/utils/**,**/util/**,**/code/** + none + + + + + + org.mockito + mockito-core + 3.4.4 + test + + + + net.bytebuddy + byte-buddy + 1.10.13 + + + org.springframework.boot + spring-boot-dependencies + ${spring.boot.version} + pom + import + + + org.projectlombok + lombok + 1.18.8 + provided + + + org.powermock + powermock-core + 2.0.7 + test + + + javax.xml.bind + jaxb-api + 2.3.1 + + + org.javassist + javassist + 3.27.0-GA + + + + + + registration-processor-core + + + registration-processor-common-camel-bridge + + + + + + init + pre-processor + core-processor + post-processor + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + ${maven.compiler.source} + ${maven.compiler.target} + + + + org.apache.maven.plugins + maven-jar-plugin + ${maven.jar.plugin.version} + + + + true + true + + + ${project.name} + ${project.version} + ${user.name} + ${os.name} + ${maven.build.timestamp} + ${env.BUILD_NUMBER} + ${env.BUILD_ID} + ${env.BUILD_URL} + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven.war.plugin.version} + + + + true + true + + + ${project.name} + ${project.version} + ${user.name} + ${os.name} + ${maven.build.timestamp} + ${env.BUILD_NUMBER} + ${env.BUILD_ID} + ${env.BUILD_URL} + + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven.surefire.plugin.version} + + false + false + + **/*IntegrationTest.java + + + --illegal-access=permit + + + + + org.jacoco + jacoco-maven-plugin + ${maven.jacoco.plugin.version} + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${maven.sonar.plugin.version} + + + verify + + sonar + + + + + + org.jacoco + jacoco-maven-plugin + + true + + + + agent-for-ut + + prepare-agent + + + + agent-for-it + + prepare-agent-integration + + + + jacoco-site + verify + + report + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven.javadoc.version} + + true + none + + + + \ No newline at end of file diff --git a/registration-processor/post-processor/pom.xml b/registration-processor/post-processor/pom.xml index f0eadbfc02b..609165d3574 100644 --- a/registration-processor/post-processor/pom.xml +++ b/registration-processor/post-processor/pom.xml @@ -1,22 +1,22 @@ - - - 4.0.0 - pom - - io.mosip.registrationprocessor - registration-processor - 1.1.5.5-P3-rc1 - - 1.1.5.5-P3-rc1 - post-processor - post-processor - - UTF-8 - - - registration-processor-message-sender-stage - registration-processor-printing-stage - registration-processor-registration-transaction-service - - + + + 4.0.0 + pom + + io.mosip.registrationprocessor + registration-processor + 1.1.5.5-P3-rc2 + + 1.1.5.5-P3-rc2 + post-processor + post-processor + + UTF-8 + + + registration-processor-message-sender-stage + registration-processor-printing-stage + registration-processor-registration-transaction-service + + diff --git a/registration-processor/post-processor/registration-processor-message-sender-stage/pom.xml b/registration-processor/post-processor/registration-processor-message-sender-stage/pom.xml index 3989266aba1..1ef1a28ea9d 100644 --- a/registration-processor/post-processor/registration-processor-message-sender-stage/pom.xml +++ b/registration-processor/post-processor/registration-processor-message-sender-stage/pom.xml @@ -1,119 +1,119 @@ - - - 4.0.0 - jar - - io.mosip.registrationprocessor - post-processor - 1.1.5.5-P3-rc1 - - - registration-processor-message-sender-stage - 1.1.5.5-P3-rc1 - - UTF-8 - UTF-8 - - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - ${h2.version} - - - - - - org.springframework - spring-context - ${spring-framework.version} - - - org.springframework - spring-tx - ${spring-framework.version} - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - io.mosip.registrationprocessor - registration-processor-message-sender-impl - ${registration.processor.message.sender.version} - - - junit - junit - test - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - io.mosip.registrationprocessor - registration-processor-packet-manager - ${packet.manager.version} - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - + + + 4.0.0 + jar + + io.mosip.registrationprocessor + post-processor + 1.1.5.5-P3-rc2 + + + registration-processor-message-sender-stage + 1.1.5.5-P3-rc2 + + UTF-8 + UTF-8 + + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + ${h2.version} + + + + + + org.springframework + spring-context + ${spring-framework.version} + + + org.springframework + spring-tx + ${spring-framework.version} + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + io.mosip.registrationprocessor + registration-processor-message-sender-impl + ${registration.processor.message.sender.version} + + + junit + junit + test + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + io.mosip.registrationprocessor + registration-processor-packet-manager + ${packet.manager.version} + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + diff --git a/registration-processor/post-processor/registration-processor-printing-stage/pom.xml b/registration-processor/post-processor/registration-processor-printing-stage/pom.xml index 58b62854232..c5548416d31 100644 --- a/registration-processor/post-processor/registration-processor-printing-stage/pom.xml +++ b/registration-processor/post-processor/registration-processor-printing-stage/pom.xml @@ -1,127 +1,127 @@ - - - 4.0.0 - - io.mosip.registrationprocessor - post-processor - 1.1.5.5-P3-rc1 - - registration-processor-printing-stage - 1.1.5.5-P3-rc1 - - UTF-8 - UTF-8 - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.springframework.boot - spring-boot-starter-actuator - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - ${h2.version} - - - - - - org.springframework - spring-context - ${spring-framework.version} - - - org.springframework - spring-tx - ${spring-framework.version} - - - io.vertx - vertx-unit - ${vertx.version} - test - - - io.vertx - vertx-web-client - 3.6.2 - - - org.apache.httpcomponents - httpmime - 4.3.1 - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - - junit - junit - test - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - + + + 4.0.0 + + io.mosip.registrationprocessor + post-processor + 1.1.5.5-P3-rc2 + + registration-processor-printing-stage + 1.1.5.5-P3-rc2 + + UTF-8 + UTF-8 + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.springframework.boot + spring-boot-starter-actuator + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + ${h2.version} + + + + + + org.springframework + spring-context + ${spring-framework.version} + + + org.springframework + spring-tx + ${spring-framework.version} + + + io.vertx + vertx-unit + ${vertx.version} + test + + + io.vertx + vertx-web-client + 3.6.2 + + + org.apache.httpcomponents + httpmime + 4.3.1 + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + + junit + junit + test + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + diff --git a/registration-processor/post-processor/registration-processor-registration-transaction-service/pom.xml b/registration-processor/post-processor/registration-processor-registration-transaction-service/pom.xml index bc47523b044..cbfeaa6bc70 100644 --- a/registration-processor/post-processor/registration-processor-registration-transaction-service/pom.xml +++ b/registration-processor/post-processor/registration-processor-registration-transaction-service/pom.xml @@ -1,72 +1,72 @@ - - - 4.0.0 - - io.mosip.registrationprocessor - post-processor - 1.1.5.5-P3-rc1 - - registration-processor-registration-transaction-service - 1.1.5.5-P3-rc1 - registration-processor-registration-transaction-service - - UTF-8 - - - - - javax.servlet - javax.servlet-api - 4.0.1 - - - junit - junit - test - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-security - - - org.springframework.security - spring-security-test - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.kernel - kernel-core - ${kernel.core.version} - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - ZIP - - - - - build-info - repackage - - - - - - - + + + 4.0.0 + + io.mosip.registrationprocessor + post-processor + 1.1.5.5-P3-rc2 + + registration-processor-registration-transaction-service + 1.1.5.5-P3-rc2 + registration-processor-registration-transaction-service + + UTF-8 + + + + + javax.servlet + javax.servlet-api + 4.0.1 + + + junit + junit + test + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.security + spring-security-test + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.kernel + kernel-core + ${kernel.core.version} + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + ZIP + + + + + build-info + repackage + + + + + + + diff --git a/registration-processor/pre-processor/pom.xml b/registration-processor/pre-processor/pom.xml index 471c4a5f041..3e9c7d42b58 100644 --- a/registration-processor/pre-processor/pom.xml +++ b/registration-processor/pre-processor/pom.xml @@ -1,28 +1,28 @@ - - - 4.0.0 - pom - - io.mosip.registrationprocessor - registration-processor - 1.1.5.5-P3-rc1 - - 1.1.5.5-P3-rc1 - pre-processor - pre-processor - - UTF-8 - - - registration-processor-packet-validator-stage - registration-processor-osi-validator-stage - registration-processor-packet-uploader-stage - registration-processor-external-stage - - registration-processor-quality-checker-stage - registration-processor-securezone-notification-stage - registration-processor-packet-classifier-stage - - + + + 4.0.0 + pom + + io.mosip.registrationprocessor + registration-processor + 1.1.5.5-P3-rc2 + + 1.1.5.5-P3-rc2 + pre-processor + pre-processor + + UTF-8 + + + registration-processor-packet-validator-stage + registration-processor-osi-validator-stage + registration-processor-packet-uploader-stage + registration-processor-external-stage + + registration-processor-quality-checker-stage + registration-processor-securezone-notification-stage + registration-processor-packet-classifier-stage + + diff --git a/registration-processor/pre-processor/registration-processor-external-stage/pom.xml b/registration-processor/pre-processor/registration-processor-external-stage/pom.xml index 1b293007cc3..710f8a755bd 100644 --- a/registration-processor/pre-processor/registration-processor-external-stage/pom.xml +++ b/registration-processor/pre-processor/registration-processor-external-stage/pom.xml @@ -1,90 +1,90 @@ - - - 4.0.0 - - io.mosip.registrationprocessor - pre-processor - 1.1.5.5-P3-rc1 - - - registration-processor-external-stage - 1.1.5.5-P3-rc1 - - - UTF-8 - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.mockito - mockito-core - ${mockito.version} - test - - - io.vertx - vertx-unit - ${vertx.version} - test - - - org.springframework - spring-context - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - javax.inject - javax.inject - 1 - - - - - - com.h2database - h2 - ${h2.version} - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - + + + 4.0.0 + + io.mosip.registrationprocessor + pre-processor + 1.1.5.5-P3-rc2 + + + registration-processor-external-stage + 1.1.5.5-P3-rc2 + + + UTF-8 + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.mockito + mockito-core + ${mockito.version} + test + + + io.vertx + vertx-unit + ${vertx.version} + test + + + org.springframework + spring-context + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + javax.inject + javax.inject + 1 + + + + + + com.h2database + h2 + ${h2.version} + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + diff --git a/registration-processor/pre-processor/registration-processor-osi-validator-stage/pom.xml b/registration-processor/pre-processor/registration-processor-osi-validator-stage/pom.xml index abed56dab2f..bdd1f253f40 100644 --- a/registration-processor/pre-processor/registration-processor-osi-validator-stage/pom.xml +++ b/registration-processor/pre-processor/registration-processor-osi-validator-stage/pom.xml @@ -1,134 +1,134 @@ - - - 4.0.0 - - io.mosip.registrationprocessor - pre-processor - 1.1.5.5-P3-rc1 - - registration-processor-osi-validator-stage - 1.1.5.5-P3-rc1 - - UTF-8 - UTF-8 - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - ${h2.version} - - - - - - org.springframework - spring-context - ${spring-framework.version} - - - org.springframework - spring-tx - ${spring-framework.version} - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - io.mosip.kernel - kernel-bioapi-provider - ${kernel.bioapi.provider.version} - - - io.mosip.kernel - kernel-core - ${kernel.core.version} - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - io.mosip.registrationprocessor - registration-processor-packet-manager - ${packet.manager.version} - - - io.mosip.kernel - kernel-templatemanager-velocity - ${kernel.templatemanager.velocity.version} - - - javax.servlet - servlet-api - - - dom4j - dom4j - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - - + + + 4.0.0 + + io.mosip.registrationprocessor + pre-processor + 1.1.5.5-P3-rc2 + + registration-processor-osi-validator-stage + 1.1.5.5-P3-rc2 + + UTF-8 + UTF-8 + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + ${h2.version} + + + + + + org.springframework + spring-context + ${spring-framework.version} + + + org.springframework + spring-tx + ${spring-framework.version} + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + io.mosip.kernel + kernel-bioapi-provider + ${kernel.bioapi.provider.version} + + + io.mosip.kernel + kernel-core + ${kernel.core.version} + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + io.mosip.registrationprocessor + registration-processor-packet-manager + ${packet.manager.version} + + + io.mosip.kernel + kernel-templatemanager-velocity + ${kernel.templatemanager.velocity.version} + + + javax.servlet + servlet-api + + + dom4j + dom4j + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + + diff --git a/registration-processor/pre-processor/registration-processor-packet-classifier-stage/pom.xml b/registration-processor/pre-processor/registration-processor-packet-classifier-stage/pom.xml index bae239d6f9d..29f269ef5a4 100644 --- a/registration-processor/pre-processor/registration-processor-packet-classifier-stage/pom.xml +++ b/registration-processor/pre-processor/registration-processor-packet-classifier-stage/pom.xml @@ -1,112 +1,112 @@ - - - 4.0.0 - - - io.mosip.registrationprocessor - pre-processor - 1.1.5.5-P3-rc1 - - registration-processor-packet-classifier-stage - 1.1.5.5-P3-rc1 - - UTF-8 - UTF-8 - - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - ${h2.version} - - - - - - org.springframework - spring-context - ${spring-framework.version} - - - io.mosip.registrationprocessor - registration-processor-packet-manager - ${packet.manager.version} - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - - io.mosip.registrationprocessor - registration-processor-message-sender-impl - ${registration.processor.message.sender.version} - - - commons-io - commons-io - ${commons.io.version} - - - junit - junit - 4.12 - test - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - io.mosip.kernel - kernel-core - ${kernel.core.version} - - - org.springframework.boot - spring-boot-starter-webflux - ${spring.boot.version} - - - + + + 4.0.0 + + + io.mosip.registrationprocessor + pre-processor + 1.1.5.5-P3-rc2 + + registration-processor-packet-classifier-stage + 1.1.5.5-P3-rc2 + + UTF-8 + UTF-8 + + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + ${h2.version} + + + + + + org.springframework + spring-context + ${spring-framework.version} + + + io.mosip.registrationprocessor + registration-processor-packet-manager + ${packet.manager.version} + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + + io.mosip.registrationprocessor + registration-processor-message-sender-impl + ${registration.processor.message.sender.version} + + + commons-io + commons-io + ${commons.io.version} + + + junit + junit + 4.12 + test + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + io.mosip.kernel + kernel-core + ${kernel.core.version} + + + org.springframework.boot + spring-boot-starter-webflux + ${spring.boot.version} + + + diff --git a/registration-processor/pre-processor/registration-processor-packet-uploader-stage/pom.xml b/registration-processor/pre-processor/registration-processor-packet-uploader-stage/pom.xml index 3b34600c195..6ba1466e7f2 100644 --- a/registration-processor/pre-processor/registration-processor-packet-uploader-stage/pom.xml +++ b/registration-processor/pre-processor/registration-processor-packet-uploader-stage/pom.xml @@ -1,148 +1,148 @@ - - - 4.0.0 - - - registration-processor-packet-uploader-stage - - - io.mosip.registrationprocessor - pre-processor - 1.1.5.5-P3-rc1 - - 1.1.5.5-P3-rc1 - - UTF-8 - - - - - - junit - junit - test - - - - org.mockito - mockito-core - ${mockito.version} - test - - - - com.h2database - h2 - ${h2.version} - - - - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - org.springframework - spring-context - ${spring-framework.version} - - - org.postgresql - postgresql - runtime - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - org.springframework.boot - spring-boot-starter-test - test - - - org.springframework.batch - spring-batch-test - test - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - io.mosip.kernel - kernel-virusscanner-clamav - ${kernel.clamav.version} - - - com.h2database - h2 - - - org.mockito - mockito-core - test - - - org.awaitility - awaitility - ${awaitility.version} - test - - - org.json - json - 20180813 - - - io.mosip.commons - khazana - ${object.store.khazana.version} - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - - - + + + 4.0.0 + + + registration-processor-packet-uploader-stage + + + io.mosip.registrationprocessor + pre-processor + 1.1.5.5-P3-rc2 + + 1.1.5.5-P3-rc2 + + UTF-8 + + + + + + junit + junit + test + + + + org.mockito + mockito-core + ${mockito.version} + test + + + + com.h2database + h2 + ${h2.version} + + + + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + org.springframework + spring-context + ${spring-framework.version} + + + org.postgresql + postgresql + runtime + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.batch + spring-batch-test + test + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + io.mosip.kernel + kernel-virusscanner-clamav + ${kernel.clamav.version} + + + com.h2database + h2 + + + org.mockito + mockito-core + test + + + org.awaitility + awaitility + ${awaitility.version} + test + + + org.json + json + 20180813 + + + io.mosip.commons + khazana + ${object.store.khazana.version} + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + + + diff --git a/registration-processor/pre-processor/registration-processor-packet-validator-stage/pom.xml b/registration-processor/pre-processor/registration-processor-packet-validator-stage/pom.xml index afbc206fa00..0a42e020013 100644 --- a/registration-processor/pre-processor/registration-processor-packet-validator-stage/pom.xml +++ b/registration-processor/pre-processor/registration-processor-packet-validator-stage/pom.xml @@ -1,139 +1,139 @@ - - - 4.0.0 - - - io.mosip.registrationprocessor - pre-processor - 1.1.5.5-P3-rc1 - - registration-processor-packet-validator-stage - 1.1.5.5-P3-rc1 - - UTF-8 - UTF-8 - - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.springframework.boot - spring-boot-starter-actuator - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - ${h2.version} - - - - - - org.springframework - spring-context - ${spring-framework.version} - - - io.mosip.registrationprocessor - registration-processor-packet-manager - ${packet.manager.version} - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - io.mosip.registrationprocessor - registration-processor-message-sender-impl - ${registration.processor.message.sender.version} - - - commons-io - commons-io - ${commons.io.version} - - - junit - junit - 4.12 - test - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - io.mosip.kernel - kernel-core - ${kernel.core.version} - - - org.springframework.boot - spring-boot-starter-webflux - ${spring.boot.version} - - - io.mosip.registrationprocessor - registration-processor-packet-classifier-stage - 1.1.5.5 - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - ZIP - - - - - build-info - repackage - - - - - - - + + + 4.0.0 + + + io.mosip.registrationprocessor + pre-processor + 1.1.5.5-P3-rc2 + + registration-processor-packet-validator-stage + 1.1.5.5-P3-rc2 + + UTF-8 + UTF-8 + + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.springframework.boot + spring-boot-starter-actuator + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + ${h2.version} + + + + + + org.springframework + spring-context + ${spring-framework.version} + + + io.mosip.registrationprocessor + registration-processor-packet-manager + ${packet.manager.version} + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + io.mosip.registrationprocessor + registration-processor-message-sender-impl + ${registration.processor.message.sender.version} + + + commons-io + commons-io + ${commons.io.version} + + + junit + junit + 4.12 + test + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + io.mosip.kernel + kernel-core + ${kernel.core.version} + + + org.springframework.boot + spring-boot-starter-webflux + ${spring.boot.version} + + + io.mosip.registrationprocessor + registration-processor-packet-classifier-stage + 1.1.5.5 + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + ZIP + + + + + build-info + repackage + + + + + + + diff --git a/registration-processor/pre-processor/registration-processor-quality-checker-stage/pom.xml b/registration-processor/pre-processor/registration-processor-quality-checker-stage/pom.xml index 61db1171547..5e2c0af2e99 100644 --- a/registration-processor/pre-processor/registration-processor-quality-checker-stage/pom.xml +++ b/registration-processor/pre-processor/registration-processor-quality-checker-stage/pom.xml @@ -1,119 +1,119 @@ - - - 4.0.0 - - io.mosip.registrationprocessor - pre-processor - 1.1.5.5-P3-rc1 - - - registration-processor-quality-checker-stage - 1.1.5.5-P3-rc1 - - - UTF-8 - UTF-8 - - - - - - org.springframework.cloud - spring-cloud-starter-config - ${spring-cloud-config.version} - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - 1.4.195 - - - - - - org.springframework - spring-context - ${spring-framework.version} - - - org.springframework - spring-tx - ${spring-framework.version} - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - io.mosip.registrationprocessor - registration-processor-info-storage-service - ${packet.info.storage.service.version} - - - io.mosip.kernel - kernel-core - ${kernel.core.version} - - - io.mosip.kernel - kernel-bioapi-provider - ${kernel.bioapi.provider.version} - - - io.mosip.kernel - kernel-cbeffutil-api - ${kernel.cbeffutil.version} - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - ZIP - true - - - - - build-info - repackage - - - - - - + + + 4.0.0 + + io.mosip.registrationprocessor + pre-processor + 1.1.5.5-P3-rc2 + + + registration-processor-quality-checker-stage + 1.1.5.5-P3-rc2 + + + UTF-8 + UTF-8 + + + + + + org.springframework.cloud + spring-cloud-starter-config + ${spring-cloud-config.version} + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + 1.4.195 + + + + + + org.springframework + spring-context + ${spring-framework.version} + + + org.springframework + spring-tx + ${spring-framework.version} + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + io.mosip.registrationprocessor + registration-processor-info-storage-service + ${packet.info.storage.service.version} + + + io.mosip.kernel + kernel-core + ${kernel.core.version} + + + io.mosip.kernel + kernel-bioapi-provider + ${kernel.bioapi.provider.version} + + + io.mosip.kernel + kernel-cbeffutil-api + ${kernel.cbeffutil.version} + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + ZIP + true + + + + + build-info + repackage + + + + + + \ No newline at end of file diff --git a/registration-processor/pre-processor/registration-processor-securezone-notification-stage/pom.xml b/registration-processor/pre-processor/registration-processor-securezone-notification-stage/pom.xml index fc33d02f88b..49002a1efb5 100644 --- a/registration-processor/pre-processor/registration-processor-securezone-notification-stage/pom.xml +++ b/registration-processor/pre-processor/registration-processor-securezone-notification-stage/pom.xml @@ -1,123 +1,123 @@ - - - - pre-processor - io.mosip.registrationprocessor - 1.1.5.5-P3-rc1 - - 4.0.0 - 1.1.5.5-P3-rc1 - - registration-processor-securezone-notification-stage - - - - - - junit - junit - test - - - - org.mockito - mockito-core - ${mockito.version} - test - - - - com.h2database - h2 - ${h2.version} - - - - - - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - org.springframework - spring-context - ${spring-framework.version} - - - org.postgresql - postgresql - runtime - - - org.springframework.boot - spring-boot-starter-test - test - - - org.springframework.batch - spring-batch-test - test - - - io.mosip.registrationprocessor - registration-processor-registration-status-service-impl - ${registration.status.service.version} - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - com.h2database - h2 - - - org.mockito - mockito-core - test - - - org.awaitility - awaitility - ${awaitility.version} - test - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - - - - - build-info - repackage - - - - - - - - + + + + pre-processor + io.mosip.registrationprocessor + 1.1.5.5-P3-rc2 + + 4.0.0 + 1.1.5.5-P3-rc2 + + registration-processor-securezone-notification-stage + + + + + + junit + junit + test + + + + org.mockito + mockito-core + ${mockito.version} + test + + + + com.h2database + h2 + ${h2.version} + + + + + + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + org.springframework + spring-context + ${spring-framework.version} + + + org.postgresql + postgresql + runtime + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.batch + spring-batch-test + test + + + io.mosip.registrationprocessor + registration-processor-registration-status-service-impl + ${registration.status.service.version} + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + com.h2database + h2 + + + org.mockito + mockito-core + test + + + org.awaitility + awaitility + ${awaitility.version} + test + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + + + + + build-info + repackage + + + + + + + + \ No newline at end of file diff --git a/registration-processor/registration-processor-common-camel-bridge/pom.xml b/registration-processor/registration-processor-common-camel-bridge/pom.xml index b169b85bfe8..5ba6fc01eeb 100644 --- a/registration-processor/registration-processor-common-camel-bridge/pom.xml +++ b/registration-processor/registration-processor-common-camel-bridge/pom.xml @@ -1,130 +1,130 @@ - - 4.0.0 - - - io.mosip.registrationprocessor - registration-processor - 1.1.5.5-P3-rc1 - - registration-processor-common-camel-bridge - 1.1.5.5-P3-rc1 - jar - - - io.mosip.registration.processor.camel.bridge.MosipCamelBridge - 1.0.5 - - - - io.mosip.registrationprocessor - registration-processor-core - ${registration.processor.core.version} - - - org.slf4j - jul-to-slf4j - - - org.slf4j - jcl-over-slf4j - - - com.hazelcast - hazelcast-kubernetes - - - - - io.vertx - vertx-unit - ${vertx.version} - test - - - io.vertx - vertx-config-spring-config-server - ${vertx.version} - - - io.vertx - vertx-config - ${vertx.version} - - - - org.apache.camel - camel-vertx - ${camel.vertx.version} - - - org.slf4j - slf4j-api - - - - - com.hazelcast - hazelcast-kubernetes - 1.0.0 - - - org.apache.camel - camel-http - ${camel.vertx.version} - - - org.slf4j - slf4j-api - - - - - org.apache.camel - camel-kafka - ${camel.vertx.version} - - - io.mosip.registrationprocessor - registration-processor-rest-client - ${registration.processor.rest.client.version} - - - org.apache.camel - camel-jsonpath - ${camel.vertx.version} - - - - - - com.h2database - h2 - ${h2.version} - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - true - io.mosip.registration.processor.camel.bridge.MosipCamelBridgeApplication - ZIP - - - - - build-info - repackage - - - - - - - + + 4.0.0 + + + io.mosip.registrationprocessor + registration-processor + 1.1.5.5-P3-rc2 + + registration-processor-common-camel-bridge + 1.1.5.5-P3-rc2 + jar + + + io.mosip.registration.processor.camel.bridge.MosipCamelBridge + 1.0.5 + + + + io.mosip.registrationprocessor + registration-processor-core + ${registration.processor.core.version} + + + org.slf4j + jul-to-slf4j + + + org.slf4j + jcl-over-slf4j + + + com.hazelcast + hazelcast-kubernetes + + + + + io.vertx + vertx-unit + ${vertx.version} + test + + + io.vertx + vertx-config-spring-config-server + ${vertx.version} + + + io.vertx + vertx-config + ${vertx.version} + + + + org.apache.camel + camel-vertx + ${camel.vertx.version} + + + org.slf4j + slf4j-api + + + + + com.hazelcast + hazelcast-kubernetes + 1.0.0 + + + org.apache.camel + camel-http + ${camel.vertx.version} + + + org.slf4j + slf4j-api + + + + + org.apache.camel + camel-kafka + ${camel.vertx.version} + + + io.mosip.registrationprocessor + registration-processor-rest-client + ${registration.processor.rest.client.version} + + + org.apache.camel + camel-jsonpath + ${camel.vertx.version} + + + + + + com.h2database + h2 + ${h2.version} + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + true + io.mosip.registration.processor.camel.bridge.MosipCamelBridgeApplication + ZIP + + + + + build-info + repackage + + + + + + + diff --git a/registration-processor/registration-processor-core/pom.xml b/registration-processor/registration-processor-core/pom.xml index 33a019e0604..e50514a4c44 100644 --- a/registration-processor/registration-processor-core/pom.xml +++ b/registration-processor/registration-processor-core/pom.xml @@ -1,221 +1,221 @@ - - - - 4.0.0 - - - io.mosip.registrationprocessor - registration-processor - 1.1.5.5-P3-rc1 - - registration-processor-core - 1.1.5.5-P3-rc1 - - - org.mockito - mockito-core - ${mockito.version} - test - - - org.powermock - powermock-module-junit4 - ${powermock.module.junit4.version} - test - - - org.powermock - powermock-api-mockito2 - ${powermock.api.mockito.version} - test - - - io.vertx - vertx-web - ${vertx.version} - - - xyz.capybara - clamav-client - 1.0.4 - - - org.apache.hadoop - hadoop-client - 2.8.1 - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - - - com.google.code.gson - gson - - - - - org.springframework.boot - spring-boot-starter-actuator - ${spring.boot.version} - - - io.vertx - vertx-health-check - ${vertx.version} - - - org.apache.activemq - activemq-core - 5.7.0 - - - org.springframework.boot - spring-boot-starter-activemq - - - io.vertx - vertx-camel-bridge - ${vertx.version} - - - io.vertx - vertx-hazelcast - ${vertx.version} - - - io.vertx - vertx-kafka-client - ${vertx.version} - - - com.hazelcast - hazelcast-kubernetes - ${hazelcast.kubernetes.version} - - - org.springframework.boot - spring-boot-starter-web - - - org.projectlombok - lombok - - - io.mosip.kernel - kernel-core - ${kernel.core.version} - - - io.mosip.kernel - kernel-idvalidator-rid - ${kernel.idvalidator.rid.version} - - - - - io.mosip.kernel - kernel-logger-logback - ${kernel.logger.logback.version} - - - io.mosip.kernel - kernel-templatemanager-velocity - ${kernel.templatemanager.velocity.version} - - - javax.servlet - servlet-api - - - dom4j - dom4j - - - - - io.mosip.kernel - kernel-cbeffutil-api - ${kernel.cbeffutil.version} - - - io.mosip.kernel - kernel-bioapi-provider - ${kernel.bioapi.provider.version} - - - com.google.code.gson - gson - - - io.vertx - vertx-config-spring-config-server - ${vertx.version} - - - io.vertx - vertx-unit - ${vertx.version} - test - - - io.springfox - springfox-swagger-ui - ${swagger.version} - - - io.springfox - springfox-swagger2 - ${swagger.version} - - - com.googlecode.json-simple - json-simple - - - io.mosip.kernel - kernel-biometrics-api - ${kernel.biometrics.api.version} - - - io.micrometer - micrometer-core - ${io.micrometer.prometheus.version} - - - io.vertx - vertx-micrometer-metrics - ${vertx.version} - - - io.micrometer - micrometer-registry-prometheus - ${io.micrometer.prometheus.version} - - - - - - org.mockito - mockito-core - ${mockito.version} - test - - - com.h2database - h2 - ${h2.version} - - - - - - UTF-8 - 1.1.0 - - + + + + 4.0.0 + + + io.mosip.registrationprocessor + registration-processor + 1.1.5.5-P3-rc2 + + registration-processor-core + 1.1.5.5-P3-rc2 + + + org.mockito + mockito-core + ${mockito.version} + test + + + org.powermock + powermock-module-junit4 + ${powermock.module.junit4.version} + test + + + org.powermock + powermock-api-mockito2 + ${powermock.api.mockito.version} + test + + + io.vertx + vertx-web + ${vertx.version} + + + xyz.capybara + clamav-client + 1.0.4 + + + org.apache.hadoop + hadoop-client + 2.8.1 + + + org.slf4j + slf4j-api + + + org.slf4j + slf4j-log4j12 + + + com.google.code.gson + gson + + + + + org.springframework.boot + spring-boot-starter-actuator + ${spring.boot.version} + + + io.vertx + vertx-health-check + ${vertx.version} + + + org.apache.activemq + activemq-core + 5.7.0 + + + org.springframework.boot + spring-boot-starter-activemq + + + io.vertx + vertx-camel-bridge + ${vertx.version} + + + io.vertx + vertx-hazelcast + ${vertx.version} + + + io.vertx + vertx-kafka-client + ${vertx.version} + + + com.hazelcast + hazelcast-kubernetes + ${hazelcast.kubernetes.version} + + + org.springframework.boot + spring-boot-starter-web + + + org.projectlombok + lombok + + + io.mosip.kernel + kernel-core + ${kernel.core.version} + + + io.mosip.kernel + kernel-idvalidator-rid + ${kernel.idvalidator.rid.version} + + + + + io.mosip.kernel + kernel-logger-logback + ${kernel.logger.logback.version} + + + io.mosip.kernel + kernel-templatemanager-velocity + ${kernel.templatemanager.velocity.version} + + + javax.servlet + servlet-api + + + dom4j + dom4j + + + + + io.mosip.kernel + kernel-cbeffutil-api + ${kernel.cbeffutil.version} + + + io.mosip.kernel + kernel-bioapi-provider + ${kernel.bioapi.provider.version} + + + com.google.code.gson + gson + + + io.vertx + vertx-config-spring-config-server + ${vertx.version} + + + io.vertx + vertx-unit + ${vertx.version} + test + + + io.springfox + springfox-swagger-ui + ${swagger.version} + + + io.springfox + springfox-swagger2 + ${swagger.version} + + + com.googlecode.json-simple + json-simple + + + io.mosip.kernel + kernel-biometrics-api + ${kernel.biometrics.api.version} + + + io.micrometer + micrometer-core + ${io.micrometer.prometheus.version} + + + io.vertx + vertx-micrometer-metrics + ${vertx.version} + + + io.micrometer + micrometer-registry-prometheus + ${io.micrometer.prometheus.version} + + + + + + org.mockito + mockito-core + ${mockito.version} + test + + + com.h2database + h2 + ${h2.version} + + + + + + UTF-8 + 1.1.0 + +