Skip to content

Commit

Permalink
Merge pull request #13 from ICTASL/1.1.5-drp-external-stage-temp
Browse files Browse the repository at this point in the history
1.1.5 drp to 1.1.5.4 drp
  • Loading branch information
viraj-virtusa authored Aug 19, 2021
2 parents 68305da + 0e530d7 commit 88e540c
Show file tree
Hide file tree
Showing 30 changed files with 2,153 additions and 215 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,41 @@
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>io.mosip.registrationprocessor</groupId>
<artifactId>registration-processor-packet-manager</artifactId>
<version>1.1.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.mosip.registrationprocessor</groupId>
<artifactId>registration-processor-info-storage-service</artifactId>
<version>1.1.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.mosip.registrationprocessor</groupId>
<artifactId>registration-processor-message-sender-impl</artifactId>
<version>1.1.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.mosip.registrationprocessor</groupId>
<artifactId>registration-processor-message-sender-impl</artifactId>
<version>1.1.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.jai-imageio</groupId>
<artifactId>jai-imageio-jpeg2000</artifactId>
<version>1.4.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.jai-imageio/jai-imageio-core -->
<dependency>
<groupId>com.github.jai-imageio</groupId>
<artifactId>jai-imageio-core</artifactId>
<version>1.4.0</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
package io.mosip.registrationprocessor.externalstage;

import javax.persistence.Column;
import java.io.Serializable;

public class DrpDto implements Serializable {
/**
* The Constant serialVersionUID.
*/
private static final long serialVersionUID = 8907302024886152312L;

/** The transaction id. */
private String drpId;

/** The registration id. */
private String registrationId;

/** The stage flag. */
private String stageFlag;

/** The operator_flag. */
private String operatorFlag;

/** The status comment. */
private String statusComment;

/** The operator id */
private String operatorId;

/** The center id */
private String centerId;

/** The is active. */
private Boolean isActive;

public DrpDto() {
}

public DrpDto(String drpId, String registrationId, String stageFlag, String operatorFlag, String statusComment, String operatorId, String centerId, Boolean isActive) {
this.drpId = drpId;
this.registrationId = registrationId;
this.stageFlag = stageFlag;
this.operatorFlag = operatorFlag;
this.statusComment = statusComment;
this.operatorId = operatorId;
this.centerId = centerId;
this.isActive = isActive;
}

public static long getSerialVersionUID() {
return serialVersionUID;
}

public String getDrpId() {
return drpId;
}

public void setDrpId(String drpId) {
this.drpId = drpId;
}

public String getRegistrationId() {
return registrationId;
}

public void setRegistrationId(String registrationId) {
this.registrationId = registrationId;
}

public String getStageFlag() {
return stageFlag;
}

public void setStageFlag(String stageFlag) {
this.stageFlag = stageFlag;
}

public String getOperatorFlag() {
return operatorFlag;
}

public void setOperatorFlag(String operatorFlag) {
this.operatorFlag = operatorFlag;
}

public String getStatusComment() {
return statusComment;
}

public void setStatusComment(String statusComment) {
this.statusComment = statusComment;
}

public String getOperatorId() {
return operatorId;
}

public void setOperatorId(String operatorId) {
this.operatorId = operatorId;
}

public String getCenterId() {
return centerId;
}

public void setCenterId(String centerId) {
this.centerId = centerId;
}

public Boolean getActive() {
return isActive;
}

public void setActive(Boolean active) {
isActive = active;
}
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,128 @@
package io.mosip.registrationprocessor.externalstage.config;

import io.mosip.kernel.cbeffutil.impl.CbeffImpl;
import io.mosip.kernel.core.cbeffutil.spi.CbeffUtil;
import io.mosip.registration.processor.core.packet.dto.Identity;
import io.mosip.registration.processor.core.spi.packetmanager.PacketInfoManager;
import io.mosip.registration.processor.message.sender.template.TemplateGenerator;
import io.mosip.registration.processor.packet.storage.dao.PacketInfoDao;
import io.mosip.registration.processor.packet.storage.dto.ApplicantInfoDto;
import io.mosip.registration.processor.packet.storage.helper.PacketManagerHelper;
import io.mosip.registration.processor.packet.storage.service.impl.PacketInfoManagerImpl;
import io.mosip.registration.processor.packet.storage.utils.IdSchemaUtil;
import io.mosip.registration.processor.packet.storage.utils.PacketManagerService;
import io.mosip.registration.processor.packet.storage.utils.PriorityBasedPacketManagerService;
import io.mosip.registration.processor.packet.storage.utils.Utilities;
import io.mosip.registrationprocessor.externalstage.DrpDto;
import io.mosip.registrationprocessor.externalstage.service.DrpService;
import io.mosip.registrationprocessor.externalstage.service.impl.DrpServiceImpl;
import io.mosip.registrationprocessor.externalstage.utils.ExtractFaceImageData;
import io.mosip.registrationprocessor.externalstage.utils.JP2ImageConverter;
import io.mosip.registrationprocessor.externalstage.utils.NotificationUtility;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

import io.mosip.registrationprocessor.externalstage.stage.ExternalStage;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;

/**
* external stage beans configuration class
*
*/
@Configuration
@EnableAspectJAutoProxy
@EnableJpaRepositories(basePackages = {
"io.mosip.registrationprocessor.externalstage.repositary"
})
public class Externalconfig {
/**
* ExternalStage bean
*/
@Bean
public ExternalStage externalStage() {
return new ExternalStage();
}

@Bean
@ConfigurationProperties(prefix = "provider.packetreader")
public Map<String, String> readerConfiguration() {
return new HashMap<>();
}

@Bean
@ConfigurationProperties(prefix = "packetmanager.provider")
public Map<String, String> providerConfiguration() {
return new HashMap<>();
}

@Bean
@ConfigurationProperties(prefix = "provider.packetwriter")
public Map<String, String> writerConfiguration() {
return new HashMap<>();
}

@PostConstruct
public void initialize() {
Utilities.initialize(readerConfiguration(), writerConfiguration());
PriorityBasedPacketManagerService.initialize(providerConfiguration());
}

@Bean
public PacketManagerService packetManagerService() {
return new PacketManagerService();
}


/**
* ExternalStage bean
*/
@Bean
public ExternalStage externalStage() {
return new ExternalStage();
}

@Bean
public DrpService<DrpDto> drpService() {
return new DrpServiceImpl();
}

@Bean
public Utilities utility() {
return new Utilities();
}

@Bean
public NotificationUtility notificationUtility() {
return new NotificationUtility();
}

@Bean
public IdSchemaUtil idSchemaUtil() { return new IdSchemaUtil(); }

@Bean
public CbeffUtil cbeffUtil() {
return new CbeffImpl();
}

@Bean
public JP2ImageConverter jP2ImageConverter() { return new JP2ImageConverter(); }

@Bean
public ExtractFaceImageData extractFaceImageData() { return new ExtractFaceImageData(); }

/** Required for packetManagerService*/
@Bean
public PacketInfoDao packetInfoDao() { return new PacketInfoDao(); }

/** Required for packetManagerService*/
@Bean
public PacketInfoManager<Identity, ApplicantInfoDto> packetInfoManager() { return new PacketInfoManagerImpl(); }

/** Required for packetManagerService*/
@Bean
public PacketManagerHelper packetManagerHelper() { return new PacketManagerHelper(); }

/** Required for notificationUtility*/
@Bean
public TemplateGenerator templateGenerator() { return new TemplateGenerator(); }


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package io.mosip.registrationprocessor.externalstage.dto;

import java.io.Serializable;

public class EmailInfoDTO implements Serializable {

private String name;
private String phone;
private String email;
private String reason;

public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getReason() { return reason; }
public void setReason(String reason) { this.reason = reason; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package io.mosip.registrationprocessor.externalstage.dto;

import io.mosip.registrationprocessor.externalstage.utils.NotificationSubjectCode;
import io.mosip.registrationprocessor.externalstage.utils.NotificationTemplateTypeCode;
import lombok.Data;

@Data
public class MessageSenderDTO {

/**
* The sms template code.
*/
private NotificationTemplateTypeCode smsTemplateCode = null;

/**
* The email template code.
*/
private NotificationTemplateTypeCode emailTemplateCode = null;

/**
* The subject.
*/
private NotificationSubjectCode subjectTemplateCode = null;

}
Loading

0 comments on commit 88e540c

Please sign in to comment.