forked from mosip/registration
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from ICTASL/1.1.5-drp-external-stage-temp
1.1.5 drp to 1.1.5.4 drp
- Loading branch information
Showing
30 changed files
with
2,153 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
...sor-external-stage/src/main/java/io/mosip/registrationprocessor/externalstage/DrpDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
121 changes: 113 additions & 8 deletions
121
...age/src/main/java/io/mosip/registrationprocessor/externalstage/config/Externalconfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); } | ||
|
||
|
||
} |
32 changes: 32 additions & 0 deletions
32
...al-stage/src/main/java/io/mosip/registrationprocessor/externalstage/dto/EmailInfoDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; } | ||
} |
25 changes: 25 additions & 0 deletions
25
...tage/src/main/java/io/mosip/registrationprocessor/externalstage/dto/MessageSenderDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
|
||
} |
Oops, something went wrong.