diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 34a910e2b..3ad2ea841 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -40,11 +40,29 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
+ - name: Set up JDK 21
+ uses: actions/setup-java@v2
+ with:
+ distribution: 'temurin'
+ java-version: '21'
+
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v2
+ uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
+ config: |
+ query-filters:
+ - exclude:
+ id: java/URL-forward-from-remote-source
+ - exclude:
+ id: java/Disabled-Spring-CSRF-protection
+ - exclude:
+ id: java/unvalidated-url-forward
+ - exclude:
+ id: java/spring-disabled-csrf-protection
+
+
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
@@ -53,7 +71,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@v2
+ uses: github/codeql-action/autobuild@v3
# âšī¸ Command-line programs to run using the OS shell.
# đ https://git.io/JvXDl
@@ -67,4 +85,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ uses: github/codeql-action/analyze@v3
diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml
index ffe1b5dbf..504ff6293 100644
--- a/.github/workflows/manual.yml
+++ b/.github/workflows/manual.yml
@@ -34,11 +34,11 @@ jobs: # This workflow contains a single job called "greet"
steps: # Runs a single command using the runners shell
- name: Checkout Code
uses: actions/checkout@v3
- - name: Set up JDK 11
+ - name: Set up JDK 21
uses: actions/setup-java@v3
with:
- java-version: '11'
- distribution: 'adopt'
+ java-version: '21'
+ distribution: 'temurin'
cache: 'maven'
- name: Setup Golang
uses: actions/setup-go@v3
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 7527c3ce6..82b4f5fbe 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - name: Set up JDK 11
+ - name: Set up JDK 21
uses: actions/setup-java@v4
with:
- java-version: '11'
- distribution: 'adopt'
+ java-version: '21'
+ distribution: 'temurin'
cache: 'maven'
- name: Set up properties
run: sh configure-dependencies.sh
diff --git a/.gitignore b/.gitignore
index df63295e3..a921c4cf4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -90,4 +90,5 @@ out
db-data*
vault-data
es-data*
-keycloak-mobile*.jar
\ No newline at end of file
+keycloak-mobile*.jar
+.lh
\ No newline at end of file
diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java
new file mode 100644
index 000000000..b901097f2
--- /dev/null
+++ b/.mvn/wrapper/MavenWrapperDownloader.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2007-present the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import java.net.*;
+import java.io.*;
+import java.nio.channels.*;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+ private static final String WRAPPER_VERSION = "0.5.6";
+ /**
+ * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+ */
+ private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
+
+ /**
+ * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+ * use instead of the default one.
+ */
+ private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+ ".mvn/wrapper/maven-wrapper.properties";
+
+ /**
+ * Path where the maven-wrapper.jar will be saved to.
+ */
+ private static final String MAVEN_WRAPPER_JAR_PATH =
+ ".mvn/wrapper/maven-wrapper.jar";
+
+ /**
+ * Name of the property which should be used to override the default download url for the wrapper.
+ */
+ private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+ public static void main(String args[]) {
+ System.out.println("- Downloader started");
+ File baseDirectory = new File(args[0]);
+ System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+ // If the maven-wrapper.properties exists, read it and check if it contains a custom
+ // wrapperUrl parameter.
+ File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+ String url = DEFAULT_DOWNLOAD_URL;
+ if(mavenWrapperPropertyFile.exists()) {
+ FileInputStream mavenWrapperPropertyFileInputStream = null;
+ try {
+ mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+ Properties mavenWrapperProperties = new Properties();
+ mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+ url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+ } catch (IOException e) {
+ System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+ } finally {
+ try {
+ if(mavenWrapperPropertyFileInputStream != null) {
+ mavenWrapperPropertyFileInputStream.close();
+ }
+ } catch (IOException e) {
+ // Ignore ...
+ }
+ }
+ }
+ System.out.println("- Downloading from: " + url);
+
+ File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+ if(!outputFile.getParentFile().exists()) {
+ if(!outputFile.getParentFile().mkdirs()) {
+ System.out.println(
+ "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+ }
+ }
+ System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+ try {
+ downloadFileFromURL(url, outputFile);
+ System.out.println("Done");
+ System.exit(0);
+ } catch (Throwable e) {
+ System.out.println("- Error downloading");
+ e.printStackTrace();
+ System.exit(1);
+ }
+ }
+
+ private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+ if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
+ String username = System.getenv("MVNW_USERNAME");
+ char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
+ Authenticator.setDefault(new Authenticator() {
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(username, password);
+ }
+ });
+ }
+ URL website = new URL(urlString);
+ ReadableByteChannel rbc;
+ rbc = Channels.newChannel(website.openStream());
+ FileOutputStream fos = new FileOutputStream(destination);
+ fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+ fos.close();
+ rbc.close();
+ }
+
+}
diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 000000000..2cc7d4a55
Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 000000000..642d572ce
--- /dev/null
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
diff --git a/Makefile b/Makefile
index 2226cb701..b8a7972b4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,24 @@
+.PHONY: show-dir
+show-dir:
+ @echo "Current directory: $$(pwd)"
+ @echo "Files in current directory:"
+ @ls -l
+
#SOURCES = $(wildcard java/**/*.java)
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
SOURCES := $(call rwildcard,java/,*.java)
-RELEASE_VERSION = v2.0.1
+RELEASE_VERSION = 2.0.4-SNAPSHOT
IMAGES := ghcr.io/sunbird-rc/sunbird-rc-core ghcr.io/sunbird-rc/sunbird-rc-claim-ms \
ghcr.io/sunbird-rc/sunbird-rc-notification-service ghcr.io/sunbird-rc/sunbird-rc-metrics \
ghcr.io/sunbird-rc/id-gen-service ghcr.io/sunbird-rc/encryption-service \
ghcr.io/sunbird-rc/sunbird-rc-identity-service ghcr.io/sunbird-rc/sunbird-rc-credential-schema \
ghcr.io/sunbird-rc/sunbird-rc-credentials-service
build: java/registry/target/registry.jar
- echo ${SOURCES}
+ #echo ${SOURCES}
rm -rf java/claim/target/*.jar
- cd target && rm -rf * && jar xvf ../java/registry/target/registry.jar && cp ../java/Dockerfile ./ && docker build -t ghcr.io/sunbird-rc/sunbird-rc-core .
+ @$(MAKE) show-dir
+ mkdir -p target
+ cd target && rm -rf * &&cp ../java/registry/target/registry-$(RELEASE_VERSION).jar ./registry.jar && cp ../java/Dockerfile ./ && docker build -t ghcr.io/sunbird-rc/sunbird-rc-core .
make -C java/claim
make -C services/notification-service docker
make -C services/metrics docker
@@ -22,7 +30,7 @@ build: java/registry/target/registry.jar
java/registry/target/registry.jar: $(SOURCES)
- echo $(SOURCES)
+ #echo $(SOURCES)
sh configure-dependencies.sh
cd java && ./mvnw clean install
diff --git a/java/.gitignore b/java/.gitignore
index 2c1091198..d52175db6 100644
--- a/java/.gitignore
+++ b/java/.gitignore
@@ -24,4 +24,5 @@ hs_err_pid*
target
mvn*
.mvn*
-deps/keycloak/providers/keycloak-mobile-number-login-spi-1.0-SNAPSHOT.jar
\ No newline at end of file
+deps/keycloak/providers/keycloak-mobile-number-login-spi-1.0-SNAPSHOT.jar
+.lh
\ No newline at end of file
diff --git a/java/.mvn/wrapper/MavenWrapperDownloader.java b/java/.mvn/wrapper/MavenWrapperDownloader.java
index 7b9f5afec..b901097f2 100644
--- a/java/.mvn/wrapper/MavenWrapperDownloader.java
+++ b/java/.mvn/wrapper/MavenWrapperDownloader.java
@@ -89,6 +89,7 @@ public static void main(String args[]) {
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
+ e.printStackTrace();
System.exit(1);
}
}
diff --git a/java/.mvn/wrapper/maven-wrapper.jar b/java/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 000000000..2cc7d4a55
Binary files /dev/null and b/java/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/java/DependencyAnalysis.md b/java/DependencyAnalysis.md
new file mode 100644
index 000000000..b1d3e585b
--- /dev/null
+++ b/java/DependencyAnalysis.md
@@ -0,0 +1,352 @@
+# Direct dependency analysis of sunbird-rc-registries
+
+Parent project is **Open Software for Building Electronic Registries**
+
+## Summary
+There are 26 subprojects in the parent project with a total of 181 dependencies.
+There are 30 pom.xml files.
+The mismatch between the subproject count and dependency count that needs analysis.
+
+The subprojects are:
+
+1. [pojos](#pojos)
+2. [middleware commons](#middleware-commons)
+3. [middleware-bom](#middleware-bom)
+ 1. [registry-middleware](#middleware-bom--registry-middleware)
+ 2. [Authorization](#middleware-bom--authorization)
+ 3. [Validation](#middleware-bom--validation)
+ 4. [Identity Provider](#middleware-bom--identity-provider)
+ 5. [keycloak](#middleware-bom--keycloak)
+ 6. [workflow](#middleware-bom--workflow)
+ 7. [auth0](#middleware-bom--auth0)
+ 8. [generic-iam](#middleware-bom--generic-iam)
+4. [validators](#validators)
+5. [Json based Validation](#json-based-validation)
+6. [JSON schema based validation](#json-schema-based-validation)
+7. [registry-interceptors](#registry-interceptors)
+8. [Elastic-Search](#elastic-search)
+9. [sunbird-actor](#sunbird-actor)
+10. [sunbirdrc-actors](#sunbirdrc-actors)
+11. [plugins](#plugins)
+12. [divoc-external-plugin](#divoc-external-plugin)
+13. [mosip-external-plugin](#mosip-external-plugin)
+14. [sample-external-plugin-2](#sample-external-plugin-2)
+15. [view-templates](#view-templates)
+16. [registry](#registry)
+17. [claim](#claim)
+18. [apitest](#apitest)
+
+## Sub Project Dependencies
+| Subproject | Dependency Count |
+|--------------------------------------|------------------|
+| pojos | 7 |
+| middleware commons | 8 |
+| middleware-bom > registry-middleware | 1 |
+| middleware-bom > Authorization | 18 |
+| middleware-bom > validation | 3 |
+| middleware-bom > Identity Provider | 1 |
+| middleware-bom > keycloak | 10 |
+| middleware-bom > workflow | 7 |
+| middleware-bom > auth0 | 10 |
+| middleware-bom > generic-iam | 9 |
+| validators | 3 |
+| Json based Validation | 3 |
+| JSON schema based validation | 4 |
+| registry-interceptors | 6 |
+| Elastic-Search | 7 |
+| sunbird-actor | 3 |
+| sunbirdrc-actors | 3 |
+| plugins | 2 |
+| divoc-external-plugin | 2 |
+| mosip-external-plugin | 2 |
+| sample-external-plugin-2 | 2 |
+| view-templates | 7 |
+| registry | 48 |
+| claim | 14 |
+| apitest | 1 |
+| **Total** | **181** |
+
+
+### pojos
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|--------------------------|-------------------------|------|---------------|---------|---------------------------------|----------|
+| 1 | com.google.code.gson | gson | jar | 2.8.2 | compile | gson (auto) | [ ] |
+| 2 | commons-io | commons-io | jar | 2.6 | compile | org.apache.commons.io [auto] | [ ] |
+| 3 | junit | junit | jar | 3.8.1 | test | junit (auto) | [ ] |
+| 4 | org.apache.commons | commons-lang3 | jar | 3.12.0 | compile | org.apache.commons.lang3 [auto] | [ ] |
+| 5 | org.perf4j | perf4j | jar | 0.9.16 | compile | perf4j (auto) | [ ] |
+| 6 | org.projectlombok | lombok | jar | 1.18.20 | compile | lombok | [ ] |
+| 7 | org.springframework.boot | spring-boot-starter-web | jar | 2.0.1.RELEASE | compile | spring.boot.starter.web [auto] | [ ] |
+
+### middleware commons
+
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|-------------------------------|-------------------------------|-------|----------------|---------|-------------------------------|----------|
+| 1 | com.github.jsonld-java | jsonld-java | jar | 0.11.1 | compile | jsonld.java (auto) | [ ] |
+| 2 | org.springframework | spring-context | jar | 5.0.2.RELEASE | compile | spring.context [auto] | [ ] |
+| 3 | org.glassfish | javax.json | jar | 1.1.4 | compile | java.json [auto] | [ ] |
+| 4 | dev.sunbirdrc | pojos | jar | 2.0.3 | compile | pojos (auto) | [ ] |
+| 5 | com.flipkart.zjsonpatch | zjsonpatch | jar | 0.4.6 | compile | zjsonpatch (auto) | [ ] |
+| 6 | junit | junit | jar | 4.12 | test | junit (auto) | [ ] |
+| 7 | org.springframework | spring-beans | jar | 5.0.13.RELEASE | compile | spring.beans [auto] | [ ] |
+| 8 | com.jayway.jsonpath | json-path | jar | 2.4.0 | compile | json.path (auto) | [ ] |
+
+### middleware-bom
+
+#### middleware-bom > registry-middleware
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|---------------|-------------|------|---------|---------|--------|----------|
+| 1 | dev.sunbirdrc | pojos | jar | 2.0.3 | compile | pojos | [ ] |
+
+#### middleware-bom > Authorization
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|-----------------------------------------|----------------------------------------|------|----------------|--------------------|-----------------------------------------------|----------|
+| 1 | com.fasterxml.jackson.core | jackson-databind | jar | 2.10.0 | compile | com.fasterxml.jackson.databind | [ ] |
+| 2 | dev.sunbirdrc | middleware-commons | jar | 2.0.3 | compile | middleware.commons (auto) | [ ] |
+| 3 | dev.sunbirdrc | pojos | jar | 2.0.3 | compile | pojos (auto) | [ ] |
+| 4 | io.jsonwebtoken | jjwt | jar | 0.9.0 | compile | jjwt (auto) | [ ] |
+| 5 | jakarta.validation | jakarta.validation-api | jar | 2.0.2 | compile | java.validation [auto] | [ ] |
+| 6 | junit | junit | jar | 4.12 | test | junit (auto) | [ ] |
+| 7 | org.apache.commons | commons-lang3 | jar | 3.0 | compile | commons.lang3 (auto) | [ ] |
+| 8 | org.keycloak | keycloak-admin-client | jar | 3.2.0.Final | compile | keycloak.admin.client (auto) | [ ] |
+| 9 | org.mockito | mockito-core | jar | 4.2.0 | test | org.mockito [auto] | [ ] |
+| 10 | org.powermock | powermock-api-mockito2 | jar | 2.0.9 | test | powermock.api.mockito2 (auto) | [ ] |
+| 11 | org.powermock | powermock-module-junit4 | jar | 2.0.9 | test | powermock.module.junit4 (auto) | [ ] |
+| 12 | org.springframework.boot | spring-boot-configuration-processor | jar | 2.3.12.RELEASE | compile (optional) | spring.boot.configuration.processor [auto] | [ ] |
+| 13 | org.springframework.boot | spring-boot-starter-security | jar | 2.3.12.RELEASE | compile | spring.boot.starter.security [auto] | [ ] |
+| 14 | org.springframework.boot | spring-boot-starter-web | jar | 2.3.12.RELEASE | compile | spring.boot.starter.web [auto] | [ ] |
+| 15 | org.springframework.boot | spring-boot-test | jar | 2.0.0.RELEASE | test | spring.boot.test [auto] | [ ] |
+| 16 | org.springframework.security | spring-security-oauth2-jose | jar | 5.3.9.RELEASE | compile | spring.security.oauth2.jose [auto] | [ ] |
+| 17 | org.springframework.security | spring-security-oauth2-resource-server | jar | 5.3.9.RELEASE | compile | spring.security.oauth2.resource.server [auto] | [ ] |
+| 18 | org.springframework.security.oauth.boot | spring-security-oauth2-autoconfigure | jar | 2.3.1.RELEASE | compile | spring.security.oauth2.autoconfigure [auto] | [ ] |
+
+#### middleware-bom > Validation
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|---------------|--------------------|------|---------|---------|---------------------------|----------|
+| 1 | dev.sunbirdrc | middleware-commons | jar | 2.0.3 | compile | middleware.commons (auto) | [ ] |
+| 2 | junit | junit | jar | 4.12 | test | junit (auto) | [ ] |
+| 3 | dev.sunbirdrc | pojos | jar | 2.0.3 | compile | pojos (auto) | [ ] |
+
+#### middleware-bom > Identity Provider
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|---------------|-------------|------|---------|---------|--------|----------|
+| 1 | dev.sunbirdrc | pojos | jar | 2.0.3 | compile | pojos | [ ] |
+
+#### middleware-bom > keycloak
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|-------------------------------|-------------------------------|-------|----------------|---------|---------------------------------|----------|
+| 1 | org.keycloak | keycloak-admin-client | jar | 14.0.0 | compile | keycloak.admin.client (auto) | [ ] |
+| 2 | org.springframework | spring-context | jar | 5.0.2.RELEASE | compile | spring.context [auto] | [ ] |
+| 3 | org.springframework | spring-web | jar | 5.0.2.RELEASE | compile | spring.web [auto] | [ ] |
+| 4 | org.slf4j | slf4j-api | jar | 1.7.32 | compile | org.slf4j [auto] | [ ] |
+| 5 | org.springframework.boot | spring-boot-starter-test | jar | 2.5.0 | test | spring.boot.starter.test [auto] | [ ] |
+| 6 | junit | junit | jar | 4.12 | test | junit (auto) | [ ] |
+| 7 | org.springframework | spring-test | jar | 5.3.9 | test | spring.test [auto] | [ ] |
+| 8 | dev.sunbirdrc | pojos | jar | 2.0.3 | compile | pojos (auto) | [ ] |
+| 9 | dev.sunbirdrc | middleware-commons | jar | 2.0.3 | compile | middleware.commons (auto) | [ ] |
+| 10 | dev.sunbirdrc | identity-provider | jar | 2.0.3 | compile | identity.provider (auto) | [ ] |
+
+#### middleware-bom > workflow
+
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|---------------|-----------------------|------|--------------|---------|----------------------------------|----------|
+| 1 | dev.sunbirdrc | pojos | jar | 2.0.3 | compile | pojos (auto) | [ ] |
+| 2 | dev.sunbirdrc | middleware-commons | jar | 2.0.3 | compile | middleware.commons (auto) | [ ] |
+| 3 | junit | junit | jar | 4.12 | test | junit (auto) | [ ] |
+| 4 | org.drools | drools-core | jar | 7.49.0.Final | compile | org.drools.core [auto] | [ ] |
+| 5 | org.drools | drools-compiler | jar | 7.49.0.Final | compile | org.drools.compiler [auto] | [ ] |
+| 6 | org.drools | drools-decisiontables | jar | 7.49.0.Final | compile | org.drools.decisiontables [auto] | [ ] |
+| 7 | dev.sunbirdrc | identity-provider | jar | 2.0.3 | compile | identity.provider (auto) | [ ] |
+
+#### middleware-bom > auth0
+
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|-------------------------------|-------------------------------|-------|----------------|---------|---------------------------------|----------|
+| 1 | com.auth0 | auth0 | jar | 2.3.0 | compile | auth0 (auto) | [ ] |
+| 2 | org.springframework | spring-context | jar | 5.0.2.RELEASE | compile | spring.context [auto] | [ ] |
+| 3 | org.springframework | spring-web | jar | 5.0.2.RELEASE | compile | spring.web [auto] | [ ] |
+| 4 | org.slf4j | slf4j-api | jar | 1.7.32 | compile | org.slf4j [auto] | [ ] |
+| 5 | org.springframework.boot | spring-boot-starter-test | jar | 2.5.0 | test | spring.boot.starter.test [auto] | [ ] |
+| 6 | junit | junit | jar | 4.12 | test | junit (auto) | [ ] |
+| 7 | org.springframework | spring-test | jar | 5.3.9 | test | spring.test [auto] | [ ] |
+| 8 | dev.sunbirdrc | pojos | jar | 2.0.3 | compile | pojos (auto) | [ ] |
+| 9 | dev.sunbirdrc | middleware-commons | jar | 2.0.3 | compile | middleware.commons (auto) | [ ] |
+| 10 | dev.sunbirdrc | identity-provider | jar | 2.0.3 | compile | identity.provider (auto) | [ ] |
+
+#### middleware-bom > generic-iam
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|-------------------------------|-------------------------------|-------|----------------|---------|---------------------------------|----------|
+| 1 | org.springframework | spring-context | jar | 5.0.2.RELEASE | compile | spring.context [auto] | [ ] |
+| 2 | org.springframework | spring-web | jar | 5.0.2.RELEASE | compile | spring.web [auto] | [ ] |
+| 3 | org.slf4j | slf4j-api | jar | 1.7.32 | compile | org.slf4j [auto] | [ ] |
+| 4 | org.springframework.boot | spring-boot-starter-test | jar | 2.5.0 | test | spring.boot.starter.test [auto] | [ ] |
+| 5 | junit | junit | jar | 4.12 | test | junit (auto) | [ ] |
+| 6 | org.springframework | spring-test | jar | 5.3.9 | test | spring.test [auto] | [ ] |
+| 7 | dev.sunbirdrc | pojos | jar | 2.0.3 | compile | pojos (auto) | [ ] |
+| 8 | dev.sunbirdrc | middleware-commons | jar | 2.0.3 | compile | middleware.commons (auto) | [ ] |
+| 9 | dev.sunbirdrc | identity-provider | jar | 2.0.3 | compile | identity.provider (auto) | [ ] |
+
+### validators
+
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|-------------------------------|-------------------------------|-------|----------------|---------|---------------------------------|----------|
+| 1 | dev.sunbirdrc | middleware-commons | jar | 2.0.3 | compile | middleware.commons (auto) | [ ] |
+| 2 | dev.sunbirdrc.middleware | validation | jar | 2.0.3 | compile | validation (auto) | [ ] |
+| 3 | junit | junit | jar | 4.12 | test | junit (auto) | [ ] |
+
+### Json based Validation
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|--------------------------|--------------------|------|---------|---------|--------------------|----------|
+| 1 | dev.sunbirdrc | middleware-commons | jar | 2.0.3 | compile | middleware.commons | [ ] |
+| 2 | dev.sunbirdrc.middleware | validation | jar | 2.0.3 | compile | validation | [ ] |
+| 3 | junit | junit | jar | 4.12 | test | junit | [ ] |
+
+### JSON schema based validation
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|-------------------------------|-------------------------------|-------|----------------|---------|---------------------------------|----------|
+| 1 | com.github.everit-org | org.everit.json.schema | jar | 1.12.2 | compile | org.everit.json.schema (auto) | [ ] |
+| 2 | junit | junit | jar | 4.12 | test | junit (auto) | [ ] |
+| 3 | dev.sunbirdrc | middleware-commons | jar | 2.0.3 | compile | middleware.commons (auto) | [ ] |
+| 4 | dev.sunbirdrc.middleware | validation | jar | 2.0.3 | compile | validation (auto) | [ ] |
+
+### registry-interceptors
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|-------------------------------|-------------------------------|-------|----------------|---------|-----------------------|----------|
+| 1 | org.apache.commons | commons-lang3 | jar | 3.4 | compile | commons.lang3 (auto) | [ ] |
+| 2 | dev.sunbirdrc | authorization | jar | 2.0.3 | compile | authorization (auto) | [ ] |
+| 3 | com.google.code.gson | gson | jar | 2.8.2 | compile | gson (auto) | [ ] |
+| 4 | dev.sunbirdrc | pojos | jar | 2.0.3 | compile | pojos (auto) | [ ] |
+| 5 | org.springframework | spring-context | jar | 5.0.2.RELEASE | compile | spring.context [auto] | [ ] |
+| 6 | org.springframework | spring-web | jar | 5.0.2.RELEASE | compile | spring.web [auto] | [ ] |
+
+
+### Elastic-Search
+
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|-----------------------------------------------|---------------------------------------|-------|----------------|---------|-------------------------------------------|----------|
+| 1 | org.elasticsearch | elasticsearch | jar | 6.6.0 | compile | | [ ] |
+| 2 | org.elasticsearch.client | elasticsearch-rest-high-level-client | jar | 6.6.0 | compile | elasticsearch.rest.high.level.client | [ ] |
+| 3 | org.elasticsearch.client | elasticsearch-rest-client | jar | 6.6.0 | compile | elasticsearch.rest.client | [ ] |
+| 4 | dev.sunbirdrc | pojos | jar | 2.0.3 | compile | pojos | [ ] |
+| 5 | dev.sunbirdrc | middleware-commons | jar | 2.0.3 | compile | middleware.commons | [ ] |
+| 6 | org.springframework.retry | spring-retry | jar | 1.2.2.RELEASE | compile | spring.retry | [ ] |
+| 7 | org.apache.commons | commons-lang3 | jar | 3.4 | compile | commons.lang3 | [ ] |
+
+### sunbird-actor
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|---------------------|------------------|------|----------|---------|---------------|----------|
+| 1 | com.typesafe.akka | akka-remote_2.12 | jar | 2.6.0-M2 | compile | akka.remote | [ ] |
+| 2 | com.google.protobuf | protobuf-java | jar | 3.6.1 | compile | protobuf.java | [ ] |
+| 3 | org.apache.commons | commons-lang3 | jar | 3.0 | compile | commons.lang3 | [ ] |
+
+### sunbirdrc-actors
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|----------------------|----------------|------|---------------|---------|----------------|----------|
+| 1 | org.sunbird.akka | sunbird-actor | jar | 1.0.0 | compile | sunbird.actor | [ ] |
+| 2 | dev.sunbirdrc | elastic-search | jar | 2.0.3 | compile | elastic.search | [ ] |
+| 3 | com.squareup.okhttp3 | okhttp | jar | 5.0.0-alpha.2 | compile | okhttp3 [auto] | [ ] |
+### plugins
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|------------------|------------------|------|---------|---------|------------------|----------|
+| 1 | org.sunbird.akka | sunbird-actor | jar | 1.0.0 | compile | sunbird.actor | [ ] |
+| 2 | dev.sunbirdrc | sunbirdrc-actors | jar | 2.0.3 | compile | sunbirdrc.actors | [ ] |
+### divoc-external-plugin
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|------------------|------------------|------|---------|---------|------------------|----------|
+| 1 | org.sunbird.akka | sunbird-actor | jar | 1.0.0 | compile | sunbird.actor | [ ] |
+| 2 | dev.sunbirdrc | sunbirdrc-actors | jar | 2.0.3 | compile | sunbirdrc.actors | [ ] |
+
+### mosip-external-plugin
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|----------------------|------------------|------|----------|---------|------------------|----------|
+| 1 | org.sunbird.akka | sunbird-actor | jar | 1.0.0 | compile | sunbird.actor | [ ] |
+| 2 | dev.sunbirdrc | sunbirdrc-actors | jar | 2.0.3 | compile | sunbirdrc.actors | [ ] |
+
+### sample-external-plugin-2
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|----------------------|------------------|------|----------|---------|------------------|----------|
+| 1 | org.sunbird.akka | sunbird-actor | jar | 1.0.0 | compile | sunbird.actor | [ ] |
+| 2 | dev.sunbirdrc | sunbirdrc-actors | jar | 2.0.3 | compile | sunbirdrc.actors | [ ] |
+
+### view-templates
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|----------------------------|------------------|------|---------|----------|--------------------------------|----------|
+| 1 | com.fasterxml.jackson.core | jackson-databind | jar | 2.12.0 | compile | com.fasterxml.jackson.databind | [ ] |
+| 2 | org.apache.commons | commons-jexl | jar | 2.1.1 | compile | commons.jexl | [ ] |
+| 3 | org.apache.commons | commons-lang3 | jar | 3.4 | compile | commons.lang3 | [ ] |
+| 4 | junit | junit | jar | 4.12 | test | junit | [ ] |
+| 5 | org.mockito | mockito-core | jar | 2.12.0 | test | org.mockito | [ ] |
+| 6 | com.jayway.jsonpath | json-path | jar | 2.4.0 | compile | json.path | [ ] |
+| 7 | org.projectlombok | lombok | jar | 1.18.20 | provided | lombok | [ ] |
+### registry
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|------------------------------|----------------------------------|------|----------------|----------|-----------------------------------------|----------|
+| 1 | com.github.jknack | handlebars | jar | 4.3.1 | compile | handlebars (auto) | [ ] |
+| 2 | com.google.code.gson | gson | jar | 2.8.2 | compile | gson (auto) | [ ] |
+| 3 | com.google.guava | guava | jar | 23.0 | compile | guava (auto) | [ ] |
+| 4 | com.googlecode.junit-toolbox | junit-toolbox | jar | 1.5 | test | junit.toolbox (auto) | [ ] |
+| 5 | com.intuit.karate | karate-junit5 | jar | 1.0.1 | test | karate.junit5 (auto) | [ ] |
+| 6 | com.microsoft.sqlserver | mssql-jdbc | jar | 12.6.1.jre8 | compile | mssql.jdbc (auto) | [ ] |
+| 7 | com.orientechnologies | orientdb-gremlin | jar | 3.0.0m2 | compile | orientdb.gremlin (auto) | [ ] |
+| 8 | com.squareup.okhttp3 | okhttp | jar | 4.8.1 | compile | okhttp3 (auto) | [ ] |
+| 9 | com.steelbridgelabs.oss | neo4j-gremlin-bolt | jar | 0.2.27 | compile | neo4j.gremlin.bolt (auto) | [ ] |
+| 10 | commons-io | commons-io | jar | 2.6 | compile | org.apache.commons.io (auto) | [ ] |
+| 11 | dev.sunbirdrc | auth0 | jar | 2.0.3 | compile | auth0 (auto) | [ ] |
+| 12 | dev.sunbirdrc | divoc-external-plugin | jar | 2.0.3 | compile | divoc.external.plugin (auto) | [ ] |
+| 13 | dev.sunbirdrc | elastic-search | jar | 2.0.3 | compile | elastic.search (auto) | [ ] |
+| 14 | dev.sunbirdrc | generic-iam | jar | 2.0.3 | compile | generic.iam (auto) | [ ] |
+| 15 | dev.sunbirdrc | identity-provider | jar | 2.0.3 | compile | identity.provider (auto) | [ ] |
+| 16 | dev.sunbirdrc | jsonschemavalidator | jar | 2.0.3 | compile | jsonschemavalidator (auto) | [ ] |
+| 17 | dev.sunbirdrc | keycloak | jar | 2.0.3 | compile | keycloak (auto) | [ ] |
+| 18 | dev.sunbirdrc | mosip-external-plugin | jar | 2.0.3 | compile | mosip.external.plugin (auto) | [ ] |
+| 19 | dev.sunbirdrc | registry-interceptor | jar | 2.0.3 | compile | registry.interceptor (auto) | [ ] |
+| 20 | dev.sunbirdrc | sample-external-plugin-2 | jar | 2.0.3 | compile | sample.external.plugin-2 (auto) | [ ] |
+| 21 | dev.sunbirdrc | sunbirdrc-actors | jar | 2.0.3 | compile | sunbirdrc.actors (auto) | [ ] |
+| 22 | dev.sunbirdrc | view-templates | jar | 1.0.0 | compile | view.templates (auto) | [ ] |
+| 23 | dev.sunbirdrc | workflow | jar | 2.0.3 | compile | workflow (auto) | [ ] |
+| 24 | io.minio | minio | jar | 8.3.0 | compile | minio (auto) | [ ] |
+| 25 | io.swagger | swagger-core | jar | 1.6.2 | compile | swagger.core (auto) | [ ] |
+| 26 | javax.ws.rs | javax.ws.rs-api | jar | 2.1.1 | compile | java.ws.rs | [ ] |
+| 27 | junit | junit | jar | 4.12 | test | junit (auto) | [ ] |
+| 28 | org.apache.commons | commons-text | jar | 1.9 | compile | org.apache.commons.text (auto) | [ ] |
+| 29 | org.apache.httpcomponents | httpclient-cache | jar | 4.5.4 | compile | httpclient.cache (auto) | [ ] |
+| 30 | org.apache.httpcomponents | httpcore | jar | 4.4.8 | compile | httpcore (auto) | [ ] |
+| 31 | org.apache.tinkerpop | gremlin-core | jar | 3.3.3 | compile | gremlin.core (auto) | [ ] |
+| 32 | org.apache.tinkerpop | neo4j-gremlin | jar | 3.3.3 | compile | neo4j.gremlin (auto) | [ ] |
+| 33 | org.apache.tinkerpop | tinkergraph-gremlin | jar | 3.3.3 | compile | tinkergraph.gremlin (auto) | [ ] |
+| 34 | org.codehaus.groovy | groovy-all | jar | 1.6-beta-2 | test | groovy.all (auto) | [ ] |
+| 35 | org.janusgraph | janusgraph-core | jar | 0.3.1 | compile | janusgraph.core (auto) | [ ] |
+| 36 | org.jboss.resteasy | resteasy-client | jar | 3.9.1.Final | compile | resteasy.client (auto) | [ ] |
+| 37 | org.jboss.resteasy | resteasy-jackson2-provider | jar | 3.9.1.Final | compile | resteasy.jackson2.provider (auto) | [ ] |
+| 38 | org.keycloak | keycloak-spring-security-adapter | jar | 14.0.0 | compile | keycloak.spring.security.adapter (auto) | [ ] |
+| 39 | org.neo4j | neo4j-tinkerpop-api-impl | jar | 0.7-3.2.3 | compile | neo4j.tinkerpop.api.impl (auto) | [ ] |
+| 40 | org.postgresql | postgresql | jar | 42.2.20 | compile | org.postgresql.jdbc (auto) | [ ] |
+| 41 | org.projectlombok | lombok | jar | 1.18.20 | provided | lombok | [ ] |
+| 42 | org.springframework.boot | spring-boot-starter-security | jar | 2.3.12.RELEASE | compile | spring.boot.starter.security [auto] | [ ] |
+| 43 | org.springframework.boot | spring-boot-starter-test | jar | 2.3.12.RELEASE | test | spring.boot.starter.test [auto] | [ ] |
+| 44 | org.springframework.boot | spring-boot-starter-validation | jar | 2.3.12.RELEASE | compile | spring.boot.starter.validation [auto] | [ ] |
+| 45 | org.springframework.boot | spring-boot-starter-web | jar | 2.3.12.RELEASE | compile | spring.boot.starter.web [auto] | [ ] |
+| 46 | org.springframework.data | spring-data-commons | jar | 2.3.9.RELEASE | compile | spring.data.commons [auto] | [ ] |
+| 47 | org.springframework.kafka | spring-kafka | jar | 2.8.6 | compile | spring.kafka [auto] | [ ] |
+| 48 | redis.clients | jedis | jar | 3.3.0 | compile | jedis (auto) | [ ] |
+### claim
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|--------------------------|------------------------------|------|------------|---------|-------------------------------------|----------|
+| 1 | com.jayway.jsonpath | json-path | jar | 2.4.0 | compile | json.path (auto) | [ ] |
+| 2 | com.microsoft.sqlserver | mssql-jdbc | jar | 9.2.1.jre8 | runtime | mssql.jdbc (auto) | [ ] |
+| 3 | dev.sunbirdrc | middleware-commons | jar | 2.0.3 | compile | middleware.commons (auto) | [ ] |
+| 4 | dev.sunbirdrc | pojos | jar | 2.0.3 | compile | pojos (auto) | [ ] |
+| 5 | io.springfox | springfox-boot-starter | jar | 3.0.0 | compile | springfox.boot.starter (auto) | [ ] |
+| 6 | io.springfox | springfox-swagger-ui | jar | 3.0.0 | compile | springfox.swagger.ui (auto) | [ ] |
+| 7 | junit | junit | jar | 4.12 | test | junit (auto) | [ ] |
+| 8 | org.mockito | mockito-core | jar | 2.12.0 | test | org.mockito [auto] | [ ] |
+| 9 | org.postgresql | postgresql | jar | 42.2.20 | compile | org.postgresql.jdbc (auto) | [ ] |
+| 10 | org.springframework.boot | spring-boot-starter-actuator | jar | 2.5.0 | compile | spring.boot.starter.actuator [auto] | [ ] |
+| 11 | org.springframework.boot | spring-boot-starter-data-jpa | jar | 2.5.0 | compile | spring.boot.starter.data.jpa [auto] | [ ] |
+| 12 | org.springframework.boot | spring-boot-starter-test | jar | 2.5.0 | test | spring.boot.starter.test [auto] | [ ] |
+| 13 | org.springframework.boot | spring-boot-starter-web | jar | 2.5.0 | compile | spring.boot.starter.web [auto] | [ ] |
+| 14 | org.springframework.boot | spring-boot-starter | jar | 2.5.0 | compile | spring.boot.starter [auto] | [ ] |
+### apitest
+| Serial No | Group ID | Artifact ID | Type | Version | Scope | Module | Selected |
+|-----------|-------------------------------|------------------|------|----------|---------|-------------------------|----------|
+| 1 | com.intuit.karate | karate-junit5 | jar | 1.3.0 | test | karate.junit5 (auto) | [ ] |
diff --git a/java/Dockerfile b/java/Dockerfile
index 1fc860410..4bf0daff1 100644
--- a/java/Dockerfile
+++ b/java/Dockerfile
@@ -1,9 +1,7 @@
-FROM frolvlad/alpine-java:jdk8-slim
-#COPY ./java/registry/target/registry.jar /home/sunbirdrc/registry.jar
-COPY ./BOOT-INF/lib /home/sunbirdrc/BOOT-INF/lib
-COPY ./META-INF /home/sunbirdrc/META-INF
-COPY ./org /home/sunbirdrc/org
-COPY ./BOOT-INF/classes /home/sunbirdrc/BOOT-INF/classes
-COPY ./BOOT-INF/classes/frame.json.sample /home/sunbirdrc/BOOT-INF/classes/frame.json
+FROM eclipse-temurin:21-jdk
+WORKDIR /app
+COPY ./registry.jar ./registry.jar
RUN mkdir -p /home/sunbirdrc/config/public/_schemas
-CMD ["java", "-Xms1024m", "-Xmx2048m", "-XX:+UseG1GC", "-Dserver.port=8081", "-cp", "/home/sunbirdrc/config:/home/sunbirdrc", "org.springframework.boot.loader.JarLauncher"]
+EXPOSE 8081
+ENTRYPOINT ["java","-Xms1g", "-Xmx2g", "-jar", "registry.jar", "--server.port=8081"]
+
diff --git a/java/SimpleCommands.md b/java/SimpleCommands.md
new file mode 100644
index 000000000..bf7066f89
--- /dev/null
+++ b/java/SimpleCommands.md
@@ -0,0 +1,21 @@
+### Use podman compose to start test environment
+```shell
+podman compose -f docker-compose-v1.yml --env-file test_environments/test_with_distributedDefManager_nativeSearch.env up -d db keycloak
+
+```
+
+### Build registry image using podman
+```shell
+podman build -t ghcr.io/sunbird-rc/sunbird-rc-core .
+```
+
+### Enable docker host access via podman
+```shell
+export DOCKER_HOST="unix://$(podman machine inspect --format '{{.ConnectionInfo.PodmanSocket.Path}}')"
+```
+
+### Copy log files from container to host
+```shell
+podman cp sunbird-rc-core-registry-1:/app/logs/app.log app.log
+
+```
\ No newline at end of file
diff --git a/java/apitest/pom.xml b/java/apitest/pom.xml
index 9987136d5..e1bc3dddc 100644
--- a/java/apitest/pom.xml
+++ b/java/apitest/pom.xml
@@ -1,23 +1,14 @@
-
+
4.0.0
-
- sunbird-rc
- dev.sunbirdrc
- 2.0.3
-
-
- dev.sunbirdrc
apitest
- 1.0-SNAPSHOT
+ 2.0.4-SNAPSHOT
jar
-
+ dev.sunbirdrc
UTF-8
- 1.8
- 3.8.1
- 2.22.2
- 1.3.0
+ 1.4.1
@@ -27,6 +18,17 @@
${karate.version}
test
+
+ org.junit.jupiter
+ junit-jupiter-api
+ 5.10.3
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ 5.10.3
+ runtime
+
@@ -39,25 +41,10 @@
-
- org.apache.maven.plugins
- maven-compiler-plugin
- ${maven.compiler.version}
-
- UTF-8
-
- ${java.version}
- -Werror
-
-
org.apache.maven.plugins
maven-surefire-plugin
- ${maven.surefire.version}
-
- -Dfile.encoding=UTF-8
- true
-
+ 2.22.2
@@ -75,18 +62,14 @@
org.apache.maven.plugins
maven-compiler-plugin
- ${maven.compiler.version}
UTF-8
-
- ${java.version}
-Werror
org.apache.maven.plugins
maven-surefire-plugin
- ${maven.surefire.version}
-Dfile.encoding=UTF-8
false
diff --git a/java/apitest/src/test/java/e2e/registry/E2ETests.java b/java/apitest/src/test/java/e2e/registry/E2ETests.java
index f4db838ab..4000cb728 100644
--- a/java/apitest/src/test/java/e2e/registry/E2ETests.java
+++ b/java/apitest/src/test/java/e2e/registry/E2ETests.java
@@ -13,7 +13,7 @@ void testParallel() {
Results results = Runner.path("classpath:e2e")
.tags("~@ignore")
//.outputCucumberJson(true)
- .parallel(5);
+ .parallel(1);
assertEquals(0, results.getFailCount(), results.getErrorMessages());
}
diff --git a/java/claim/Dockerfile b/java/claim/Dockerfile
index 4f1f5af6e..f42de2475 100644
--- a/java/claim/Dockerfile
+++ b/java/claim/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:8-jdk-alpine
+FROM eclipse-temurin:21-jdk
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
\ No newline at end of file
diff --git a/java/claim/Makefile b/java/claim/Makefile
index 9eb60e04d..a23f53b62 100644
--- a/java/claim/Makefile
+++ b/java/claim/Makefile
@@ -3,10 +3,10 @@
#SOURCES = $(wildcard java/**/*.java)
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
SOURCES := $(call rwildcard,java/,*.java)
-build: target/claim-0.0.1-SNAPSHOT.jar
+build: target/claim-2.0.4-SNAPSHOT.jar
echo ${SOURCES}
cd target && docker build -t ghcr.io/sunbird-rc/sunbird-rc-claim-ms ..
-target/claim-0.0.1-SNAPSHOT.jar: $(SOURCES)
+target/claim-2.0.4-SNAPSHOT.jar: $(SOURCES)
echo $(SOURCES)
../mvnw -DskipTests clean install
\ No newline at end of file
diff --git a/java/claim/pom.xml b/java/claim/pom.xml
index c8aa49cb1..27e5572d1 100644
--- a/java/claim/pom.xml
+++ b/java/claim/pom.xml
@@ -3,29 +3,31 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
claim
- 0.0.1-SNAPSHOT
+ 2.0.4-SNAPSHOT
claim
Claim processing service
- org.springframework.boot
- spring-boot-starter-parent
- 2.5.0
-
+ dev.sunbirdrc
+ sunbird-rc
+ 2.0.4-SNAPSHOT
-
- 1.8
-
+
org.springframework.boot
spring-boot-starter
+
+ org.springframework.boot
+ spring-boot-starter-web
+
org.springframework.boot
spring-boot-starter-data-jpa
+
org.postgresql
@@ -36,69 +38,52 @@
mssql-jdbc
runtime
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- junit
- junit
- 4.12
- test
-
-
- org.mockito
- mockito-core
- 2.12.0
- test
-
+
dev.sunbirdrc
pojos
- 2.0.3
- compile
+ 2.0.4-SNAPSHOT
com.jayway.jsonpath
json-path
- 2.4.0
+ ${json-path.version}
io.springfox
springfox-boot-starter
- 3.0.0
+ ${springfox-boot-starter.version}
- io.springfox
- springfox-swagger-ui
- 3.0.0
+ org.springdoc
+ springdoc-openapi-starter-webmvc-ui
+ ${springdoc-openapi-starter-webmvc-ui.version}
org.springframework.boot
spring-boot-starter-actuator
- 2.5.0
+ ${spring-boot-starter-actuator.version}
dev.sunbirdrc
middleware-commons
- 2.0.3
- compile
+ 2.0.4-SNAPSHOT
+
+
+ ch.qos.logback
+ logback-classic
+ ${logback.version}
+
+
+ ch.qos.logback
+ logback-core
+ ${logback.version}
+
+
+ org.slf4j
+ slf4j-api
+ ${slf4j-api.version}
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
diff --git a/java/claim/src/main/java/dev/sunbirdrc/claim/entity/Claim.java b/java/claim/src/main/java/dev/sunbirdrc/claim/entity/Claim.java
index 98e13026f..6f58e323e 100644
--- a/java/claim/src/main/java/dev/sunbirdrc/claim/entity/Claim.java
+++ b/java/claim/src/main/java/dev/sunbirdrc/claim/entity/Claim.java
@@ -5,7 +5,7 @@
import dev.sunbirdrc.pojos.dto.ClaimDTO;
import org.hibernate.annotations.GenericGenerator;
-import javax.persistence.*;
+import jakarta.persistence.*;
import java.util.Date;
@Entity
diff --git a/java/claim/src/main/java/dev/sunbirdrc/claim/entity/ClaimNote.java b/java/claim/src/main/java/dev/sunbirdrc/claim/entity/ClaimNote.java
index ad603d25a..899c579c5 100644
--- a/java/claim/src/main/java/dev/sunbirdrc/claim/entity/ClaimNote.java
+++ b/java/claim/src/main/java/dev/sunbirdrc/claim/entity/ClaimNote.java
@@ -5,7 +5,7 @@
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;
-import javax.persistence.*;
+import jakarta.persistence.*;
import java.util.Date;
@Getter
diff --git a/java/claim/src/main/resources/application.properties b/java/claim/src/main/resources/application.properties
index a8d3441b0..51a497d85 100644
--- a/java/claim/src/main/resources/application.properties
+++ b/java/claim/src/main/resources/application.properties
@@ -8,6 +8,4 @@ spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
-sunbirdrc.url=${sunbirdrc_url:http://localhost:8081}
-
-uuid-property-name=${uuid_property_name:osid}
+sunbirdrc.url=${sunbirdrc_url:http://localhost:8081}
\ No newline at end of file
diff --git a/java/claim/src/test/java/dev/sunbirdrc/claim/ClaimsApplicationTests.java b/java/claim/src/test/java/dev/sunbirdrc/claim/ClaimsApplicationTests.java
index 90e0a36b3..89ffb36c4 100644
--- a/java/claim/src/test/java/dev/sunbirdrc/claim/ClaimsApplicationTests.java
+++ b/java/claim/src/test/java/dev/sunbirdrc/claim/ClaimsApplicationTests.java
@@ -1,13 +1,13 @@
package dev.sunbirdrc.claim;
-import org.junit.Test;
+import com.google.gson.Gson;
+import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
-@SpringBootTest
+@SpringBootTest(classes = {Gson.class})
class ClaimsApplicationTests {
- @Test
- void contextLoads() {
- }
-
-}
+ @Test
+ void contextLoads() {
+ }
+}
\ No newline at end of file
diff --git a/java/claim/src/test/java/dev/sunbirdrc/claim/service/ClaimServiceTest.java b/java/claim/src/test/java/dev/sunbirdrc/claim/service/ClaimServiceTest.java
index 76012d617..15d7bf7c8 100644
--- a/java/claim/src/test/java/dev/sunbirdrc/claim/service/ClaimServiceTest.java
+++ b/java/claim/src/test/java/dev/sunbirdrc/claim/service/ClaimServiceTest.java
@@ -11,13 +11,12 @@
import dev.sunbirdrc.claim.exception.UnAuthorizedException;
import dev.sunbirdrc.claim.repository.ClaimNoteRepository;
import dev.sunbirdrc.claim.repository.ClaimRepository;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.PageImpl;
+import org.mockito.junit.jupiter.MockitoExtension;
+import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
@@ -26,29 +25,31 @@
import static dev.sunbirdrc.claim.contants.AttributeNames.*;
import static dev.sunbirdrc.claim.model.ClaimStatus.CLOSED;
import static dev.sunbirdrc.claim.model.ClaimStatus.OPEN;
-import static org.junit.Assert.assertEquals;
+import static dev.sunbirdrc.registry.middleware.util.Constants.USER_ID;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;
-@RunWith(MockitoJUnitRunner.class)
-public class ClaimServiceTest {
- private ClaimService claimService;
+@ExtendWith(MockitoExtension.class)
+class ClaimServiceTest {
@Mock
ClaimRepository claimRepository;
@Mock
ClaimNoteRepository claimNoteRepository;
- @Mock
+ @MockBean
SunbirdRCClient sunbirdRCClient;
@Mock
ClaimsAuthorizer claimsAuthorizer;
+ private ClaimService claimService;
- @Before
- public void setUp() {
+ @BeforeEach
+ void setUp() {
claimService = new ClaimService(claimRepository, claimNoteRepository, sunbirdRCClient, claimsAuthorizer);
}
@Test
- public void shouldReturnOnlyAuthorizedClaims() {
+ void shouldReturnOnlyAuthorizedClaims() {
Claim claim1 = getClaim("1");
Claim claim2 = getClaim("2");
Claim claim3 = getClaim("3");
@@ -68,7 +69,7 @@ public void shouldReturnOnlyAuthorizedClaims() {
}
@Test
- public void shouldReturnAppropriateClaimsInPaginationFormat() {
+ void shouldReturnAppropriateClaimsInPaginationFormat() {
Claim claim1 = getClaim("1");
Claim claim2 = getClaim("2");
Claim claim3 = getClaim("3");
@@ -90,7 +91,7 @@ public void shouldReturnAppropriateClaimsInPaginationFormat() {
}
@Test
- public void shouldReturnEmptyClaimsIfOffsetGreaterThanClaimSize() {
+ void shouldReturnEmptyClaimsIfOffsetGreaterThanClaimSize() {
Claim claim1 = getClaim("1");
Claim claim2 = getClaim("2");
Claim claim3 = getClaim("3");
@@ -111,35 +112,36 @@ public void shouldReturnEmptyClaimsIfOffsetGreaterThanClaimSize() {
assertEquals(claimService.findClaimsForAttestor(entity, dummyNode, pageable), actualClaims);
}
- @Test(expected = ResourceNotFoundException.class)
- public void attestClaimShouldThrowExceptionIfTheClaimIsNotFound() {
+ @Test
+ void attestClaimShouldThrowExceptionIfTheClaimIsNotFound() {
String id = "1";
when(claimRepository.findById(id)).thenReturn(Optional.empty());
JsonNode dummyNode = new ObjectMapper().nullNode();
- claimService.attestClaim(id, dummyNode);
+ assertThrows(ResourceNotFoundException.class, () -> claimService.attestClaim(id, dummyNode));
}
- @Test(expected = ClaimAlreadyProcessedException.class)
- public void attestClaimShouldThrowExceptionIfTheClaimIsAlreadyProcessed() {
+
+ @Test
+ void attestClaimShouldThrowExceptionIfTheClaimIsAlreadyProcessed() {
String id = "1";
Claim claim = getClaim(id);
claim.setStatus(CLOSED.name());
when(claimRepository.findById(id)).thenReturn(Optional.of(claim));
JsonNode dummyNode = new ObjectMapper().nullNode();
- claimService.attestClaim(id, dummyNode);
+ assertThrows(ClaimAlreadyProcessedException.class, () -> claimService.attestClaim(id, dummyNode));
}
- @Test(expected = UnAuthorizedException.class)
- public void attestClaimShouldThrowExceptionIfTheUserIsNotAuthorized() {
+ @Test
+ void attestClaimShouldThrowExceptionIfTheUserIsNotAuthorized() {
String id = "1";
Claim claim = getClaim(id);
claim.setStatus(OPEN.name());
JsonNode dummyNode = new ObjectMapper().nullNode();
when(claimRepository.findById(id)).thenReturn(Optional.of(claim));
- claimService.attestClaim(id, dummyNode);
+ assertThrows(UnAuthorizedException.class, () -> claimService.attestClaim(id, dummyNode));
}
@Test
- public void shouldAbleToAttestTheClaim() throws JsonProcessingException {
+ void shouldAbleToAttestTheClaim() throws JsonProcessingException {
String id = "1";
String addedBy = "Rogers";
String notes = "what ?";
@@ -155,6 +157,7 @@ public void shouldAbleToAttestTheClaim() throws JsonProcessingException {
JsonNode dummyNode = new ObjectMapper().readTree(getStudentEntity());
requestBody.set(ATTESTOR_INFO, dummyNode);
requestBody.put(NOTES, notes);
+ requestBody.put(USER_ID, 1);
when(claimRepository.findById(id)).thenReturn(Optional.of(claim));
when(claimsAuthorizer.isAuthorizedAttestor(claim, dummyNode)).thenReturn(true);
@@ -167,8 +170,14 @@ public void shouldAbleToAttestTheClaim() throws JsonProcessingException {
claimService.attestClaim(id, requestBody);
verify(claimRepository, atLeastOnce()).save(any());
- verify(claimNoteRepository, atLeastOnce()).save(expectedClaimNote);
+ verify(claimNoteRepository, atLeastOnce()).save(argThat(note ->
+ note.getNotes().equals(expectedClaimNote.getNotes()) &&
+ note.getPropertyURI().equals(expectedClaimNote.getPropertyURI()) &&
+ note.getEntityId().equals(expectedClaimNote.getEntityId()) &&
+ note.getAddedBy().equals(expectedClaimNote.getAddedBy())
+ ));
}
+
private Claim getClaim(String id) {
Claim claim = new Claim();
claim.setId(id);
@@ -212,4 +221,4 @@ private String getStudentEntity() {
" \"osOwner\": \"556302c9-d8b4-4f60-9ac1-c16c8839a9f3\"\n" +
" }";
}
-}
+}
\ No newline at end of file
diff --git a/java/cukes/pom.xml b/java/cukes/pom.xml
index 0acf0ab6e..a76c0e741 100644
--- a/java/cukes/pom.xml
+++ b/java/cukes/pom.xml
@@ -5,7 +5,7 @@
sunbird-rc
dev.sunbirdrc
- 2.0.3
+ 2.0.4-SNAPSHOT
cukes
diff --git a/java/elastic-search/pom.xml b/java/elastic-search/pom.xml
index f5a00332a..54bf18845 100644
--- a/java/elastic-search/pom.xml
+++ b/java/elastic-search/pom.xml
@@ -1,108 +1,62 @@
4.0.0
- elastic-search
- Elastic-Search
- Elastic Search for OS
-
sunbird-rc
dev.sunbirdrc
- 2.0.3
+ 2.0.4-SNAPSHOT
-
-
- 6.6.0
-
-
+ elastic-search
+ Elastic-Search
+ 2.0.4-SNAPSHOT
+ Elastic Search for OS
+
+
+ MIT License
+ https://opensource.org/licenses/MIT
+ repo
+
+
-
-
- org.elasticsearch
- elasticsearch
- ${elastic.search.version}
-
-
org.elasticsearch.client
elasticsearch-rest-high-level-client
- ${elastic.search.version}
-
-
-
- org.elasticsearch.client
- elasticsearch-rest-client
- ${elastic.search.version}
+ ${elasticsearch.version}
dev.sunbirdrc
pojos
- ${version}
+ ${project.version}
dev.sunbirdrc
middleware-commons
- ${version}
+ ${project.version}
-
-
org.springframework.retry
spring-retry
- 1.2.2.RELEASE
-
-
-
- org.apache.commons
- commons-lang3
- 3.4
+ ${spring.retry.version}
-
- org.jacoco
- jacoco-maven-plugin
- ${jacoco.version}
+ org.springframework.boot
+ spring-boot-maven-plugin
- prepare-agent
-
- prepare-agent
-
-
-
- report
- prepare-package
+ repackage
+ package
- report
-
-
-
- post-unit-test
- test
-
- report
+ repackage
-
-
- target/jacoco.exec
-
- target/jacoco-ut
+ true
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- 8
-
-
\ No newline at end of file
diff --git a/java/middleware-commons/pom.xml b/java/middleware-commons/pom.xml
index d49d5dcbb..9e283e9fe 100644
--- a/java/middleware-commons/pom.xml
+++ b/java/middleware-commons/pom.xml
@@ -4,59 +4,80 @@
dev.sunbirdrc
sunbird-rc
- 2.0.3
- ../
+ 2.0.4-SNAPSHOT
middleware-commons
- 2.0.3
+ 2.0.4-SNAPSHOT
middleware commons
Common utilities and interfaces
-
+
+
+ MIT License
+ https://opensource.org/licenses/MIT
+ repo
+
+
+
+
+
+ commons-io
+ commons-io
+ ${commons-io.version}
+
+
+
- com.github.jsonld-java
- jsonld-java
- 0.11.1
+ com.flipkart.zjsonpatch
+ zjsonpatch
+ ${zjsonpatch.version}
- org.springframework
- spring-context
- 5.0.2.RELEASE
+ jakarta.json
+ jakarta.json-api
+ ${jakarta.json-api.version}
- org.glassfish
- javax.json
- 1.1.4
+ com.github.jsonld-java
+ jsonld-java
+ ${jsonld-java.version}
+
+
+ commons-io
+ commons-io
+
+
dev.sunbirdrc
pojos
- 2.0.3
-
-
-
- com.flipkart.zjsonpatch
- zjsonpatch
- 0.4.6
-
-
-
- junit
- junit
- 4.12
- test
-
-
- org.springframework
- spring-beans
- 5.0.13.RELEASE
- compile
+ ${sunbird.revision}
com.jayway.jsonpath
json-path
- 2.4.0
+ ${json-path.version}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+ repackage
+ package
+
+ repackage
+
+
+ true
+
+
+
+
+
+
\ No newline at end of file
diff --git a/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/middleware/service/ConditionResolverService.java b/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/middleware/service/ConditionResolverService.java
index f2e9b2ce3..f07b03164 100644
--- a/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/middleware/service/ConditionResolverService.java
+++ b/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/middleware/service/ConditionResolverService.java
@@ -20,12 +20,12 @@ public class ConditionResolverService {
/**
* @param entityNode subject node where we will apply the extract out the values for given json path
- * @param matcher it accepts either ATTESTOR or REQUESTER
- * @param condition this is the condition the system has to resolve which will be used for evaluation
+ * @param matcher it accepts either ATTESTOR or REQUESTER
+ * @param condition this is the condition the system has to resolve which will be used for evaluation
* @param attributes contains pair[key, val] where key will be replaced with its value in the condition
- * */
+ */
public String resolve(JsonNode entityNode, String matcher, String condition, List attributes) {
- if(condition == null || condition.isEmpty()) {
+ if (condition == null || condition.isEmpty()) {
return "";
}
String entity = entityNode.toString();
@@ -38,16 +38,17 @@ public String resolve(JsonNode entityNode, String matcher, String condition, Lis
expressions[1] = replaceOriginalValueForGivenJsonPath(entity, expressions[1]);
matchersValuesPair.add(expressions);
}
- for(String[] pair: matchersValuesPair) {
+ for (String[] pair : matchersValuesPair) {
condition = replace(condition, pair);
}
return condition;
}
+
private String replaceOriginalValueForGivenJsonPath(String entity, String path) {
Configuration alwaysReturnListConfig = Configuration.builder().options(Option.ALWAYS_RETURN_LIST).build();
List read = JsonPath.using(alwaysReturnListConfig).parse(entity).read(path);
String s;
- if(read.size() == 1) {
+ if (read.size() == 1) {
s = "'" + read.get(0) + "'";
} else {
s = read.toString();
@@ -68,7 +69,7 @@ private String[] generateExpressionAndJsonPathPair(int index, String condition)
}
if (hashCount == 1 && indexAfterFirstHash == -1) {
indexAfterFirstHash = i;
- } else if(hashCount == 2){
+ } else if (hashCount == 2) {
ans[0] = sb.toString();
ans[1] = condition.substring(indexAfterFirstHash + 1, i);
break;
@@ -93,9 +94,9 @@ private String replace(String condition, String[] pair) {
private List findWordIndices(String matcher, String condition) {
int index = 0;
List indices = new ArrayList<>();
- while(index != -1) {
+ while (index != -1) {
index = condition.indexOf(matcher, index);
- if(index != -1) {
+ if (index != -1) {
indices.add(index);
index++;
}
@@ -107,6 +108,6 @@ public boolean evaluate(String condition) {
logger.info("Resolved conditions {}", condition);
ExpressionParser expressionParser = new SpelExpressionParser();
Expression expression = expressionParser.parseExpression(condition);
- return expression.getValue(Boolean.class);
+ return Boolean.TRUE.equals(expression.getValue(Boolean.class));
}
}
diff --git a/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/middleware/util/Constants.java b/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/middleware/util/Constants.java
index cfea2abd4..11ab9e49f 100644
--- a/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/middleware/util/Constants.java
+++ b/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/middleware/util/Constants.java
@@ -94,6 +94,7 @@ public class Constants {
//class path for json resources from _schemas folder
public static final String RESOURCE_LOCATION = "classpath*:public/_schemas/*.json";
+ public static final String SCHEMA_FILE_LOCATION = "./public/_schemas/*.json";
public static final String INTERNAL_RESOURCE_LOCATION = "classpath*:internal/_schemas/*.json";
//elastic search document type
diff --git a/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/middleware/util/JSONUtil.java b/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/middleware/util/JSONUtil.java
index 62ec2137e..4cea65be9 100644
--- a/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/middleware/util/JSONUtil.java
+++ b/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/middleware/util/JSONUtil.java
@@ -3,6 +3,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
@@ -412,15 +413,18 @@ public static void merge(String entityTypeJsonPtr, ObjectNode result, ObjectNode
* @return
*/
public static JsonNode diffJsonNode(JsonNode existingNode, JsonNode latestNode) {
- ObjectMapper objectMapper = new ObjectMapper();
- if(existingNode == null) {
- existingNode = objectMapper.createObjectNode();
+
+ final JsonToken existingNodeToken = (existingNode != null) ? existingNode.asToken() : JsonToken.NOT_AVAILABLE;
+
+ final JsonToken latestNodeToken = (latestNode != null) ? latestNode.asToken() : JsonToken.NOT_AVAILABLE;
+
+ if (existingNodeToken == JsonToken.NOT_AVAILABLE) {
+ existingNode = null;
}
- if(latestNode == null) {
- latestNode = objectMapper.createObjectNode();
+ if (latestNodeToken == JsonToken.NOT_AVAILABLE) {
+ latestNode = null;
}
- JsonNode patchNode = JsonDiff.asJson(existingNode, latestNode);
- return patchNode;
+ return JsonDiff.asJson(existingNode, latestNode);
}
diff --git a/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/transform/Data.java b/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/transform/Data.java
index 9cb2d22ee..0cc6c4803 100644
--- a/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/transform/Data.java
+++ b/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/transform/Data.java
@@ -1,14 +1,12 @@
package dev.sunbirdrc.registry.transform;
-public class Data {
+import lombok.AllArgsConstructor;
+import lombok.Getter;
- private final T data;
+@Getter
+@AllArgsConstructor
+public class Data {
- public Data(T data) {
- this.data = data;
- }
+ private final T data;
- public T getData() {
- return data;
- }
}
diff --git a/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/transform/ErrorCode.java b/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/transform/ErrorCode.java
index a466a91fd..8cf05474f 100644
--- a/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/transform/ErrorCode.java
+++ b/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/transform/ErrorCode.java
@@ -1,5 +1,8 @@
package dev.sunbirdrc.registry.transform;
+import lombok.Getter;
+
+@Getter
public enum ErrorCode {
NODE_MAPPING_NOT_DEFINED("NODE_MAPPING_NOT_DEFINED", 1000), JSON_TO_JSONLD_TRANFORMATION_ERROR(
@@ -14,11 +17,4 @@ private ErrorCode(String errorMessage, int errorCode) {
this.errorCode = errorCode;
}
- public String getErrorMessage() {
- return errorMessage;
- }
-
- public int getErrorCode() {
- return errorCode;
- }
}
diff --git a/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/transform/Json2LdTransformer.java b/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/transform/Json2LdTransformer.java
index 462ff6f3d..791060fd1 100644
--- a/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/transform/Json2LdTransformer.java
+++ b/java/middleware-commons/src/main/java/dev/sunbirdrc/registry/transform/Json2LdTransformer.java
@@ -8,83 +8,82 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.json.JsonObject;
import java.util.ArrayList;
import java.util.List;
public class Json2LdTransformer implements ITransformer