diff --git a/.github/workflows/push_trigger.yml b/.github/workflows/push_trigger.yml index f2c5de8d69..54ab396929 100644 --- a/.github/workflows/push_trigger.yml +++ b/.github/workflows/push_trigger.yml @@ -56,7 +56,7 @@ jobs: - name: Build with Maven run: | cd commons-packet - mvn -U -B package -DskipTests --file pom.xml -s $GITHUB_WORKSPACE/settings.xml + mvn -U -B package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml - name: Ready the springboot artifacts run: find -name '*.jar' -executable -type f -exec zip release.zip {} + @@ -127,12 +127,12 @@ jobs: - name: Build with Maven run: | cd commons-packet - mvn -B package -DskipTests --file pom.xml -s $GITHUB_WORKSPACE/settings.xml + mvn -B package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml - name: Publish the maven package run: | cd commons-packet - mvn -B deploy -DskipTests -DaltDeploymentRepository=ossrh::default::${{ secrets.OSSRH_SNAPSHOT_URL }} -s $GITHUB_WORKSPACE/settings.xml -f pom.xml + mvn -B deploy -DaltDeploymentRepository=ossrh::default::${{ secrets.OSSRH_SNAPSHOT_URL }} -s $GITHUB_WORKSPACE/settings.xml -f pom.xml env: GITHUB_TOKEN: ${{secrets.RELEASE_TOKEN}} GPG_TTY: $(tty) diff --git a/commons-packet/commons-packet-manager/pom.xml b/commons-packet/commons-packet-manager/pom.xml index a4ec0e4164..6235c76794 100644 --- a/commons-packet/commons-packet-manager/pom.xml +++ b/commons-packet/commons-packet-manager/pom.xml @@ -37,7 +37,6 @@ 1.3.1 1.2.0-SNAPSHOT - 1.2.0-SNAPSHOT 1.2.0-SNAPSHOT 1.2.0-SNAPSHOT 1.2.0-SNAPSHOT @@ -54,7 +53,7 @@ io.mosip.kernel kernel-idobjectvalidator - ${kernel-idobjectvalidator.version} + 1.2.0-SNAPSHOT org.springframework.boot diff --git a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/audit/AuditLogEntry.java b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/audit/AuditLogEntry.java index 2a266135c2..2dd422b9b0 100644 --- a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/audit/AuditLogEntry.java +++ b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/audit/AuditLogEntry.java @@ -1,12 +1,13 @@ package io.mosip.commons.packet.audit; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; - +import io.mosip.commons.packet.constants.LoggerFileConstant; +import io.mosip.commons.packet.dto.packet.AuditRequestDto; +import io.mosip.kernel.core.http.RequestWrapper; +import io.mosip.kernel.core.util.DateUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Lazy; import org.springframework.core.env.Environment; import org.springframework.http.HttpEntity; import org.springframework.http.HttpMethod; @@ -14,23 +15,16 @@ import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; -import io.mosip.commons.packet.constants.LoggerFileConstant; -import io.mosip.commons.packet.dto.packet.AuditRequestDto; -import io.mosip.commons.packet.util.PacketManagerLogger; -import io.mosip.kernel.core.exception.ExceptionUtils; -import io.mosip.kernel.core.http.RequestWrapper; -import io.mosip.kernel.core.logger.spi.Logger; -import io.mosip.kernel.core.util.DateUtils; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; @Component public class AuditLogEntry { /** The logger. */ - private final Logger LOGGER = PacketManagerLogger.getLogger(AuditLogEntry.class); + private final Logger LOGGER = LoggerFactory.getLogger(AuditLogEntry.class); @Autowired - @Lazy - @Qualifier("restTemplate") private RestTemplate restTemplate; @Autowired @@ -85,8 +79,7 @@ public String addAudit(String description, String eventId, String.class); } catch (Exception arae) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, - null, ExceptionUtils.getStackTrace(arae)); + LOGGER.error(arae.getMessage()); } LOGGER.debug(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.ID.toString(), id, diff --git a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/config/OfflineConfig.java b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/config/OfflineConfig.java index 9dd13fcca7..4ca0e683b1 100644 --- a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/config/OfflineConfig.java +++ b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/config/OfflineConfig.java @@ -9,7 +9,11 @@ @ConditionalOnProperty(value = "objectstore.crypto.name", havingValue = "OfflinePacketCryptoServiceImpl") @ComponentScan(basePackages = {"io.mosip.kernel.cryptomanager.*", "io.mosip.kernel.signature.*", "io.mosip.kernel.keymanagerservice.*", "io.mosip.kernel.keymanager.*", "io.mosip.kernel.core.*", +<<<<<<< HEAD + "io.mosip.kernel.keygenerator.*", "io.mosip.kernel.crypto.*", "io.mosip.kernel.clientcrypto.*"}) +======= "io.mosip.kernel.keygenerator.*", "io.mosip.kernel.crypto.*", "io.mosip.kernel.clientcrypto.*","io.mosip.kernel.idobjectvalidator.*"}) +>>>>>>> e9c054926c6ba766da66874a8fa9a48245de1332 @EnableJpaRepositories(basePackages = {"io.mosip.kernel.keymanagerservice.repository.*"}) public class OfflineConfig { diff --git a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/config/PacketManagerConfig.java b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/config/PacketManagerConfig.java index c3b609df90..f21166749e 100644 --- a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/config/PacketManagerConfig.java +++ b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/config/PacketManagerConfig.java @@ -5,21 +5,23 @@ import io.mosip.commons.packet.spi.IPacketWriter; import io.mosip.commons.packet.util.PacketHelper; import io.mosip.commons.packet.util.PacketManagerLogger; +import io.mosip.kernel.auth.defaultadapter.config.RestTemplateInterceptor; import io.mosip.kernel.core.logger.spi.Logger; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.cache.annotation.EnableCaching; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.FilterType; -import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Lazy; import org.springframework.util.CollectionUtils; +import org.springframework.web.client.RestTemplate; import javax.annotation.PostConstruct; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -27,10 +29,7 @@ @Configuration @EnableCaching -@ComponentScan(excludeFilters = @ComponentScan.Filter(type = FilterType.REGEX, pattern = { - "io.mosip.kernel.cbeffutil.impl.CbeffImpl"}), basePackages = {"io.mosip.commons.packet.*", "io.mosip.commons.khazana.*", - "io.mosip.kernel.cbeffutil.*", "io.mosip.kernel.auth.*","io.mosip.kernel.idobjectvalidator.*"}) -@Import({OfflineConfig.class}) +@ComponentScan(basePackages = "io.mosip.*") public class PacketManagerConfig { private static final Logger logger = PacketManagerLogger.getLogger(PacketManagerConfig.class); @@ -50,6 +49,14 @@ public Map writerConfiguration() { return new HashMap<>(); } + @Bean + @ConditionalOnMissingBean + public RestTemplate restTemplate() { + RestTemplate restTemplate = new RestTemplate(); + restTemplate.setInterceptors(Collections.singletonList(new RestTemplateInterceptor())); + return restTemplate; + } + /** * Validate the reference provider. * diff --git a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/constants/PacketUtilityErrorCodes.java b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/constants/PacketUtilityErrorCodes.java index 30de54991f..d0cbdea274 100644 --- a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/constants/PacketUtilityErrorCodes.java +++ b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/constants/PacketUtilityErrorCodes.java @@ -1,52 +1,43 @@ -package io.mosip.commons.packet.constants; - -public enum PacketUtilityErrorCodes { - - UNKNOWN_RESOURCE_EXCEPTION("KER-PUT-001", - "Unknown resource provided"), - FILE_NOT_FOUND_IN_DESTINATION("KER-PUT-002", "Unable to Find File in Destination Folder"), - PACKET_DECRYPTION_FAILURE_EXCEPTION("KER-PUT-003", "Packet decryption failed"), - API_NOT_ACCESSIBLE_EXCEPTION("KER-PUT-005", "API not accessible"), - SYS_IO_EXCEPTION("KER-PUT-004", "Unable to Find File in Destination Folder"), - GET_ALL_IDENTITY_EXCEPTION("KER-PUT-005", "Unable to fetch identity json from all sub packets"), - NO_AVAILABLE_PROVIDER("KER-PUT-006", "No available provider for given source and process"), - BIOMETRIC_FIELDNAME_NOT_FOUND("KER-PUT-007", "Biometric fieldname is not present inside packet"), - GET_ALL_METAINFO_EXCEPTION("KER-PUT-008", "Unable to fetch meta information from all sub packets"), - ZIP_PARSING_EXCEPTION("KER-PUT-009", "Unable to parse the zip"), - SIGNATURE_EXCEPTION("KER-PUT-010", "Failed to generate digital signature"), - DOCUMENT_EXCEPTION("KER-PUT-011", "Failed to get document"), - BIOMETRIC_EXCEPTION("KER-PUT-012", "Unable to get biometric"), - OS_ADAPTER_EXCEPTION("KER-PUT-013", "No Object store adapter found."), - PACKET_KEEPER_GET_ERROR("KER-PUT-014", "Packet keeper exception occured."), - PACKET_KEEPER_PUT_ERROR("KER-PUT-015", "Packet keeper exception occured."), - PACKET_KEEPER_GETMETA_ERROR("KER-PUT-016", "Packet keeper exception occured."), - PACKET_KEEPER_INTEGRITY_ERROR("KER-PUT-017", "Packet keeper exception occured."), - CRYPTO_EXCEPTION("KER-PUT-018", "No available crypto service exception."), - INTEGRITY_FAILURE("KER-PUT-019", "Packet Integrity check failed."), - PACKET_VALIDATION_FAILED("KER-PUT-020", "Packet Validation exception occured."), - TAGGING_FAILED("KER-PUT-021", "Failed to add tags."), - TAG_ALREADY_EXIST("KER-PUT-022", "Tag Already Exist."), - GET_TAG_EXCEPTION("KER-PUT-023","Failed to get tags"), - TAG_NOT_FOUND("KER-PUT-024", "Requested tag not present"), - SOURCE_NOT_PRESENT("KER-PUT-025", "Source not present in request."), - DELETE_TAGGING_FAILED("KER-PUT-026", "Failed to delete tags."); - - - - - private final String errorCode; - private final String errorMessage; - - private PacketUtilityErrorCodes(final String errorCode, final String errorMessage) { - this.errorCode = errorCode; - this.errorMessage = errorMessage; - } - - public String getErrorCode() { - return errorCode; - } - - public String getErrorMessage() { - return errorMessage; - } -} +package io.mosip.commons.packet.constants; + +public enum PacketUtilityErrorCodes { + + UNKNOWN_RESOURCE_EXCEPTION("KER-PUT-001", + "Unknown resource provided"), + FILE_NOT_FOUND_IN_DESTINATION("KER-PUT-002", "Unable to Find File in Destination Folder"), + PACKET_DECRYPTION_FAILURE_EXCEPTION("KER-PUT-003", "Packet decryption failed"), + API_NOT_ACCESSIBLE_EXCEPTION("KER-PUT-005", "API not accessible"), + SYS_IO_EXCEPTION("KER-PUT-004", "Unable to Find File in Destination Folder"), + GET_ALL_IDENTITY_EXCEPTION("KER-PUT-005", "Unable to fetch identity json from all sub packets"), + NO_AVAILABLE_PROVIDER("KER-PUT-006", "No available provider for given source and process"), + BIOMETRIC_FIELDNAME_NOT_FOUND("KER-PUT-007", "Biometric fieldname is not present inside packet"), + GET_ALL_METAINFO_EXCEPTION("KER-PUT-008", "Unable to fetch meta information from all sub packets"), + ZIP_PARSING_EXCEPTION("KER-PUT-009", "Unable to parse the zip"), + SIGNATURE_EXCEPTION("KER-PUT-010", "Failed to generate digital signature"), + DOCUMENT_EXCEPTION("KER-PUT-011", "Failed to get document"), + BIOMETRIC_EXCEPTION("KER-PUT-012", "Unable to get biometric"), + OS_ADAPTER_EXCEPTION("KER-PUT-013", "No Object store adapter found."), + PACKET_KEEPER_GET_ERROR("KER-PUT-014", "Packet keeper exception occured."), + PACKET_KEEPER_PUT_ERROR("KER-PUT-015", "Packet keeper exception occured."), + PACKET_KEEPER_GETMETA_ERROR("KER-PUT-016", "Packet keeper exception occured."), + PACKET_KEEPER_INTEGRITY_ERROR("KER-PUT-017", "Packet keeper exception occured."), + CRYPTO_EXCEPTION("KER-PUT-018", "No available crypto service exception."), + INTEGRITY_FAILURE("KER-PUT-019", "Packet Integrity check failed."); + + + private final String errorCode; + private final String errorMessage; + + private PacketUtilityErrorCodes(final String errorCode, final String errorMessage) { + this.errorCode = errorCode; + this.errorMessage = errorMessage; + } + + public String getErrorCode() { + return errorCode; + } + + public String getErrorMessage() { + return errorMessage; + } +} diff --git a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/dto/packet/CryptomanagerRequestDto.java b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/dto/packet/CryptomanagerRequestDto.java index d15e3a4a4c..181e7794e9 100644 --- a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/dto/packet/CryptomanagerRequestDto.java +++ b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/dto/packet/CryptomanagerRequestDto.java @@ -43,20 +43,4 @@ public class CryptomanagerRequestDto { @NotBlank(message = "should not be null or empty") private String data; - - private Boolean prependThumbprint; - - /** - * salt in BASE64 encoding for encrypt/decrypt - */ - - @NotBlank(message = "should not be null or empty") - private String salt; - - /** - * aad in BASE64 encoding for encrypt/decrypt - */ - - @NotBlank(message = "should not be null or empty") - private String aad; } diff --git a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/impl/OfflinePacketCryptoServiceImpl.java b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/impl/OfflinePacketCryptoServiceImpl.java index 8ec3fdcd05..24a43587e0 100644 --- a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/impl/OfflinePacketCryptoServiceImpl.java +++ b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/impl/OfflinePacketCryptoServiceImpl.java @@ -54,6 +54,24 @@ public class OfflinePacketCryptoServiceImpl implements IPacketCryptoService { */ private ClientCryptoManagerService tpmCryptoService = null; + /** + * The sign applicationid. + */ + @Value("${mosip.sign.applicationid:KERNEL}") + private String signApplicationid; + + /** + * The sign refid. + */ + @Value("${mosip.sign.refid:SIGN}") + private String signRefid; + + @Value("${mosip.kernel.registrationcenterid.length:5}") + private int centerIdLength; + + @Value("${mosip.kernel.machineid.length:5}") + private int machineIdLength; + @Value("${crypto.PrependThumbprint.enable:true}") private boolean isPrependThumbprintEnabled; @@ -65,7 +83,10 @@ public byte[] sign(byte[] packet) { } @Override - public byte[] encrypt(String refId, byte[] packet) { + public byte[] encrypt(String id, byte[] packet) { + String centerId = id.substring(0, centerIdLength); + String machineId = id.substring(centerIdLength, centerIdLength + machineIdLength); + String refId = centerId + "_" + machineId; String packetString = CryptoUtil.encodeBase64String(packet); CryptomanagerRequestDto cryptomanagerRequestDto = new CryptomanagerRequestDto(); cryptomanagerRequestDto.setApplicationId(APPLICATION_ID); @@ -80,14 +101,26 @@ public byte[] encrypt(String refId, byte[] packet) { sRandom.nextBytes(aad); cryptomanagerRequestDto.setAad(CryptoUtil.encodeBase64String(aad)); cryptomanagerRequestDto.setSalt(CryptoUtil.encodeBase64String(nonce)); - cryptomanagerRequestDto.setTimeStamp(DateUtils.getUTCCurrentDateTime()); - + // setLocal Date Time + if (id.length() > 14) { + String packetCreatedDateTime = id.substring(id.length() - 14); + String formattedDate = packetCreatedDateTime.substring(0, 8) + "T" + + packetCreatedDateTime.substring(packetCreatedDateTime.length() - 6); + + cryptomanagerRequestDto.setTimeStamp(LocalDateTime.parse(formattedDate, DateTimeFormatter.ofPattern("yyyyMMdd'T'HHmmss"))); + } else { + throw new PacketDecryptionFailureException("Packet Encryption Failed-Invalid Packet format"); + } byte[] encryptedData = CryptoUtil.decodeBase64(getCryptomanagerService().encrypt(cryptomanagerRequestDto).getData()); return EncryptionUtil.mergeEncryptedData(encryptedData, nonce, aad); } @Override - public byte[] decrypt(String refId, byte[] packet) { + public byte[] decrypt(String id, byte[] packet) { + String centerId = id.substring(0, centerIdLength); + String machineId = id.substring(centerIdLength, centerIdLength + machineIdLength); + String refId = centerId + "_" + machineId; + byte[] nonce = Arrays.copyOfRange(packet, 0, CryptomanagerConstant.GCM_NONCE_LENGTH); byte[] aad = Arrays.copyOfRange(packet, CryptomanagerConstant.GCM_NONCE_LENGTH, CryptomanagerConstant.GCM_NONCE_LENGTH + CryptomanagerConstant.GCM_AAD_LENGTH); @@ -101,8 +134,17 @@ public byte[] decrypt(String refId, byte[] packet) { cryptomanagerRequestDto.setSalt(CryptoUtil.encodeBase64String(nonce)); cryptomanagerRequestDto.setData(CryptoUtil.encodeBase64String(encryptedData)); cryptomanagerRequestDto.setPrependThumbprint(isPrependThumbprintEnabled); - cryptomanagerRequestDto.setTimeStamp(DateUtils.getUTCCurrentDateTime()); - + // setLocal Date Time + if (id.length() > 14) { + String packetCreatedDateTime = id.substring(id.length() - 14); + String formattedDate = packetCreatedDateTime.substring(0, 8) + "T" + + packetCreatedDateTime.substring(packetCreatedDateTime.length() - 6); + + cryptomanagerRequestDto.setTimeStamp( + LocalDateTime.parse(formattedDate, DateTimeFormatter.ofPattern("yyyyMMdd'T'HHmmss"))); + } else { + throw new PacketDecryptionFailureException("Packet DecryptionFailed-Invalid Packet format"); + } return CryptoUtil.decodeBase64(getCryptomanagerService().decrypt(cryptomanagerRequestDto).getData()); } diff --git a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/impl/OnlinePacketCryptoServiceImpl.java b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/impl/OnlinePacketCryptoServiceImpl.java index 27c34dcf14..77f31462c3 100644 --- a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/impl/OnlinePacketCryptoServiceImpl.java +++ b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/impl/OnlinePacketCryptoServiceImpl.java @@ -1,23 +1,26 @@ package io.mosip.commons.packet.impl; -import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.security.SecureRandom; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; +import java.util.Arrays; +import java.util.LinkedHashMap; + import io.mosip.commons.khazana.util.EncryptionUtil; -import io.mosip.commons.packet.constants.CryptomanagerConstant; -import io.mosip.commons.packet.dto.TpmSignVerifyRequestDto; +import io.mosip.commons.packet.dto.ValidateRequestDto; import io.mosip.commons.packet.dto.packet.CryptomanagerRequestDto; import io.mosip.commons.packet.dto.packet.CryptomanagerResponseDto; import io.mosip.commons.packet.exception.ApiNotAccessibleException; import io.mosip.commons.packet.exception.PacketDecryptionFailureException; -import io.mosip.commons.packet.exception.SignatureException; -import io.mosip.commons.packet.spi.IPacketCryptoService; import io.mosip.commons.packet.util.PacketManagerLogger; import io.mosip.kernel.clientcrypto.dto.TpmSignRequestDto; import io.mosip.kernel.core.exception.ExceptionUtils; import io.mosip.kernel.core.exception.ServiceError; -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 org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; @@ -30,13 +33,20 @@ import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; -import java.io.IOException; -import java.security.SecureRandom; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeParseException; -import java.util.Arrays; -import java.util.LinkedHashMap; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import io.mosip.commons.packet.constants.CryptomanagerConstant; +import io.mosip.commons.packet.dto.ClientPublicKeyResponseDto; +import io.mosip.commons.packet.dto.SignRequestDto; +import io.mosip.commons.packet.dto.TpmSignVerifyRequestDto; +import io.mosip.commons.packet.dto.TpmSignVerifyResponseDto; +import io.mosip.commons.packet.exception.SignatureException; +import io.mosip.commons.packet.spi.IPacketCryptoService; +import io.mosip.kernel.core.http.RequestWrapper; +import io.mosip.kernel.core.http.ResponseWrapper; +import io.mosip.kernel.core.util.DateUtils; @Component @Qualifier("OnlinePacketCryptoServiceImpl") @@ -58,9 +68,15 @@ public class OnlinePacketCryptoServiceImpl implements IPacketCryptoService { @Value("${mosip.kernel.cryptomanager.request_version:v1}") private String APPLICATION_VERSION; + @Value("${mosip.kernel.registrationcenterid.length:5}") + private int centerIdLength; + @Value("${CRYPTOMANAGER_DECRYPT:null}") private String cryptomanagerDecryptUrl; + @Value("${mosip.kernel.machineid.length:5}") + private int machineIdLength; + @Value("${crypto.PrependThumbprint.enable:true}") private boolean isPrependThumbprintEnabled; @@ -112,10 +128,13 @@ public byte[] sign(byte[] packet) { } @Override - public byte[] encrypt(String refId, byte[] packet) { + public byte[] encrypt(String id, byte[] packet) { byte[] encryptedPacket = null; try { + String centerId = id.substring(0, centerIdLength); + String machineId = id.substring(centerIdLength, centerIdLength + machineIdLength); + String refId = centerId + "_" + machineId; String packetString = CryptoUtil.encodeBase64String(packet); CryptomanagerRequestDto cryptomanagerRequestDto = new CryptomanagerRequestDto(); RequestWrapper request = new RequestWrapper<>(); @@ -131,8 +150,19 @@ public byte[] encrypt(String refId, byte[] packet) { sRandom.nextBytes(aad); cryptomanagerRequestDto.setAad(CryptoUtil.encodeBase64String(aad)); cryptomanagerRequestDto.setSalt(CryptoUtil.encodeBase64String(nonce)); - cryptomanagerRequestDto.setTimeStamp(DateUtils.getUTCCurrentDateTime()); + // setLocal Date Time + if (id.length() > 14) { + String packetCreatedDateTime = id.substring(id.length() - 14); + String formattedDate = packetCreatedDateTime.substring(0, 8) + "T" + + packetCreatedDateTime.substring(packetCreatedDateTime.length() - 6); + cryptomanagerRequestDto.setTimeStamp( + LocalDateTime.parse(formattedDate, DateTimeFormatter.ofPattern("yyyyMMdd'T'HHmmss"))); + } else { + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, + "Packet encryption Failed-Invalid datetime format"); + throw new PacketDecryptionFailureException("Packet encryption Failed-Invalid datetime format"); + } request.setId(DECRYPT_SERVICE_ID); request.setMetadata(null); request.setRequest(cryptomanagerRequestDto); @@ -147,27 +177,27 @@ public byte[] encrypt(String refId, byte[] packet) { CryptomanagerResponseDto responseObject = mapper.readValue(response.getBody(), CryptomanagerResponseDto.class); if (responseObject != null && responseObject.getErrors() != null && !responseObject.getErrors().isEmpty()) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REFERENCEID, refId, + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, "Packet encryption failed"); ServiceError error = responseObject.getErrors().get(0); - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REFERENCEID, refId, + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, "Packet encryption failure message : " + error.getMessage()); throw new PacketDecryptionFailureException(error.getMessage()); } byte[] encryptedData = CryptoUtil.decodeBase64(responseObject.getResponse().getData()); encryptedPacket = EncryptionUtil.mergeEncryptedData(encryptedData, nonce, aad); - LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REFERENCEID, refId, + LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, "Successfully encrypted Packet"); } catch (IOException e) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REFERENCEID, refId, + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, ExceptionUtils.getStackTrace(e)); throw new PacketDecryptionFailureException(IO_EXCEPTION, e); } catch (DateTimeParseException e) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REFERENCEID, refId, + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, ExceptionUtils.getStackTrace(e)); throw new PacketDecryptionFailureException(DATE_TIME_EXCEPTION); } catch (Exception e) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REFERENCEID, refId, + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, ExceptionUtils.getStackTrace(e)); if (e.getCause() instanceof HttpClientErrorException) { HttpClientErrorException httpClientException = (HttpClientErrorException) e.getCause(); @@ -184,10 +214,13 @@ public byte[] encrypt(String refId, byte[] packet) { } @Override - public byte[] decrypt(String refId, byte[] packet) { + public byte[] decrypt(String id, byte[] packet) { byte[] decryptedPacket = null; try { + String centerId = id.substring(0, centerIdLength); + String machineId = id.substring(centerIdLength, centerIdLength + machineIdLength); + String refId = centerId + "_" + machineId; CryptomanagerRequestDto cryptomanagerRequestDto = new CryptomanagerRequestDto(); RequestWrapper request = new RequestWrapper<>(); cryptomanagerRequestDto.setApplicationId(APPLICATION_ID); @@ -201,8 +234,19 @@ public byte[] decrypt(String refId, byte[] packet) { cryptomanagerRequestDto.setSalt(CryptoUtil.encodeBase64String(nonce)); cryptomanagerRequestDto.setData(CryptoUtil.encodeBase64String(encryptedData)); cryptomanagerRequestDto.setPrependThumbprint(isPrependThumbprintEnabled); - cryptomanagerRequestDto.setTimeStamp(DateUtils.getUTCCurrentDateTime()); + // setLocal Date Time + if (id.length() > 14) { + String packetCreatedDateTime = id.substring(id.length() - 14); + String formattedDate = packetCreatedDateTime.substring(0, 8) + "T" + + packetCreatedDateTime.substring(packetCreatedDateTime.length() - 6); + cryptomanagerRequestDto.setTimeStamp( + LocalDateTime.parse(formattedDate, DateTimeFormatter.ofPattern("yyyyMMdd'T'HHmmss"))); + } else { + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, + "Packet DecryptionFailed-Invalid Packet format"); + throw new PacketDecryptionFailureException("Packet DecryptionFailed-Invalid Packet format"); + } request.setId(DECRYPT_SERVICE_ID); request.setMetadata(null); request.setRequest(cryptomanagerRequestDto); @@ -219,26 +263,26 @@ public byte[] decrypt(String refId, byte[] packet) { if (responseObject != null && responseObject.getErrors() != null && !responseObject.getErrors().isEmpty()) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REFERENCEID, refId, + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, "Packet decryption failed"); ServiceError error = responseObject.getErrors().get(0); - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REFERENCEID, refId, + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, "Error message : " + error.getMessage()); throw new PacketDecryptionFailureException(error.getMessage()); } decryptedPacket = CryptoUtil.decodeBase64(responseObject.getResponse().getData()); - LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REFERENCEID, refId, + LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, "Successfully decrypted Packet"); } catch (IOException e) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REFERENCEID, refId, + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, ExceptionUtils.getStackTrace(e)); throw new PacketDecryptionFailureException(IO_EXCEPTION, e); } catch (DateTimeParseException e) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REFERENCEID, refId, + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, ExceptionUtils.getStackTrace(e)); throw new PacketDecryptionFailureException(DATE_TIME_EXCEPTION); } catch (Exception e) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REFERENCEID, refId, + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, ExceptionUtils.getStackTrace(e)); if (e.getCause() instanceof HttpClientErrorException) { HttpClientErrorException httpClientException = (HttpClientErrorException) e.getCause(); @@ -255,9 +299,8 @@ public byte[] decrypt(String refId, byte[] packet) { } @Override - public boolean verify(String refId, byte[] packet, byte[] signature) { + public boolean verify(String machineId,byte[] packet, byte[] signature) { try { - String machineId = refId.split("_")[1]; String publicKey=getPublicKey(machineId); TpmSignVerifyRequestDto dto = new TpmSignVerifyRequestDto(); dto.setData(CryptoUtil.encodeBase64(packet)); @@ -292,7 +335,7 @@ public boolean verify(String refId, byte[] packet, byte[] signature) { } } - private String getPublicKey(String machineId) throws IOException { + private String getPublicKey(String machineId) throws JsonParseException, JsonMappingException, IOException { ResponseEntity response = restTemplate.exchange(syncdataGetTpmKeyUrl+machineId, HttpMethod.GET, null, String.class); LinkedHashMap responseMap = (LinkedHashMap) mapper.readValue(response.getBody(), LinkedHashMap.class).get("response");//.get("signature"); diff --git a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/impl/PacketReaderImpl.java b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/impl/PacketReaderImpl.java index 1d3608ce95..46ce543f3e 100644 --- a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/impl/PacketReaderImpl.java +++ b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/impl/PacketReaderImpl.java @@ -1,414 +1,342 @@ package io.mosip.commons.packet.impl; -import static io.mosip.commons.packet.constants.PacketManagerConstants.FORMAT; -import static io.mosip.commons.packet.constants.PacketManagerConstants.ID; -import static io.mosip.commons.packet.constants.PacketManagerConstants.IDENTITY; -import static io.mosip.commons.packet.constants.PacketManagerConstants.LABEL; -import static io.mosip.commons.packet.constants.PacketManagerConstants.META_INFO_OPERATIONS_DATA; -import static io.mosip.commons.packet.constants.PacketManagerConstants.TYPE; -import static io.mosip.commons.packet.constants.PacketManagerConstants.VALUE; - -import java.io.IOException; -import java.io.InputStream; -import java.security.NoSuchAlgorithmException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import io.mosip.kernel.biometrics.constant.BiometricType; -import io.mosip.kernel.core.util.JsonUtils; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.collections4.ListUtils; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.lang3.StringUtils; -import org.assertj.core.util.Lists; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.stereotype.Component; - import com.fasterxml.jackson.databind.ObjectMapper; - import io.mosip.commons.packet.constants.PacketManagerConstants; import io.mosip.commons.packet.dto.Document; import io.mosip.commons.packet.dto.Packet; import io.mosip.commons.packet.dto.PacketInfo; import io.mosip.commons.packet.exception.ApiNotAccessibleException; +import io.mosip.commons.packet.exception.FieldNameNotFoundException; import io.mosip.commons.packet.exception.GetAllIdentityException; import io.mosip.commons.packet.exception.GetAllMetaInfoException; import io.mosip.commons.packet.exception.GetBiometricException; import io.mosip.commons.packet.exception.GetDocumentException; import io.mosip.commons.packet.exception.PacketDecryptionFailureException; import io.mosip.commons.packet.exception.PacketKeeperException; -import io.mosip.commons.packet.exception.PacketValidationFailureException; +import io.mosip.commons.packet.facade.PacketWriter; import io.mosip.commons.packet.keeper.PacketKeeper; import io.mosip.commons.packet.spi.IPacketReader; -import io.mosip.commons.packet.util.IdSchemaUtils; -import io.mosip.commons.packet.util.PacketManagerHelper; -import io.mosip.commons.packet.util.PacketManagerLogger; -import io.mosip.commons.packet.util.PacketValidator; -import io.mosip.commons.packet.util.ZipUtils; -import io.mosip.kernel.biometrics.commons.CbeffValidator; +import io.mosip.commons.packet.util.*; +import io.mosip.kernel.biometrics.constant.BiometricType; import io.mosip.kernel.biometrics.entities.BIR; import io.mosip.kernel.biometrics.entities.BiometricRecord; +import io.mosip.kernel.core.cbeffutil.common.CbeffValidator; +import io.mosip.kernel.core.cbeffutil.jaxbclasses.BIRType; import io.mosip.kernel.core.exception.BaseCheckedException; import io.mosip.kernel.core.exception.BaseUncheckedException; import io.mosip.kernel.core.exception.ExceptionUtils; import io.mosip.kernel.core.logger.spi.Logger; +import io.mosip.kernel.core.util.JsonUtils; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.io.IOUtils; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cloud.context.config.annotation.RefreshScope; +import org.springframework.stereotype.Component; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import static io.mosip.commons.packet.constants.PacketManagerConstants.FORMAT; +import static io.mosip.commons.packet.constants.PacketManagerConstants.ID; +import static io.mosip.commons.packet.constants.PacketManagerConstants.IDENTITY; +import static io.mosip.commons.packet.constants.PacketManagerConstants.LABEL; +import static io.mosip.commons.packet.constants.PacketManagerConstants.META_INFO_OPERATIONS_DATA; +import static io.mosip.commons.packet.constants.PacketManagerConstants.TYPE; +import static io.mosip.commons.packet.constants.PacketManagerConstants.VALUE; @RefreshScope @Component public class PacketReaderImpl implements IPacketReader { - private static final Logger LOGGER = PacketManagerLogger.getLogger(PacketReaderImpl.class); - - @Value("${mosip.commons.packetnames}") - private String packetNames; - - @Autowired - private PacketKeeper packetKeeper; - - @Autowired - private ObjectMapper mapper; - - @Autowired - private IdSchemaUtils idSchemaUtils; - - @Autowired - private PacketValidator packetValidator; - - /** - * Perform packet validations and audit errors. List of validations - 1. schema - * & idobject reference validation 2. files validation 3. decrypted packet - * checksum validation 4. cbeff validation 5. document validation - * - * - * @param id - * @param process - * @return - */ - @Override - public boolean validatePacket(String id, String source, String process) { - try { - return packetValidator.validate(id, source, process); - } catch (BaseCheckedException | IOException | NoSuchAlgorithmException e) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, - "Packet Validation exception : " + ExceptionUtils.getStackTrace(e)); - if (e instanceof BaseCheckedException) - throw new PacketValidationFailureException(((BaseCheckedException) e).getMessage(), e); - else - throw new PacketValidationFailureException(((IOException) e).getMessage(), e); - } - } - - /** - * return data from idobject of all 3 subpackets - * - * @param id - * @param process - * @return - */ - @Override - @Cacheable(value = "packets", key = "{'allFields'.concat('-').concat(#id).concat('-').concat(#process)}") - public Map getAll(String id, String source, String process) { - LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, - "Getting all fields :: enrtry"); - Map finalMap = new LinkedHashMap<>(); - String[] sourcePacketNames = packetNames.split(","); - - try { - for (String srcPacket : sourcePacketNames) { - Packet packet = packetKeeper.getPacket(getPacketInfo(id, srcPacket, source, process)); - InputStream idJsonStream = ZipUtils.unzipAndGetFile(packet.getPacket(), "ID"); - if (idJsonStream != null) { - byte[] bytearray = IOUtils.toByteArray(idJsonStream); - String jsonString = new String(bytearray); - LinkedHashMap currentIdMap = (LinkedHashMap) mapper - .readValue(jsonString, LinkedHashMap.class).get(IDENTITY); - - currentIdMap.keySet().stream().forEach(key -> { - Object value = currentIdMap.get(key); - if (value != null && (value instanceof Number)) - finalMap.putIfAbsent(key, value); - else if (value != null && (value instanceof String)) - finalMap.putIfAbsent(key, value.toString().replaceAll("^\"|\"$", "")); - else { - try { - finalMap.putIfAbsent(key, - value != null ? JsonUtils.javaObjectToJsonString(currentIdMap.get(key)) : null); - } catch (io.mosip.kernel.core.util.exception.JsonProcessingException e) { - LOGGER.error(ExceptionUtils.getStackTrace(e)); - throw new GetAllIdentityException(e.getMessage()); - } - } - }); - } - } - } catch (Exception e) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, - ExceptionUtils.getStackTrace(e)); - if (e instanceof BaseCheckedException) { - BaseCheckedException ex = (BaseCheckedException) e; - throw new GetAllIdentityException(ex.getErrorCode(), ex.getMessage()); - } else if (e instanceof BaseUncheckedException) { - BaseUncheckedException ex = (BaseUncheckedException) e; - throw new GetAllIdentityException(ex.getErrorCode(), ex.getMessage()); - } - throw new GetAllIdentityException(e.getMessage()); - } - - return finalMap; - } - - @Override - public String getField(String id, String field, String source, String process) { - LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, - "getField :: for - " + field); - Map allFields = getAll(id, source, process); - if (allFields != null) { - Object fieldObj = allFields.get(field); - return fieldObj != null ? fieldObj.toString() : null; - } - return null; - } - - @Override - public Map getFields(String id, List fields, String source, String process) { - LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, - "getFields :: for - " + fields.toString()); - Map result = new HashMap<>(); - Map allFields = getAll(id, source, process); - fields.stream().forEach( - field -> result.put(field, allFields.get(field) != null ? allFields.get(field).toString() : null)); - - return result; - } - - @Override - public Document getDocument(String id, String documentName, String source, String process) { - LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, - "getDocument :: for - " + documentName); - Map idobjectMap = getAll(id, source, process); - Double schemaVersion = idobjectMap.get(PacketManagerConstants.IDSCHEMA_VERSION) != null - ? Double.valueOf(idobjectMap.get(PacketManagerConstants.IDSCHEMA_VERSION).toString()) - : null; - String documentString = (String) idobjectMap.get(documentName); - try { - if (documentString != null && schemaVersion != null) { - JSONObject documentMap = new JSONObject(documentString); - String packetName = idSchemaUtils.getSource(documentName, schemaVersion); - Packet packet = packetKeeper.getPacket(getPacketInfo(id, packetName, source, process)); - String value = documentMap.has(VALUE) ? documentMap.get(VALUE).toString() : null; - InputStream documentStream = ZipUtils.unzipAndGetFile(packet.getPacket(), value); - if (documentStream != null) { - Document document = new Document(); - document.setDocument(IOUtils.toByteArray(documentStream)); - document.setValue(value); - document.setType(documentMap.get(TYPE) != null ? documentMap.get(TYPE).toString() : null); - document.setFormat(documentMap.get(FORMAT) != null ? documentMap.get(FORMAT).toString() : null); - return document; - } - } - } catch (IOException | ApiNotAccessibleException | PacketDecryptionFailureException | JSONException - | PacketKeeperException e) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, - ExceptionUtils.getStackTrace(e)); - throw new GetDocumentException(e.getMessage()); - } - return null; - } - - @Override - public BiometricRecord getBiometric(String id, String biometricFieldName, List modalities, String source, - String process) { - LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, - "getBiometric :: for - " + biometricFieldName); - BiometricRecord biometricRecord = null; - String packetName = null; - String fileName = null; - try { - Map idobjectMap = getAll(id, source, process); - String bioString = (String) idobjectMap.get(biometricFieldName); - JSONObject biometricMap = null; - if (bioString != null) - biometricMap = new JSONObject(bioString); - if (bioString == null || biometricMap == null || biometricMap.isNull(VALUE)) { - // biometric file not present in idobject. Search in meta data. - Map metadataMap = getMetaInfo(id, source, process); - String operationsData = metadataMap.get(META_INFO_OPERATIONS_DATA); - if (StringUtils.isNotEmpty(operationsData)) { - JSONArray jsonArray = new JSONArray(operationsData); - for (int i = 0; i < jsonArray.length(); i++) { - JSONObject jsonObject = (JSONObject) jsonArray.get(i); - if (jsonObject.has(LABEL) - && jsonObject.get(LABEL).toString().equalsIgnoreCase(biometricFieldName)) { - packetName = ID; - fileName = jsonObject.isNull(VALUE) ? null : jsonObject.get(VALUE).toString(); - break; - } - } - } - } else { - Double schemaVersion = idobjectMap.get(PacketManagerConstants.IDSCHEMA_VERSION) != null - ? Double.valueOf(idobjectMap.get(PacketManagerConstants.IDSCHEMA_VERSION).toString()) - : null; - packetName = idSchemaUtils.getSource(biometricFieldName, schemaVersion); - fileName = biometricMap.get(VALUE).toString(); - } - - if (packetName == null || fileName == null) - return null; - - Packet packet = packetKeeper.getPacket(getPacketInfo(id, packetName, source, process)); - InputStream biometrics = ZipUtils.unzipAndGetFile(packet.getPacket(), fileName); - if (biometrics == null) - return null; - BIR bir = CbeffValidator.getBIRFromXML(IOUtils.toByteArray(biometrics)); - biometricRecord = new BiometricRecord(); - if(bir.getOthers() != null) { - Map others = new HashMap<>(); - bir.getOthers().forEach(e -> { - others.put(e.getKey(), e.getValue()); - }); - biometricRecord.setOthers(others); - } - biometricRecord.setSegments(filterByModalities(modalities, bir.getBirs())); - } catch (Exception e) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, - ExceptionUtils.getStackTrace(e)); - if (e instanceof BaseCheckedException) { - BaseCheckedException ex = (BaseCheckedException) e; - throw new GetBiometricException(ex.getErrorCode(), ex.getMessage()); - } else if (e instanceof BaseUncheckedException) { - BaseUncheckedException ex = (BaseUncheckedException) e; - throw new GetBiometricException(ex.getErrorCode(), ex.getMessage()); - } - throw new GetBiometricException(e.getMessage()); - } - - return biometricRecord; - } - - @Override - public Map getMetaInfo(String id, String source, String process) { - Map finalMap = new LinkedHashMap<>(); - String[] sourcePacketNames = packetNames.split(","); - - try { - for (String packetName : sourcePacketNames) { - Packet packet = packetKeeper.getPacket(getPacketInfo(id, packetName, source, process)); - InputStream idJsonStream = ZipUtils.unzipAndGetFile(packet.getPacket(), "PACKET_META_INFO"); - if (idJsonStream != null) { - byte[] bytearray = IOUtils.toByteArray(idJsonStream); - String jsonString = new String(bytearray); - LinkedHashMap currentIdMap = (LinkedHashMap) mapper - .readValue(jsonString, LinkedHashMap.class).get(IDENTITY); - - currentIdMap.keySet().stream().forEach(key -> { - try { - finalMap.putIfAbsent(key, - currentIdMap.get(key) != null ? JsonUtils - .javaObjectToJsonString(currentIdMap.get(key)).replaceAll("^\"|\"$", "") - : null); - } catch (io.mosip.kernel.core.util.exception.JsonProcessingException e) { - throw new GetAllMetaInfoException(e.getMessage()); - } - }); - } - } - } catch (Exception e) { - if (e instanceof BaseCheckedException) { - BaseCheckedException ex = (BaseCheckedException) e; - throw new GetAllMetaInfoException(ex.getErrorCode(), ex.getMessage()); - } else if (e instanceof BaseUncheckedException) { - BaseUncheckedException ex = (BaseUncheckedException) e; - throw new GetAllMetaInfoException(ex.getErrorCode(), ex.getMessage()); - } - throw new GetAllMetaInfoException(e.getMessage()); - } - return finalMap; - } - - @Override - public List> getAuditInfo(String id, String source, String process) { - LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, "getAuditInfo :: enrtry"); - List> finalMap = new ArrayList<>(); - String[] sourcePacketNames = packetNames.split(","); - try { - for (String srcPacket : sourcePacketNames) { - Packet packet = packetKeeper.getPacket(getPacketInfo(id, srcPacket, source, process)); - InputStream auditJson = ZipUtils.unzipAndGetFile(packet.getPacket(), "audit"); - if (auditJson != null) { - byte[] bytearray = IOUtils.toByteArray(auditJson); - String jsonString = new String(bytearray); - List> currentMap = (List>) mapper.readValue(jsonString, - List.class); - finalMap.addAll(currentMap); - } - } - } catch (Exception e) { - LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, - ExceptionUtils.getStackTrace(e)); - if (e instanceof BaseCheckedException) { - BaseCheckedException ex = (BaseCheckedException) e; - throw new GetAllIdentityException(ex.getErrorCode(), ex.getMessage()); - } else if (e instanceof BaseUncheckedException) { - BaseUncheckedException ex = (BaseUncheckedException) e; - throw new GetAllIdentityException(ex.getErrorCode(), ex.getMessage()); - } - throw new GetAllIdentityException(e.getMessage()); - } - return finalMap; - } - - private PacketInfo getPacketInfo(String id, String packetName, String source, String process) { - PacketInfo packetInfo = new PacketInfo(); - packetInfo.setId(id); - packetInfo.setPacketName(packetName); - packetInfo.setProcess(process); - packetInfo.setSource(source); - return packetInfo; - } - - public List filterByModalities(List modalities, - List birList) { - List segments = new ArrayList<>(); - if (CollectionUtils.isEmpty(modalities)) { - return birList; - } else { - // first search modalities in subtype and if not present search in type - for (BIR bir : birList) { - if (CollectionUtils.isNotEmpty(bir.getBdbInfo().getSubtype()) - && isModalityPresentInTypeSubtype(bir.getBdbInfo().getSubtype(), modalities)) { - segments.add(bir); - } else { - for (BiometricType type : bir.getBdbInfo().getType()) { - if (isModalityPresentInTypeSubtype(Lists.newArrayList(type.value()), modalities)) - segments.add(bir); - } - } - } - } - return segments; - } - - private boolean isModalityPresentInTypeSubtype(List typeSubtype, List modalities) { - boolean isPresent = false; - for (String modality : modalities) { - String[] modalityArray = modality.split(" "); - if (ArrayUtils.isNotEmpty(modalityArray) && ListUtils.isEqualList(typeSubtype, Arrays.asList(modalityArray))) - isPresent = true; - } - return isPresent; - } - + private static final Logger LOGGER = PacketManagerLogger.getLogger(PacketReaderImpl.class); + + @Autowired + private PacketWriter packetWriter; + + @Value("${mosip.commons.packetnames}") + private String packetNames; + + @Autowired + private PacketKeeper packetKeeper; + + @Autowired + private ObjectMapper mapper; + + @Autowired + private IdSchemaUtils idSchemaUtils; + + @Autowired + private PacketValidator packetValidator; + + /** + * Perform packet validations and audit errors. + * List of validations - + * 1. schema & idobject reference validation + * 2. files validation + * 3. decrypted packet checksum validation + * 4. cbeff validation + * 5. document validation + * + * + * @param id + * @param process + * @return + */ + @Override + public boolean validatePacket(String id, String source, String process) { + try { + return packetValidator.validate(id, source, process, getAll(id, source, process)); + } catch (Exception e) { + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, + id, "Packet Validation exception : " + ExceptionUtils.getStackTrace(e)); + } + return false; + } + + /** + * return data from idobject of all 3 subpackets + * + * @param id + * @param process + * @return + */ + @Override + @Cacheable(value = "packets", key = "{'allFields'.concat('-').concat(#id).concat('-').concat(#process)}") + public Map getAll(String id, String source, String process) { + LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, "Getting all fields :: enrtry"); + Map finalMap = new LinkedHashMap<>(); + String[] sourcePacketNames = packetNames.split(","); + + try { + for (String srcPacket : sourcePacketNames) { + Packet packet = packetKeeper.getPacket(getPacketInfo(id, srcPacket, source, process)); + InputStream idJsonStream = ZipUtils.unzipAndGetFile(packet.getPacket(), "ID"); + if (idJsonStream != null) { + byte[] bytearray = IOUtils.toByteArray(idJsonStream); + String jsonString = new String(bytearray); + LinkedHashMap currentIdMap = (LinkedHashMap) mapper.readValue(jsonString, LinkedHashMap.class).get(IDENTITY); + + currentIdMap.keySet().stream().forEach(key -> { + Object value = currentIdMap.get(key); + if (value != null && (value instanceof Number)) + finalMap.putIfAbsent(key, value); + else if (value != null && (value instanceof String)) + finalMap.putIfAbsent(key, value.toString().replaceAll("^\"|\"$", "")); + else { + try { + finalMap.putIfAbsent(key, value != null ? JsonUtils.javaObjectToJsonString(currentIdMap.get(key)) : null); + } catch (io.mosip.kernel.core.util.exception.JsonProcessingException e) { + e.printStackTrace(); + throw new GetAllIdentityException(e.getMessage()); + } + } + }); + } + } + } catch (Exception e) { + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, ExceptionUtils.getStackTrace(e)); + if (e instanceof BaseCheckedException) { + BaseCheckedException ex = (BaseCheckedException) e; + throw new GetAllIdentityException(ex.getErrorCode(), ex.getMessage()); + } else if (e instanceof BaseUncheckedException) { + BaseUncheckedException ex = (BaseUncheckedException) e; + throw new GetAllIdentityException(ex.getErrorCode(), ex.getMessage()); + } + throw new GetAllIdentityException(e.getMessage()); + } + + return finalMap; + } + + @Override + public String getField(String id, String field, String source, String process) { + LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, "getField :: for - " + field); + Map allFields = getAll(id, source, process); + if (allFields != null) { + Object fieldObj = allFields.get(field); + return fieldObj != null ? fieldObj.toString() : null; + } + return null; + } + + @Override + public Map getFields(String id, List fields, String source, String process) { + LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, "getFields :: for - " + fields.toString()); + Map result = new HashMap<>(); + Map allFields = getAll(id, source, process); + fields.stream().forEach(field -> result.put(field, allFields.get(field) != null ? allFields.get(field).toString() : null)); + + return result; + } + + @Override + public Document getDocument(String id, String documentName, String source, String process) { + LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, "getDocument :: for - " + documentName); + Map idobjectMap = getAll(id, source, process); + Double schemaVersion = idobjectMap.get(PacketManagerConstants.IDSCHEMA_VERSION) != null ? Double.valueOf(idobjectMap.get(PacketManagerConstants.IDSCHEMA_VERSION).toString()) : null; + String documentString = (String) idobjectMap.get(documentName); + try { + JSONObject documentMap = new JSONObject(documentString); + if (documentMap != null && schemaVersion != null) { + String packetName = idSchemaUtils.getSource(documentName, schemaVersion); + Packet packet = packetKeeper.getPacket(getPacketInfo(id, packetName, source, process)); + String value = documentMap.has(VALUE) ? documentMap.get(VALUE).toString() : null; + InputStream documentStream = ZipUtils.unzipAndGetFile(packet.getPacket(), value); + Document document = new Document(); + document.setDocument(IOUtils.toByteArray(documentStream)); + document.setValue(value); + document.setType(documentMap.get(TYPE) != null ? documentMap.get(TYPE).toString() : null); + document.setFormat(documentMap.get(FORMAT) != null ? documentMap.get(FORMAT).toString() : null); + return document; + } + } catch (IOException | ApiNotAccessibleException | PacketDecryptionFailureException | JSONException | PacketKeeperException e) { + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, ExceptionUtils.getStackTrace(e)); + throw new GetDocumentException(e.getMessage()); + } + return null; + } + + @Override + public BiometricRecord getBiometric(String id, String biometricFieldName, List modalities, String source, String process) { + LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, "getBiometric :: for - " + biometricFieldName); + BiometricRecord biometricRecord = null; + String packetName = null; + String fileName = null; + try { + Map idobjectMap = getAll(id, source, process); + String bioString = (String) idobjectMap.get(biometricFieldName); + JSONObject biometricMap = null; + if (bioString != null) + biometricMap = new JSONObject(bioString); + if (bioString == null || biometricMap == null || biometricMap.isNull(VALUE)) { + // biometric file not present in idobject. Search in meta data. + Map metadataMap = getMetaInfo(id, source, process); + String operationsData = metadataMap.get(META_INFO_OPERATIONS_DATA); + JSONArray jsonArray = new JSONArray(operationsData); + for (int i = 0; i < jsonArray.length(); i++) { + JSONObject jsonObject = (JSONObject) jsonArray.get(i); + if (jsonObject.has(LABEL) && jsonObject.get(LABEL).toString().equalsIgnoreCase(biometricFieldName)) { + packetName = ID; + fileName = jsonObject.isNull(VALUE) ? null : jsonObject.get(VALUE).toString(); + break; + } + } + } else { + Double schemaVersion = idobjectMap.get(PacketManagerConstants.IDSCHEMA_VERSION) != null ? + Double.valueOf(idobjectMap.get(PacketManagerConstants.IDSCHEMA_VERSION).toString()) : null; + packetName = idSchemaUtils.getSource(biometricFieldName, schemaVersion); + fileName = biometricMap.get(VALUE).toString(); + } + + if (packetName == null || fileName == null) + return null; + + Packet packet = packetKeeper.getPacket(getPacketInfo(id, packetName, source, process)); + InputStream biometrics = ZipUtils.unzipAndGetFile(packet.getPacket(), fileName); + BIRType birType = CbeffValidator.getBIRFromXML(IOUtils.toByteArray(biometrics)); + biometricRecord = new BiometricRecord(); + List segments = new ArrayList<>(); + List birList = CbeffValidator.convertBIRTypeToBIR(birType.getBIR()); + birList.forEach(bir -> segments.add(PacketManagerHelper.convertToBiometricRecordBIR(bir))); + biometricRecord.setSegments(segments); + } catch (Exception e) { + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, ExceptionUtils.getStackTrace(e)); + if (e instanceof BaseCheckedException) { + BaseCheckedException ex = (BaseCheckedException) e; + throw new GetBiometricException(ex.getErrorCode(), ex.getMessage()); + } else if (e instanceof BaseUncheckedException) { + BaseUncheckedException ex = (BaseUncheckedException) e; + throw new GetBiometricException(ex.getErrorCode(), ex.getMessage()); + } + throw new GetBiometricException(e.getMessage()); + } + + return biometricRecord; + } + + @Override + public Map getMetaInfo(String id, String source, String process) { + Map finalMap = new LinkedHashMap<>(); + String[] sourcePacketNames = packetNames.split(","); + + try { + for (String packetName : sourcePacketNames) { + Packet packet = packetKeeper.getPacket(getPacketInfo(id, packetName, source, process)); + InputStream idJsonStream = ZipUtils.unzipAndGetFile(packet.getPacket(), "PACKET_META_INFO"); + if (idJsonStream != null) { + byte[] bytearray = IOUtils.toByteArray(idJsonStream); + String jsonString = new String(bytearray); + LinkedHashMap currentIdMap = (LinkedHashMap) mapper.readValue(jsonString, LinkedHashMap.class).get(IDENTITY); + + currentIdMap.keySet().stream().forEach(key -> { + try { + finalMap.putIfAbsent(key, currentIdMap.get(key) != null ? JsonUtils.javaObjectToJsonString(currentIdMap.get(key)).replaceAll("^\"|\"$", "") : null); + } catch (io.mosip.kernel.core.util.exception.JsonProcessingException e) { + throw new GetAllMetaInfoException(e.getMessage()); + } + }); + } + } + } catch (Exception e) { + if (e instanceof BaseCheckedException) { + BaseCheckedException ex = (BaseCheckedException) e; + throw new GetAllMetaInfoException(ex.getErrorCode(), ex.getMessage()); + } else if (e instanceof BaseUncheckedException) { + BaseUncheckedException ex = (BaseUncheckedException) e; + throw new GetAllMetaInfoException(ex.getErrorCode(), ex.getMessage()); + } + throw new GetAllMetaInfoException(e.getMessage()); + } + return finalMap; + } + + @Override + public List> getAuditInfo(String id, String source, String process) { + LOGGER.info(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, "getAuditInfo :: enrtry"); + List> finalMap = new ArrayList<>(); + String[] sourcePacketNames = packetNames.split(","); + try { + for (String srcPacket : sourcePacketNames) { + Packet packet = packetKeeper.getPacket(getPacketInfo(id, srcPacket, source, process)); + InputStream auditJson = ZipUtils.unzipAndGetFile(packet.getPacket(), "audit"); + if (auditJson != null) { + byte[] bytearray = IOUtils.toByteArray(auditJson); + String jsonString = new String(bytearray); + List> currentMap = (List>) mapper.readValue(jsonString, List.class); + finalMap.addAll(currentMap); + } + } + } catch (Exception e) { + LOGGER.error(PacketManagerLogger.SESSIONID, PacketManagerLogger.REGISTRATIONID, id, ExceptionUtils.getStackTrace(e)); + if (e instanceof BaseCheckedException) { + BaseCheckedException ex = (BaseCheckedException) e; + throw new GetAllIdentityException(ex.getErrorCode(), ex.getMessage()); + } else if (e instanceof BaseUncheckedException) { + BaseUncheckedException ex = (BaseUncheckedException) e; + throw new GetAllIdentityException(ex.getErrorCode(), ex.getMessage()); + } + throw new GetAllIdentityException(e.getMessage()); + } + return finalMap; + } + + + private PacketInfo getPacketInfo(String id, String packetName, String source, String process) { + PacketInfo packetInfo = new PacketInfo(); + packetInfo.setId(id); + packetInfo.setPacketName(packetName); + packetInfo.setProcess(process); + packetInfo.setSource(source); + return packetInfo; + } } diff --git a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/keeper/PacketKeeper.java b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/keeper/PacketKeeper.java index 3ab51ee7cb..60eb0b91ce 100644 --- a/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/keeper/PacketKeeper.java +++ b/commons-packet/commons-packet-manager/src/main/java/io/mosip/commons/packet/keeper/PacketKeeper.java @@ -84,11 +84,27 @@ public class PacketKeeper { @Qualifier("OfflinePacketCryptoServiceImpl") private IPacketCryptoService offlineCrypto; - @Autowired - private PacketManagerHelper helper; - private static final String UNDERSCORE = "_"; + /** + * Get the manifest information for given packet id + * + * @param id : packet id + * @return : Manifest + */ + /*public Manifest getManifest(String id) { + Manifest manifest = new Manifest(); + + Map metaMap = getAdapter().getMetaData(PACKET_MANAGER_ACCOUNT, id, null); + + metaMap.entrySet().forEach(entry -> { + Map tempMap = (Map) entry.getValue(); + PacketInfo packetInfo = PacketManagerHelper.getPacketInfo(tempMap); + manifest.getPacketInfos().add(packetInfo); + }); + return manifest; + }*/ + /** * Check packet integrity. * @@ -112,9 +128,9 @@ public boolean checkIntegrity(PacketInfo packetInfo, byte[] encryptedSubPacket) * @return */ public boolean checkSignature(Packet packet, byte[] encryptedSubPacket) throws NoSuchAlgorithmException { - boolean result = disablePacketSignatureVerification ? true : - getCryptoService().verify(helper.getRefId( - packet.getPacketInfo().getId(), packet.getPacketInfo().getRefId()), packet.getPacket() + String machineId = packet.getPacketInfo().getId().substring(centerIdLength, centerIdLength+machineIdLength); + boolean result = disablePacketSignatureVerification ? true : + getCryptoService().verify(machineId, packet.getPacket() , CryptoUtil.decodeBase64(packet.getPacketInfo().getSignature())); if (result) result = checkIntegrity(packet.getPacketInfo(), encryptedSubPacket); @@ -139,8 +155,10 @@ public Packet getPacket(PacketInfo packetInfo) throws PacketKeeperException { throw new PacketKeeperException(ErrorCode.PACKET_NOT_FOUND.getErrorCode(), ErrorCode.PACKET_NOT_FOUND.getErrorMessage()); } byte[] encryptedSubPacket = IOUtils.toByteArray(is); + byte[] subPacket = getCryptoService().decrypt(packetInfo.getId(), encryptedSubPacket); Packet packet = new Packet(); + packet.setPacket(subPacket); Map metaInfo = getAdapter().getMetaData(PACKET_MANAGER_ACCOUNT, packetInfo.getId(), packetInfo.getSource(), packetInfo.getProcess(), getName(packetInfo.getId(), packetInfo.getPacketName())); if (metaInfo != null && !metaInfo.isEmpty()) @@ -150,9 +168,6 @@ public Packet getPacket(PacketInfo packetInfo) throws PacketKeeperException { getName(packetInfo.getId(), packetInfo.getPacketName()), "metainfo not found for this packet"); packet.setPacketInfo(packetInfo); } - byte[] subPacket = getCryptoService().decrypt(helper.getRefId( - packet.getPacketInfo().getId(), packet.getPacketInfo().getRefId()), encryptedSubPacket); - packet.setPacket(subPacket); if (!checkSignature(packet, encryptedSubPacket)) { @@ -186,7 +201,7 @@ else if (e instanceof BaseUncheckedException) { public PacketInfo putPacket(Packet packet) throws PacketKeeperException { try { // encrypt packet - byte[] encryptedSubPacket = getCryptoService().encrypt(packet.getPacketInfo().getRefId(), packet.getPacket()); + byte[] encryptedSubPacket = getCryptoService().encrypt(packet.getPacketInfo().getId(), packet.getPacket()); // put packet in object store boolean response = getAdapter().putObject(PACKET_MANAGER_ACCOUNT, @@ -250,8 +265,8 @@ public boolean deletePacket(String id, String source, String process) { return getAdapter().removeContainer(PACKET_MANAGER_ACCOUNT, id, source, process); } - public boolean pack(String id, String source, String process, String refId) { - return getAdapter().pack(PACKET_MANAGER_ACCOUNT, id, source, process, refId); + public boolean pack(String id, String source, String process) { + return getAdapter().pack(PACKET_MANAGER_ACCOUNT, id, source, process); } public Map addTags(TagDto tagDto) { diff --git a/commons-packet/commons-packet-manager/src/test/java/io/mosip/commons/packet/test/impl/OfflinePacketCryptoServiceTest.java b/commons-packet/commons-packet-manager/src/test/java/io/mosip/commons/packet/test/impl/OfflinePacketCryptoServiceTest.java index 16d603d898..6fe42d1d26 100644 --- a/commons-packet/commons-packet-manager/src/test/java/io/mosip/commons/packet/test/impl/OfflinePacketCryptoServiceTest.java +++ b/commons-packet/commons-packet-manager/src/test/java/io/mosip/commons/packet/test/impl/OfflinePacketCryptoServiceTest.java @@ -1,40 +1,20 @@ package io.mosip.commons.packet.test.impl; -import io.mosip.commons.packet.constants.CryptomanagerConstant; import io.mosip.commons.packet.impl.OfflinePacketCryptoServiceImpl; import io.mosip.commons.packet.util.ZipUtils; -import io.mosip.kernel.clientcrypto.dto.TpmSignResponseDto; -import io.mosip.kernel.clientcrypto.dto.TpmSignVerifyResponseDto; -import io.mosip.kernel.clientcrypto.service.spi.ClientCryptoManagerService; -import io.mosip.kernel.core.signatureutil.model.SignatureResponse; -import io.mosip.kernel.core.util.CryptoUtil; import io.mosip.kernel.core.util.JsonUtils; -import io.mosip.kernel.cryptomanager.dto.CryptomanagerResponseDto; -import io.mosip.kernel.cryptomanager.service.impl.CryptomanagerServiceImpl; -import io.mosip.kernel.signature.dto.ValidatorResponseDto; -import io.mosip.kernel.signature.service.SignatureService; -import io.mosip.kernel.signature.service.impl.SignatureServiceImpl; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.ArrayUtils; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; -import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.PropertySource; -import org.springframework.test.util.ReflectionTestUtils; - -import java.nio.charset.StandardCharsets; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.mockito.ArgumentMatchers.any; @RunWith(PowerMockRunner.class) @PrepareForTest({ZipUtils.class, IOUtils.class, JsonUtils.class}) @@ -45,73 +25,38 @@ public class OfflinePacketCryptoServiceTest { @InjectMocks private OfflinePacketCryptoServiceImpl offlinePacketCryptoService; - @Mock - private ApplicationContext applicationContext; - - @Mock - private CryptomanagerServiceImpl cryptomanagerService; - - @Mock - private ClientCryptoManagerService clientCryptoManagerService; - - @Mock - private SignatureServiceImpl signatureService; - - @Before - public void setup() { - Mockito.when(applicationContext.getBean(CryptomanagerServiceImpl.class)).thenReturn(cryptomanagerService); - Mockito.when(applicationContext.getBean(ClientCryptoManagerService.class)).thenReturn(clientCryptoManagerService); - Mockito.when(applicationContext.getBean(SignatureService.class)).thenReturn(signatureService); - ReflectionTestUtils.setField(offlinePacketCryptoService, "DATETIME_PATTERN", "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); - } - @Test public void signTest() { - String packetSignature = "signature"; - TpmSignResponseDto signatureResponse = new TpmSignResponseDto(); - signatureResponse.setData(CryptoUtil.encodeBase64(packetSignature.getBytes(StandardCharsets.UTF_8))); - - Mockito.when(clientCryptoManagerService.csSign(any())).thenReturn(signatureResponse); + byte[] packet = new byte[0]; - byte[] result = offlinePacketCryptoService.sign(packetSignature.getBytes()); - assertTrue(ArrayUtils.isEquals(packetSignature.getBytes(), result)); + byte[] result = offlinePacketCryptoService.sign(packet); + assertTrue(ArrayUtils.isEquals(packet, result)); } @Test public void encryptTest() { - String id = "10001100770000320200720092256"; - String response = "packet"; + String id = "1234"; byte[] packet = "packet".getBytes(); - CryptomanagerResponseDto cryptomanagerResponseDto = new CryptomanagerResponseDto(); - cryptomanagerResponseDto.setData(response); - Mockito.when(cryptomanagerService.encrypt(any())).thenReturn(cryptomanagerResponseDto); byte[] result = offlinePacketCryptoService.encrypt(id, packet); - assertNotNull(result); + assertEquals(packet, result); } @Test public void decryptTest() { - String id = "10001100770000320200720092256"; - String response = "10001100770000320200720092256_packetwithsignatureandaad"; - byte[] packet = "10001100770000320200720092256_packetwithsignatureandaad".getBytes(); - CryptomanagerResponseDto cryptomanagerResponseDto = new CryptomanagerResponseDto(); - cryptomanagerResponseDto.setData(response); - Mockito.when(cryptomanagerService.decrypt(any())).thenReturn(cryptomanagerResponseDto); + String id = "1234"; + byte[] packet = "packet".getBytes(); byte[] result = offlinePacketCryptoService.decrypt(id, packet); - assertNotNull(result); + assertEquals(packet, result); } @Test public void verifyTest() { - String packetSignature = "signature"; - - TpmSignVerifyResponseDto tpmSignVerifyResponseDto = new TpmSignVerifyResponseDto(); - tpmSignVerifyResponseDto.setVerified(true); - Mockito.when(clientCryptoManagerService.csVerify(any())).thenReturn(tpmSignVerifyResponseDto); + byte[] signature = "1234".getBytes(); + byte[] packet = "packet".getBytes(); - boolean result = offlinePacketCryptoService.verify("12345","packet".getBytes(), packetSignature.getBytes()); + boolean result = offlinePacketCryptoService.verify(packet, signature); assertTrue(result); } } diff --git a/commons-packet/commons-packet-manager/src/test/java/io/mosip/commons/packet/test/impl/PacketReaderImplTest.java b/commons-packet/commons-packet-manager/src/test/java/io/mosip/commons/packet/test/impl/PacketReaderImplTest.java index 045b8d6945..17204b3027 100644 --- a/commons-packet/commons-packet-manager/src/test/java/io/mosip/commons/packet/test/impl/PacketReaderImplTest.java +++ b/commons-packet/commons-packet-manager/src/test/java/io/mosip/commons/packet/test/impl/PacketReaderImplTest.java @@ -1,437 +1,442 @@ -package io.mosip.commons.packet.test.impl; - -import static org.junit.Assert.assertTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyObject; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.when; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.security.NoSuchAlgorithmException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import org.apache.commons.io.IOUtils; -import org.json.simple.JSONObject; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.powermock.api.mockito.PowerMockito; -import org.powermock.core.classloader.annotations.PowerMockIgnore; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; -import org.springframework.context.annotation.PropertySource; -import org.springframework.test.util.ReflectionTestUtils; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.collect.Lists; - -import io.mosip.commons.packet.dto.Document; -import io.mosip.commons.packet.dto.Packet; -import io.mosip.commons.packet.exception.GetAllIdentityException; -import io.mosip.commons.packet.exception.GetAllMetaInfoException; -import io.mosip.commons.packet.exception.GetDocumentException; -import io.mosip.commons.packet.exception.PacketKeeperException; -import io.mosip.commons.packet.exception.PacketValidationFailureException; -import io.mosip.commons.packet.impl.PacketReaderImpl; -import io.mosip.commons.packet.keeper.PacketKeeper; -import io.mosip.commons.packet.spi.IPacketReader; -import io.mosip.commons.packet.util.IdSchemaUtils; -import io.mosip.commons.packet.util.PacketValidator; -import io.mosip.commons.packet.util.ZipUtils; -import io.mosip.kernel.biometrics.commons.CbeffValidator; -import io.mosip.kernel.biometrics.constant.BiometricType; -import io.mosip.kernel.biometrics.constant.QualityType; -import io.mosip.kernel.biometrics.entities.BDBInfo; -import io.mosip.kernel.biometrics.entities.BIR; -import io.mosip.kernel.biometrics.entities.BiometricRecord; -import io.mosip.kernel.biometrics.entities.RegistryIDType; -import io.mosip.kernel.core.idobjectvalidator.exception.IdObjectIOException; -import io.mosip.kernel.core.idobjectvalidator.exception.IdObjectValidationFailedException; -import io.mosip.kernel.core.idobjectvalidator.exception.InvalidIdSchemaException; -import io.mosip.kernel.core.util.JsonUtils; -import io.mosip.kernel.core.util.exception.JsonProcessingException; - -@RunWith(PowerMockRunner.class) -@PrepareForTest({ZipUtils.class, IOUtils.class, JsonUtils.class, CbeffValidator.class}) -@PropertySource("classpath:application-test.properties") -@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"}) -public class PacketReaderImplTest { - - @InjectMocks - private IPacketReader iPacketReader = new PacketReaderImpl(); - - @Mock - private PacketValidator packetValidator; - - @Mock - private PacketKeeper packetKeeper; - - @Mock - private ObjectMapper objectMapper; - - @Mock - private IdSchemaUtils idSchemaUtils; - - private static final String docName = "proofOfIdentity"; - private static final String biometricFieldName = "individualBiometrics"; - - @Before - public void setup() throws PacketKeeperException, IOException { - Packet packet = new Packet(); - packet.setPacket("hello".getBytes()); - - String str = "{ \"identity\" : {\n" + - " \"proofOfAddress\" : {\n" + - " \"value\" : \"proofOfAddress\",\n" + - " \"type\" : \"DOC004\",\n" + - " \"format\" : \"jpg\"\n" + - " },\n" + - " \"gender\" : [ {\n" + - " \"language\" : \"eng\",\n" + - " \"value\" : \"Male\"\n" + - " }, {\n" + - " \"language\" : \"ara\",\n" + - " \"value\" : \"الذكر\"\n" + - " } ],\n" + - " \"city\" : [ {\n" + - " \"language\" : \"eng\",\n" + - " \"value\" : \"Kenitra\"\n" + - " }, {\n" + - " \"language\" : \"ara\",\n" + - " \"value\" : \"القنيطرة\"\n" + - " } ],\n" + - " \"postalCode\" : \"14000\",\n" + - " \"fullName\" : [ {\n" + - " \"language\" : \"eng\",\n" + - " \"value\" : \"Test after fix\"\n" + - " }, {\n" + - " \"language\" : \"ara\",\n" + - " \"value\" : \"Test after fix\"\n" + - " } ],\n" + - " \"dateOfBirth\" : \"1976/01/01\",\n" + - " \"referenceIdentityNumber\" : \"2345235252352353523\",\n" + - " \"individualBiometrics\" : {\n" + - " \"format\" : \"cbeff\",\n" + - " \"version\" : 1.0,\n" + - " \"value\" : \"individualBiometrics_bio_CBEFF\"\n" + - " },\n" + - " \"IDSchemaVersion\" : \"0.1\",\n" + - " \"province\" : [ {\n" + - " \"language\" : \"eng\",\n" + - " \"value\" : \"Kenitra\"\n" + - " }, {\n" + - " \"language\" : \"ara\",\n" + - " \"value\" : \"القنيطرة\"\n" + - " } ],\n" + - " \"zone\" : [ {\n" + - " \"language\" : \"eng\",\n" + - " \"value\" : \"Assam\"\n" + - " }, {\n" + - " \"language\" : \"ara\",\n" + - " \"value\" : \"العصام\"\n" + - " } ],\n" + - " \"phone\" : \"9606139887\",\n" + - " \"addressLine1\" : [ {\n" + - " \"language\" : \"eng\",\n" + - " \"value\" : \"asdadsfas\"\n" + - " }, {\n" + - " \"language\" : \"ara\",\n" + - " \"value\" : \"asdadsfas\"\n" + - " } ],\n" + - " \"addressLine2\" : [ {\n" + - " \"language\" : \"eng\",\n" + - " \"value\" : \"qqwqrqwrw\"\n" + - " }, {\n" + - " \"language\" : \"ara\",\n" + - " \"value\" : \"qqwqrqwrw\"\n" + - " } ],\n" + - " \"residenceStatus\" : [ {\n" + - " \"language\" : \"eng\",\n" + - " \"value\" : \"Non-Foreigner\"\n" + - " }, {\n" + - " \"language\" : \"ara\",\n" + - " \"value\" : \"غير أجنبي\"\n" + - " } ],\n" + - " \"addressLine3\" : [ {\n" + - " \"language\" : \"eng\",\n" + - " \"value\" : \"wfwfwef\"\n" + - " }, {\n" + - " \"language\" : \"ara\",\n" + - " \"value\" : \"wfwfwef\"\n" + - " } ],\n" + - " \"region\" : [ {\n" + - " \"language\" : \"eng\",\n" + - " \"value\" : \"Rabat Sale Kenitra\"\n" + - " }, {\n" + - " \"language\" : \"ara\",\n" + - " \"value\" : \"جهة الرباط سلا القنيطرة\"\n" + - " } ],\n" + - " \"email\" : \"niyati.swami@technoforte.co.in\"\n" + - "} } "; - - Map keyValueMap = new LinkedHashMap<>(); - keyValueMap.put("email", "niyati.swami@technoforte.co.in"); - keyValueMap.put("phone", "9606139887"); - keyValueMap.put("fullName", "[ {\r\n \"language\" : \"eng\",\r\n \"value\" : \"Test after fix\"\r\n}, {\r\n \"language\" : \"ara\",\r\n \"value\" : \"Test after fix\"\r\n} ]"); - keyValueMap.put("IDSchemaVersion", "0.1"); - keyValueMap.put(biometricFieldName, "{\r\n \"format\" : \"cbeff\",\r\n \"version\" : 1.0,\r\n \"value\" : \"individualBiometrics_bio_CBEFF\"\r\n}"); - keyValueMap.put(docName, "{\r\n \"value\" : \"proofOfIdentity\",\r\n \"type\" : \"DOC003\",\r\n \"format\" : \"jpg\"\r\n}"); - - - Map finalMap = new LinkedHashMap<>(); - finalMap.put("identity", keyValueMap); - - ByteArrayInputStream bis = new ByteArrayInputStream(str.getBytes()); - - MockitoAnnotations.initMocks(this); - ReflectionTestUtils.setField(iPacketReader, "packetNames", "id,evidence,optional"); - when(packetKeeper.getPacket(any())).thenReturn(packet); - - PowerMockito.mockStatic(ZipUtils.class); - when(ZipUtils.unzipAndGetFile(any(), anyString())).thenReturn(bis); - PowerMockito.mockStatic(IOUtils.class); - when(IOUtils.toByteArray(any(InputStream.class))).thenReturn(str.getBytes()); - - when(objectMapper.readValue(anyString(), any(Class.class))).thenReturn(finalMap); - when(idSchemaUtils.getSource(any(), any())).thenReturn("id"); - - } - - @Test - public void validatePacketTest() throws JsonProcessingException, PacketKeeperException, InvalidIdSchemaException, IdObjectValidationFailedException, IdObjectIOException, IOException, NoSuchAlgorithmException { - when(packetValidator.validate(anyString(), anyString(), anyString())).thenReturn(true); - boolean result = iPacketReader.validatePacket("id", "source", "process"); - - assertTrue("Should be true", result); - } - - @Test(expected = PacketValidationFailureException.class) - public void validatePacketExceptionTest() throws JsonProcessingException, PacketKeeperException, InvalidIdSchemaException, IdObjectValidationFailedException, IdObjectIOException, IOException, NoSuchAlgorithmException { - when(packetValidator.validate(anyString(), anyString(), anyString())).thenThrow(new IOException("exception")); - boolean result = iPacketReader.validatePacket("id", "source","process"); - - } - - @Test - public void getAllTest() { - Map result = iPacketReader.getAll("id", "source", "process"); - - assertTrue("Should be true", result.size() == 6); - } - - @Test(expected = GetAllIdentityException.class) - public void getAllExceptionTest() throws IOException { - when(objectMapper.readValue(anyString(), any(Class.class))).thenReturn(null); - - Map result = iPacketReader.getAll("id", "source", "process"); - } - - @Test(expected = GetAllIdentityException.class) - public void getAllExceptionTest2() throws JsonProcessingException, IOException { - PowerMockito.mockStatic(JsonUtils.class); - Map keyValueMap = new LinkedHashMap<>(); - keyValueMap.put("email", new JSONObject(new LinkedHashMap())); - Map finalMap = new LinkedHashMap<>(); - finalMap.put("identity", keyValueMap); - when(objectMapper.readValue(anyString(), any(Class.class))).thenReturn(finalMap); - - when(JsonUtils.javaObjectToJsonString(anyObject())).thenThrow(new JsonProcessingException("errormessage")); - Map result = iPacketReader.getAll("id", "source", "process"); - } - - @Test - public void getFieldTest() { - String result = iPacketReader.getField("id", "phone", "source","process"); - - assertTrue("Should be true", result.equals("9606139887")); - } - - @Test - public void getFieldsTest() { - List list = Lists.newArrayList("phone", "email"); - - Map result = iPacketReader.getFields("id", list, "source", "process"); - - assertTrue("Should be true", result.size() == 2); - } - - @Test - public void getDocumentTest() { - List list = Lists.newArrayList("phone", "email"); - - Document result = iPacketReader.getDocument("id", docName, "source", "process"); - - assertTrue("Should be true", result.getDocument() != null); - } - - @Test(expected = GetDocumentException.class) - public void getDocumentExceptionTest() throws IOException { - List list = Lists.newArrayList("phone", "email"); - - when(idSchemaUtils.getSource(any(), any())).thenThrow(new IOException("exception")); - - Document result = iPacketReader.getDocument("id", docName, "source", "process"); - - } - - @Test - public void getBiometricsTest() throws Exception { - BIR birType = new BIR(); - BIR bir1 = new BIR(); - BDBInfo bdbInfoType1 = new BDBInfo(); - RegistryIDType registryIDType = new RegistryIDType(); - registryIDType.setOrganization("Mosip"); - registryIDType.setType("257"); - QualityType quality = new QualityType(); - quality.setAlgorithm(registryIDType); - quality.setScore(90l); - bdbInfoType1.setQuality(quality); - BiometricType singleType1 = BiometricType .FINGER; - List singleTypeList1 = new ArrayList<>(); - singleTypeList1.add(singleType1); - List subtype1 = new ArrayList<>(Arrays.asList("Left", "RingFinger")); - bdbInfoType1.setSubtype(subtype1); - bdbInfoType1.setType(singleTypeList1); - bdbInfoType1.setFormat(registryIDType); - bir1.setBdbInfo(bdbInfoType1); - BIR bir2 = new BIR(); - bir2.setBdbInfo(bdbInfoType1); - - PowerMockito.mockStatic(CbeffValidator.class); - birType.setBirs(Lists.newArrayList(bir1, bir2)); - when(CbeffValidator.getBIRFromXML(any())).thenReturn(birType); - - BiometricRecord result = iPacketReader.getBiometric("id", biometricFieldName, null, "source", "process"); - - assertTrue("Should be true", result.getSegments().size() == 2); - } - - @Test - @Ignore - public void getBiometricsExceptionTest() throws Exception { - List list = Lists.newArrayList("phone", "email"); - BIR birType = new BIR(); - - BIR bir1 = new BIR(); - BDBInfo bdbInfoType1 = new BDBInfo(); - RegistryIDType registryIDType = new RegistryIDType(); - registryIDType.setOrganization("Mosip"); - registryIDType.setType("257"); - QualityType quality = new QualityType(); - quality.setAlgorithm(registryIDType); - quality.setScore(90l); - bdbInfoType1.setQuality(quality); - BiometricType singleType1 = BiometricType.FINGER; - List singleTypeList1 = new ArrayList<>(); - singleTypeList1.add(singleType1); - List subtype1 = new ArrayList<>(Arrays.asList("Left", "RingFinger")); - bdbInfoType1.setSubtype(subtype1); - bdbInfoType1.setType(singleTypeList1); - bdbInfoType1.setFormat(registryIDType); - bir1.setBdbInfo(bdbInfoType1); - BIR bir2 = new BIR(); - bir2.setBdbInfo(bdbInfoType1); - birType.setBirs(Lists.newArrayList(bir1, bir2)); - - Map keyValueMap = new LinkedHashMap<>(); - keyValueMap.put("operationsData", "[{\n \"label\\\" : \\\"officerId\\\",\n \\\"value\\\" : \\\"110012\\\"\n}, {\n \\\"label\\\" : \\\"officerBiometricFileName\\\",\n \\\"value\\\" : \\\"officer_bio_cbeff\\\"\n}, {\n \\\"label\\\" : \\\"supervisorId\\\",\n \\\"value\\\" : null\n}, {\n \\\"label\\\" : \\\"supervisorBiometricFileName\\\",\n \\\"value\\\" : null\n}, {\n \\\"label\\\" : \\\"supervisorPassword\\\",\n \\\"value\\\" : \\\"false\\\"\n}, {\n \\\"label\\\" : \\\"officerPassword\\\",\n \\\"value\\\" : \\\"true\\\"\n}, {\n \\\"label\\\" : \\\"supervisorPIN\\\",\n \\\"value\\\" : null\n}, {\n \\\"label\\\" : \\\"officerPIN\\\",\n \\\"value\\\" : null\n}]"); - keyValueMap.put("metaData", "[{\r\n \"label\" : \"registrationId\",\r\n \"value\" : \"10001100770000320200720092256\"\r\n}, {\r\n \"label\" : \"creationDate\",\r\n \"value\" : \"2020-07-20T14:54:49.823Z\"\r\n}, {\r\n \"label\" : \"Registration Client Version Number\",\r\n \"value\" : \"1.0.10\"\r\n}, {\r\n \"label\" : \"registrationType\",\r\n \"value\" : \"New\"\r\n}, {\r\n \"label\" : \"preRegistrationId\",\r\n \"value\" : null\r\n}, {\r\n \"label\" : \"machineId\",\r\n \"value\" : \"10077\"\r\n}, {\r\n \"label\" : \"centerId\",\r\n \"value\" : \"10001\"\r\n}, {\r\n \"label\" : \"dongleId\",\r\n \"value\" : null\r\n}, {\r\n \"label\" : \"keyIndex\",\r\n \"value\" : \"4F:38:72:D9:F8:DB:94:E7:22:48:96:D0:91:01:6D:3C:64:90:2E:14:DC:D2:F8:14:1F:2A:A4:19:1A:BC:91:41\"\r\n}, {\r\n \"label\" : \"consentOfApplicant\",\r\n \"value\" : \"Yes} ]"); - Map finalMap = new LinkedHashMap<>(); - finalMap.put("identity", keyValueMap); - - when(objectMapper.readValue(anyString(), any(Class.class))).thenReturn(finalMap); - - PowerMockito.mockStatic(CbeffValidator.class); - when(CbeffValidator.getBIRFromXML(any())).thenReturn(birType); - - BiometricRecord result = iPacketReader.getBiometric("id", "officerBiometric", null, "source", "process"); - - assertTrue("Should be true", result.getSegments().size() == 2); - } - - @Test - public void getMetaInfoTest() throws IOException { - Map keyValueMap = new LinkedHashMap<>(); - keyValueMap.put("operationsData", "[{\n" + - "\t\"label\": \"officerId\",\n" + - "\t\"value\": \"110122\"\n" + - "}, {\n" + - "\t\"label\": \"officerBiometricFileName\",\n" + - "\t\"value\": \"officerBiometric\"\n" + - "}, {\n" + - "\t\"label\": \"supervisorId\",\n" + - "\t\"value\": null\n" + - "}, {\n" + - "\t\"label\": \"supervisorBiometricFileName\",\n" + - "\t\"value\": null\n" + - "}, {\n" + - "\t\"label\": \"supervisorPassword\",\n" + - "\t\"value\": \"false\"\n" + - "}, {\n" + - "\t\"label\": \"officerPassword\",\n" + - "\t\"value\": \"true\"\n" + - "}, {\n" + - "\t\"label\": \"supervisorPIN\",\n" + - "\t\"value\": null\n" + - "}, {\n" + - "\t\"label\": \"officerPIN\",\n" + - "\t\"value\": null\n" + - "}, {\n" + - "\t\"label\": \"supervisorOTPAuthentication\",\n" + - "\t\"value\": \"false\"\n" + - "}, {\n" + - "\t\"label\": \"officerOTPAuthentication\",\n" + - "\t\"value\": \"false\"\n" + - "}]"); - keyValueMap.put("metaData", "\"[ {\r\n \"label\" : \"registrationId\",\r\n \"value\" : \"10001100770000320200720092256\"\r\n}, {\r\n \"label\" : \"creationDate\",\r\n \"value\" : \"2020-07-20T14:54:49.823Z\"\r\n}, {\r\n \"label\" : \"Registration Client Version Number\",\r\n \"value\" : \"1.0.10\"\r\n}, {\r\n \"label\" : \"registrationType\",\r\n \"value\" : \"New\"\r\n}, {\r\n \"label\" : \"preRegistrationId\",\r\n \"value\" : null\r\n}, {\r\n \"label\" : \"machineId\",\r\n \"value\" : \"10077\"\r\n}, {\r\n \"label\" : \"centerId\",\r\n \"value\" : \"10001\"\r\n}, {\r\n \"label\" : \"dongleId\",\r\n \"value\" : null\r\n}, {\r\n \"label\" : \"keyIndex\",\r\n \"value\" : \"4F:38:72:D9:F8:DB:94:E7:22:48:96:D0:91:01:6D:3C:64:90:2E:14:DC:D2:F8:14:1F:2A:A4:19:1A:BC:91:41\"\r\n}, {\r\n \"label\" : \"consentOfApplicant\",\r\n \"value\" : \"Yes\"\r\n} ]\""); - Map finalMap = new LinkedHashMap<>(); - finalMap.put("identity", keyValueMap); - - when(objectMapper.readValue(anyString(), any(Class.class))).thenReturn(finalMap); - - Map result = iPacketReader.getMetaInfo("id", "source", "process"); - - assertTrue("Should be true", result.size() == 2); - } - - @Test - public void getAuditTest() throws IOException { - ReflectionTestUtils.setField(iPacketReader, "packetNames", "id"); - Map keyValueMap = new LinkedHashMap<>(); - keyValueMap.put("audit1", "audit1"); - keyValueMap.put("audit2", "audit2"); - List> finalMap = new ArrayList<>(); - finalMap.add(keyValueMap); - - when(objectMapper.readValue(anyString(), any(Class.class))).thenReturn(finalMap); - - List> result = iPacketReader.getAuditInfo("id", "source", "process"); - - assertTrue("Should be true", result.size() == 1); - } - - @Test(expected = GetAllMetaInfoException.class) - public void metaInfoExceptionTest() throws IOException { - when(objectMapper.readValue(anyString(), any(Class.class))).thenThrow(new IOException("exception")); - - iPacketReader.getMetaInfo("id", "source", "process"); - } - - @Test(expected = GetAllIdentityException.class) - public void getAuditExceptionTest() throws IOException { - when(objectMapper.readValue(anyString(), any(Class.class))).thenThrow(new IOException("exception")); - - iPacketReader.getAuditInfo("id", "source", "process"); - } - -} +package io.mosip.commons.packet.test.impl; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.collect.Lists; +import io.mosip.commons.packet.dto.Document; +import io.mosip.commons.packet.dto.Packet; +import io.mosip.commons.packet.exception.GetAllIdentityException; +import io.mosip.commons.packet.exception.GetAllMetaInfoException; +import io.mosip.commons.packet.exception.GetDocumentException; +import io.mosip.commons.packet.exception.PacketKeeperException; +import io.mosip.commons.packet.impl.PacketReaderImpl; +import io.mosip.commons.packet.keeper.PacketKeeper; +import io.mosip.commons.packet.spi.IPacketReader; +import io.mosip.commons.packet.util.IdSchemaUtils; +import io.mosip.commons.packet.util.PacketValidator; +import io.mosip.commons.packet.util.ZipUtils; +import io.mosip.kernel.biometrics.entities.BiometricRecord; +import io.mosip.kernel.core.cbeffutil.common.CbeffValidator; +import io.mosip.kernel.core.cbeffutil.entity.BDBInfo; +import io.mosip.kernel.core.cbeffutil.entity.BIR; +import io.mosip.kernel.core.cbeffutil.jaxbclasses.BIRType; +import io.mosip.kernel.core.cbeffutil.jaxbclasses.QualityType; +import io.mosip.kernel.core.cbeffutil.jaxbclasses.RegistryIDType; +import io.mosip.kernel.core.cbeffutil.jaxbclasses.SingleType; +import io.mosip.kernel.core.idobjectvalidator.exception.IdObjectIOException; +import io.mosip.kernel.core.idobjectvalidator.exception.IdObjectValidationFailedException; +import io.mosip.kernel.core.idobjectvalidator.exception.InvalidIdSchemaException; +import io.mosip.kernel.core.util.JsonUtils; +import io.mosip.kernel.core.util.exception.JsonProcessingException; +import org.apache.commons.io.IOUtils; +import org.json.JSONArray; +import org.json.simple.JSONObject; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; +import org.powermock.core.classloader.annotations.PrepareForTest; +import org.powermock.modules.junit4.PowerMockRunner; +import org.springframework.context.annotation.PropertySource; +import org.springframework.test.util.ReflectionTestUtils; +import org.springframework.util.CollectionUtils; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.*; + +import static io.mosip.commons.packet.constants.PacketManagerConstants.*; +import static io.mosip.commons.packet.constants.PacketManagerConstants.VALUE; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyMap; +import static org.mockito.ArgumentMatchers.anyObject; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.when; + +@RunWith(PowerMockRunner.class) +@PrepareForTest({ZipUtils.class, IOUtils.class, JsonUtils.class, CbeffValidator.class}) +@PropertySource("classpath:application-test.properties") +@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"}) +public class PacketReaderImplTest { + + @InjectMocks + private IPacketReader iPacketReader = new PacketReaderImpl(); + + @Mock + private PacketValidator packetValidator; + + @Mock + private PacketKeeper packetKeeper; + + @Mock + private ObjectMapper objectMapper; + + @Mock + private IdSchemaUtils idSchemaUtils; + + private static final String docName = "proofOfIdentity"; + private static final String biometricFieldName = "individualBiometrics"; + + @Before + public void setup() throws PacketKeeperException, IOException { + Packet packet = new Packet(); + packet.setPacket("hello".getBytes()); + + String str = "{ \"identity\" : {\n" + + " \"proofOfAddress\" : {\n" + + " \"value\" : \"proofOfAddress\",\n" + + " \"type\" : \"DOC004\",\n" + + " \"format\" : \"jpg\"\n" + + " },\n" + + " \"gender\" : [ {\n" + + " \"language\" : \"eng\",\n" + + " \"value\" : \"Male\"\n" + + " }, {\n" + + " \"language\" : \"ara\",\n" + + " \"value\" : \"الذكر\"\n" + + " } ],\n" + + " \"city\" : [ {\n" + + " \"language\" : \"eng\",\n" + + " \"value\" : \"Kenitra\"\n" + + " }, {\n" + + " \"language\" : \"ara\",\n" + + " \"value\" : \"القنيطرة\"\n" + + " } ],\n" + + " \"postalCode\" : \"14000\",\n" + + " \"fullName\" : [ {\n" + + " \"language\" : \"eng\",\n" + + " \"value\" : \"Test after fix\"\n" + + " }, {\n" + + " \"language\" : \"ara\",\n" + + " \"value\" : \"Test after fix\"\n" + + " } ],\n" + + " \"dateOfBirth\" : \"1976/01/01\",\n" + + " \"referenceIdentityNumber\" : \"2345235252352353523\",\n" + + " \"individualBiometrics\" : {\n" + + " \"format\" : \"cbeff\",\n" + + " \"version\" : 1.0,\n" + + " \"value\" : \"individualBiometrics_bio_CBEFF\"\n" + + " },\n" + + " \"IDSchemaVersion\" : \"0.1\",\n" + + " \"province\" : [ {\n" + + " \"language\" : \"eng\",\n" + + " \"value\" : \"Kenitra\"\n" + + " }, {\n" + + " \"language\" : \"ara\",\n" + + " \"value\" : \"القنيطرة\"\n" + + " } ],\n" + + " \"zone\" : [ {\n" + + " \"language\" : \"eng\",\n" + + " \"value\" : \"Assam\"\n" + + " }, {\n" + + " \"language\" : \"ara\",\n" + + " \"value\" : \"العصام\"\n" + + " } ],\n" + + " \"phone\" : \"9606139887\",\n" + + " \"addressLine1\" : [ {\n" + + " \"language\" : \"eng\",\n" + + " \"value\" : \"asdadsfas\"\n" + + " }, {\n" + + " \"language\" : \"ara\",\n" + + " \"value\" : \"asdadsfas\"\n" + + " } ],\n" + + " \"addressLine2\" : [ {\n" + + " \"language\" : \"eng\",\n" + + " \"value\" : \"qqwqrqwrw\"\n" + + " }, {\n" + + " \"language\" : \"ara\",\n" + + " \"value\" : \"qqwqrqwrw\"\n" + + " } ],\n" + + " \"residenceStatus\" : [ {\n" + + " \"language\" : \"eng\",\n" + + " \"value\" : \"Non-Foreigner\"\n" + + " }, {\n" + + " \"language\" : \"ara\",\n" + + " \"value\" : \"غير أجنبي\"\n" + + " } ],\n" + + " \"addressLine3\" : [ {\n" + + " \"language\" : \"eng\",\n" + + " \"value\" : \"wfwfwef\"\n" + + " }, {\n" + + " \"language\" : \"ara\",\n" + + " \"value\" : \"wfwfwef\"\n" + + " } ],\n" + + " \"region\" : [ {\n" + + " \"language\" : \"eng\",\n" + + " \"value\" : \"Rabat Sale Kenitra\"\n" + + " }, {\n" + + " \"language\" : \"ara\",\n" + + " \"value\" : \"جهة الرباط سلا القنيطرة\"\n" + + " } ],\n" + + " \"email\" : \"niyati.swami@technoforte.co.in\"\n" + + "} } "; + + Map keyValueMap = new LinkedHashMap<>(); + keyValueMap.put("email", "niyati.swami@technoforte.co.in"); + keyValueMap.put("phone", "9606139887"); + keyValueMap.put("fullName", "[ {\r\n \"language\" : \"eng\",\r\n \"value\" : \"Test after fix\"\r\n}, {\r\n \"language\" : \"ara\",\r\n \"value\" : \"Test after fix\"\r\n} ]"); + keyValueMap.put("IDSchemaVersion", "0.1"); + keyValueMap.put(biometricFieldName, "{\r\n \"format\" : \"cbeff\",\r\n \"version\" : 1.0,\r\n \"value\" : \"individualBiometrics_bio_CBEFF\"\r\n}"); + keyValueMap.put(docName, "{\r\n \"value\" : \"proofOfIdentity\",\r\n \"type\" : \"DOC003\",\r\n \"format\" : \"jpg\"\r\n}"); + + + Map finalMap = new LinkedHashMap<>(); + finalMap.put("identity", keyValueMap); + + ByteArrayInputStream bis = new ByteArrayInputStream(str.getBytes()); + + MockitoAnnotations.initMocks(this); + ReflectionTestUtils.setField(iPacketReader, "packetNames", "id,evidence,optional"); + when(packetKeeper.getPacket(any())).thenReturn(packet); + + PowerMockito.mockStatic(ZipUtils.class); + when(ZipUtils.unzipAndGetFile(any(), anyString())).thenReturn(bis); + PowerMockito.mockStatic(IOUtils.class); + when(IOUtils.toByteArray(any(InputStream.class))).thenReturn(str.getBytes()); + + when(objectMapper.readValue(anyString(), any(Class.class))).thenReturn(finalMap); + when(idSchemaUtils.getSource(any(), any())).thenReturn("id"); + + } + + @Test + public void validatePacketTest() throws JsonProcessingException, PacketKeeperException, InvalidIdSchemaException, IdObjectValidationFailedException, IdObjectIOException, IOException { + when(packetValidator.validate(anyString(), anyString(), anyString(), anyMap())).thenReturn(true); + boolean result = iPacketReader.validatePacket("id", "source", "process"); + + assertTrue("Should be true", result); + } + + @Test + public void validatePacketExceptionTest() throws JsonProcessingException, PacketKeeperException, InvalidIdSchemaException, IdObjectValidationFailedException, IdObjectIOException, IOException { + when(packetValidator.validate(anyString(), anyString(), anyString(), anyMap())).thenThrow(new IOException("exception")); + boolean result = iPacketReader.validatePacket("id", "source","process"); + + assertFalse("Should be true", result); + } + + @Test + public void getAllTest() { + Map result = iPacketReader.getAll("id", "source", "process"); + + assertTrue("Should be true", result.size() == 6); + } + + @Test(expected = GetAllIdentityException.class) + public void getAllExceptionTest() throws IOException { + when(objectMapper.readValue(anyString(), any(Class.class))).thenReturn(null); + + Map result = iPacketReader.getAll("id", "source", "process"); + } + + @Test(expected = GetAllIdentityException.class) + public void getAllExceptionTest2() throws JsonProcessingException, IOException { + PowerMockito.mockStatic(JsonUtils.class); + Map keyValueMap = new LinkedHashMap<>(); + keyValueMap.put("email", new JSONObject(new LinkedHashMap())); + Map finalMap = new LinkedHashMap<>(); + finalMap.put("identity", keyValueMap); + when(objectMapper.readValue(anyString(), any(Class.class))).thenReturn(finalMap); + + when(JsonUtils.javaObjectToJsonString(anyObject())).thenThrow(new JsonProcessingException("errormessage")); + Map result = iPacketReader.getAll("id", "source", "process"); + } + + @Test + public void getFieldTest() { + String result = iPacketReader.getField("id", "phone", "source","process"); + + assertTrue("Should be true", result.equals("9606139887")); + } + + @Test + public void getFieldsTest() { + List list = Lists.newArrayList("phone", "email"); + + Map result = iPacketReader.getFields("id", list, "source", "process"); + + assertTrue("Should be true", result.size() == 2); + } + + @Test + public void getDocumentTest() { + List list = Lists.newArrayList("phone", "email"); + + Document result = iPacketReader.getDocument("id", docName, "source", "process"); + + assertTrue("Should be true", result.getDocument() != null); + } + + @Test(expected = GetDocumentException.class) + public void getDocumentExceptionTest() throws IOException { + List list = Lists.newArrayList("phone", "email"); + + when(idSchemaUtils.getSource(any(), any())).thenThrow(new IOException("exception")); + + Document result = iPacketReader.getDocument("id", docName, "source", "process"); + + } + + @Test + public void getBiometricsTest() throws Exception { + BIRType birType = new BIRType(); + BIRType birType1 = new BIRType(); + BIRType birType2 = new BIRType(); + birType.setBir(Lists.newArrayList(birType1, birType2)); + BIR bir1 = new BIR(); + BDBInfo bdbInfoType1 = new BDBInfo(); + RegistryIDType registryIDType = new RegistryIDType(); + registryIDType.setOrganization("Mosip"); + registryIDType.setType("257"); + QualityType quality = new QualityType(); + quality.setAlgorithm(registryIDType); + quality.setScore(90l); + bdbInfoType1.setQuality(quality); + SingleType singleType1 = SingleType.FINGER; + List singleTypeList1 = new ArrayList<>(); + singleTypeList1.add(singleType1); + List subtype1 = new ArrayList<>(Arrays.asList("Left", "RingFinger")); + bdbInfoType1.setSubtype(subtype1); + bdbInfoType1.setType(singleTypeList1); + bdbInfoType1.setFormat(registryIDType); + bir1.setBdbInfo(bdbInfoType1); + BIR bir2 = new BIR(); + bir2.setBdbInfo(bdbInfoType1); + + PowerMockito.mockStatic(CbeffValidator.class); + when(CbeffValidator.getBIRFromXML(any())).thenReturn(birType); + when(CbeffValidator.convertBIRTypeToBIR(any())).thenReturn(Lists.newArrayList(bir1, bir2)); + + BiometricRecord result = iPacketReader.getBiometric("id", biometricFieldName, null, "source", "process"); + + assertTrue("Should be true", result.getSegments().size() == 2); + } + + @Test + @Ignore + public void getBiometricsExceptionTest() throws Exception { + List list = Lists.newArrayList("phone", "email"); + BIRType birType = new BIRType(); + BIRType birType1 = new BIRType(); + BIRType birType2 = new BIRType(); + birType.setBir(Lists.newArrayList(birType1, birType2)); + BIR bir1 = new BIR(); + BDBInfo bdbInfoType1 = new BDBInfo(); + RegistryIDType registryIDType = new RegistryIDType(); + registryIDType.setOrganization("Mosip"); + registryIDType.setType("257"); + QualityType quality = new QualityType(); + quality.setAlgorithm(registryIDType); + quality.setScore(90l); + bdbInfoType1.setQuality(quality); + SingleType singleType1 = SingleType.FINGER; + List singleTypeList1 = new ArrayList<>(); + singleTypeList1.add(singleType1); + List subtype1 = new ArrayList<>(Arrays.asList("Left", "RingFinger")); + bdbInfoType1.setSubtype(subtype1); + bdbInfoType1.setType(singleTypeList1); + bdbInfoType1.setFormat(registryIDType); + bir1.setBdbInfo(bdbInfoType1); + BIR bir2 = new BIR(); + bir2.setBdbInfo(bdbInfoType1); + + Map keyValueMap = new LinkedHashMap<>(); + keyValueMap.put("operationsData", "[{\n \"label\\\" : \\\"officerId\\\",\n \\\"value\\\" : \\\"110012\\\"\n}, {\n \\\"label\\\" : \\\"officerBiometricFileName\\\",\n \\\"value\\\" : \\\"officer_bio_cbeff\\\"\n}, {\n \\\"label\\\" : \\\"supervisorId\\\",\n \\\"value\\\" : null\n}, {\n \\\"label\\\" : \\\"supervisorBiometricFileName\\\",\n \\\"value\\\" : null\n}, {\n \\\"label\\\" : \\\"supervisorPassword\\\",\n \\\"value\\\" : \\\"false\\\"\n}, {\n \\\"label\\\" : \\\"officerPassword\\\",\n \\\"value\\\" : \\\"true\\\"\n}, {\n \\\"label\\\" : \\\"supervisorPIN\\\",\n \\\"value\\\" : null\n}, {\n \\\"label\\\" : \\\"officerPIN\\\",\n \\\"value\\\" : null\n}]"); + keyValueMap.put("metaData", "[{\r\n \"label\" : \"registrationId\",\r\n \"value\" : \"10001100770000320200720092256\"\r\n}, {\r\n \"label\" : \"creationDate\",\r\n \"value\" : \"2020-07-20T14:54:49.823Z\"\r\n}, {\r\n \"label\" : \"Registration Client Version Number\",\r\n \"value\" : \"1.0.10-rc2\"\r\n}, {\r\n \"label\" : \"registrationType\",\r\n \"value\" : \"New\"\r\n}, {\r\n \"label\" : \"preRegistrationId\",\r\n \"value\" : null\r\n}, {\r\n \"label\" : \"machineId\",\r\n \"value\" : \"10077\"\r\n}, {\r\n \"label\" : \"centerId\",\r\n \"value\" : \"10001\"\r\n}, {\r\n \"label\" : \"dongleId\",\r\n \"value\" : null\r\n}, {\r\n \"label\" : \"keyIndex\",\r\n \"value\" : \"4F:38:72:D9:F8:DB:94:E7:22:48:96:D0:91:01:6D:3C:64:90:2E:14:DC:D2:F8:14:1F:2A:A4:19:1A:BC:91:41\"\r\n}, {\r\n \"label\" : \"consentOfApplicant\",\r\n \"value\" : \"Yes} ]"); + Map finalMap = new LinkedHashMap<>(); + finalMap.put("identity", keyValueMap); + + when(objectMapper.readValue(anyString(), any(Class.class))).thenReturn(finalMap); + + PowerMockito.mockStatic(CbeffValidator.class); + when(CbeffValidator.getBIRFromXML(any())).thenReturn(birType); + when(CbeffValidator.convertBIRTypeToBIR(any())).thenReturn(Lists.newArrayList(bir1, bir2)); + + BiometricRecord result = iPacketReader.getBiometric("id", "officerBiometric", null, "source", "process"); + + assertTrue("Should be true", result.getSegments().size() == 2); + } + + @Test + public void getMetaInfoTest() throws IOException { + Map keyValueMap = new LinkedHashMap<>(); + keyValueMap.put("operationsData", "[{\n" + + "\t\"label\": \"officerId\",\n" + + "\t\"value\": \"110122\"\n" + + "}, {\n" + + "\t\"label\": \"officerBiometricFileName\",\n" + + "\t\"value\": \"officerBiometric\"\n" + + "}, {\n" + + "\t\"label\": \"supervisorId\",\n" + + "\t\"value\": null\n" + + "}, {\n" + + "\t\"label\": \"supervisorBiometricFileName\",\n" + + "\t\"value\": null\n" + + "}, {\n" + + "\t\"label\": \"supervisorPassword\",\n" + + "\t\"value\": \"false\"\n" + + "}, {\n" + + "\t\"label\": \"officerPassword\",\n" + + "\t\"value\": \"true\"\n" + + "}, {\n" + + "\t\"label\": \"supervisorPIN\",\n" + + "\t\"value\": null\n" + + "}, {\n" + + "\t\"label\": \"officerPIN\",\n" + + "\t\"value\": null\n" + + "}, {\n" + + "\t\"label\": \"supervisorOTPAuthentication\",\n" + + "\t\"value\": \"false\"\n" + + "}, {\n" + + "\t\"label\": \"officerOTPAuthentication\",\n" + + "\t\"value\": \"false\"\n" + + "}]"); + keyValueMap.put("metaData", "\"[ {\r\n \"label\" : \"registrationId\",\r\n \"value\" : \"10001100770000320200720092256\"\r\n}, {\r\n \"label\" : \"creationDate\",\r\n \"value\" : \"2020-07-20T14:54:49.823Z\"\r\n}, {\r\n \"label\" : \"Registration Client Version Number\",\r\n \"value\" : \"1.0.10-rc2\"\r\n}, {\r\n \"label\" : \"registrationType\",\r\n \"value\" : \"New\"\r\n}, {\r\n \"label\" : \"preRegistrationId\",\r\n \"value\" : null\r\n}, {\r\n \"label\" : \"machineId\",\r\n \"value\" : \"10077\"\r\n}, {\r\n \"label\" : \"centerId\",\r\n \"value\" : \"10001\"\r\n}, {\r\n \"label\" : \"dongleId\",\r\n \"value\" : null\r\n}, {\r\n \"label\" : \"keyIndex\",\r\n \"value\" : \"4F:38:72:D9:F8:DB:94:E7:22:48:96:D0:91:01:6D:3C:64:90:2E:14:DC:D2:F8:14:1F:2A:A4:19:1A:BC:91:41\"\r\n}, {\r\n \"label\" : \"consentOfApplicant\",\r\n \"value\" : \"Yes\"\r\n} ]\""); + Map finalMap = new LinkedHashMap<>(); + finalMap.put("identity", keyValueMap); + + when(objectMapper.readValue(anyString(), any(Class.class))).thenReturn(finalMap); + + Map result = iPacketReader.getMetaInfo("id", "source", "process"); + + assertTrue("Should be true", result.size() == 2); + } + + @Test + public void getAuditTest() throws IOException { + ReflectionTestUtils.setField(iPacketReader, "packetNames", "id"); + Map keyValueMap = new LinkedHashMap<>(); + keyValueMap.put("audit1", "audit1"); + keyValueMap.put("audit2", "audit2"); + List> finalMap = new ArrayList<>(); + finalMap.add(keyValueMap); + + when(objectMapper.readValue(anyString(), any(Class.class))).thenReturn(finalMap); + + List> result = iPacketReader.getAuditInfo("id", "source", "process"); + + assertTrue("Should be true", result.size() == 1); + } + + @Test(expected = GetAllMetaInfoException.class) + public void metaInfoExceptionTest() throws IOException { + when(objectMapper.readValue(anyString(), any(Class.class))).thenThrow(new IOException("exception")); + + iPacketReader.getMetaInfo("id", "source", "process"); + } + + @Test(expected = GetAllIdentityException.class) + public void getAuditExceptionTest() throws IOException { + when(objectMapper.readValue(anyString(), any(Class.class))).thenThrow(new IOException("exception")); + + iPacketReader.getAuditInfo("id", "source", "process"); + } + +} diff --git a/commons-packet/commons-packet-manager/src/test/java/io/mosip/commons/packet/test/keeper/PacketKeeperTest.java b/commons-packet/commons-packet-manager/src/test/java/io/mosip/commons/packet/test/keeper/PacketKeeperTest.java index 31991fe635..adfeba7d79 100644 --- a/commons-packet/commons-packet-manager/src/test/java/io/mosip/commons/packet/test/keeper/PacketKeeperTest.java +++ b/commons-packet/commons-packet-manager/src/test/java/io/mosip/commons/packet/test/keeper/PacketKeeperTest.java @@ -1,238 +1,155 @@ -package io.mosip.commons.packet.test.keeper; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyString; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.util.ReflectionTestUtils; - -import com.google.common.collect.Lists; - -import io.mosip.commons.khazana.dto.ObjectDto; -import io.mosip.commons.khazana.spi.ObjectStoreAdapter; -import io.mosip.commons.packet.constants.PacketManagerConstants; -import io.mosip.commons.packet.dto.Packet; -import io.mosip.commons.packet.dto.PacketInfo; -import io.mosip.commons.packet.dto.TagDto; -import io.mosip.commons.packet.dto.TagRequestDto; -import io.mosip.commons.packet.exception.PacketKeeperException; -import io.mosip.commons.packet.keeper.PacketKeeper; -import io.mosip.commons.packet.spi.IPacketCryptoService; -import io.mosip.kernel.core.exception.BaseUncheckedException; -import io.mosip.kernel.core.util.DateUtils; - -@RunWith(SpringRunner.class) -public class PacketKeeperTest { - - @InjectMocks - private PacketKeeper packetKeeper; - - @Mock - @Qualifier("SwiftAdapter") - private ObjectStoreAdapter swiftAdapter; - - @Mock - @Qualifier("S3Adapter") - private ObjectStoreAdapter s3Adapter; - - @Mock - @Qualifier("PosixAdapter") - private ObjectStoreAdapter posixAdapter; - - @Mock - @Qualifier("OnlinePacketCryptoServiceImpl") - private IPacketCryptoService onlineCrypto; - - /*@Mock - private OfflinePacketCryptoServiceImpl offlineCrypto;*/ - - private Packet packet; - private PacketInfo packetInfo; - - private static final String id = "1234567890"; - private static final String source = "source"; - private static final String process = "process"; - - @Before - public void setup() { - ReflectionTestUtils.setField(packetKeeper, "cryptoName", onlineCrypto.getClass().getSimpleName()); - ReflectionTestUtils.setField(packetKeeper, "adapterName", swiftAdapter.getClass().getSimpleName()); - ReflectionTestUtils.setField(packetKeeper, "PACKET_MANAGER_ACCOUNT", "PACKET_MANAGER_ACCOUNT"); - ReflectionTestUtils.setField(packetKeeper, "centerIdLength", 5); - ReflectionTestUtils.setField(packetKeeper, "machineIdLength", 5); - ReflectionTestUtils.setField(packetKeeper, "disablePacketSignatureVerification", false); - - packetInfo = new PacketInfo(); - packetInfo.setCreationDate(DateUtils.getCurrentDateTimeString()); - packetInfo.setEncryptedHash("yWxtW-jQihLntc3Bsgf6ayQwl0yGgD2IkWdedv2ZLCA"); - packetInfo.setId(id); - packetInfo.setProcess(process); - packetInfo.setSource(source); - packetInfo.setSignature("sign"); - packetInfo.setSchemaVersion("0.1"); - packetInfo.setProviderVersion("1.0"); - packet = new Packet(); - packet.setPacket("packet".getBytes()); - packet.setPacketInfo(packetInfo); - - Map metaMap = new HashMap<>(); - metaMap.put(PacketManagerConstants.ID, id); - metaMap.put(PacketManagerConstants.SOURCE, source); - metaMap.put(PacketManagerConstants.PROCESS, process); - metaMap.put(PacketManagerConstants.SIGNATURE, "signature"); - metaMap.put(PacketManagerConstants.ENCRYPTED_HASH, "yWxtW-jQihLntc3Bsgf6ayQwl0yGgD2IkWdedv2ZLCA"); - - Mockito.when(onlineCrypto.encrypt(any(), any())).thenReturn("encryptedpacket".getBytes()); - Mockito.when(onlineCrypto.sign(any())).thenReturn("signed data".getBytes()); - Mockito.when(swiftAdapter.putObject(any(), any(), any(),any(), any(), any())).thenReturn(true); - Mockito.when(swiftAdapter.addObjectMetaData(any(), any(), any(),any(), any(), any())).thenReturn(metaMap); - - InputStream is = new ByteArrayInputStream("input".getBytes()); - - Mockito.when(swiftAdapter.getObject(any(), any(),any(), any(), any())).thenReturn(is); - Mockito.when(onlineCrypto.decrypt(any(), any())).thenReturn("decryptedpacket".getBytes()); - Mockito.when(swiftAdapter.getMetaData(any(), any(),any(), any(), any())).thenReturn(metaMap); - Mockito.when(onlineCrypto.verify(any(),any(), any())).thenReturn(true); - Map tagsMap = new HashMap<>(); - tagsMap.put("osivalidation", "pass"); - Mockito.when(swiftAdapter.getTags(any(), any())).thenReturn(tagsMap); - - - } - - @Test - public void testPutPacketSuccess() throws PacketKeeperException { - PacketInfo packetInfo = packetKeeper.putPacket(packet); - - assertTrue(packetInfo.getId().equals(id)); - assertTrue(packetInfo.getSource().equals(source)); - assertTrue(packetInfo.getProcess().equals(process)); - } - - @Test(expected = PacketKeeperException.class) - public void testPutPacketException() throws PacketKeeperException { - Mockito.when(onlineCrypto.encrypt(any(), any())).thenThrow(new BaseUncheckedException("code","message")); - - packetKeeper.putPacket(packet); - } - - @Test(expected = PacketKeeperException.class) - public void testObjectStoreAdapterException() throws PacketKeeperException { - ReflectionTestUtils.setField(packetKeeper, "adapterName", "wrongAdapterName"); - - packetKeeper.putPacket(packet); - } - - @Test(expected = PacketKeeperException.class) - public void testCryptoException() throws PacketKeeperException { - ReflectionTestUtils.setField(packetKeeper, "cryptoName", "wrongname"); - - packetKeeper.putPacket(packet); - } - - @Test - public void testGetPacketSuccess() throws PacketKeeperException { - Packet result = packetKeeper.getPacket(packetInfo); - - assertTrue(result.getPacketInfo().getId().equals(id)); - assertTrue(result.getPacketInfo().getSource().equals(source)); - assertTrue(result.getPacketInfo().getProcess().equals(process)); - } - - @Test(expected = PacketKeeperException.class) - public void testGetPacketFailure() throws PacketKeeperException { - Mockito.when(swiftAdapter.getObject(any(), any(), any(), any(), any())).thenThrow(new BaseUncheckedException("code","message")); - - packetKeeper.getPacket(packetInfo); - } - - @Test(expected = PacketKeeperException.class) - @Ignore - public void testPacketIntegrityFailure() throws PacketKeeperException { - Mockito.when(onlineCrypto.verify(any(),any(), any())).thenReturn(false); - - packetKeeper.getPacket(packetInfo); - } - @Test - public void testAddTags() { - TagDto tagDto=new TagDto(); - tagDto.setId(id); - Map tags = new HashMap<>(); - tags.put("test", "testValue"); - tagDto.setTags(tags); - Mockito.when(swiftAdapter.addTags(any(), any(),any())).thenReturn(tags); - Map map = packetKeeper.addTags(tagDto); - assertEquals(tags, map); - - } - - @Test - public void testUpdateTags() { - TagDto tagDto=new TagDto(); - tagDto.setId(id); - Map tags = new HashMap<>(); - tags.put("test", "testValue"); - tagDto.setTags(tags); - Mockito.when(swiftAdapter.addTags(any(), any(),any())).thenReturn(tags); - Map map = packetKeeper.addorUpdate(tagDto); - assertEquals(tags, map); - - } - - @Test - public void testGetTags() { - List tagNames=new ArrayList<>(); - tagNames.add("osivalidation"); - - Map map = packetKeeper.getTags(id); - assertEquals(map.get("osivalidation"), "pass"); - - } - - - @Test - public void testgetAll() { - ObjectDto objectDto = new ObjectDto("source1", "process1", "object1", new Date()); - ObjectDto objectDto2 = new ObjectDto("source2", "process2", "object2", new Date()); - ObjectDto objectDto3 = new ObjectDto("source3", "process3", "object3", new Date()); - List objectDtos = Lists.newArrayList(objectDto, objectDto2, objectDto3); - - Mockito.when(swiftAdapter.getAllObjects(anyString(), anyString())).thenReturn(objectDtos); - - List result = packetKeeper.getAll(id); - assertEquals(objectDtos.size(), result.size()); - - } - @Test - public void testdeleteTags() { - TagRequestDto tagRequestDto=new TagRequestDto(); - tagRequestDto.setId(id); - List tagNames=new ArrayList<>(); - tagNames.add("osivalidation"); - tagRequestDto.setTagNames(tagNames); - packetKeeper.deleteTags(tagRequestDto); - - } - - -} - - +package io.mosip.commons.packet.test.keeper; + +import io.mosip.commons.khazana.spi.ObjectStoreAdapter; +import io.mosip.commons.packet.constants.PacketManagerConstants; +import io.mosip.commons.packet.dto.Packet; +import io.mosip.commons.packet.dto.PacketInfo; +import io.mosip.commons.packet.exception.PacketKeeperException; +import io.mosip.commons.packet.keeper.PacketKeeper; +import io.mosip.commons.packet.spi.IPacketCryptoService; +import io.mosip.kernel.core.exception.BaseUncheckedException; +import io.mosip.kernel.core.util.DateUtils; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.util.ReflectionTestUtils; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.any; + +@RunWith(SpringRunner.class) +public class PacketKeeperTest { + + @InjectMocks + private PacketKeeper packetKeeper; + + @Mock + @Qualifier("SwiftAdapter") + private ObjectStoreAdapter swiftAdapter; + + @Mock + @Qualifier("S3Adapter") + private ObjectStoreAdapter s3Adapter; + + @Mock + @Qualifier("PosixAdapter") + private ObjectStoreAdapter posixAdapter; + + @Mock + @Qualifier("OnlinePacketCryptoServiceImpl") + private IPacketCryptoService onlineCrypto; + + /*@Mock + private OfflinePacketCryptoServiceImpl offlineCrypto;*/ + + private Packet packet; + private PacketInfo packetInfo; + + private static final String id = "123457890"; + private static final String source = "source"; + private static final String process = "process"; + + @Before + public void setup() { + ReflectionTestUtils.setField(packetKeeper, "cryptoName", onlineCrypto.getClass().getSimpleName()); + ReflectionTestUtils.setField(packetKeeper, "adapterName", swiftAdapter.getClass().getSimpleName()); + ReflectionTestUtils.setField(packetKeeper, "PACKET_MANAGER_ACCOUNT", "PACKET_MANAGER_ACCOUNT"); + + packetInfo = new PacketInfo(); + packetInfo.setCreationDate(DateUtils.getCurrentDateTimeString()); + packetInfo.setEncryptedHash("yWxtW-jQihLntc3Bsgf6ayQwl0yGgD2IkWdedv2ZLCA"); + packetInfo.setId(id); + packetInfo.setProcess(process); + packetInfo.setSource(source); + packetInfo.setSignature("sign"); + packetInfo.setSchemaVersion("0.1"); + packetInfo.setProviderVersion("1.0"); + packet = new Packet(); + packet.setPacket("packet".getBytes()); + packet.setPacketInfo(packetInfo); + + Map metaMap = new HashMap<>(); + metaMap.put(PacketManagerConstants.ID, id); + metaMap.put(PacketManagerConstants.SOURCE, source); + metaMap.put(PacketManagerConstants.PROCESS, process); + metaMap.put(PacketManagerConstants.SIGNATURE, "signature"); + metaMap.put(PacketManagerConstants.ENCRYPTED_HASH, "yWxtW-jQihLntc3Bsgf6ayQwl0yGgD2IkWdedv2ZLCA"); + + Mockito.when(onlineCrypto.encrypt(any(), any())).thenReturn("encryptedpacket".getBytes()); + Mockito.when(onlineCrypto.sign(any())).thenReturn("signed data".getBytes()); + Mockito.when(swiftAdapter.putObject(any(), any(), any(),any(), any(), any())).thenReturn(true); + Mockito.when(swiftAdapter.addObjectMetaData(any(), any(), any(),any(), any(), any())).thenReturn(metaMap); + + InputStream is = new ByteArrayInputStream("input".getBytes()); + + Mockito.when(swiftAdapter.getObject(any(), any(),any(), any(), any())).thenReturn(is); + Mockito.when(onlineCrypto.decrypt(any(), any())).thenReturn("decryptedpacket".getBytes()); + Mockito.when(swiftAdapter.getMetaData(any(), any(),any(), any(), any())).thenReturn(metaMap); + Mockito.when(onlineCrypto.verify(any(), any())).thenReturn(true); + } + + @Test + public void testPutPacketSuccess() throws PacketKeeperException { + PacketInfo packetInfo = packetKeeper.putPacket(packet); + + assertTrue(packetInfo.getId().equals(id)); + assertTrue(packetInfo.getSource().equals(source)); + assertTrue(packetInfo.getProcess().equals(process)); + } + + @Test(expected = PacketKeeperException.class) + public void testPutPacketException() throws PacketKeeperException { + Mockito.when(onlineCrypto.encrypt(any(), any())).thenThrow(new BaseUncheckedException("code","message")); + + packetKeeper.putPacket(packet); + } + + @Test(expected = PacketKeeperException.class) + public void testObjectStoreAdapterException() throws PacketKeeperException { + ReflectionTestUtils.setField(packetKeeper, "adapterName", "wrongAdapterName"); + + packetKeeper.putPacket(packet); + } + + @Test(expected = PacketKeeperException.class) + public void testCryptoException() throws PacketKeeperException { + ReflectionTestUtils.setField(packetKeeper, "cryptoName", "wrongname"); + + packetKeeper.putPacket(packet); + } + + @Test + public void testGetPacketSuccess() throws PacketKeeperException { + Packet result = packetKeeper.getPacket(packetInfo); + + assertTrue(result.getPacketInfo().getId().equals(id)); + assertTrue(result.getPacketInfo().getSource().equals(source)); + assertTrue(result.getPacketInfo().getProcess().equals(process)); + } + + @Test(expected = PacketKeeperException.class) + public void testGetPacketFailure() throws PacketKeeperException { + Mockito.when(swiftAdapter.getObject(any(), any(), any(), any(), any())).thenThrow(new BaseUncheckedException("code","message")); + + packetKeeper.getPacket(packetInfo); + } + + @Test(expected = PacketKeeperException.class) + public void testPacketIntegrityFailure() throws PacketKeeperException { + Mockito.when(onlineCrypto.verify(any(), any())).thenReturn(false); + + packetKeeper.getPacket(packetInfo); + } +} + + diff --git a/commons-packet/commons-packet-service/Dockerfile b/commons-packet/commons-packet-service/Dockerfile index 47ad9dd9f8..c4f0292b8f 100644 --- a/commons-packet/commons-packet-service/Dockerfile +++ b/commons-packet/commons-packet-service/Dockerfile @@ -1,5 +1,14 @@ FROM openjdk:11 +ARG SOURCE +ARG COMMIT_HASH +ARG COMMIT_ID +ARG BUILD_TIME +LABEL source=${SOURCE} +LABEL commit_hash=${COMMIT_HASH} +LABEL commit_id=${COMMIT_ID} +LABEL build_time=${BUILD_TIME} + #Uncomment below and Comment above line(i.e. FROM openjdk:8) for OS specific (e.g. Alpine OS ) docker base image #FROM openjdk:8-jdk-alpine diff --git a/commons-packet/commons-packet-service/src/main/java/io/mosip/commons/packetmanager/PacketServiceApp.java b/commons-packet/commons-packet-service/src/main/java/io/mosip/commons/packetmanager/PacketServiceApp.java index 939b5d362c..bf13deea33 100644 --- a/commons-packet/commons-packet-service/src/main/java/io/mosip/commons/packetmanager/PacketServiceApp.java +++ b/commons-packet/commons-packet-service/src/main/java/io/mosip/commons/packetmanager/PacketServiceApp.java @@ -12,8 +12,7 @@ * */ @SpringBootApplication -@ComponentScan(basePackages = {"io.mosip.commons.packet.*" , - "io.mosip.commons.packetmanager.*", "${mosip.auth.adapter.impl.basepackage}"}) +@ComponentScan(basePackages = { "io.mosip.*"}) @EnableCaching public class PacketServiceApp { diff --git a/commons-packet/pom.xml b/commons-packet/pom.xml index 65e829194d..c699ecc7e3 100644 --- a/commons-packet/pom.xml +++ b/commons-packet/pom.xml @@ -2,16 +2,16 @@ - + + io.mosip + commons + 1.2.0-SNAPSHOT + 4.0.0 io.mosip.commons commons-packet 1.2.0-SNAPSHOT - common-packet - Common packet manager for MOSIP - https://github.com/mosip/commons - pom @@ -20,11 +20,11 @@ 11 11 3.8.0 - 2.22.0 + 2.22.0 3.0.2 3.1.0 - 0.8.5 - 3.7.0.1746 + 0.8.1 + 3.7.0.1746 3.2.0 2.3 @@ -34,16 +34,16 @@ 2.0.0.RELEASE 1.4.197 2.9.8 - 1.2.0-SNAPSHOT + 1.0.6 2.9.2 2.0.7 1.2.0-SNAPSHOT 1.2.0-SNAPSHOT - 1.2.0-SNAPSHOT + 1.0.6 1.2.0-SNAPSHOT - 1.2.0-SNAPSHOT - 1.2.0-SNAPSHOT + 1.0.7 + 1.0.6 2.0.2.RELEASE 1.2.0-SNAPSHOT **/constant/**,**/config/**,**/httpfilter/**,**/cache/**,**/dto/**,**/entity/**,**/model/**,**/exception/**,**/repository/**,**/security/**,**/*Config.java,**/*BootApplication.java,**/*VertxApplication.java,**/cbeffutil/**,**/*Utils.java,**/*Validator.java,**/*Helper.java,**/verticle/**,**/VidWriter.java/**,**/masterdata/utils/**,**/spi/**,**/core/http/**,"**/LocationServiceImpl.java","**/RegistrationCenterMachineServiceImpl.java","**/RegistrationCenterServiceImpl.java","**/pridgenerator/**","**/idgenerator/prid","**/proxy/**","**/cryptosignature/**" @@ -55,18 +55,8 @@ commons-packet-service - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - + + org.apache.maven.plugins @@ -76,25 +66,24 @@ ${skipTests} false - ${argLine} --add-opens java.xml/jdk.xml.internal=ALL-UNNAMED --illegal-access=permit + --illegal-access=permit org.jacoco jacoco-maven-plugin - ${maven.jacoco.version} + ${maven.jacoco.plugin.version} + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${maven.sonar.plugin.version} + verify - prepare-agent - - - - report - prepare-package - - report + sonar @@ -133,7 +122,38 @@ - + + + + + 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-compiler-plugin ${maven.compiler.version} @@ -142,167 +162,8 @@ ${maven.compiler.target} - - maven-deploy-plugin - 2.8.1 - - - default-deploy - deploy - - deploy - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - - default-deploy - deploy - - deploy - - - - - ossrh - https://oss.sonatype.org/ - false - - + + - - org.apache.maven.plugins - maven-source-plugin - true - 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 - - - - - - - scm:git:git://github.com/mosip/commons.git - scm:git:ssh://github.com:mosip/commons.git - https://github.com/mosip/commons - HEAD - - - - MPL 2.0 - https://www.mozilla.org/en-US/MPL/2.0/ - - - - - Mosip - mosip.emailnotifier@gmail.com - io.mosip - https://github.com/mosip/commons - - - - - sonar - - . - src/main/java/**,src/main/resources/** - ${sonar.coverage.exclusions} - https://sonarcloud.io - - - false - - - - - org.sonarsource.scanner.maven - sonar-maven-plugin - ${maven.sonar.plugin.version} - - - verify - - sonar - - - - - - - - - + diff --git a/db_release_scripts/mosip_master/dml/master-template.csv b/db_release_scripts/mosip_master/dml/master-template.csv index 452f525a1d..241457b518 100644 --- a/db_release_scripts/mosip_master/dml/master-template.csv +++ b/db_release_scripts/mosip_master/dml/master-template.csv @@ -1,162 +1,162 @@ id,name,descr,file_format_code,model,file_txt,module_id,module_name,template_typ_code,lang_code,is_active,cr_by,cr_dtimes 1101,Template for authorization content,Template for authorization content,txt,,"Dear $name -Your Authentication of $idvidType $idvid using $authType on $date at $time Hrs $status at a device deployed by MOSIP Services",10004,ID Authentication,auth-email-content,eng,TRUE,superadmin,now() -1102,Template for authorization subject,Template for authorization subject,txt,,$idvidType $idvid Authentication $status,10004,ID Authentication,auth-email-subject,eng,TRUE,superadmin,now() -1103,Template for authorization SMS,Template for authorization SMS,txt,,Your Authentication of $idvidType $idvid using $authType on $date at $time Hrs $status at a device deployed by MOSIP Services.,10004,ID Authentication,auth-sms,eng,TRUE,superadmin,now() -1101,قالب لمحتوى التخويل,قالب لمحتوى التخويل,txt,velocity,"عزيزي $name ، -مصاٿقة $idvidType $idvid باستخدام $authType على $date في $time Hrs $status على جهاز تم نشره بواسطة ""خٿمات MOSIP"".",10004,مصادقة الهوية,auth-email-content,ara,TRUE,superadmin,now() -1102,قالب لموضوع التخويل,قالب لموضوع التخويل,txt,velocity,$idvidType $idvid: مصادقة $status,10004,مصادقة الهوية,auth-email-subject,ara,TRUE,superadmin,now() -1103,قالب لرسالة التفويض,قالب لرسالة التفويض,txt,velocity,"مصاٿقتك على $idvidType $idvid باستخدام $authType في $date في $time Hrs $status على جهاز تم نشره بواسطة ""خدمات MOSIP"".",10004,مصادقة الهوية,auth-sms,ara,TRUE,superadmin,now() -1101,Modèle de contenu dautorisation,Modèle de contenu dautorisation,txt,velocity,"Cher $name, -Votre authentification $idvidType $idvid utilisant $authType le $date à $time Hrs $status sur un périphérique déployé par ""MOSIP Services""",10004,Authentification ID,auth-email-content,fra,TRUE,superadmin,now() -1102,Modèle pour sujet dautorisation,Modèle pour sujet dautorisation,txt,velocity,$idvidType $idvid: $status dauthentification,10004,Authentification ID,auth-email-subject,fra,TRUE,superadmin,now() -1103,Modèle de SMS dautorisation,Modèle de SMS dautorisation,txt,velocity,"Votre authentification $idvidType $idvid utilisant $authType le $date à $time Hrs $status sur un périphérique déployé par ""MOSIP Services"".",10004,Authentification ID,auth-sms,fra,TRUE,superadmin,now() -1107,Template for duplicate UIN Email,Template for duplicate UIN Email,txt,velocity,"Dear $!name_eng, +Your Authentication of UIN $uin using $authType on $date at $time Hrs $status at a device deployed by MOSIP Services",10004,ID Authentication,auth-email-content,eng,TRUE,superadmin,now() +1102,Template for authorization subject,Template for authorization subject,txt,,UIN $uin Authentication $status,10004,ID Authentication,auth-email-subject,eng,TRUE,superadmin,now() +1103,Template for authorization SMS,Template for authorization SMS,txt,,Your Authentication of UIN $uin using $authType on $date at $time Hrs $status at a device deployed by MOSIP Services.,10004,ID Authentication,auth-sms,eng,TRUE,superadmin,now() +1101,قالب لمحتوى التخويل,قالب لمحتوى التخويل,txt,,"عزيزي $name ، +مصادقة UIN $uin باستخدام $authType على $date في $time Hrs $status على جهاز تم نشره بواسطة ""خدمات MOSIP.",10004,مصادقة الهوية,auth-email-content,ara,TRUE,superadmin,now() +1102,قالب لموضوع التخويل,قالب لموضوع التخويل,txt,,UIN $uin: مصادقة $status,10004,مصادقة الهوية,auth-email-subject,ara,TRUE,superadmin,now() +1103,قالب لرسالة التفويض,قالب لرسالة التفويض,txt,,مصادقتك على UIN $uin باستخدام $authType في $date في $time Hrs $status في جهاز تم نشره بواسطة خدمات MOSIP.,10004,مصادقة الهوية,auth-sms,ara,TRUE,superadmin,now() +1101,Modèle de contenu dautorisation,Modèle de contenu dautorisation,txt,,"Cher $name, +Votre authentification UIN $uin utilisant $authType le $date à $time Hrs $status sur un périphérique déployé par ""MOSIP Services""",10004,Authentification ID,auth-email-content,fra,TRUE,superadmin,now() +1102,Modèle pour sujet dautorisation,Modèle pour sujet dautorisation,txt,,UIN $uin: $status dauthentification,10004,Authentification ID,auth-email-subject,fra,TRUE,superadmin,now() +1103,Modèle de SMS dautorisation,Modèle de SMS dautorisation,txt,,Votre authentification de UIN $uin à l'aide de $authType le $date à $time Hrs $status sur un appareil déployé par les services MOSIP.,10004,Authentification ID,auth-sms,fra,TRUE,superadmin,now() +1107,Template for duplicate UIN Email,Template for duplicate UIN Email,txt,,"Dear $!name_eng, Your request for UIN for Registration ID: $!RID has failed because a duplicate UIN has been found against your details. Please visit your nearest Registration office or visit https://mosip.io/grievances Thank You",10003,Registration Processor,RPR_DUP_UIN_EMAIL,eng,TRUE,superadmin,now() -1108,Template for duplicate UIN SMS,Template for duplicate UIN SMS,txt,velocity,"Dear $!name_eng, +1108,Template for duplicate UIN SMS,Template for duplicate UIN SMS,txt,,"Dear $!name_eng, Your request for UIN for Registration ID: $!RID has failed because a duplicate UIN has been found against your details. Please visit your nearest Registration office or visit https://mosip.io/grievances",10003,Registration Processor,RPR_DUP_UIN_SMS,eng,TRUE,superadmin,now() -1109,Template for Technical Issue Email,Template for Technical Issue Email,txt,velocity,"Dear $!name_eng, +1109,Template for Technical Issue Email,Template for Technical Issue Email,txt,,"Dear $!name_eng, Your request for UIN for Registration ID: $!RID has failed because of a technical issue. Please visit your nearest Registration office or visit https://mosip.io/grievances Thank You",10003,Registration Processor,RPR_TEC_ISSUE_EMAIL,eng,TRUE,superadmin,now() -1110,Template for Technical Issue SMS,Template for Technical Issue SMS,txt,velocity,"Dear $!name_eng, +1110,Template for Technical Issue SMS,Template for Technical Issue SMS,txt,,"Dear $!name_eng, Your request for UIN for Registration ID: $!RID has failed because of a technical issue. Please visit your nearest Registration office or visit https://mosip.io/grievances",10003,Registration Processor,RPR_TEC_ISSUE_SMS,eng,TRUE,superadmin,now() -1111,Template for UIN generation Email,Template for UIN generation Email,txt,velocity,"Dear $name_eng, +1111,Template for UIN generation Email,Template for UIN generation Email,txt,,"Dear $name_eng, Your UIN for Registration ID: $!RID has been successfully generated and will reach soon at your postal address. Thank You",10003,Registration Processor,RPR_UIN_GEN_EMAIL,eng,TRUE,superadmin,now() -1112,Template for UIN generation SMS,Template for UIN generation SMS,txt,velocity,"Dear $name_eng, +1112,Template for UIN generation SMS,Template for UIN generation SMS,txt,,"Dear $name_eng, Your UIN for Registration ID: $!RID has been successfully generated and will reach soon at your postal address.",10003,Registration Processor,RPR_UIN_GEN_SMS,eng,TRUE,superadmin,now() -1113,Template for update details Email,Template for update details Email,txt,velocity,"Dear $!name_eng, +1113,Template for update details Email,Template for update details Email,txt,,"Dear $!name_eng, Your UIN details for the Registration ID: $!RID have been updated and a physical copy of your UIN card will reach you soon at your postal address. Thank You",10003,Registration Processor,RPR_UIN_UPD_EMAIL,eng,TRUE,superadmin,now() -1114,Template for update Details SMS,Template for update Details SMS,txt,velocity,"Dear $!name_eng, +1114,Template for update Details SMS,Template for update Details SMS,txt,,"Dear $!name_eng, Your UIN details for the Registration ID: $!RID have been updated and a physical copy of your UIN card will reach you soon at your postal address.",10003,Registration Processor,RPR_UIN_UPD_SMS,eng,TRUE,superadmin,now() -1107,قالب لبريد إلكتروني مكرر الهوية,قالب لبريد إلكتروني مكرر الهوية,txt,velocity,"$!name_ara، +1107,قالب لبريد إلكتروني مكرر الهوية,قالب لبريد إلكتروني مكرر الهوية,txt,,"$!name_ara، لقد فشل طلبك الخاص بـ UIN لمعرف التسجيل: $!RID لأنه تم العثور على UIN مكرر مقابل تفاصيلك. يرجى زيارة أقرب مكتب للتسجيل أو زيارة https://mosip.io/grievances شكرا جزيلا",10003,معالج التسجيل,RPR_DUP_UIN_EMAIL,ara,TRUE,superadmin,now() -1108,قالب لرسالة الهوية المكررة,قالب لرسالة الهوية المكررة,txt,velocity,"$!name_ara، +1108,قالب لرسالة الهوية المكررة,قالب لرسالة الهوية المكررة,txt,,"$!name_ara، لقد فشل طلبك الخاص بـ UIN لمعرف التسجيل: $!RID لأنه تم العثور على UIN مكرر مقابل تفاصيلك. يرجى زيارة أقرب مكتب للتسجيل أو زيارة https://mosip.io/grievances",10003,معالج التسجيل,RPR_DUP_UIN_SMS,ara,TRUE,superadmin,now() -1109,نموذج للبريد الإلكتروني لمشكلة فنية,نموذج للبريد الإلكتروني لمشكلة فنية,txt,velocity,"$!name_ara، +1109,نموذج للبريد الإلكتروني لمشكلة فنية,نموذج للبريد الإلكتروني لمشكلة فنية,txt,,"$!name_ara، طلبك لـ UIN لمعرف التسجيل: $!RID فشل بسبب مشكلة فنية. يرجى زيارة أقرب مكتب للتسجيل أو زيارة https://mosip.io/grievances شكرا جزيلا",10003,معالج التسجيل,RPR_TEC_ISSUE_EMAIL,ara,TRUE,superadmin,now() -1110,قالب لرسالة المشكلة الفنية,قالب لرسالة المشكلة الفنية,txt,velocity,"$!name_ara، +1110,قالب لرسالة المشكلة الفنية,قالب لرسالة المشكلة الفنية,txt,,"$!name_ara، طلبك لـ UIN لمعرف التسجيل: $!RID فشل بسبب مشكلة فنية. يرجى زيارة أقرب مكتب للتسجيل أو زيارة https://mosip.io/grievances",10003,معالج التسجيل,RPR_TEC_ISSUE_SMS,ara,TRUE,superadmin,now() -1111,قالب لتوليد الهوية البريد الإلكتروني,قالب لتوليد الهوية البريد الإلكتروني,txt,velocity,"$name_ara، +1111,قالب لتوليد الهوية البريد الإلكتروني,قالب لتوليد الهوية البريد الإلكتروني,txt,,"$name_ara، تم إنشاء رقم UIN الخاص بك لمعرف التسجيل: $!RID بنجاح وسيصل قريباً إلى عنوانك البريدي. شكرا جزيلا",10003,معالج التسجيل,RPR_UIN_GEN_EMAIL,ara,TRUE,superadmin,now() -1112,قالب لرسالة توليد الهوية,قالب لرسالة توليد الهوية,txt,velocity,"$name_ara، +1112,قالب لرسالة توليد الهوية,قالب لرسالة توليد الهوية,txt,,"$name_ara، تم إنشاء رقم UIN الخاص بك لمعرف التسجيل: $!RID بنجاح وسيصل قريباً إلى عنوانك البريدي.",10003,معالج التسجيل,RPR_UIN_GEN_SMS,ara,TRUE,superadmin,now() -1113,قالب للحصول على تفاصيل التحديث,قالب للحصول على تفاصيل التحديث,txt,velocity,"$!name_ara ، +1113,قالب للحصول على تفاصيل التحديث,قالب للحصول على تفاصيل التحديث,txt,,"$!name_ara ، تم تحديث تفاصيل UIN المطابقة لمعرف التسجيل: $!RID وسوف تصل إليك نسخة مادية من UIN في عنوانك البريدي قريبًا. شكرا",10003,معالج التسجيل,RPR_UIN_UPD_EMAIL,ara,TRUE,superadmin,now() -1114,قالب لتحديث تفاصيل الرسالة,قالب لتحديث تفاصيل الرسالة,txt,velocity,"$!name_ara ، +1114,قالب لتحديث تفاصيل الرسالة,قالب لتحديث تفاصيل الرسالة,txt,,"$!name_ara ، تم تحديث تفاصيل UIN المطابقة لمعرف التسجيل: $!RID وسوف تصل إليك نسخة مادية من UIN في عنوانك البريدي قريبًا.",10003,معالج التسجيل,RPR_UIN_UPD_SMS,ara,TRUE,superadmin,now() -1107,Modèle de courrier didentité en double,Modèle de courrier didentité en double,txt,velocity,"Cher $!name_fra, +1107,Modèle de courrier didentité en double,Modèle de courrier didentité en double,txt,,"Cher $!name_fra, Votre demande d'UIN pour l'ID d'enregistrement: $!RID a échoué car un duplicata d'UIN a été trouvé par rapport à vos informations. Veuillez vous rendre au bureau d’enregistrement le plus proche ou sur https://mosip.io/grievances Merci",10003,Processeur dinscription,RPR_DUP_UIN_EMAIL,fra,TRUE,superadmin,now() -1108,Modèle de message didentité en double,Modèle de message didentité en double,txt,velocity,"Cher $!name_fra, +1108,Modèle de message didentité en double,Modèle de message didentité en double,txt,,"Cher $!name_fra, Votre demande d'UIN pour l'ID d'enregistrement: $!RID a échoué car un duplicata d'UIN a été trouvé par rapport à vos informations. Veuillez vous rendre au bureau d’enregistrement le plus proche ou sur https://mosip.io/grievances",10003,Processeur dinscription,RPR_DUP_UIN_SMS,fra,TRUE,superadmin,now() -1109,Modèle pour courrier électronique de problème technique,Modèle pour courrier électronique de problème technique,txt,velocity,"Cher $!name_fra, +1109,Modèle pour courrier électronique de problème technique,Modèle pour courrier électronique de problème technique,txt,,"Cher $!name_fra, Votre demande d'UIN pour l'ID d'enregistrement: $!RID a échoué en raison d'un problème technique. Veuillez vous rendre au bureau d’enregistrement le plus proche ou sur https://mosip.io/grievances Merci",10003,Processeur dinscription,RPR_TEC_ISSUE_EMAIL,fra,TRUE,superadmin,now() -1110,Modèle de message de problème technique,Modèle de message de problème technique,txt,velocity,"Cher $!name_fra, +1110,Modèle de message de problème technique,Modèle de message de problème technique,txt,,"Cher $!name_fra, Votre demande d'UIN pour l'ID d'enregistrement: $!RID a échoué en raison d'un problème technique. Veuillez vous rendre au bureau d’enregistrement le plus proche ou sur https://mosip.io/grievances",10003,Processeur dinscription,RPR_TEC_ISSUE_SMS,fra,TRUE,superadmin,now() -1111,Modèle de courrier électronique de génération didentité,Modèle de courrier électronique de génération didentité,txt,velocity,"Cher $!name_fra, +1111,Modèle de courrier électronique de génération didentité,Modèle de courrier électronique de génération didentité,txt,,"Cher $!name_fra, Votre UIN pour ID d’enregistrement: $!RID a été généré avec succès et vous parviendra sous peu à votre adresse postale. Merci",10003,Processeur dinscription,RPR_UIN_GEN_EMAIL,fra,TRUE,superadmin,now() -1112,Modèle de message de génération didentité,Modèle de message de génération didentité,txt,velocity,"Cher $!name_fra, +1112,Modèle de message de génération didentité,Modèle de message de génération didentité,txt,,"Cher $!name_fra, Votre UIN pour ID d’enregistrement: $!RID a été généré avec succès et vous parviendra sous peu à votre adresse postale.",10003,Processeur dinscription,RPR_UIN_GEN_SMS,fra,TRUE,superadmin,now() -1113,Modèle pour les détails de la mise à jour Email,Modèle pour les détails de la mise à jour Email,txt,velocity,"Cher $!name_fra, +1113,Modèle pour les détails de la mise à jour Email,Modèle pour les détails de la mise à jour Email,txt,,"Cher $!name_fra, Les détails de votre UIN correspondant à l’ID d’enregistrement: $!RID ont été mis à jour. Une copie physique de votre UIN vous parviendra sous peu à votre adresse postale. Merci",10003,Processeur dinscription,RPR_UIN_UPD_EMAIL,fra,TRUE,superadmin,now() -1114,Modèle pour la mise à jour Détails Message,Modèle pour la mise à jour Détails Message,txt,velocity,"Cher $!name_fra, +1114,Modèle pour la mise à jour Détails Message,Modèle pour la mise à jour Détails Message,txt,,"Cher $!name_fra, Les détails de votre UIN correspondant à l’ID d’enregistrement: $!RID ont été mis à jour. Une copie physique de votre UIN vous parviendra sous peu à votre adresse postale.",10003,Processeur dinscription,RPR_UIN_UPD_SMS,fra,TRUE,superadmin,now() -1115,Template for new registration Email Content,Template for new registration Email Content,txt,velocity,"Dear $name, +1115,Template for new registration Email Content,Template for new registration Email Content,txt,,"Dear $name, Thank you for registering with the digital identity platform. Your registration id is $RegistrationID. If there are any corrections to be made in your details, please contact the Registration centre within the next 4 days.",10002,Registration Client,NewReg-email-content-template,eng,TRUE,superadmin,now() -1116,Template for new registration Email Subject,Template for new registration Email Subject,txt,velocity,Registration confirmation,10002,Registration Client,NewReg-email-subject-template,eng,TRUE,superadmin,now() -1117,Template for new registration SMS,Template for new registration SMS,txt,velocity,"Dear $name, +1116,Template for new registration Email Subject,Template for new registration Email Subject,txt,,Registration confirmation,10002,Registration Client,NewReg-email-subject-template,eng,TRUE,superadmin,now() +1117,Template for new registration SMS,Template for new registration SMS,txt,,"Dear $name, Thank you for registering with the digital identity platform. Your registration id is $RegistrationID. If there are any corrections to be made in your details, please contact the Registration centre within the next 4 days. ",10002,Registration Client,NewReg-sms-template,eng,TRUE,superadmin,now() -1118,Template for OTP generation Email Content,Template for OTP generation Email Content,txt,velocity,"Dear $name, +1118,Template for OTP generation Email Content,Template for OTP generation Email Content,txt,,"Dear $name, OTP for username $username is $otp and is valid for $validTime minutes (Generated on $date at $time hrs).",10002,Registration Client,OTP-email-content-template,eng,TRUE,superadmin,now() -1119,Template for OTP generation Email Subject,Template for OTP generation Email Subject,txt,velocity,One time password from digital identify platfor,10002,Registration Client,OTP-email-subject-template,eng,TRUE,superadmin,now() -1120,Template for OTP SMS,Template for OTP SMS,txt,velocity,"Dear $name, +1119,Template for OTP generation Email Subject,Template for OTP generation Email Subject,txt,,One time password from digital identify platfor,10002,Registration Client,OTP-email-subject-template,eng,TRUE,superadmin,now() +1120,Template for OTP SMS,Template for OTP SMS,txt,,"Dear $name, OTP for username $username is $otp and is valid for $validTime minutes (Generated on $date at $time hrs).",10002,Registration Client,OTP-sms-template,eng,TRUE,superadmin,now() -1121,Template for update registration Email Content,Template for update registration Email Content,txt,velocity,"Dear $name, +1121,Template for update registration Email Content,Template for update registration Email Content,txt,,"Dear $name, Thank you for updating your details with the digital identity platform. Your registration id is $RegistrationID. If there are any corrections to be made in your details, please contact the Registration centre within the next 4 days.",10002,Registration Client,Update-email-content-template,eng,TRUE,superadmin,now() -1122,Template for update registration Email Subject,Template for update registration Email Subject,txt,velocity,Registration update confirmation,10002,Registration Client,Update-email-subject-template,eng,TRUE,superadmin,now() -1123,Template for update registration SMS,Template for update registration SMS,txt,velocity,"Dear $name, +1122,Template for update registration Email Subject,Template for update registration Email Subject,txt,,Registration update confirmation,10002,Registration Client,Update-email-subject-template,eng,TRUE,superadmin,now() +1123,Template for update registration SMS,Template for update registration SMS,txt,,"Dear $name, Thank you for updating your details with the digital identity platform. Your registration id is $RegistrationID. If there are any corrections to be made in your details, please contact the Registration centre within the next 4 days.",10002,Registration Client,Update-sms-template,eng,TRUE,superadmin,now() -1115,قالب للتسجيل الجديد محتوى البريد الإلكتروني,قالب للتسجيل الجديد محتوى البريد الإلكتروني,txt,velocity,"$name ، +1115,قالب للتسجيل الجديد محتوى البريد الإلكتروني,قالب للتسجيل الجديد محتوى البريد الإلكتروني,txt,,"$name ، نشكرك على التسجيل في منصة الهوية الرقمية. رقم التسجيل الخاص بك هو $RegistrationID. إذا كان هناك أي تصحيحات يتم إدخالها في تفاصيلك ، يرجى الاتصال بمركز التسجيل في غضون 4 أيام مقبلة.",10002,عميل التسجيل,NewReg-email-content-template,ara,TRUE,superadmin,now() -1116,قالب للتسجيل الجديد البريد الإلكتروني الموضوع,قالب للتسجيل الجديد البريد الإلكتروني الموضوع,txt,velocity,تأكيد التسجيل,10002,عميل التسجيل,NewReg-email-subject-template,ara,TRUE,superadmin,now() -1117,قالب لرسالة التسجيل الجديدة,قالب لرسالة التسجيل الجديدة,txt,velocity,"$name ، +1116,قالب للتسجيل الجديد البريد الإلكتروني الموضوع,قالب للتسجيل الجديد البريد الإلكتروني الموضوع,txt,,تأكيد التسجيل,10002,عميل التسجيل,NewReg-email-subject-template,ara,TRUE,superadmin,now() +1117,قالب لرسالة التسجيل الجديدة,قالب لرسالة التسجيل الجديدة,txt,,"$name ، نشكرك على التسجيل في منصة الهوية الرقمية. رقم التسجيل الخاص بك هو $RegistrationID. إذا كان هناك أي تصحيحات يتم إدخالها في تفاصيلك ، يرجى الاتصال بمركز التسجيل في غضون 4 أيام مقبلة.",10002,عميل التسجيل,NewReg-sms-template,ara,TRUE,superadmin,now() -1118,قالب لتوليد OTP محتوى البريد الإلكتروني,قالب لتوليد OTP محتوى البريد الإلكتروني,txt,velocity,"$name ، +1118,قالب لتوليد OTP محتوى البريد الإلكتروني,قالب لتوليد OTP محتوى البريد الإلكتروني,txt,,"$name ، OTP لاسم المستخدم $username هو $otp وصالحة لدقائق $validTime (منشأ على $date في $time hrs).",10002,عميل التسجيل,OTP-email-content-template,ara,TRUE,superadmin,now() -1119,قالب لتوليد OTP البريد الإلكتروني الموضوع,قالب لتوليد OTP البريد الإلكتروني الموضوع,txt,velocity,كلمة مرور مرة واحدة من منصة تحديد الرقمية,10002,عميل التسجيل,OTP-email-subject-template,ara,TRUE,superadmin,now() -1120,قالب لرسالة OTP,قالب لرسالة OTP,txt,velocity,"$name ، +1119,قالب لتوليد OTP البريد الإلكتروني الموضوع,قالب لتوليد OTP البريد الإلكتروني الموضوع,txt,,كلمة مرور مرة واحدة من منصة تحديد الرقمية,10002,عميل التسجيل,OTP-email-subject-template,ara,TRUE,superadmin,now() +1120,قالب لرسالة OTP,قالب لرسالة OTP,txt,,"$name ، OTP لاسم المستخدم $username هو $otp وصالحة لدقائق $validTime (منشأ على $date في $time hrs).",10002,عميل التسجيل,OTP-sms-template,ara,TRUE,superadmin,now() -1121,قالب لتحديث تسجيل محتوى البريد الإلكتروني,قالب لتحديث تسجيل محتوى البريد الإلكتروني,txt,velocity,"$name ، +1121,قالب لتحديث تسجيل محتوى البريد الإلكتروني,قالب لتحديث تسجيل محتوى البريد الإلكتروني,txt,,"$name ، شكرا لتحديث التفاصيل الخاصة بك مع منصة الهوية الرقمية. رقم التسجيل الخاص بك هو $RegistrationID. إذا كان هناك أي تصحيحات يتم إدخالها في تفاصيلك ، يرجى الاتصال بمركز التسجيل في غضون 4 أيام مقبلة",10002,عميل التسجيل,Update-email-content-template,ara,TRUE,superadmin,now() -1122,قالب لتسجيل التحديث البريد الإلكتروني الموضوع,قالب لتسجيل التحديث البريد الإلكتروني الموضوع,txt,velocity,تأكيد تحديث التسجيل,10002,عميل التسجيل,Update-email-subject-template,ara,TRUE,superadmin,now() -1123,قالب لرسالة تسجيل التحديث,قالب لرسالة تسجيل التحديث,txt,velocity,"$name ، +1122,قالب لتسجيل التحديث البريد الإلكتروني الموضوع,قالب لتسجيل التحديث البريد الإلكتروني الموضوع,txt,,تأكيد تحديث التسجيل,10002,عميل التسجيل,Update-email-subject-template,ara,TRUE,superadmin,now() +1123,قالب لرسالة تسجيل التحديث,قالب لرسالة تسجيل التحديث,txt,,"$name ، شكرا لتحديث التفاصيل الخاصة بك مع منصة الهوية الرقمية. رقم التسجيل الخاص بك هو $ RegistrationID. إذا كان هناك أي تصحيحات يتم إدخالها في تفاصيلك ، يرجى الاتصال بمركز التسجيل في غضون 4 أيام مقبلة.",10002,عميل التسجيل,Update-sms-template,ara,TRUE,superadmin,now() -1115,Modèle pour nouvelle inscription Email Content,Modèle pour nouvelle inscription Email Content,txt,velocity,"Cher $name, +1115,Modèle pour nouvelle inscription Email Content,Modèle pour nouvelle inscription Email Content,txt,,"Cher $name, Merci de vous être inscrit sur la plateforme d'identité numérique. Votre identifiant d'enregistrement est $RegistrationID. Si des corrections doivent être apportées à vos données, veuillez contacter le centre d’inscription dans les 4 prochains jours.",10002,Client dinscription,NewReg-email-content-template,fra,TRUE,superadmin,now() -1116,Modèle pour nouvelle inscription Objet de le-mail,Modèle pour nouvelle inscription Objet de le-mail,txt,velocity,Confirmation d'enregistrement,10002,Client dinscription,NewReg-email-subject-template,fra,TRUE,superadmin,now() -1117,Modèle de nouvelle inscription SMS,Modèle de nouvelle inscription SMS,txt,velocity,"Cher $name, +1116,Modèle pour nouvelle inscription Objet de le-mail,Modèle pour nouvelle inscription Objet de le-mail,txt,,Confirmation d'enregistrement,10002,Client dinscription,NewReg-email-subject-template,fra,TRUE,superadmin,now() +1117,Modèle de nouvelle inscription SMS,Modèle de nouvelle inscription SMS,txt,,"Cher $name, Merci de vous être inscrit sur la plateforme d'identité numérique. Votre identifiant d'enregistrement est $RegistrationID. Si des corrections doivent être apportées à vos données, veuillez contacter le centre d’inscription dans les 4 prochains jours.",10002,Client dinscription,NewReg-sms-template,fra,TRUE,superadmin,now() -1118,Modèle de contenu de courrier électronique de génération dOTP,Modèle de contenu de courrier électronique de génération dOTP,txt,velocity,"Cher $name, +1118,Modèle de contenu de courrier électronique de génération dOTP,Modèle de contenu de courrier électronique de génération dOTP,txt,,"Cher $name, OTP pour le nom d'utilisateur $username est $otp et est valide pour $validTime minutes (Généré le $date à $heure hrs).",10002,Client dinscription,OTP-email-content-template,fra,TRUE,superadmin,now() -1119,Modèle pour le sujet de-mail de génération dOTP,Modèle pour le sujet de-mail de génération dOTP,txt,velocity,Mot de passe unique de la plateforme d'identification numérique,10002,Client dinscription,OTP-email-subject-template,fra,TRUE,superadmin,now() -1120,Modèle pour SMS OTP,Modèle pour SMS OTP,txt,velocity,"Cher $name, +1119,Modèle pour le sujet de-mail de génération dOTP,Modèle pour le sujet de-mail de génération dOTP,txt,,Mot de passe unique de la plateforme d'identification numérique,10002,Client dinscription,OTP-email-subject-template,fra,TRUE,superadmin,now() +1120,Modèle pour SMS OTP,Modèle pour SMS OTP,txt,,"Cher $name, OTP pour le nom d'utilisateur $username est $otp et est valide pour $validTime minutes (Généré le $date à $heure hrs).",10002,Client dinscription,OTP-sms-template,fra,TRUE,superadmin,now() -1121,Modèle pour lenregistrement de la mise à jour,Modèle pour lenregistrement de la mise à jour,txt,velocity,"Cher $name, +1121,Modèle pour lenregistrement de la mise à jour,Modèle pour lenregistrement de la mise à jour,txt,,"Cher $name, Merci de mettre à jour vos coordonnées avec la plateforme d’identité numérique. Votre identifiant d'enregistrement est $RegistrationID. Si des corrections doivent être apportées à vos données, veuillez contacter le centre d’inscription dans les 4 prochains jours.",10002,Client dinscription,Update-email-content-template,fra,TRUE,superadmin,now() -1122,Modèle denregistrement de mise à jour Objet de le-mail,Modèle denregistrement de mise à jour Objet de le-mail,txt,velocity,Confirmation de la mise à jour de l'inscription,10002,Client dinscription,Update-email-subject-template,fra,TRUE,superadmin,now() -1123,Modèle pour SMS denregistrement de mise à jour,Modèle pour SMS denregistrement de mise à jour,txt,velocity,"Merci de mettre à jour vos coordonnées avec la plateforme d’identité numérique. Votre identifiant d'enregistrement est $RegistrationID. Si des corrections doivent être apportées à vos données, veuillez contacter le centre d’inscription dans les 4 prochains jours.",10002,Client dinscription,Update-sms-template,fra,TRUE,superadmin,now() -1124,Template for Email Acknowledgement,Template for Email Acknowledgement,txt,velocity,"Dear $name, +1122,Modèle denregistrement de mise à jour Objet de le-mail,Modèle denregistrement de mise à jour Objet de le-mail,txt,,Confirmation de la mise à jour de l'inscription,10002,Client dinscription,Update-email-subject-template,fra,TRUE,superadmin,now() +1123,Modèle pour SMS denregistrement de mise à jour,Modèle pour SMS denregistrement de mise à jour,txt,,"Merci de mettre à jour vos coordonnées avec la plateforme d’identité numérique. Votre identifiant d'enregistrement est $RegistrationID. Si des corrections doivent être apportées à vos données, veuillez contacter le centre d’inscription dans les 4 prochains jours.",10002,Client dinscription,Update-sms-template,fra,TRUE,superadmin,now() +1124,Template for Email Acknowledgement,Template for Email Acknowledgement,txt,,"Dear $name, Your Pre-Registration for UIN is Completed Successfully on $Date at $Time. Your ID is #$PRID. Appointment is scheduled for $Appointmentdate at $Appointmenttime. you will also receive the details on your registered Mobile Number",10001,Pre-Registration,Email-Acknowledgement,eng,TRUE,superadmin,now() -1125,Template for Onscreen Acknowledgment,Template for Onscreen Acknowledgment,txt,velocity,"1. Guideline 1 +1125,Template for Onscreen Acknowledgment,Template for Onscreen Acknowledgment,txt,,"1. Guideline 1 2. Guideline 2 3. Guideline 3 4. Guideline 4 @@ -167,17 +167,17 @@ you will also receive the details on your registered Mobile Number",10001,Pre-Re 9. Guideline 9 10. Guideline 10 ",10001,Pre-Registration,Onscreen-Acknowledgement,eng,TRUE,superadmin,now() -1126,Template for OTP Email Content,Template for OTP Email Content,txt,velocity,"Dear $name, +1126,Template for OTP Email Content,Template for OTP Email Content,txt,,"Dear $name, TP for Pre-Registration $PRID is $otp and is valid for $validTime minutes. (Generated on $date at $time Hrs)",10001,Pre-Registration,otp-email-content-template,eng,TRUE,superadmin,now() -1127,Template for OTP Email Subject,Template for OTP Email Subject,txt,velocity,Pre-Registration $PRID: OTP Request,10001,Pre-Registration,otp-email-subject-template,eng,TRUE,superadmin,now() -1128,Template for OTP SMS,Template for OTP SMS,txt,velocity,OTP for Pre-Registration $PRID is $otp and is valid for $validTime minutes. (Generated on $date at $time Hrs),10001,Pre-Registration,otp-sms-template,eng,TRUE,superadmin,now() -1129,Template for SMS Acknowledgement,Template for SMS Acknowledgement,txt,velocity,"Your Pre-Registration for UIN is Completed Successfully +1127,Template for OTP Email Subject,Template for OTP Email Subject,txt,,Pre-Registration $PRID: OTP Request,10001,Pre-Registration,otp-email-subject-template,eng,TRUE,superadmin,now() +1128,Template for OTP SMS,Template for OTP SMS,txt,,OTP for Pre-Registration $PRID is $otp and is valid for $validTime minutes. (Generated on $date at $time Hrs),10001,Pre-Registration,otp-sms-template,eng,TRUE,superadmin,now() +1129,Template for SMS Acknowledgement,Template for SMS Acknowledgement,txt,,"Your Pre-Registration for UIN is Completed Successfully on $Date at $Time. Your ID is #$PRID. Appointment is scheduled for $Appointmentdate at $Appointmenttime. you will also receive the details on your registered email address",10001,Pre-Registration,SMS-Acknowledgement,eng,TRUE,superadmin,now() -1124,قالب لتأكيد البريد الإلكتروني,قالب لتأكيد البريد الإلكتروني,txt,velocity,"$name ، +1124,قالب لتأكيد البريد الإلكتروني,قالب لتأكيد البريد الإلكتروني,txt,,"$name ، تم الانتهاء من التسجيل المسبق ل uin بنجاح علي $Date في $Time. رقم التعريف الخاص بك هو # $PRID. ومن المقرر تعيين $Appointmentdate في $Appointmenttime. ",10001,ما قبل التسجيل,Email-Acknowledgement,ara,TRUE,superadmin,now() -1125,قالب للشاشة شكر وتقدير,قالب للشاشة شكر وتقدير,txt,velocity,"1. المبدا التوجيهي 1 +1125,قالب للشاشة شكر وتقدير,قالب للشاشة شكر وتقدير,txt,,"1. المبدا التوجيهي 1 2. المبدا التوجيهي 2 3. المبدا التوجيهي 3 4. المبدا التوجيهي 4 @@ -187,20 +187,20 @@ you will also receive the details on your registered email address",10001,Pre-Re 8. المبدا التوجيهي 8 9. المبدا التوجيهي 9 10. المبدا التوجيهي 10",10001,ما قبل التسجيل,Onscreen-Acknowledgement,ara,TRUE,superadmin,now() -1126,قالب لمحتوى البريد الإلكتروني OTP,قالب لمحتوى البريد الإلكتروني OTP,txt,velocity,"$name ، +1126,قالب لمحتوى البريد الإلكتروني OTP,قالب لمحتوى البريد الإلكتروني OTP,txt,,"$name ، OTP لـ Pre-Registration $PRID هو $otp وهو صالح لمدة $validTime دقيقة. (التي تم إنشاؤها على $date في $time ساعات)",10001,ما قبل التسجيل,otp-email-content-template,ara,TRUE,superadmin,now() -1127,قالب لموضوع البريد الإلكتروني OTP,قالب لموضوع البريد الإلكتروني OTP,txt,velocity,Pre-Registration $PRID: OTP Request,10001,ما قبل التسجيل,otp-email-subject-template,ara,TRUE,superadmin,now() -1128,قالب ل OTP SMS,قالب ل OTP SMS,txt,velocity,OTP لـ Pre-Registration $PRID هو $otp وهو صالح لمدة $validTime دقيقة. (التي تم إنشاؤها على $date في $time ساعات),10001,ما قبل التسجيل,otp-sms-template,ara,TRUE,superadmin,now() -1129,قالب للإشعار SMS,قالب للإشعار SMS,txt,velocity," +1127,قالب لموضوع البريد الإلكتروني OTP,قالب لموضوع البريد الإلكتروني OTP,txt,,Pre-Registration $PRID: OTP Request,10001,ما قبل التسجيل,otp-email-subject-template,ara,TRUE,superadmin,now() +1128,قالب ل OTP SMS,قالب ل OTP SMS,txt,,OTP لـ Pre-Registration $PRID هو $otp وهو صالح لمدة $validTime دقيقة. (التي تم إنشاؤها على $date في $time ساعات),10001,ما قبل التسجيل,otp-sms-template,ara,TRUE,superadmin,now() +1129,قالب للإشعار SMS,قالب للإشعار SMS,txt,," تم الانتهاء من التسجيل المسبق ل uin بنجاح علي $Date في $Time. رقم التعريف الخاص بك هو # $PRID. ومن المقرر تعيين $Appointmentdate في $Appointmenttime. سوف تتلقي أيضا التفاصيل علي عنوان البريد الكتروني المسجل الخاص بك",10001,ما قبل التسجيل,SMS-Acknowledgement,ara,TRUE,superadmin,now() -1124,Template for email confirmation,Template for email confirmation,txt,velocity,"Cher $name, +1124,Template for email confirmation,Template for email confirmation,txt,,"Cher $name, votre pré-inscription à l'UIN est terminée avec succès sur $Date à $Time. Votre ID est # $PRID. Le rendez-vous est prévu pour $Appointmentdate à $Appointmenttime. vous recevrez également les détails sur votre numéro de mobile enregistré",10001,Pré-inscription,Email-Acknowledgement,fra,TRUE,superadmin,now() -1125,On-screen recognition template,On-screen recognition template,txt,velocity,"1. Ligne directrice 1 +1125,On-screen recognition template,On-screen recognition template,txt,,"1. Ligne directrice 1 2. Ligne directrice 2 3. Ligne directrice 3 4. Ligne directrice 4 @@ -210,18 +210,18 @@ vous recevrez également les détails sur votre numéro de mobile enregistré",1 8. Ligne directrice 8 9. Ligne directrice 9 10. Ligne directrice 10",10001,Pré-inscription,Onscreen-Acknowledgement,fra,TRUE,superadmin,now() -1126,OTP Email Content Template,OTP Email Content Template,txt,velocity,"Cher $name, +1126,OTP Email Content Template,OTP Email Content Template,txt,,"Cher $name, OTP pour Pre-Registration $PRID est $otp et est valide pour $validTime minutes. (Généré le $date à $time Hrs)",10001,Pré-inscription,otp-email-content-template,fra,TRUE,superadmin,now() -1127,Template for OTP email subject,Template for OTP email subject,txt,velocity,Pre-Registration $PRID: Requête OTP,10001,Pré-inscription,otp-email-subject-template,fra,TRUE,superadmin,now() -1128,Template for OTP SMS,Template for OTP SMS,txt,velocity,OTP pour Pre-Registration $PRID est $otp et est valide pour $validTime minutes. (Généré le $date à $time Hrs),10001,Pré-inscription,otp-sms-template,fra,TRUE,superadmin,now() -1129,Template for SMS Acknowledgment,Template for SMS Acknowledgment,txt,velocity,"Votre pré-inscription pour UIN est terminée avec succès sur $Date à $Time. +1127,Template for OTP email subject,Template for OTP email subject,txt,,Pre-Registration $PRID: Requête OTP,10001,Pré-inscription,otp-email-subject-template,fra,TRUE,superadmin,now() +1128,Template for OTP SMS,Template for OTP SMS,txt,,OTP pour Pre-Registration $PRID est $otp et est valide pour $validTime minutes. (Généré le $date à $time Hrs),10001,Pré-inscription,otp-sms-template,fra,TRUE,superadmin,now() +1129,Template for SMS Acknowledgment,Template for SMS Acknowledgment,txt,,"Votre pré-inscription pour UIN est terminée avec succès sur $Date à $Time. Votre ID est # $PRID. Le rendez-vous est prévu pour $Appointmentdate à $Appointmenttime. vous recevrez également les détails sur votre adresse email enregistrée",10001,Pré-inscription,SMS-Acknowledgement,fra,TRUE,superadmin,now() -1130,Template for email subject of Acknowledgement,Template for email subject of Acknowledgement,txt,velocity,Pre-Registration $PRID: Acknowledgement ,10001,Pre-Registration,Acknowledgement-email-subject,eng,TRUE,superadmin,now() -1130,Modèle pour le sujet d'email d'accusé de réception,Modèle pour le sujet d'email d'accusé de réception,txt,velocity,Pré-inscription $PRID: accusé de réception ,10001,Pré-inscription,Acknowledgement-email-subject,fra,TRUE,superadmin,now() -1130,قالب للتسليم البريد الكتروني الموضوع,قالب للتسليم البريد الكتروني الموضوع,txt,velocity,$PRID التسجيل المسبق: شكر,10001,ما قبل التسجيل,Acknowledgement-email-subject,ara,TRUE,superadmin,now() -1131,UIN card template,UIN card template,html,velocity," +1130,Template for email subject of Acknowledgement,Template for email subject of Acknowledgement,txt,,Pre-Registration $PRID: Acknowledgement ,10001,Pre-Registration,Acknowledgement-email-subject,eng,TRUE,superadmin,now() +1130,Modèle pour le sujet d'email d'accusé de réception,Modèle pour le sujet d'email d'accusé de réception,txt,,Pré-inscription $PRID: accusé de réception ,10001,Pré-inscription,Acknowledgement-email-subject,fra,TRUE,superadmin,now() +1130,قالب للتسليم البريد الكتروني الموضوع,قالب للتسليم البريد الكتروني الموضوع,txt,,$PRID التسجيل المسبق: شكر,10001,ما قبل التسجيل,Acknowledgement-email-subject,ara,TRUE,superadmin,now() +1131,UIN card template,UIN card template,html,," @@ -367,7 +367,7 @@ Tech Park, Mysore Rd,RVCE,Bengaluru, Karnataka 560059
",10003,Registration Processor,RPR_UIN_CARD_TEMPLATE,eng,TRUE,superadmin,now() -1131,قالب بطاقة UIN,قالب بطاقة UIN,html,velocity," +1131,قالب بطاقة UIN,قالب بطاقة UIN,html,," @@ -513,7 +513,7 @@ Parc technologique, Mysore Rd, RVCE, Bangalore, Karnataka 560059
",10003,معالج التسجيل,RPR_UIN_CARD_TEMPLATE,ara,TRUE,superadmin,now() -1131,Modèle de carte UIN,Modèle de carte UIN,html,velocity," +1131,Modèle de carte UIN,Modèle de carte UIN,html,," @@ -659,61 +659,61 @@ Parc technologique, Mysore Rd, RVCE, Bangalore, Karnataka 560059
",10003,Processeur dinscription,RPR_UIN_CARD_TEMPLATE,fra,TRUE,superadmin,now() -1132,Template for UIN Deactivation SMS,Template for UIN Deactivation SMS,txt,velocity,"Dear $!name_eng, +1132,Template for UIN Deactivation SMS,Template for UIN Deactivation SMS,txt,,"Dear $!name_eng, Your UIN has been de-activated. If you have any conserns please visit the nearest Registration Center.",10003,Registration Processor,RPR_UIN_DEAC_SMS,eng,TRUE,superadmin,now() -1132,قالب لتعطيل UIN SMS,قالب لتعطيل UIN SMS,txt,velocity,"$!name_ara ، +1132,قالب لتعطيل UIN SMS,قالب لتعطيل UIN SMS,txt,,"$!name_ara ، تم إلغاء تنشيط UIN الخاص بك. إذا كان لديك أي مواصلات ، يرجى زيارة أقرب مركز للتسجيل.",10003,معالج التسجيل,RPR_UIN_DEAC_SMS,ara,TRUE,superadmin,now() -1132,Modèle pour courrier électronique de problème technique,Modèle pour courrier électronique de problème technique,txt,velocity,"Cher $!name_fra, +1132,Modèle pour courrier électronique de problème technique,Modèle pour courrier électronique de problème technique,txt,,"Cher $!name_fra, Votre UIN a été désactivé. Si vous avez des intérêts, veuillez vous rendre au centre d’enregistrement le plus proche.",10003,Processeur dinscription,RPR_UIN_DEAC_SMS,fra,TRUE,superadmin,now() -1133,Template for UIN Deactivation Email,Template for UIN Deactivation Email,txt,velocity,"Dear $!name_eng, +1133,Template for UIN Deactivation Email,Template for UIN Deactivation Email,txt,,"Dear $!name_eng, Your UIN has been de-activated. If you have any conserns please visit the nearest Registration Center. Thank You",10003,Registration Processor,RPR_UIN_DEAC_EMAIL,eng,TRUE,superadmin,now() -1133,قالب لإلغاء تنشيط البريد,قالب لإلغاء تنشيط البريد,txt,velocity,"$!name_ara ، +1133,قالب لإلغاء تنشيط البريد,قالب لإلغاء تنشيط البريد,txt,,"$!name_ara ، تم إلغاء تنشيط UIN الخاص بك. إذا كان لديك أي مواصلات ، يرجى زيارة أقرب مركز للتسجيل. شكرا",10003,معالج التسجيل,RPR_UIN_DEAC_EMAIL,ara,TRUE,superadmin,now() -1133,Modèle pour courrier électronique de problème technique,Modèle pour courrier électronique de problème technique,txt,velocity,"Cher $!name_fra, +1133,Modèle pour courrier électronique de problème technique,Modèle pour courrier électronique de problème technique,txt,,"Cher $!name_fra, Votre UIN a été désactivé. Si vous avez des intérêts, veuillez vous rendre au centre d’enregistrement le plus proche. Merci",10003,Processeur dinscription,RPR_UIN_DEAC_EMAIL,fra,TRUE,superadmin,now() -1134,Template for UIN Reactivate SMS,Template for UIN Reactivate SMS,txt,velocity,"Dear $!name_eng, +1134,Template for UIN Reactivate SMS,Template for UIN Reactivate SMS,txt,,"Dear $!name_eng, Your UIN has been re-activated. If you have any conserns please visit the nearest Registration Center.",10003,Registration Processor,RPR_UIN_REAC_SMS,eng,TRUE,superadmin,now() -1134,قالب لـ UIN تنشيط SMS,قالب لـ UIN تنشيط SMS,txt,velocity,"$!name_ara ، +1134,قالب لـ UIN تنشيط SMS,قالب لـ UIN تنشيط SMS,txt,,"$!name_ara ، تمت إعادة تنشيط UIN الخاص بك. إذا كان لديك أي مواصلات ، يرجى زيارة أقرب مركز للتسجيل.",10003,معالج التسجيل,RPR_UIN_REAC_SMS,ara,TRUE,superadmin,now() -1134,Modèle pour courrier électronique de problème technique,Modèle pour courrier électronique de problème technique,txt,velocity,"Cher $!name_fra, +1134,Modèle pour courrier électronique de problème technique,Modèle pour courrier électronique de problème technique,txt,,"Cher $!name_fra, Votre UIN a été réactivé. Si vous avez des intérêts, veuillez vous rendre au centre d’enregistrement le plus proche.",10003,Processeur dinscription,RPR_UIN_REAC_SMS,fra,TRUE,superadmin,now() -1135,Template for UIN Reactivate Email,Template for UIN Reactivate Email,txt,velocity,"Dear $!name_eng, +1135,Template for UIN Reactivate Email,Template for UIN Reactivate Email,txt,,"Dear $!name_eng, Your UIN has been re-activated. If you have any conserns please visit the nearest Registration Center. Thank You",10003,Registration Processor,RPR_UIN_REAC_EMAIL,eng,TRUE,superadmin,now() -1135,قالب لـ UIN تنشيط البريد,قالب لـ UIN تنشيط البريد,txt,velocity,"$!name_ara ، +1135,قالب لـ UIN تنشيط البريد,قالب لـ UIN تنشيط البريد,txt,,"$!name_ara ، تمت إعادة تنشيط UIN الخاص بك. إذا كان لديك أي مواصلات ، يرجى زيارة أقرب مركز للتسجيل. شكرا",10003,معالج التسجيل,RPR_UIN_REAC_EMAIL,ara,TRUE,superadmin,now() -1135,Modèle pour courrier électronique de problème technique,Modèle pour courrier électronique de problème technique,txt,velocity,"Cher $!name_fra, +1135,Modèle pour courrier électronique de problème technique,Modèle pour courrier électronique de problème technique,txt,,"Cher $!name_fra, Votre UIN a été réactivé. Si vous avez des intérêts, veuillez vous rendre au centre d’enregistrement le plus proche. @@ -809,10 +809,22 @@ Merci de vous être inscrit sur la plateforme d'identité numérique. Votre iden 11. Code postal: ${POSTALCODE} 12. Numéro de mobile: ${PHONE} 13. Email: ${EMAIL}",10005,Inscription,reg-email-notification,fra,TRUE,superadmin,now() -preregistration,otp service,OTP Send Service,txt,velocity,Please find the OTP $otp,10001,Pre-Registration,otp-sms-template,eng ,TRUE,superadmin,now() -ida,otp service,OTP Send Service,txt,velocity,Please find the OTP $otp,10002,login,otp-sms-template,eng ,TRUE,superadmin,now() -registrationprocessor,otp service,OTP Send Service,txt,velocity,Please find the OTP $!otp,10003,login,otp-sms-template,eng ,TRUE,superadmin,now() -registrationclient,otp service,OTP Send Service,txt,velocity,Please find the OTP $otp,10004,ID Authentication,otp-sms-template,eng ,TRUE,superadmin,now() +1138,Registration Acknowledgement Template - Part 1,Acknowledgement generated after registration - Part 1,txt,velocity,"",10005,Registration,reg-ack-template-part1,eng,TRUE,superadmin,now() +1138,إقرار تم إنشاؤه بعد التسجيل - الجزء 1,قالب الاعتراف بالتسجيل - الجزء 1,txt,velocity,"",10005,التسجيل,reg-ack-template-part1,ara,TRUE,superadmin,now() +1138,enregistrement Modèle de remerciement - Partie 1,Accusé de réception généré après lenregistrement - Partie 1,txt,velocity,"",10005,Inscription,reg-ack-template-part1,fra,TRUE,superadmin,now() +1139,Registration Acknowledgement Template - Part 2,Acknowledgement generated after registration - Part 2,txt,velocity,"

${RIDPrimLabel} / ${RIDSecLabel}


${RID}

${UINPrimLabel} / ${UINSecLabel}


${UIN}

${DatePrimLabel} / ${DateSecLabel}


${Date}

${PreRegIDPrimLabel} / ${PreRegIDSecLabel}


${PreRegID}

${DatePrimLabel} / ${DateSecLabel}


${Date}


${DemographicInfo} / ${DemographicInfoSecondary}


#foreach( $data in $demographicsdata ) #if(""""!=$data.get(""primaryValue"")) #end #end

$data.get(""primaryLabel"")/$data.get(""secondaryLabel"")


$data.get(""primaryValue"")/$data.get(""secondaryValue"")

${PhotoPrim} / ${PhotoSec}


${DocumentsPrimLabel} / ${DocumentsSecLabel}



${Documents}
${DocumentsSec}

",10005,Registration,reg-ack-template-part2,eng,TRUE,superadmin,now() +1139,الإقرار المتولد بعد التسجيل - الجزء 2,الب الاعتراف بالتسجيل - الجزء 2,txt,velocity,"

${RIDPrimLabel} / ${RIDSecLabel}


${RID}

${UINPrimLabel} / ${UINSecLabel}


${UIN}

${DatePrimLabel} / ${DateSecLabel}


${Date}

${PreRegIDPrimLabel} / ${PreRegIDSecLabel}


${PreRegID}

${DatePrimLabel} / ${DateSecLabel}


${Date}


${DemographicInfo} / ${DemographicInfoSecondary}


#foreach( $data in $demographicsdata ) #if(""""!=$data.get(""primaryValue"")) #end #end

$data.get(""primaryLabel"")/$data.get(""secondaryLabel"")


$data.get(""primaryValue"")/$data.get(""secondaryValue"")

${PhotoPrim} / ${PhotoSec}


${DocumentsPrimLabel} / ${DocumentsSecLabel}



${Documents}
${DocumentsSec}

",10005,التسجيل,reg-ack-template-part2,ara,TRUE,superadmin,now() +1139,enregistrement Modèle de remerciement - Partie 2,Accusé de réception généré après lenregistrement - Partie 2,txt,velocity,"

${RIDPrimLabel} / ${RIDSecLabel}


${RID}

${UINPrimLabel} / ${UINSecLabel}


${UIN}

${DatePrimLabel} / ${DateSecLabel}


${Date}

${PreRegIDPrimLabel} / ${PreRegIDSecLabel}


${PreRegID}

${DatePrimLabel} / ${DateSecLabel}


${Date}


${DemographicInfo} / ${DemographicInfoSecondary}


#foreach( $data in $demographicsdata ) #if(""""!=$data.get(""primaryValue"")) #end #end

$data.get(""primaryLabel"")/$data.get(""secondaryLabel"")


$data.get(""primaryValue"")/$data.get(""secondaryValue"")

${PhotoPrim} / ${PhotoSec}


${DocumentsPrimLabel} / ${DocumentsSecLabel}



${Documents}
${DocumentsSec}

",10005,Inscription,reg-ack-template-part2,fra,TRUE,superadmin,now() +1140,Registration Acknowledgement Template - Part 3,Acknowledgement generated after registration - Part 3,txt,velocity,"

${BiometricsPrimLabel} / ${BiometricsSecLabel}


#foreach( $biodata in $biometricsData )
$biodata.get(""BiometricsFieldPrimLabel"")/ $biodata.get(""BiometricsFieldSecLabel"")

$biodata.get(""Biometrics"")
$biodata.get(""BiometricsSec"")


$biodata.get(""LeftEyePrimLabel"") / $biodata.get(""LeftEyeSecLabel"")

$biodata.get(""RightEyePrimLabel"") / $biodata.get(""RightEyeSecLabel"")

$biodata.get(""LeftEye"")
$biodata.get(""RightEye"")

$biodata.get(""LeftPalmPrimLabel"") / $biodata.get(""LeftPalmSecLabel"")

$biodata.get(""RightPalmPrimLabel"") / $biodata.get(""RightPalmSecLabel"")

$biodata.get(""ThumbsPrimLabel"") / $biodata.get(""ThumbsSecLabel"")

$biodata.get(""leftLittle"")
$biodata.get(""leftRing"")
$biodata.get(""leftMiddle"")
$biodata.get(""leftIndex"")
$biodata.get(""rightIndex"")
$biodata.get(""rightMiddle"")
$biodata.get(""rightRing"")
$biodata.get(""rightLittle"")
$biodata.get(""leftThumb"")
$biodata.get(""rightThumb"")
",10005,Registration,reg-ack-template-part3,eng,TRUE,superadmin,now() +1140,إقرار تم إنشاؤه بعد التسجيل - الجزء 3,قالب الاعتراف بالتسجيل - الجزء 3,txt,velocity,"

${BiometricsPrimLabel} / ${BiometricsSecLabel}


#foreach( $biodata in $biometricsData )
$biodata.get(""BiometricsFieldPrimLabel"")/ $biodata.get(""BiometricsFieldSecLabel"")

$biodata.get(""Biometrics"")
$biodata.get(""BiometricsSec"")


$biodata.get(""LeftEyePrimLabel"") / $biodata.get(""LeftEyeSecLabel"")

$biodata.get(""RightEyePrimLabel"") / $biodata.get(""RightEyeSecLabel"")

$biodata.get(""LeftEye"")
$biodata.get(""RightEye"")

$biodata.get(""LeftPalmPrimLabel"") / $biodata.get(""LeftPalmSecLabel"")

$biodata.get(""RightPalmPrimLabel"") / $biodata.get(""RightPalmSecLabel"")

$biodata.get(""ThumbsPrimLabel"") / $biodata.get(""ThumbsSecLabel"")

$biodata.get(""leftLittle"")
$biodata.get(""leftRing"")
$biodata.get(""leftMiddle"")
$biodata.get(""leftIndex"")
$biodata.get(""rightIndex"")
$biodata.get(""rightMiddle"")
$biodata.get(""rightRing"")
$biodata.get(""rightLittle"")
$biodata.get(""leftThumb"")
$biodata.get(""rightThumb"")
",10005,التسجيل,reg-ack-template-part3,ara,TRUE,superadmin,now() +1140,enregistrement Modèle de remerciement - Partie 3,Accusé de réception généré après lenregistrement - Partie 3,txt,velocity,"

${BiometricsPrimLabel} / ${BiometricsSecLabel}


#foreach( $biodata in $biometricsData )
$biodata.get(""BiometricsFieldPrimLabel"")/ $biodata.get(""BiometricsFieldSecLabel"")

$biodata.get(""Biometrics"")
$biodata.get(""BiometricsSec"")


$biodata.get(""LeftEyePrimLabel"") / $biodata.get(""LeftEyeSecLabel"")

$biodata.get(""RightEyePrimLabel"") / $biodata.get(""RightEyeSecLabel"")

$biodata.get(""LeftEye"")
$biodata.get(""RightEye"")

$biodata.get(""LeftPalmPrimLabel"") / $biodata.get(""LeftPalmSecLabel"")

$biodata.get(""RightPalmPrimLabel"") / $biodata.get(""RightPalmSecLabel"")

$biodata.get(""ThumbsPrimLabel"") / $biodata.get(""ThumbsSecLabel"")

$biodata.get(""leftLittle"")
$biodata.get(""leftRing"")
$biodata.get(""leftMiddle"")
$biodata.get(""leftIndex"")
$biodata.get(""rightIndex"")
$biodata.get(""rightMiddle"")
$biodata.get(""rightRing"")
$biodata.get(""rightLittle"")
$biodata.get(""leftThumb"")
$biodata.get(""rightThumb"")
",10005,Inscription,reg-ack-template-part3,fra,TRUE,superadmin,now() +preregistration,otp service,OTP Send Service,txt,string,Please find the OTP $otp,10001,Pre-Registration,otp-sms-template,eng ,TRUE,superadmin,now() +ida,otp service,OTP Send Service,txt,string,Please find the OTP $otp,10002,login,otp-sms-template,eng ,TRUE,superadmin,now() +registrationprocessor,otp service,OTP Send Service,txt,string,Please find the OTP $!otp,10003,login,otp-sms-template,eng ,TRUE,superadmin,now() +registrationclient,otp service,OTP Send Service,txt,string,Please find the OTP $otp,10004,ID Authentication,otp-sms-template,eng ,TRUE,superadmin,now() +1141,Registration Acknowledgement Template - Part 4,Acknowledgement generated after registration - Part 4,txt,velocity,"

$biodata.get(""ExceptionPhotoPrimLabel"") / $biodata.get(""ExceptionPhotoSecLabel"")

$biodata.get(""PhotoPrim"") / $biodata.get(""PhotoSec"")


#end

${Consent}

${RONamePrimLabel} / ${RONameSecLabel}


${ROName}
${RONameSec}

${RegCenterPrimLabel} / ${RegCenterSecLabel}


${RegCenter}
${RegCenterSec}


${ImportantGuidelines}

    ${Guidelines}
",10005,Registration,reg-ack-template-part4,eng ,TRUE,superadmin,now() +1141,"قالب الاعتراف بالتسجيل - الجزء 4','الإ",ر المتولد بعد التسجيل - الجزء 4,txt,velocity,"

$biodata.get(""ExceptionPhotoPrimLabel"") / $biodata.get(""ExceptionPhotoSecLabel"")

$biodata.get(""PhotoPrim"") / $biodata.get(""PhotoSec"")


#end

${Consent}

${RONamePrimLabel} / ${RONameSecLabel}


${ROName}
${RONameSec}

${RegCenterPrimLabel} / ${RegCenterSecLabel}


${RegCenter}
${RegCenterSec}


${ImportantGuidelines}

    ${Guidelines}
",10005,التسجيل,reg-ack-template-part4,ara,TRUE,superadmin,now() +1141,enregistrement Modèle de remerciement - Partie 4,Accusé de réception généré après lenregistrement - Partie 4,txt,velocity,"

$biodata.get(""ExceptionPhotoPrimLabel"") / $biodata.get(""ExceptionPhotoSecLabel"")

$biodata.get(""PhotoPrim"") / $biodata.get(""PhotoSec"")


#end

${Consent}

${RONamePrimLabel} / ${RONameSecLabel}


${ROName}
${RONameSec}

${RegCenterPrimLabel} / ${RegCenterSecLabel}


${RegCenter}
${RegCenterSec}


${ImportantGuidelines}

    ${Guidelines}
",10005,Inscription,reg-ack-template-part4,fra,TRUE,superadmin,now() 1142,auth otp service,auth otp service for sending otp,txt,velocity,يرجى الاطلاع على otp $otp,10001,ما قبل التسجيل,auth-otp-sms-template,ara,TRUE,superadmin,now() 1142,auth otp service,auth otp service for sending otp,txt,velocity,Please find the otp $otp,10001,Pre-Registration,auth-otp-sms-template,eng,TRUE,superadmin,now() 1142,auth otp service,auth otp service for sending otp,txt,velocity,Please find the otp $otp,10001,Pré-inscription,auth-otp-sms-template,fra,TRUE,superadmin,now() @@ -840,19 +852,16 @@ registrationclient,otp service,OTP Send Service,txt,velocity,Please find the OTP 1150,auth otp email service subject,auth otp email service subject,txt,velocity,يرجى الاطلاع على otp $otp,10004,مصادقة الهوية,auth-otp-email-content-template,ara,TRUE,superadmin,now() 1150,auth otp email service subject,auth otp email service subject,txt,velocity,Please find the otp $otp,10004,ID Authentication,auth-otp-email-content-template,eng,TRUE,superadmin,now() 1150,auth otp email service subject,auth otp email service subject,txt,velocity,Sil vous plaît trouver le otp $otp,10004,Authentification ID,auth-otp-email-content-template,fra,TRUE,superadmin,now() -1151,Template for Email Content,Template for Email Content,txt,velocity,"Dear $name -OTP for $idvidType $idvid is $otp and is valid for $validTime minutes. (Generated on $date at $time Hrs)",10004,ID Authentication,ida-auth-otp-email-content-template,eng,TRUE,superadmin,now() -1151,قالب لمحتوى البريد الإلكتروني,قالب لمحتوى البريد الإلكتروني,txt,velocity,"عزيزي $name - OTP لـ $idvidType $idvid هو $otp وهو صالح لمدة $validTime دقيقة. (تم إنشاؤه في $date في $time Hrs)",10004,مصادقة الهوية,ida-auth-otp-email-content-template,ara,TRUE,superadmin,now() -1151,Modèle de contenu de courrier électronique,Modèle de contenu de courrier électronique,txt,velocity,"Cher $name, -OTP pour $idvidType $idvid est $otp et est valide pour $validTime minutes. (Généré le $date à $time Hrs)",10004,Authentification ID,ida-auth-otp-email-content-template,fra,TRUE,superadmin,now() -1152,Template for Email Subject,Template for Email Subject,txt,velocity,$idvidType $idvid: OTP Request,10004,ID Authentication,ida-auth-otp-email-subject-template,eng,TRUE,superadmin,now() -1152,قالب لموضوع البريد الإلكتروني,قالب لموضوع البريد الإلكتروني,txt,velocity,$idvidType $idvid: طلب OTP,10004,مصادقة الهوية,ida-auth-otp-email-subject-template,ara,TRUE,superadmin,now() -1152,Modèle pour sujet demail,Modèle pour sujet demail,txt,velocity,$idvidType $idvid: Requête OTP,10004,Authentification ID,ida-auth-otp-email-subject-template,fra,TRUE,superadmin,now() -1153,Template for OTP in SMS ,Template for OTP in SMS ,txt,velocity,OTP for $idvidType $idvid is $otp and is valid for $validTime minutes. (Generated on $date at $time Hrs),10004,ID Authentication,ida-auth-otp-sms-template,eng,TRUE,superadmin,now() -1153,قالب كلمة المرور لمرة واحدة في الرسالة,قالب كلمة المرور لمرة واحدة في الرسالة,txt,velocity,OTP لـ $idvidType $idvid هو $otp وهو صالح لمدة $validTime دقيقة. (التي تم إنشاؤها على $date في $time ساعات),10004,مصادقة الهوية,ida-auth-otp-sms-template,ara,TRUE,superadmin,now() -1153,Modèle pour OTP dans SMS,Modèle pour OTP dans SMS,txt,velocity,OTP pour $idvidType $idvid est $otp et est valide pour $validTime minutes. (Généré le $date à $time Hrs),10004,Authentification ID,ida-auth-otp-sms-template,fra,TRUE,superadmin,now() -1154,Consent,Consent,txt,velocity,"I understand that the data collected about me during pre-registration by the said authority includes my - +1151,Template for Email Content,Template for Email Content,txt,model,Dear $name\nOTP for UIN  $uin is $otp and is valid for $validTime minutes. (Generated on $date at $time Hrs),10004,ID Authentication,ida-auth-otp-email-content-template,eng,TRUE,superadmin,now() +1151,قالب لمحتوى البريد الإلكتروني,قالب لمحتوى البريد الإلكتروني,txt,model,عزيزي $name \ nOTP لـ UIN $uin هو $otp وهو صالح لمدة $validTime دقيقة. (تم إنشاؤه في $date في $time Hrs),10004,مصادقة الهوية,ida-auth-otp-email-content-template,ara,TRUE,superadmin,now() +1151,Modèle de contenu de courrier électronique,Modèle de contenu de courrier électronique,txt,,"Cher $name,OTP pour UIN $uin est $otp et est valide pour $validTime minutes. (Généré le $date à $time Hrs)",10004,Authentification ID,ida-auth-otp-email-content-template,fra,TRUE,superadmin,now() +1152,Template for Email Subject,Template for Email Subject,txt,model,UIN $uin: OTP Request,10004,ID Authentication,ida-auth-otp-email-subject-template,eng,TRUE,superadmin,now() +1152,قالب لموضوع البريد الإلكتروني,قالب لموضوع البريد الإلكتروني,txt,model,UIN $uin: طلب OTP,10004,مصادقة الهوية,ida-auth-otp-email-subject-template,ara,TRUE,superadmin,now() +1152,Modèle pour sujet demail,Modèle pour sujet demail,txt,model,UIN $uin: Requête OTP,10004,Authentification ID,ida-auth-otp-email-subject-template,fra,TRUE,superadmin,now() +1153,Template for OTP in SMS ,Template for OTP in SMS ,txt,model,OTP for UIN  $uin is $otp and is valid for $validTime minutes. (Generated on $date at $time Hrs),10004,ID Authentication,ida-auth-otp-sms-template,eng,TRUE,superadmin,now() +1153,قالب كلمة المرور لمرة واحدة في الرسالة,قالب كلمة المرور لمرة واحدة في الرسالة,txt,model,OTP لـ UIN $uin هو $otp وهو صالح لمدة $validTime دقيقة. (التي تم إنشاؤها على $date في $time ساعات),10004,مصادقة الهوية,ida-auth-otp-sms-template,ara,TRUE,superadmin,now() +1153,Modèle pour OTP dans SMS,Modèle pour OTP dans SMS,txt,model,OTP pour UIN $uin est $otp et est valide pour $validTime minutes. (Généré le $date à $time Hrs),10004,Authentification ID,ida-auth-otp-sms-template,fra,TRUE,superadmin,now() +1154,Consent,Consent,txt,,"I understand that the data collected about me during pre-registration by the said authority includes my - • Name • Date of birth • Gender @@ -860,7 +869,7 @@ OTP pour $idvidType $idvid est $otp et est valide pour $validTime minutes. (Gén • Contact details • Documents I also understand that this information will be stored and processed for the purpose of verifying my identity in order to access various services, or to comply with a legal obligation. I give my consent for the collection of this data for this purpose.",10001,Pre-Registration,consent,eng ,TRUE,superadmin,now() -1154,موافقة,موافقة,txt,velocity,"وأنا أفهم أن البيانات التي تم جمعها عني خلال التسجيل المسبق من قبل السلطة المذكورة تشمل بلدي - +1154,موافقة,موافقة,txt,,"وأنا أفهم أن البيانات التي تم جمعها عني خلال التسجيل المسبق من قبل السلطة المذكورة تشمل بلدي - • الاسم • تاريخ الميلاد • نوع الجنس @@ -868,7 +877,7 @@ I also understand that this information will be stored and processed for the pur • تفاصيل الاتصال • الوثائق كما أفهم أنه سيتم تخزين هذه المعلومات ومعالجتها بغرض التحقق من هويتي من أجل الوصول إلى خدمات مختلفة، أو الامتثال لالتزام قانوني. وأوافق على جمع هذه البيانات لهذا الغرض.",10001,ما قبل التسجيل,consent,ara,TRUE,superadmin,now() -1154,Consentement,Consentement,txt,velocity,"Je comprends que les données recueillies à mon sujet lors de la pré-enregistrèrent par ladite autorité comprennent mon - +1154,Consentement,Consentement,txt,,"Je comprends que les données recueillies à mon sujet lors de la pré-enregistrèrent par ladite autorité comprennent mon - • nom • Date de naissance • genre @@ -2187,43 +2196,37 @@ Merci",10003,Registration Processor,RPR_DPV_SUC_SMS,fra,TRUE,superadmin,now() 1231,De-activate Packet Validation Success Email Sub,De-activate Packet Validation Success Email Sub,txt,velocity,Confirmation de la demande de désactivation,10003,Registration Processor,RPR_DPV_SUC_EMAIL_SUB,fra,TRUE,superadmin,now() 1232,Credential Issuance Success SMS,Credential Issuance Success SMS,txt,velocity,"Hi $!fullName, -We have received a request for $!credentialName from $!partnerName. The request id for the same is $!RID and your encryption key is $!encryptionKey. - +We have received a request for $!credentialName from $!partnerName. The request id for the same is $!RID. This request is under processing. Thank You",10006,Resident Services,RS_CRE_REQ_SUCCESS_SMS,eng,TRUE,superadmin,now() 1232,Credential Issuance Success SMS,Credential Issuance Success SMS,txt,velocity,"مرحبًا $!fullName ، -لقد تلقينا طلبًا للحصول على $!creditName من $!partnerName. معرّف الطلب له هو $!RID ومفتاح التشفير الخاص بك هو $!encryptionKey. - +لقد تلقينا طلبًا للحصول على $!creditName من $!partnerName. معرف الطلب لنفسه هو $!RID. هذا الطلب قيد المعالجة. شكرا",10006,Resident Services,RS_CRE_REQ_SUCCESS_SMS,ara,TRUE,superadmin,now() 1232,Credential Issuance Success SMS,Credential Issuance Success SMS,txt,velocity,"Bonjour $!fullName, -Nous avons reçu une demande de $!credentialName de $!partnerName. L'identifiant de la demande est $!RID et votre clé de chiffrement est $!encryptionKey. - +Nous avons reçu une demande de $!credentialName de $!partnerName. L'identifiant de demande pour le même est $!RID. Cette demande est en cours de traitement. Merci",10006,Resident Services,RS_CRE_REQ_SUCCESS_SMS,fra,TRUE,superadmin,now() 1233,Credential Issuance Success EMAIL,Credential Issuance Success EMAIL,txt,velocity,"Hi $!fullName, -We have received a request for $!credentialName from $!partnerName. The request id for the same is $!RID and your encryption key is $!encryptionKey. - +We have received a request for $!credentialName from $!partnerName. The request id for the same is $!RID. This request is under processing. Thank You",10006,Resident Services,RS_CRE_REQ_SUCCESS_EMAIL,eng,TRUE,superadmin,now() 1233,Credential Issuance Success EMAIL,Credential Issuance Success EMAIL,txt,velocity,"مرحبًا $!fullName ، -لقد تلقينا طلبًا للحصول على $!creditName من $!partnerName. معرّف الطلب له هو $!RID ومفتاح التشفير الخاص بك هو $!encryptionKey. - +لقد تلقينا طلبًا للحصول على $!creditName من $!partnerName. معرف الطلب لنفسه هو $!RID. هذا الطلب قيد المعالجة. شكرا",10006,Resident Services,RS_CRE_REQ_SUCCESS_EMAIL,ara,TRUE,superadmin,now() 1233,Credential Issuance Success EMAIL,Credential Issuance Success EMAIL,txt,velocity,"Bonjour $!fullName, -Nous avons reçu une demande de $!credentialName de $!partnerName. L'identifiant de la demande est $!RID et votre clé de chiffrement est $!encryptionKey. - +Nous avons reçu une demande de $!credentialName de $!partnerName. L'identifiant de demande pour le même est $!RID. Cette demande est en cours de traitement. Merci",10006,Resident Services,RS_CRE_REQ_SUCCESS_EMAIL,fra,TRUE,superadmin,now() @@ -2335,30 +2338,3 @@ Merci",10006,Resident Services,RS_CRE_REQ_FAILURE_EMAIL,fra,TRUE,superadmin,now( 1243,Credential Issuance Failure EMAIL Subject,Credential Issuance Failure EMAIL Subject,txt,velocity,Credential Issuance Failed,10006,Resident Services,RS_CRE_REQ_FAILURE_EMAIL_SUB,eng,TRUE,superadmin,now() 1243,Credential Issuance Failure EMAIL Subject,Credential Issuance Failure EMAIL Subject,txt,velocity,فشل إصدار بيانات الاعتماد,10006,Resident Services,RS_CRE_REQ_FAILURE_EMAIL_SUB,ara,TRUE,superadmin,now() 1243,Credential Issuance Failure EMAIL Subject,Credential Issuance Failure EMAIL Subject,txt,velocity,Échec de l'émission des informations d'identification,10006,Resident Services,RS_CRE_REQ_FAILURE_EMAIL_SUB,fra,TRUE,superadmin,now() -1250,Registration Acknowledgement Template,Acknowledgement generated after registration,txt,velocity,"
#if ( !$isPreview && $QRCodeSource ) #end #if ( $UIN ) #end #if ( $isPreview && $PreRegID ) #end

${RIDLabel}


${RID}

${UINLabel}


${UIN}

${PreRegIDLabel}


${PreRegID}

${DateLabel}


${Date}

#if ( $name )

${NameLabel}


${NameValue}
#end

${DemographicInfo}

#if ( $isPreview )
#end
#if( $demographics.get(""fullName"") ) #end #if( $demographics.get(""fullName"") ) #end #if( $demographics.get(""dateOfBirth"") ) #end #if( $demographics.get(""dateOfBirth"") ) #end #if( $demographics.get(""gender"") ) #end #if( $demographics.get(""gender"") ) #end #if( $demographics.get(""phone"") ) #end #if( $demographics.get(""email"") ) #end #if( $demographics.get(""phone"") ) #end #if( $demographics.get(""email"") ) #end
$demographics.get(""fullName"").get(""label"")
$demographics.get(""fullName"").get(""value"")
$demographics.get(""dateOfBirth"").get(""label"")
$demographics.get(""dateOfBirth"").get(""value"")
$demographics.get(""gender"").get(""label"")
$demographics.get(""gender"").get(""value"")
$demographics.get(""phone"").get(""label"")$demographics.get(""email"").get(""label"")
$demographics.get(""phone"").get(""value"")$demographics.get(""email"").get(""value"")
#if( $demographics.get(""addressLine1"") )

Address

#end #if( $demographics.get(""addressLine1"") ) #end #if( $demographics.get(""addressLine2"") ) #end #if( $demographics.get(""addressLine3"") ) #end #if( $demographics.get(""addressLine1"") ) #end #if( $demographics.get(""addressLine2"") ) #end #if( $demographics.get(""addressLine3"") ) #end
$demographics.get(""addressLine1"").get(""label"")$demographics.get(""addressLine2"").get(""label"")$demographics.get(""addressLine3"").get(""label"")
$demographics.get(""addressLine1"").get(""value"")$demographics.get(""addressLine2"").get(""value"")$demographics.get(""addressLine3"").get(""value"")
#if( $demographics.get(""region"") ) #end #if( $demographics.get(""province"") ) #end #if( $demographics.get(""city"") ) #end #if( $demographics.get(""region"") ) #end #if( $demographics.get(""province"") ) #end #if( $demographics.get(""city"") ) #end
$demographics.get(""region"").get(""label"")$demographics.get(""province"").get(""label"")$demographics.get(""city"").get(""label"")
$demographics.get(""region"").get(""value"")$demographics.get(""province"").get(""value"")$demographics.get(""city"").get(""value"")
#if( $demographics.get(""zone"") ) #end #if( $demographics.get(""postalCode"") ) #end #if( $demographics.get(""zone"") ) #end #if( $demographics.get(""postalCode"") ) #end #if( $demographics.get(""modeOfClaim"") ) #end #if( $demographics.get(""modeOfClaim"") ) #end
$demographics.get(""zone"").get(""label"")$demographics.get(""postalCode"").get(""label"")
$demographics.get(""zone"").get(""value"")$demographics.get(""postalCode"").get(""value"")
$demographics.get(""modeOfClaim"").get(""label"")
$demographics.get(""modeOfClaim"").get(""value"")
#if( $demographics.get(""parentOrGuardianName"") )

Gaurdian Details

#if( $demographics.get(""parentOrGuardianRID"") ) #end #if( $demographics.get(""parentOrGuardianUIN"") ) #end #if( $demographics.get(""parentOrGuardianRID"") ) #end #if( $demographics.get(""parentOrGuardianUIN"") ) #end
$demographics.get(""parentOrGuardianName"").get(""label"")$demographics.get(""parentOrGuardianRID"").get(""label"")$demographics.get(""parentOrGuardianUIN"").get(""label"")
$demographics.get(""parentOrGuardianName"").get(""value"")$demographics.get(""parentOrGuardianRID"").get(""value"")$demographics.get(""parentOrGuardianUIN"").get(""value"")
#end
#if ( $ApplicantImageSource )

${Photo}

#end



${DocumentsLabel}

#if($isPreview)
#end
#foreach( $key in $documents.keySet() ) #end

$documents.get($key).get(""label"")


$documents.get($key).get(""value"")



${BiometricsLabel}

#if($isPreview)
#end
#foreach( $key in $biometrics.keySet() )
$biometrics.get($key).get(""label"")

Fingers ( $biometrics.get($key).get(""FingerCount"") ),Iris ( $biometrics.get($key).get(""IrisCount"") ),Face ( $biometrics.get($key).get(""FaceCount"") )


#if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end #if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end

${LeftEyeLabel}

${RightEyeLabel}

#if( !$isPreview )
$biometrics.get($key).get(""LeftEye"")
#end #if( $isPreview && $biometrics.get($key).get(""CapturedLeftEye"") ) #end
#if( !$isPreview )
$biometrics.get($key).get(""RightEye"")
#end
#if( $biometrics.get($key).get(""CapturedLeftSlap"") ) #end #if( $biometrics.get($key).get(""CapturedRightSlap"") ) #end #if( $biometrics.get($key).get(""CapturedThumbs"") ) #end #if( $biometrics.get($key).get(""CapturedLeftSlap"") ) #end #if( $biometrics.get($key).get(""CapturedRightSlap"") ) #end #if( $biometrics.get($key).get(""CapturedThumbs"") ) #end

${LeftPalmLabel}

${RightPalmLabel}

${ThumbsLabel}

#if( !$isPreview )
$biometrics.get($key).get(""leftLittle"")
$biometrics.get($key).get(""leftRing"")
$biometrics.get($key).get(""leftMiddle"")
$biometrics.get($key).get(""leftIndex"")
#end
#if( !$isPreview )
$biometrics.get($key).get(""rightIndex"")
$biometrics.get($key).get(""rightMiddle"")
$biometrics.get($key).get(""rightRing"")
$biometrics.get($key).get(""rightLittle"")
#end
#if( !$isPreview )
$biometrics.get($key).get(""leftThumb"")
$biometrics.get($key).get(""rightThumb"")
#end

#if( $biometrics.get($key).get(""FaceImageSource"") ) #end #if( $biometrics.get($key).get(""subType"") == ""applicant"" && $ExceptionImageSource ) #end #if( $biometrics.get($key).get(""FaceImageSource"") ) #end #if( $biometrics.get($key).get(""subType"") == ""applicant"" && $ExceptionImageSource ) #end

${FaceLabel}

${ExceptionPhotoLabel}

#end

${RONameLabel}


${ROName}

${RegCenterLabel}


${RegCenter}


${ImportantGuidelines}

    #foreach( $line in $Guidelines )
  • ${line}
  • #end
",10003,Registration Client,reg-ack-template-part,eng,TRUE,superadmin,now() -1251,نموذج إقرار التسجيل,Acknowledgement generated after registration,txt,velocity,"
#if ( !$isPreview && $QRCodeSource ) #end #if ( $UIN ) #end #if ( $isPreview && $PreRegID ) #end

${RIDLabel}


${RID}

${UINLabel}


${UIN}

${PreRegIDLabel}


${PreRegID}

${DateLabel}


${Date}

#if ( $name )

${NameLabel}


${NameValue}
#end

${DemographicInfo}

#if ( $isPreview )
#end
#if( $demographics.get(""fullName"") ) #end #if( $demographics.get(""fullName"") ) #end #if( $demographics.get(""dateOfBirth"") ) #end #if( $demographics.get(""dateOfBirth"") ) #end #if( $demographics.get(""gender"") ) #end #if( $demographics.get(""gender"") ) #end #if( $demographics.get(""phone"") ) #end #if( $demographics.get(""email"") ) #end #if( $demographics.get(""phone"") ) #end #if( $demographics.get(""email"") ) #end
$demographics.get(""fullName"").get(""label"")
$demographics.get(""fullName"").get(""value"")
$demographics.get(""dateOfBirth"").get(""label"")
$demographics.get(""dateOfBirth"").get(""value"")
$demographics.get(""gender"").get(""label"")
$demographics.get(""gender"").get(""value"")
$demographics.get(""phone"").get(""label"")$demographics.get(""email"").get(""label"")
$demographics.get(""phone"").get(""value"")$demographics.get(""email"").get(""value"")
#if( $demographics.get(""addressLine1"") )

Address

#end #if( $demographics.get(""addressLine1"") ) #end #if( $demographics.get(""addressLine2"") ) #end #if( $demographics.get(""addressLine3"") ) #end #if( $demographics.get(""addressLine1"") ) #end #if( $demographics.get(""addressLine2"") ) #end #if( $demographics.get(""addressLine3"") ) #end
$demographics.get(""addressLine1"").get(""label"")$demographics.get(""addressLine2"").get(""label"")$demographics.get(""addressLine3"").get(""label"")
$demographics.get(""addressLine1"").get(""value"")$demographics.get(""addressLine2"").get(""value"")$demographics.get(""addressLine3"").get(""value"")
#if( $demographics.get(""region"") ) #end #if( $demographics.get(""province"") ) #end #if( $demographics.get(""city"") ) #end #if( $demographics.get(""region"") ) #end #if( $demographics.get(""province"") ) #end #if( $demographics.get(""city"") ) #end
$demographics.get(""region"").get(""label"")$demographics.get(""province"").get(""label"")$demographics.get(""city"").get(""label"")
$demographics.get(""region"").get(""value"")$demographics.get(""province"").get(""value"")$demographics.get(""city"").get(""value"")
#if( $demographics.get(""zone"") ) #end #if( $demographics.get(""postalCode"") ) #end #if( $demographics.get(""zone"") ) #end #if( $demographics.get(""postalCode"") ) #end #if( $demographics.get(""modeOfClaim"") ) #end #if( $demographics.get(""modeOfClaim"") ) #end
$demographics.get(""zone"").get(""label"")$demographics.get(""postalCode"").get(""label"")
$demographics.get(""zone"").get(""value"")$demographics.get(""postalCode"").get(""value"")
$demographics.get(""modeOfClaim"").get(""label"")
$demographics.get(""modeOfClaim"").get(""value"")
#if( $demographics.get(""parentOrGuardianName"") )

Gaurdian Details

#if( $demographics.get(""parentOrGuardianRID"") ) #end #if( $demographics.get(""parentOrGuardianUIN"") ) #end #if( $demographics.get(""parentOrGuardianRID"") ) #end #if( $demographics.get(""parentOrGuardianUIN"") ) #end
$demographics.get(""parentOrGuardianName"").get(""label"")$demographics.get(""parentOrGuardianRID"").get(""label"")$demographics.get(""parentOrGuardianUIN"").get(""label"")
$demographics.get(""parentOrGuardianName"").get(""value"")$demographics.get(""parentOrGuardianRID"").get(""value"")$demographics.get(""parentOrGuardianUIN"").get(""value"")
#end
#if ( $ApplicantImageSource )

${Photo}

#end



${DocumentsLabel}

#if($isPreview)
#end
#foreach( $key in $documents.keySet() ) #end

$documents.get($key).get(""label"")


$documents.get($key).get(""value"")



${BiometricsLabel}

#if($isPreview)
#end
#foreach( $key in $biometrics.keySet() )
$biometrics.get($key).get(""label"")

Fingers ( $biometrics.get($key).get(""FingerCount"") ),Iris ( $biometrics.get($key).get(""IrisCount"") ),Face ( $biometrics.get($key).get(""FaceCount"") )


#if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end #if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end

${LeftEyeLabel}

${RightEyeLabel}

#if( !$isPreview )
$biometrics.get($key).get(""LeftEye"")
#end #if( $isPreview && $biometrics.get($key).get(""CapturedLeftEye"") ) #end
#if( !$isPreview )
$biometrics.get($key).get(""RightEye"")
#end
#if( $biometrics.get($key).get(""CapturedLeftSlap"") ) #end #if( $biometrics.get($key).get(""CapturedRightSlap"") ) #end #if( $biometrics.get($key).get(""CapturedThumbs"") ) #end #if( $biometrics.get($key).get(""CapturedLeftSlap"") ) #end #if( $biometrics.get($key).get(""CapturedRightSlap"") ) #end #if( $biometrics.get($key).get(""CapturedThumbs"") ) #end

${LeftPalmLabel}

${RightPalmLabel}

${ThumbsLabel}

#if( !$isPreview )
$biometrics.get($key).get(""leftLittle"")
$biometrics.get($key).get(""leftRing"")
$biometrics.get($key).get(""leftMiddle"")
$biometrics.get($key).get(""leftIndex"")
#end
#if( !$isPreview )
$biometrics.get($key).get(""rightIndex"")
$biometrics.get($key).get(""rightMiddle"")
$biometrics.get($key).get(""rightRing"")
$biometrics.get($key).get(""rightLittle"")
#end
#if( !$isPreview )
$biometrics.get($key).get(""leftThumb"")
$biometrics.get($key).get(""rightThumb"")
#end

#if( $biometrics.get($key).get(""FaceImageSource"") ) #end #if( $biometrics.get($key).get(""subType"") == ""applicant"" && $ExceptionImageSource ) #end #if( $biometrics.get($key).get(""FaceImageSource"") ) #end #if( $biometrics.get($key).get(""subType"") == ""applicant"" && $ExceptionImageSource ) #end

${FaceLabel}

${ExceptionPhotoLabel}

#end

${RONameLabel}


${ROName}

${RegCenterLabel}


${RegCenter}


${ImportantGuidelines}

    #foreach( $line in $Guidelines )
  • ${line}
  • #end
",10003,Registration Client,reg-ack-template-part,ara,TRUE,superadmin,now() -1252,Modèle d'accusé de réception d'inscription,Acknowledgement generated after registration,txt,velocity,"
#if ( !$isPreview && $QRCodeSource ) #end #if ( $UIN ) #end #if ( $isPreview && $PreRegID ) #end

${RIDLabel}


${RID}

${UINLabel}


${UIN}

${PreRegIDLabel}


${PreRegID}

${DateLabel}


${Date}

#if ( $name )

${NameLabel}


${NameValue}
#end

${DemographicInfo}

#if ( $isPreview )
#end
#if( $demographics.get(""fullName"") ) #end #if( $demographics.get(""fullName"") ) #end #if( $demographics.get(""dateOfBirth"") ) #end #if( $demographics.get(""dateOfBirth"") ) #end #if( $demographics.get(""gender"") ) #end #if( $demographics.get(""gender"") ) #end #if( $demographics.get(""phone"") ) #end #if( $demographics.get(""email"") ) #end #if( $demographics.get(""phone"") ) #end #if( $demographics.get(""email"") ) #end
$demographics.get(""fullName"").get(""label"")
$demographics.get(""fullName"").get(""value"")
$demographics.get(""dateOfBirth"").get(""label"")
$demographics.get(""dateOfBirth"").get(""value"")
$demographics.get(""gender"").get(""label"")
$demographics.get(""gender"").get(""value"")
$demographics.get(""phone"").get(""label"")$demographics.get(""email"").get(""label"")
$demographics.get(""phone"").get(""value"")$demographics.get(""email"").get(""value"")
#if( $demographics.get(""addressLine1"") )

Address

#end #if( $demographics.get(""addressLine1"") ) #end #if( $demographics.get(""addressLine2"") ) #end #if( $demographics.get(""addressLine3"") ) #end #if( $demographics.get(""addressLine1"") ) #end #if( $demographics.get(""addressLine2"") ) #end #if( $demographics.get(""addressLine3"") ) #end
$demographics.get(""addressLine1"").get(""label"")$demographics.get(""addressLine2"").get(""label"")$demographics.get(""addressLine3"").get(""label"")
$demographics.get(""addressLine1"").get(""value"")$demographics.get(""addressLine2"").get(""value"")$demographics.get(""addressLine3"").get(""value"")
#if( $demographics.get(""region"") ) #end #if( $demographics.get(""province"") ) #end #if( $demographics.get(""city"") ) #end #if( $demographics.get(""region"") ) #end #if( $demographics.get(""province"") ) #end #if( $demographics.get(""city"") ) #end
$demographics.get(""region"").get(""label"")$demographics.get(""province"").get(""label"")$demographics.get(""city"").get(""label"")
$demographics.get(""region"").get(""value"")$demographics.get(""province"").get(""value"")$demographics.get(""city"").get(""value"")
#if( $demographics.get(""zone"") ) #end #if( $demographics.get(""postalCode"") ) #end #if( $demographics.get(""zone"") ) #end #if( $demographics.get(""postalCode"") ) #end #if( $demographics.get(""modeOfClaim"") ) #end #if( $demographics.get(""modeOfClaim"") ) #end
$demographics.get(""zone"").get(""label"")$demographics.get(""postalCode"").get(""label"")
$demographics.get(""zone"").get(""value"")$demographics.get(""postalCode"").get(""value"")
$demographics.get(""modeOfClaim"").get(""label"")
$demographics.get(""modeOfClaim"").get(""value"")
#if( $demographics.get(""parentOrGuardianName"") )

Gaurdian Details

#if( $demographics.get(""parentOrGuardianRID"") ) #end #if( $demographics.get(""parentOrGuardianUIN"") ) #end #if( $demographics.get(""parentOrGuardianRID"") ) #end #if( $demographics.get(""parentOrGuardianUIN"") ) #end
$demographics.get(""parentOrGuardianName"").get(""label"")$demographics.get(""parentOrGuardianRID"").get(""label"")$demographics.get(""parentOrGuardianUIN"").get(""label"")
$demographics.get(""parentOrGuardianName"").get(""value"")$demographics.get(""parentOrGuardianRID"").get(""value"")$demographics.get(""parentOrGuardianUIN"").get(""value"")
#end
#if ( $ApplicantImageSource )

${Photo}

#end



${DocumentsLabel}

#if($isPreview)
#end
#foreach( $key in $documents.keySet() ) #end

$documents.get($key).get(""label"")


$documents.get($key).get(""value"")



${BiometricsLabel}

#if($isPreview)
#end
#foreach( $key in $biometrics.keySet() )
$biometrics.get($key).get(""label"")

Fingers ( $biometrics.get($key).get(""FingerCount"") ),Iris ( $biometrics.get($key).get(""IrisCount"") ),Face ( $biometrics.get($key).get(""FaceCount"") )


#if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end #if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end

${LeftEyeLabel}

${RightEyeLabel}

#if( !$isPreview )
$biometrics.get($key).get(""LeftEye"")
#end #if( $isPreview && $biometrics.get($key).get(""CapturedLeftEye"") ) #end
#if( !$isPreview )
$biometrics.get($key).get(""RightEye"")
#end
#if( $biometrics.get($key).get(""CapturedLeftSlap"") ) #end #if( $biometrics.get($key).get(""CapturedRightSlap"") ) #end #if( $biometrics.get($key).get(""CapturedThumbs"") ) #end #if( $biometrics.get($key).get(""CapturedLeftSlap"") ) #end #if( $biometrics.get($key).get(""CapturedRightSlap"") ) #end #if( $biometrics.get($key).get(""CapturedThumbs"") ) #end

${LeftPalmLabel}

${RightPalmLabel}

${ThumbsLabel}

#if( !$isPreview )
$biometrics.get($key).get(""leftLittle"")
$biometrics.get($key).get(""leftRing"")
$biometrics.get($key).get(""leftMiddle"")
$biometrics.get($key).get(""leftIndex"")
#end
#if( !$isPreview )
$biometrics.get($key).get(""rightIndex"")
$biometrics.get($key).get(""rightMiddle"")
$biometrics.get($key).get(""rightRing"")
$biometrics.get($key).get(""rightLittle"")
#end
#if( !$isPreview )
$biometrics.get($key).get(""leftThumb"")
$biometrics.get($key).get(""rightThumb"")
#end

#if( $biometrics.get($key).get(""FaceImageSource"") ) #end #if( $biometrics.get($key).get(""subType"") == ""applicant"" && $ExceptionImageSource ) #end #if( $biometrics.get($key).get(""FaceImageSource"") ) #end #if( $biometrics.get($key).get(""subType"") == ""applicant"" && $ExceptionImageSource ) #end

${FaceLabel}

${ExceptionPhotoLabel}

#end

${RONameLabel}


${ROName}

${RegCenterLabel}


${RegCenter}


${ImportantGuidelines}

    #foreach( $line in $Guidelines )
  • ${line}
  • #end
",10003,Registration Client,reg-ack-template-part,fra,TRUE,superadmin,now() -1253,Registration Preview Template,Preview generated after registration,txt,velocity,"
#if ( $UIN ) #end #if ( $PreRegID ) #end

${RIDLabel}


${RID}

${UINLabel}


${UIN}

${PreRegIDLabel}


${PreRegID}

${DateLabel}


${Date}

#if ( $name )

${NameLabel}


${NameValue}
#end

${DemographicInfo}


#if( $demographics.get(""fullName"") ) #end #if( $demographics.get(""fullName"") ) #end #if( $demographics.get(""dateOfBirth"") ) #end #if( $demographics.get(""dateOfBirth"") ) #end #if( $demographics.get(""gender"") ) #end #if( $demographics.get(""gender"") ) #end #if( $demographics.get(""phone"") ) #end #if( $demographics.get(""email"") ) #end #if( $demographics.get(""phone"") ) #end #if( $demographics.get(""email"") ) #end
$demographics.get(""fullName"").get(""label"")
$demographics.get(""fullName"").get(""value"")
$demographics.get(""dateOfBirth"").get(""label"")
$demographics.get(""dateOfBirth"").get(""value"")
$demographics.get(""gender"").get(""label"")
$demographics.get(""gender"").get(""value"")
$demographics.get(""phone"").get(""label"")$demographics.get(""email"").get(""label"")
$demographics.get(""phone"").get(""value"")$demographics.get(""email"").get(""value"")
#if( $demographics.get(""addressLine1"") )

Address

#end #if( $demographics.get(""addressLine1"") ) #end #if( $demographics.get(""addressLine2"") ) #end #if( $demographics.get(""addressLine3"") ) #end #if( $demographics.get(""addressLine1"") ) #end #if( $demographics.get(""addressLine2"") ) #end #if( $demographics.get(""addressLine3"") ) #end
$demographics.get(""addressLine1"").get(""label"")$demographics.get(""addressLine2"").get(""label"")$demographics.get(""addressLine3"").get(""label"")
$demographics.get(""addressLine1"").get(""value"")$demographics.get(""addressLine2"").get(""value"")$demographics.get(""addressLine3"").get(""value"")
#if( $demographics.get(""region"") ) #end #if( $demographics.get(""province"") ) #end #if( $demographics.get(""city"") ) #end #if( $demographics.get(""region"") ) #end #if( $demographics.get(""province"") ) #end #if( $demographics.get(""city"") ) #end
$demographics.get(""region"").get(""label"")$demographics.get(""province"").get(""label"")$demographics.get(""city"").get(""label"")
$demographics.get(""region"").get(""value"")$demographics.get(""province"").get(""value"")$demographics.get(""city"").get(""value"")
#if( $demographics.get(""zone"") ) #end #if( $demographics.get(""postalCode"") ) #end #if( $demographics.get(""zone"") ) #end #if( $demographics.get(""postalCode"") ) #end #if( $demographics.get(""modeOfClaim"") ) #end #if( $demographics.get(""modeOfClaim"") ) #end
$demographics.get(""zone"").get(""label"")$demographics.get(""postalCode"").get(""label"")
$demographics.get(""zone"").get(""value"")$demographics.get(""postalCode"").get(""value"")
$demographics.get(""modeOfClaim"").get(""label"")
$demographics.get(""modeOfClaim"").get(""value"")
#if( $demographics.get(""parentOrGuardianName"") )

Gaurdian Details

#if( $demographics.get(""parentOrGuardianRID"") ) #end #if( $demographics.get(""parentOrGuardianUIN"") ) #end #if( $demographics.get(""parentOrGuardianRID"") ) #end #if( $demographics.get(""parentOrGuardianUIN"") ) #end
$demographics.get(""parentOrGuardianName"").get(""label"")$demographics.get(""parentOrGuardianRID"").get(""label"")$demographics.get(""parentOrGuardianUIN"").get(""label"")
$demographics.get(""parentOrGuardianName"").get(""value"")$demographics.get(""parentOrGuardianRID"").get(""value"")$demographics.get(""parentOrGuardianUIN"").get(""value"")
#end
#if ( $ApplicantImageSource )

${Photo}

#end



${DocumentsLabel}


#foreach( $key in $documents.keySet() ) #end

$documents.get($key).get(""label"")


$documents.get($key).get(""value"")



${BiometricsLabel}


#foreach( $key in $biometrics.keySet() )
$biometrics.get($key).get(""label"")

Fingers ( $biometrics.get($key).get(""FingerCount"") ),Iris ( $biometrics.get($key).get(""IrisCount"") ),Face ( $biometrics.get($key).get(""FaceCount"") )


#if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end #if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end

${LeftEyeLabel}

${RightEyeLabel}

#if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end
#if( $biometrics.get($key).get(""CapturedLeftSlap"") ) #end #if( $biometrics.get($key).get(""CapturedRightSlap"") ) #end #if( $biometrics.get($key).get(""CapturedThumbs"") ) #end #if( $biometrics.get($key).get(""CapturedLeftSlap"") ) #end #if( $biometrics.get($key).get(""CapturedRightSlap"") ) #end #if( $biometrics.get($key).get(""CapturedThumbs"") ) #end

${LeftPalmLabel}

${RightPalmLabel}

${ThumbsLabel}


#if( $biometrics.get($key).get(""FaceImageSource"") ) #end #if( $biometrics.get($key).get(""subType"") == ""applicant"" && $ExceptionImageSource ) #end #if( $biometrics.get($key).get(""FaceImageSource"") ) #end #if( $biometrics.get($key).get(""subType"") == ""applicant"" && $ExceptionImageSource ) #end

${FaceLabel}

${ExceptionPhotoLabel}

#end
",10003,Registration Client,reg-preview-template-part,eng,TRUE,superadmin,now() -1254,نموذج معاينة التسجيل,Preview generated after registration,txt,velocity,"
#if ( $UIN ) #end #if ( $PreRegID ) #end

${RIDLabel}


${RID}

${UINLabel}


${UIN}

${PreRegIDLabel}


${PreRegID}

${DateLabel}


${Date}

#if ( $name )

${NameLabel}


${NameValue}
#end

${DemographicInfo}


#if( $demographics.get(""fullName"") ) #end #if( $demographics.get(""fullName"") ) #end #if( $demographics.get(""dateOfBirth"") ) #end #if( $demographics.get(""dateOfBirth"") ) #end #if( $demographics.get(""gender"") ) #end #if( $demographics.get(""gender"") ) #end #if( $demographics.get(""phone"") ) #end #if( $demographics.get(""email"") ) #end #if( $demographics.get(""phone"") ) #end #if( $demographics.get(""email"") ) #end
$demographics.get(""fullName"").get(""label"")
$demographics.get(""fullName"").get(""value"")
$demographics.get(""dateOfBirth"").get(""label"")
$demographics.get(""dateOfBirth"").get(""value"")
$demographics.get(""gender"").get(""label"")
$demographics.get(""gender"").get(""value"")
$demographics.get(""phone"").get(""label"")$demographics.get(""email"").get(""label"")
$demographics.get(""phone"").get(""value"")$demographics.get(""email"").get(""value"")
#if( $demographics.get(""addressLine1"") )

Address

#end #if( $demographics.get(""addressLine1"") ) #end #if( $demographics.get(""addressLine2"") ) #end #if( $demographics.get(""addressLine3"") ) #end #if( $demographics.get(""addressLine1"") ) #end #if( $demographics.get(""addressLine2"") ) #end #if( $demographics.get(""addressLine3"") ) #end
$demographics.get(""addressLine1"").get(""label"")$demographics.get(""addressLine2"").get(""label"")$demographics.get(""addressLine3"").get(""label"")
$demographics.get(""addressLine1"").get(""value"")$demographics.get(""addressLine2"").get(""value"")$demographics.get(""addressLine3"").get(""value"")
#if( $demographics.get(""region"") ) #end #if( $demographics.get(""province"") ) #end #if( $demographics.get(""city"") ) #end #if( $demographics.get(""region"") ) #end #if( $demographics.get(""province"") ) #end #if( $demographics.get(""city"") ) #end
$demographics.get(""region"").get(""label"")$demographics.get(""province"").get(""label"")$demographics.get(""city"").get(""label"")
$demographics.get(""region"").get(""value"")$demographics.get(""province"").get(""value"")$demographics.get(""city"").get(""value"")
#if( $demographics.get(""zone"") ) #end #if( $demographics.get(""postalCode"") ) #end #if( $demographics.get(""zone"") ) #end #if( $demographics.get(""postalCode"") ) #end #if( $demographics.get(""modeOfClaim"") ) #end #if( $demographics.get(""modeOfClaim"") ) #end
$demographics.get(""zone"").get(""label"")$demographics.get(""postalCode"").get(""label"")
$demographics.get(""zone"").get(""value"")$demographics.get(""postalCode"").get(""value"")
$demographics.get(""modeOfClaim"").get(""label"")
$demographics.get(""modeOfClaim"").get(""value"")
#if( $demographics.get(""parentOrGuardianName"") )

Gaurdian Details

#if( $demographics.get(""parentOrGuardianRID"") ) #end #if( $demographics.get(""parentOrGuardianUIN"") ) #end #if( $demographics.get(""parentOrGuardianRID"") ) #end #if( $demographics.get(""parentOrGuardianUIN"") ) #end
$demographics.get(""parentOrGuardianName"").get(""label"")$demographics.get(""parentOrGuardianRID"").get(""label"")$demographics.get(""parentOrGuardianUIN"").get(""label"")
$demographics.get(""parentOrGuardianName"").get(""value"")$demographics.get(""parentOrGuardianRID"").get(""value"")$demographics.get(""parentOrGuardianUIN"").get(""value"")
#end
#if ( $ApplicantImageSource )

${Photo}

#end



${DocumentsLabel}


#foreach( $key in $documents.keySet() ) #end

$documents.get($key).get(""label"")


$documents.get($key).get(""value"")



${BiometricsLabel}


#foreach( $key in $biometrics.keySet() )
$biometrics.get($key).get(""label"")

Fingers ( $biometrics.get($key).get(""FingerCount"") ),Iris ( $biometrics.get($key).get(""IrisCount"") ),Face ( $biometrics.get($key).get(""FaceCount"") )


#if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end #if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end

${LeftEyeLabel}

${RightEyeLabel}

#if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end
#if( $biometrics.get($key).get(""CapturedLeftSlap"") ) #end #if( $biometrics.get($key).get(""CapturedRightSlap"") ) #end #if( $biometrics.get($key).get(""CapturedThumbs"") ) #end #if( $biometrics.get($key).get(""CapturedLeftSlap"") ) #end #if( $biometrics.get($key).get(""CapturedRightSlap"") ) #end #if( $biometrics.get($key).get(""CapturedThumbs"") ) #end

${LeftPalmLabel}

${RightPalmLabel}

${ThumbsLabel}


#if( $biometrics.get($key).get(""FaceImageSource"") ) #end #if( $biometrics.get($key).get(""subType"") == ""applicant"" && $ExceptionImageSource ) #end #if( $biometrics.get($key).get(""FaceImageSource"") ) #end #if( $biometrics.get($key).get(""subType"") == ""applicant"" && $ExceptionImageSource ) #end

${FaceLabel}

${ExceptionPhotoLabel}

#end
",10003,Registration Client,reg-preview-template-part,ara,TRUE,superadmin,now() -1255,Modèle d'aperçu d'inscription,Preview generated after registration,txt,velocity,"
#if ( $UIN ) #end #if ( $PreRegID ) #end

${RIDLabel}


${RID}

${UINLabel}


${UIN}

${PreRegIDLabel}


${PreRegID}

${DateLabel}


${Date}

#if ( $name )

${NameLabel}


${NameValue}
#end

${DemographicInfo}


#if( $demographics.get(""fullName"") ) #end #if( $demographics.get(""fullName"") ) #end #if( $demographics.get(""dateOfBirth"") ) #end #if( $demographics.get(""dateOfBirth"") ) #end #if( $demographics.get(""gender"") ) #end #if( $demographics.get(""gender"") ) #end #if( $demographics.get(""phone"") ) #end #if( $demographics.get(""email"") ) #end #if( $demographics.get(""phone"") ) #end #if( $demographics.get(""email"") ) #end
$demographics.get(""fullName"").get(""label"")
$demographics.get(""fullName"").get(""value"")
$demographics.get(""dateOfBirth"").get(""label"")
$demographics.get(""dateOfBirth"").get(""value"")
$demographics.get(""gender"").get(""label"")
$demographics.get(""gender"").get(""value"")
$demographics.get(""phone"").get(""label"")$demographics.get(""email"").get(""label"")
$demographics.get(""phone"").get(""value"")$demographics.get(""email"").get(""value"")
#if( $demographics.get(""addressLine1"") )

Address

#end #if( $demographics.get(""addressLine1"") ) #end #if( $demographics.get(""addressLine2"") ) #end #if( $demographics.get(""addressLine3"") ) #end #if( $demographics.get(""addressLine1"") ) #end #if( $demographics.get(""addressLine2"") ) #end #if( $demographics.get(""addressLine3"") ) #end
$demographics.get(""addressLine1"").get(""label"")$demographics.get(""addressLine2"").get(""label"")$demographics.get(""addressLine3"").get(""label"")
$demographics.get(""addressLine1"").get(""value"")$demographics.get(""addressLine2"").get(""value"")$demographics.get(""addressLine3"").get(""value"")
#if( $demographics.get(""region"") ) #end #if( $demographics.get(""province"") ) #end #if( $demographics.get(""city"") ) #end #if( $demographics.get(""region"") ) #end #if( $demographics.get(""province"") ) #end #if( $demographics.get(""city"") ) #end
$demographics.get(""region"").get(""label"")$demographics.get(""province"").get(""label"")$demographics.get(""city"").get(""label"")
$demographics.get(""region"").get(""value"")$demographics.get(""province"").get(""value"")$demographics.get(""city"").get(""value"")
#if( $demographics.get(""zone"") ) #end #if( $demographics.get(""postalCode"") ) #end #if( $demographics.get(""zone"") ) #end #if( $demographics.get(""postalCode"") ) #end #if( $demographics.get(""modeOfClaim"") ) #end #if( $demographics.get(""modeOfClaim"") ) #end
$demographics.get(""zone"").get(""label"")$demographics.get(""postalCode"").get(""label"")
$demographics.get(""zone"").get(""value"")$demographics.get(""postalCode"").get(""value"")
$demographics.get(""modeOfClaim"").get(""label"")
$demographics.get(""modeOfClaim"").get(""value"")
#if( $demographics.get(""parentOrGuardianName"") )

Gaurdian Details

#if( $demographics.get(""parentOrGuardianRID"") ) #end #if( $demographics.get(""parentOrGuardianUIN"") ) #end #if( $demographics.get(""parentOrGuardianRID"") ) #end #if( $demographics.get(""parentOrGuardianUIN"") ) #end
$demographics.get(""parentOrGuardianName"").get(""label"")$demographics.get(""parentOrGuardianRID"").get(""label"")$demographics.get(""parentOrGuardianUIN"").get(""label"")
$demographics.get(""parentOrGuardianName"").get(""value"")$demographics.get(""parentOrGuardianRID"").get(""value"")$demographics.get(""parentOrGuardianUIN"").get(""value"")
#end
#if ( $ApplicantImageSource )

${Photo}

#end



${DocumentsLabel}


#foreach( $key in $documents.keySet() ) #end

$documents.get($key).get(""label"")


$documents.get($key).get(""value"")



${BiometricsLabel}


#foreach( $key in $biometrics.keySet() )
$biometrics.get($key).get(""label"")

Fingers ( $biometrics.get($key).get(""FingerCount"") ),Iris ( $biometrics.get($key).get(""IrisCount"") ),Face ( $biometrics.get($key).get(""FaceCount"") )


#if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end #if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end

${LeftEyeLabel}

${RightEyeLabel}

#if( $biometrics.get($key).get(""CapturedLeftEye"") ) #end #if( $biometrics.get($key).get(""CapturedRightEye"") ) #end
#if( $biometrics.get($key).get(""CapturedLeftSlap"") ) #end #if( $biometrics.get($key).get(""CapturedRightSlap"") ) #end #if( $biometrics.get($key).get(""CapturedThumbs"") ) #end #if( $biometrics.get($key).get(""CapturedLeftSlap"") ) #end #if( $biometrics.get($key).get(""CapturedRightSlap"") ) #end #if( $biometrics.get($key).get(""CapturedThumbs"") ) #end

${LeftPalmLabel}

${RightPalmLabel}

${ThumbsLabel}


#if( $biometrics.get($key).get(""FaceImageSource"") ) #end #if( $biometrics.get($key).get(""subType"") == ""applicant"" && $ExceptionImageSource ) #end #if( $biometrics.get($key).get(""FaceImageSource"") ) #end #if( $biometrics.get($key).get(""subType"") == ""applicant"" && $ExceptionImageSource ) #end

${FaceLabel}

${ExceptionPhotoLabel}

#end
",10003,Registration Client,reg-preview-template-part,fra,TRUE,superadmin,now() -1260,Dashboard Template,Dashboard of Registration Client,txt,velocity,"

${dashBoard}

Users

#foreach( $key in $userDetails.keySet() ) #end
$userDetails.get($key).get(""userId"")$userDetails.get($key).get(""userName"")

${totalPacketsCount}

${totalPacketsLabel}

${pendingEODCount}

${pendingEODLabel}

${pendingUploadCount}

${pendingUploadLabel}

#foreach( $key in $activities.keySet() ) #end

#if( $key != ""Updates"" ) $key #end

#foreach( $keyList in $activities.get($key) ) #end
$keyList.get(""activityName"")$keyList.get(""activityValue"")
",10003,Registration Client,reg-dashboard-template,eng,TRUE,superadmin,now() -1261,قالب لوحة القيادة,Dashboard of Registration Client,txt,velocity,"

${dashBoard}

Users

#foreach( $key in $userDetails.keySet() ) #end
$userDetails.get($key).get(""userId"")$userDetails.get($key).get(""userName"")

${totalPacketsCount}

${totalPacketsLabel}

${pendingEODCount}

${pendingEODLabel}

${pendingUploadCount}

${pendingUploadLabel}

#foreach( $key in $activities.keySet() ) #end

#if( $key != ""Updates"" ) $key #end

#foreach( $keyList in $activities.get($key) ) #end
$keyList.get(""activityName"")$keyList.get(""activityValue"")
",10003,Registration Client,reg-dashboard-template,ara,TRUE,superadmin,now() -1262,Modèle de tableau de bord,Dashboard of Registration Client,txt,velocity,"

${dashBoard}

Users

#foreach( $key in $userDetails.keySet() ) #end
$userDetails.get($key).get(""userId"")$userDetails.get($key).get(""userName"")

${totalPacketsCount}

${totalPacketsLabel}

${pendingEODCount}

${pendingEODLabel}

${pendingUploadCount}

${pendingUploadLabel}

#foreach( $key in $activities.keySet() ) #end

#if( $key != ""Updates"" ) $key #end

#foreach( $keyList in $activities.get($key) ) #end
$keyList.get(""activityName"")$keyList.get(""activityValue"")
",10003,Registration Client,reg-dashboard-template,fra,TRUE,superadmin,now() -1263,partner-reg-sub-template,partner registration notify subject template,txt,velocity,Partner registration,10007,PMS,partner-reg-sub-template,eng,TRUE,superadmin,now() -1264,partner-status-sub-template,partner status notify subject template,txt,velocity,Partner Status,10007,PMS,partner-status-sub-template,eng,TRUE,superadmin,now() -1265,partner-apikey-status-sub-template,partner apikey status notify subject template,txt,velocity,Partner APIKey Status,10007,PMS,partner-apikey-status-sub-template,eng,TRUE,superadmin,now() -1266,partner-reg-content-template,partner registration notify content template,txt,velocity,"Dear Partner, - -Your Self-Registration in Partner Management Portal is Completed Successfully. Your Partner ID is $partnerId.",10007,PMS,partner-reg-content-template,eng,TRUE,superadmin,now() -1267,partner-status-content-template,partner status notify content template,txt,velocity,"Dear Partner, - -This is to inform that your account with partner ID $partnerId in Portal is $status on $Date. - -Please contact partner admin for further details.",10007,PMS,partner-status-content-template,eng,TRUE,superadmin,now() -1268,apikey-status-content-template,partner apikey status notify content template,txt,velocity,"Dear Partner, - -Please find the below status of apikey $apiKey and policy Name $PolicyName - -apikey $apiKey status is $apiKeyStatus and expires on $apiKeyExpiresOn - -policy $policyName status is $policyStatus and expires on $policyExpiresOn",10007,PMS,apikey-status-content-template,eng,TRUE,superadmin,now() diff --git a/db_scripts/mosip_master/dml/master-zone_user.csv b/db_scripts/mosip_master/dml/master-zone_user.csv index 846fad6ed3..23c1a18b2a 100644 --- a/db_scripts/mosip_master/dml/master-zone_user.csv +++ b/db_scripts/mosip_master/dml/master-zone_user.csv @@ -1,4 +1,5 @@ zone_code,usr_id,lang_code,is_active,cr_by,cr_dtimes +MOR,superadmin,eng,TRUE,superadmin,now() NTH,110001,eng,TRUE,superadmin,now() NTH,110002,eng,TRUE,superadmin,now() NTH,110003,eng,TRUE,superadmin,now() diff --git a/db_scripts/mosip_master/dml/master-zone_user_h.csv b/db_scripts/mosip_master/dml/master-zone_user_h.csv index 1d93bc1458..9f72c069f9 100644 --- a/db_scripts/mosip_master/dml/master-zone_user_h.csv +++ b/db_scripts/mosip_master/dml/master-zone_user_h.csv @@ -1,4 +1,5 @@ zone_code,usr_id,lang_code,is_active,cr_by,cr_dtimes,eff_dtimes +MOR,superadmin,eng,TRUE,superadmin,now(),now() NTH,110001,eng,TRUE,superadmin,now(),now() NTH,110002,eng,TRUE,superadmin,now(),now() NTH,110003,eng,TRUE,superadmin,now(),now() diff --git a/design/data_model/_sources/mosip_master.dbm b/design/data_model/_sources/mosip_master.dbm index c397733eea..ed204eea4e 100644 --- a/design/data_model/_sources/mosip_master.dbm +++ b/design/data_model/_sources/mosip_master.dbm @@ -3,7 +3,7 @@ CAUTION: Do not modify this file unless you know what you are doing. Unexpected results may occur if the code is changed deliberately. --> - - - - - + - + - +
- + @@ -109,7 +98,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -122,11 +111,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -163,7 +152,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -176,11 +165,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -225,7 +214,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -255,11 +244,11 @@ CAUTION: Do not modify this file unless you know what you are doing. -
+
- + @@ -296,7 +285,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -317,11 +306,11 @@ CAUTION: Do not modify this file unless you know what you are doing. -
+
- + @@ -362,7 +351,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -389,11 +378,11 @@ CAUTION: Do not modify this file unless you know what you are doing. -
+
- + @@ -426,7 +415,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -439,11 +428,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -476,7 +465,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -489,11 +478,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -530,7 +519,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -543,11 +532,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -588,7 +577,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -601,11 +590,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -642,7 +631,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -655,11 +644,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -692,7 +681,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -705,11 +694,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -770,7 +759,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -783,11 +772,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -848,7 +837,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -865,11 +854,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -922,7 +911,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -935,11 +924,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -976,7 +965,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -989,11 +978,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1030,7 +1019,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1043,11 +1032,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1084,7 +1073,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1097,11 +1086,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1138,7 +1127,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1151,11 +1140,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1188,7 +1177,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1201,11 +1190,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1246,7 +1235,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1259,11 +1248,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1300,7 +1289,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1313,11 +1302,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1350,7 +1339,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1363,11 +1352,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1404,7 +1393,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1417,11 +1406,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1458,7 +1447,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1471,11 +1460,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1520,7 +1509,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1533,11 +1522,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1582,7 +1571,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1598,11 +1587,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1631,22 +1620,14 @@ CAUTION: Do not modify this file unless you know what you are doing. - + - + - - - - - - - - @@ -1679,7 +1660,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1692,11 +1673,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1725,22 +1706,14 @@ CAUTION: Do not modify this file unless you know what you are doing. - + - + - - - - - - - - @@ -1773,7 +1746,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1790,11 +1763,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1847,7 +1820,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1860,11 +1833,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1901,7 +1874,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1914,11 +1887,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -1963,7 +1936,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -1976,11 +1949,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2006,11 +1979,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2047,7 +2020,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2060,11 +2033,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2101,7 +2074,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2114,11 +2087,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2144,11 +2117,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2185,7 +2158,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2198,11 +2171,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2243,7 +2216,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2256,11 +2229,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2369,7 +2342,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2382,11 +2355,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2495,7 +2468,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2512,11 +2485,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2553,7 +2526,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2566,11 +2539,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2603,7 +2576,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2616,11 +2589,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2657,7 +2630,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2670,11 +2643,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2715,7 +2688,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2728,11 +2701,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2773,7 +2746,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2786,11 +2759,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2827,7 +2800,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2840,11 +2813,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2866,7 +2839,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2905,7 +2878,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2918,11 +2891,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -2955,7 +2928,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -2968,11 +2941,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3005,7 +2978,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3018,11 +2991,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3059,7 +3032,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3072,11 +3045,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3102,11 +3075,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3167,7 +3140,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3180,11 +3153,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3245,7 +3218,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3262,11 +3235,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3307,7 +3280,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3320,11 +3293,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3357,7 +3330,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3370,11 +3343,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3407,7 +3380,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3420,11 +3393,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3473,7 +3446,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3489,11 +3462,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3526,7 +3499,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3539,7 +3512,7 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
@@ -3576,7 +3549,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3593,11 +3566,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3638,7 +3611,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3651,11 +3624,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3692,7 +3665,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3705,11 +3678,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3750,7 +3723,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3763,11 +3736,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3800,7 +3773,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3813,11 +3786,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3834,6 +3807,10 @@ CAUTION: Do not modify this file unless you know what you are doing. + + + + @@ -3874,7 +3851,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3887,11 +3864,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3936,7 +3913,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -3952,11 +3929,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -3997,7 +3974,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -4010,11 +3987,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -4048,7 +4025,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -4075,7 +4052,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -4088,11 +4065,11 @@ CAUTION: Do not modify this file unless you know what you are doing.
- +
- + @@ -4141,7 +4118,7 @@ CAUTION: Do not modify this file unless you know what you are doing. - + @@ -4154,78 +4131,6 @@ CAUTION: Do not modify this file unless you know what you are doing.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - @@ -4496,211 +4401,211 @@ CAUTION: Do not modify this file unless you know what you are doing. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -4709,52 +4614,52 @@ CAUTION: Do not modify this file unless you know what you are doing. - - - - - - - - - - diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000000..f370686a34 --- /dev/null +++ b/pom.xml @@ -0,0 +1,174 @@ + + + + 4.0.0 + io.mosip + commons + 1.2.0-SNAPSHOT + pom + + MOSIP Commons Parent POM + Mosip Commons Project + https://github.com/mosip/commons + + + + MPL 2.0 + https://www.mozilla.org/en-US/MPL/2.0/ + + + + + scm:git:git://github.com/mosip/commons.git + scm:git:ssh://github.com:mosip/commons.git + https://github.com/mosip/commons + HEAD + + + + + Mosip + mosip.emailnotifier@gmail.com + io.mosip + https://github.com/mosip/commons + + + + + ossrh + Central Repository + https://oss.sonatype.org/content/repositories/snapshots + default + + true + + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + maven-deploy-plugin + 2.8.1 + + + default-deploy + deploy + + deploy + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + + default-deploy + deploy + + deploy + + + + + 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-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 + + + + + + + kernel + commons-packet + +