diff --git a/registration-processor-opencrvs-stage/src/main/java/io/mosip/registration/processor/opencrvs/stage/OpencrvsStage.java b/registration-processor-opencrvs-stage/src/main/java/io/mosip/registration/processor/opencrvs/stage/OpencrvsStage.java index e091c73..2a7f820 100644 --- a/registration-processor-opencrvs-stage/src/main/java/io/mosip/registration/processor/opencrvs/stage/OpencrvsStage.java +++ b/registration-processor-opencrvs-stage/src/main/java/io/mosip/registration/processor/opencrvs/stage/OpencrvsStage.java @@ -6,21 +6,17 @@ import java.security.SecureRandom; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; -import io.mosip.registration.processor.core.constant.ProviderStageName; -import io.mosip.registration.processor.opencrvs.constants.Constants; -import io.mosip.registration.processor.opencrvs.constants.MessageBusConstants; -import io.mosip.registration.processor.opencrvs.constants.OpencrvsStatusCode; -import io.mosip.registration.processor.opencrvs.exception.OpencrvsErrorMessages; -import io.mosip.registration.processor.opencrvs.exception.OpencrvsSuccessMessages; -import io.mosip.registration.processor.packet.storage.utils.PriorityBasedPacketManagerService; import org.apache.commons.lang3.exception.ExceptionUtils; import org.json.JSONArray; import org.json.simple.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; @@ -34,7 +30,6 @@ import io.mosip.kernel.core.exception.ServiceError; import io.mosip.kernel.core.logger.spi.Logger; import io.mosip.kernel.core.util.DateUtils; -import io.mosip.registration.processor.core.abstractverticle.MessageBusAddress; import io.mosip.registration.processor.core.abstractverticle.MessageDTO; import io.mosip.registration.processor.core.abstractverticle.MosipEventBus; import io.mosip.registration.processor.core.abstractverticle.MosipRouter; @@ -43,16 +38,13 @@ import io.mosip.registration.processor.core.code.EventId; import io.mosip.registration.processor.core.code.EventName; import io.mosip.registration.processor.core.code.EventType; -import io.mosip.registration.processor.core.code.ModuleName; import io.mosip.registration.processor.core.code.RegistrationTransactionStatusCode; -import io.mosip.registration.processor.core.code.RegistrationTransactionTypeCode; import io.mosip.registration.processor.core.common.rest.dto.ErrorDTO; import io.mosip.registration.processor.core.constant.IdType; import io.mosip.registration.processor.core.constant.LoggerFileConstant; +import io.mosip.registration.processor.core.constant.ProviderStageName; import io.mosip.registration.processor.core.constant.VidType; import io.mosip.registration.processor.core.exception.ApisResourceAccessException; -import io.mosip.registration.processor.core.exception.util.PlatformErrorMessages; -import io.mosip.registration.processor.core.exception.util.PlatformSuccessMessages; import io.mosip.registration.processor.core.http.RequestWrapper; import io.mosip.registration.processor.core.http.ResponseWrapper; import io.mosip.registration.processor.core.idrepo.dto.CredentialRequestDto; @@ -65,8 +57,14 @@ import io.mosip.registration.processor.core.status.util.StatusUtil; import io.mosip.registration.processor.core.status.util.TrimExceptionMessage; import io.mosip.registration.processor.core.util.JsonUtil; -import io.mosip.registration.processor.packet.storage.utils.Utilities; +import io.mosip.registration.processor.opencrvs.constants.Constants; +import io.mosip.registration.processor.opencrvs.constants.MessageBusConstants; +import io.mosip.registration.processor.opencrvs.constants.OpencrvsStatusCode; +import io.mosip.registration.processor.opencrvs.exception.OpencrvsErrorMessages; +import io.mosip.registration.processor.opencrvs.exception.OpencrvsSuccessMessages; import io.mosip.registration.processor.opencrvs.stage.exception.VidNotAvailableException; +import io.mosip.registration.processor.packet.storage.utils.PriorityBasedPacketManagerService; +import io.mosip.registration.processor.packet.storage.utils.Utilities; import io.mosip.registration.processor.rest.client.audit.builder.AuditLogRequestBuilder; import io.mosip.registration.processor.status.dto.InternalRegistrationStatusDto; import io.mosip.registration.processor.status.dto.RegistrationStatusDto; @@ -200,7 +198,7 @@ public MessageDTO process(MessageDTO object) { registrationStatusDto .setLatestTransactionTypeCode(Constants.OPENCRVS_TRANSACTION_TYPE); registrationStatusDto.setRegistrationStageName(getStageName()); - JSONObject jsonObject = utilities.retrieveUIN(regId); + JSONObject jsonObject = utilities.retrieveIdrepoJson(regId); uin = JsonUtil.getJSONValue(jsonObject, IdType.UIN.toString()); if (uin == null) { regProcLogger.error(LoggerFileConstant.SESSIONID.toString(),