Skip to content

Commit

Permalink
Merge pull request #434 from bcgov/imp/remove-dps-registration-api
Browse files Browse the repository at this point in the history
Imp/remove dps registration api
  • Loading branch information
KFloodBCGov committed Jul 6, 2023
2 parents 81ff038 + 81aee04 commit b5d952b
Show file tree
Hide file tree
Showing 54 changed files with 44 additions and 2,681 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/dev-dps-registration-api.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
- dps-email-worker
- dps-notification-service
- dps-payment-service
- dps-registration-api
- dps-validation-service
- figaro-validation-service
- spd-notification-worker
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/openshift-imagetagging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
- dps-email-worker
- dps-notification-service
- dps-payment-service
- dps-registration-api
- dps-validation-service
- figaro-validation-service
- spd-notification-worker
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ COPY src/dps-email-poller/pom.xml dps-email-poller/pom.xml
COPY src/dps-email-worker/pom.xml dps-email-worker/pom.xml
COPY src/dps-notification-service/pom.xml dps-notification-service/pom.xml
COPY src/dps-payment-service/pom.xml dps-payment-service/pom.xml
COPY src/dps-registration-api/pom.xml dps-registration-api/pom.xml
COPY src/dps-validation-service/pom.xml dps-validation-service/pom.xml

COPY src/figaro-validation-service/pom.xml figaro-validation-service/pom.xml
Expand All @@ -41,7 +40,6 @@ COPY src/libs/dps-commons/pom.xml libs/dps-commons/pom.xml
COPY src/libs/dps-files/pom.xml libs/dps-files/pom.xml
COPY src/libs/dps-monitoring/pom.xml libs/dps-monitoring/pom.xml
COPY src/libs/dps-sftp-starter/pom.xml libs/dps-sftp-starter/pom.xml
COPY src/libs/otssoa-ords-client/pom.xml libs/otssoa-ords-client/pom.xml

RUN mvn dependency:go-offline \
-Pall \
Expand Down
5 changes: 5 additions & 0 deletions src/dps-email-worker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@
<artifactId>jsr305</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>

<!-- JSON processing: jackson -->
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import ca.bc.gov.dps.monitoring.SystemNotification;
import ca.bc.gov.open.pssg.rsbc.dps.dpsemailworker.kofax.models.ImportSession;
import ca.bc.gov.open.pssg.rsbc.dps.dpsemailworker.kofax.services.ImportSessionService;
import ca.bc.gov.open.pssg.rsbc.dps.dpsemailworker.registration.RegistrationService;
import ca.bc.gov.open.pssg.rsbc.models.DpsFileInfo;
import ca.bc.gov.open.pssg.rsbc.models.DpsMetadata;
import ca.bc.gov.open.pssg.rsbc.dps.cache.StorageService;
Expand Down Expand Up @@ -39,17 +38,13 @@ public class DpsEmailConsumer {

private final ImportSessionService importSessionService;

private final RegistrationService registrationService;

public DpsEmailConsumer(DpsEmailService dpsEmailService, StorageService storageService, FileService fileService,
SftpProperties sftpProperties, ImportSessionService importSessionService,
RegistrationService registrationService) {
SftpProperties sftpProperties, ImportSessionService importSessionService) {
this.dpsEmailService = dpsEmailService;
this.storageService = storageService;
this.fileService = fileService;
this.sftpProperties = sftpProperties;
this.importSessionService = importSessionService;
this.registrationService = registrationService;
}

@RabbitListener(queues = Keys.EMAIL_QUEUE_NAME)
Expand Down Expand Up @@ -87,15 +82,6 @@ public void receiveMessage(DpsMetadata message) {
storageService.delete(dpsFileInfo.getId());
logger.info("Successfully removed document from redis cache");


if(registrationService.isActive()) {
logger.info("Attempting to register package");
registrationService.registerPackage(message);
logger.info("Successfully registered package to OTS database.");
} else {
logger.info("Registration Service is not activated.");
}

logger.info("Attempting to move email to processed folder");
DpsEmailProcessedResponse dpsEmailProcessedResponse = dpsEmailService.dpsEmailProcessed(message.getBase64EmailId(), message.getTransactionId().toString());

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import ca.bc.gov.open.pssg.rsbc.dps.dpsemailworker.kofax.models.Batch;
import ca.bc.gov.open.pssg.rsbc.dps.dpsemailworker.kofax.models.ImportSession;
import ca.bc.gov.open.pssg.rsbc.dps.dpsemailworker.kofax.services.ImportSessionService;
import ca.bc.gov.open.pssg.rsbc.dps.dpsemailworker.registration.RegistrationService;
import ca.bc.gov.open.pssg.rsbc.dps.email.client.DpsEmailProcessedResponse;
import ca.bc.gov.open.pssg.rsbc.dps.email.client.DpsEmailService;
import ca.bc.gov.open.pssg.rsbc.dps.files.FileService;
Expand Down Expand Up @@ -60,9 +59,6 @@ public class DpsEmailConsumerTest {
@Mock
private DpsEmailProcessedResponse dpsEmailFailedResponseMock;

@Mock
private RegistrationService registrationServiceMock;

@BeforeAll
public void setUp() throws Exception {

Expand Down Expand Up @@ -103,7 +99,7 @@ public void setUp() throws Exception {
sftpProperties.setRemoteLocation(REMOTE_LOCATION);

sut = new DpsEmailConsumer(dpsEmailServiceMock, storageServiceMock, fileServiceMock, sftpProperties,
importSessionService, registrationServiceMock);
importSessionService);
}

@DisplayName("success - with email processed should return acknowledge")
Expand Down

This file was deleted.

31 changes: 0 additions & 31 deletions src/dps-registration-api/.gitignore

This file was deleted.

31 changes: 0 additions & 31 deletions src/dps-registration-api/README.md

This file was deleted.

Loading

0 comments on commit b5d952b

Please sign in to comment.