From ca14566fe17de508072e0db7dcd3b9e75c2d9206 Mon Sep 17 00:00:00 2001 From: yashpalnegi Date: Wed, 15 Jul 2026 14:23:52 +0100 Subject: [PATCH 01/22] LPT-2348 - Change SJP to POST payload to new SJP publishing endpoint --- .../PressTransparencyReportRequested.java | 51 -------- .../TransparencyReportRequested.java | 57 --------- ...sTransparencyReportRequestedProcessor.java | 54 +++------ .../TransparencyReportRequestedProcessor.java | 105 +++------------- .../service/ApplicationParameters.java | 11 +- .../service/CourtListPublishingService.java | 31 +++++ ...nsparencyReportRequestedProcessorTest.java | 97 +++------------ ...nsparencyReportRequestedProcessorTest.java | 105 ++-------------- ...p.pending-cases-public-list-generated.json | 82 ------------- ...p.press-transparency-report-generated.json | 114 ------------------ ....events.transparency-report-requested.json | 18 --- ....events.transparency-report-requested.json | 4 - .../yaml/public-publications-descriptor.yaml | 6 - .../src/yaml/subscriptions-descriptor.yaml | 6 - .../stub/CourtListPublishingServiceStub.java | 51 ++++++++ .../it/test/PressTransparencyReportIT.java | 25 ++-- .../moj/sjp/it/test/TransparencyReportIT.java | 23 ++-- 17 files changed, 179 insertions(+), 661 deletions(-) delete mode 100644 sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/PressTransparencyReportRequested.java delete mode 100644 sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/TransparencyReportRequested.java create mode 100644 sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java delete mode 100644 sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.pending-cases-public-list-generated.json delete mode 100644 sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.press-transparency-report-generated.json delete mode 100644 sjp-event/sjp-event-processor/src/yaml/json/schema/sjp.events.transparency-report-requested.json delete mode 100644 sjp-event/sjp-event-processor/src/yaml/json/sjp.events.transparency-report-requested.json create mode 100644 sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java diff --git a/sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/PressTransparencyReportRequested.java b/sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/PressTransparencyReportRequested.java deleted file mode 100644 index 510abceabf..0000000000 --- a/sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/PressTransparencyReportRequested.java +++ /dev/null @@ -1,51 +0,0 @@ -package uk.gov.moj.cpp.sjp.event.transparency; - -import static java.util.UUID.randomUUID; - -import uk.gov.justice.domain.annotation.Event; - -import java.time.ZonedDateTime; -import java.util.UUID; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * Event to indicate that the generation of a press transparency report has requested. Use either the JSON or PDF report generation requested events instead. - * - * @deprecated - */ -@Deprecated(forRemoval = true) -@Event(PressTransparencyReportRequested.EVENT_NAME) -@SuppressWarnings("squid:S1133") -public class PressTransparencyReportRequested { - public static final String EVENT_NAME = "sjp.events.press-transparency-report-requested"; - - private UUID pressTransparencyReportId = randomUUID(); - private ZonedDateTime requestedAt; - - @JsonCreator - public PressTransparencyReportRequested( - @JsonProperty("pressTransparencyReportId") final UUID reportId, - @JsonProperty("requestedAt") final ZonedDateTime requestedAt) { - if (reportId != null) { - this.pressTransparencyReportId = reportId; - } - this.requestedAt = requestedAt; - } - - public UUID getPressTransparencyReportId() { - return pressTransparencyReportId; - } - - public ZonedDateTime getRequestedAt() { - return requestedAt; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); - } -} diff --git a/sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/TransparencyReportRequested.java b/sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/TransparencyReportRequested.java deleted file mode 100644 index ddbc8eb156..0000000000 --- a/sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/TransparencyReportRequested.java +++ /dev/null @@ -1,57 +0,0 @@ -package uk.gov.moj.cpp.sjp.event.transparency; - -import static java.util.UUID.randomUUID; - -import uk.gov.justice.domain.annotation.Event; - -import java.time.ZonedDateTime; -import java.util.UUID; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * Event to indicate that the generation of a press transparency report has requested. - * Use either the JSON or PDF report generation requested events instead. - * - * @deprecated - */ -@Deprecated(forRemoval = true) -@Event(TransparencyReportRequested.EVENT_NAME) -@SuppressWarnings("squid:S1133") -public class TransparencyReportRequested { - public static final String EVENT_NAME = "sjp.events.transparency-report-requested"; - - /** - * Default value assigned for event replay where old versions of this - * event don't have an id. - */ - private UUID transparencyReportId = randomUUID(); - - private ZonedDateTime requestedAt; - - @JsonCreator - public TransparencyReportRequested( - @JsonProperty("transparencyReportId") final UUID transparencyReportId, - @JsonProperty("requestedAt") final ZonedDateTime requestedAt) { - if (transparencyReportId != null) { - this.transparencyReportId = transparencyReportId; - } - this.requestedAt = requestedAt; - } - - public ZonedDateTime getRequestedAt() { - return requestedAt; - } - - public UUID getTransparencyReportId() { - return transparencyReportId; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); - } -} diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java index 175cb2d0b6..49b42e0af9 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java @@ -34,6 +34,7 @@ import uk.gov.justice.services.messaging.JsonEnvelope; import uk.gov.justice.services.messaging.JsonObjects; import uk.gov.moj.cpp.sjp.domain.ListType; +import uk.gov.moj.cpp.sjp.event.processor.service.CourtListPublishingService; import uk.gov.moj.cpp.sjp.event.processor.service.ExportType; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataOffencesService; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataService; @@ -43,6 +44,7 @@ import uk.gov.moj.cpp.sjp.event.transparency.PressTransparencyPDFReportRequested; import java.io.ByteArrayInputStream; +import java.io.IOException; import java.time.LocalDate; import java.time.format.DateTimeParseException; import java.util.List; @@ -63,7 +65,8 @@ @ServiceComponent(EVENT_PROCESSOR) public class PressTransparencyReportRequestedProcessor { - public static final String PUBLIC_SJP_PRESS_TRANSPARENCY_REPORT_GENERATED = "public.sjp.press-transparency-report-generated"; + private static final String LIST_TYPE = "listType"; + private static final String SJP_PRESS_LIST = "SJP_PRESS_LIST"; public static final String CASE_URN = "caseUrn"; public static final String FIRST_NAME = "firstName"; public static final String LAST_NAME = "lastName"; @@ -111,6 +114,8 @@ public class PressTransparencyReportRequestedProcessor { @Inject @FrameworkComponent(EVENT_PROCESSOR) private Sender sender; + @Inject + private CourtListPublishingService courtListPublishingService; private String getTemplateIdentifier(final String type, final String lang) { return "PressPendingCases" + type + lang; @@ -148,48 +153,25 @@ public void handlePressTransparencyJSONReportRequest(final JsonEnvelope envelope final UUID reportId = fromString(eventPayload.getString(PRESS_TRANSPARENCY_REPORT_ID)); final boolean isWelsh = WELSH.name().equalsIgnoreCase(eventPayload.getString(LANGUAGE)); LOGGER.info("generating press transparency JSON report for press report {}", reportId); - sendPublicEvent(envelope, buildPayload(pendingCasesFromViewStore, true, envelope, isWelsh)); - } - - /** - * @deprecated with CCT-1587 now we are using two separate events for PDF and JSON report - * generation {@link PressTransparencyPDFReportRequested} and {@link - * PressTransparencyJSONReportRequested} - */ - @Deprecated(forRemoval = true) - @Handles("sjp.events.press-transparency-report-requested") - @Transactional - @SuppressWarnings({"squid:S00112", "squid:S1133"}) - public void handlePressTransparencyRequest(final JsonEnvelope envelope) { - payloadHelper.initCache(); - - final List pendingCasesFromViewStore = getPendingCasesFromViewStore(envelope); - final JsonObject eventPayload = envelope.payloadAsJsonObject(); - final UUID reportId = fromString(eventPayload.getString(PRESS_TRANSPARENCY_REPORT_ID)); - try { - final JsonObject payloadForDocumentGeneration = buildPayload(pendingCasesFromViewStore, false, envelope, false); - requestDocumentGeneration(envelope, reportId, payloadForDocumentGeneration); - sendPublicEvent(envelope, buildPayload(pendingCasesFromViewStore, true, envelope, false)); - storeReportMetadata(envelope, reportId, pendingCasesFromViewStore); - } catch (FileServiceException e) { - throw new RuntimeException("IO Exception happened during press transparency report generation", e); - } + publishCourtList(envelope, buildPayload(pendingCasesFromViewStore, true, envelope, isWelsh)); } - private void sendPublicEvent(final JsonEnvelope envelope, final JsonObject payloadForDocumentGeneration) { - LOGGER.info("publishing public event for sjp pending cases for public list in english"); + private void publishCourtList(final JsonEnvelope envelope, final JsonObject payloadForDocumentGeneration) { + LOGGER.info("publishing sjp press pending cases list to court list publishing service"); final String type = envelope.payloadAsJsonObject().getString(REQUEST_TYPE); final String language = envelope.payloadAsJsonObject().getString(LANGUAGE); - final JsonObjectBuilder pendingListEnglishBuilder = createObjectBuilder() + final JsonObject courtListPublishRequest = createObjectBuilder() + .add(LIST_TYPE, SJP_PRESS_LIST) .add(LANGUAGE, language) .add(REQUEST_TYPE, type) - .add("listPayload", payloadForDocumentGeneration); - if (LOGGER.isInfoEnabled()) { - LOGGER.info("publishing Sjp public event for press report {}, {}", PUBLIC_SJP_PRESS_TRANSPARENCY_REPORT_GENERATED, payloadForDocumentGeneration); + .add("listPayload", payloadForDocumentGeneration) + .build(); + + try { + courtListPublishingService.publishCourtList(courtListPublishRequest.toString()); + } catch (IOException e) { + throw new RuntimeException("IO Exception happened while publishing sjp press court list", e); } - sender.send(Envelope.envelopeFrom(metadataFrom(envelope.metadata()) - .withName(PUBLIC_SJP_PRESS_TRANSPARENCY_REPORT_GENERATED), - pendingListEnglishBuilder.build())); } private void storeReportMetadata(final JsonEnvelope envelope, diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java index d78984bdea..5106d859ca 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java @@ -31,6 +31,7 @@ import uk.gov.justice.services.messaging.JsonEnvelope; import uk.gov.justice.services.messaging.JsonObjects; import uk.gov.moj.cpp.sjp.domain.ListType; +import uk.gov.moj.cpp.sjp.event.processor.service.CourtListPublishingService; import uk.gov.moj.cpp.sjp.event.processor.service.ExportType; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataOffencesService; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataService; @@ -38,9 +39,9 @@ import uk.gov.moj.cpp.sjp.event.processor.utils.PayloadHelper; import uk.gov.moj.cpp.sjp.event.transparency.TransparencyJSONReportRequested; import uk.gov.moj.cpp.sjp.event.transparency.TransparencyPDFReportRequested; -import uk.gov.moj.cpp.sjp.event.transparency.TransparencyReportRequested; import java.io.ByteArrayInputStream; +import java.io.IOException; import java.time.LocalDate; import java.time.Period; import java.util.Comparator; @@ -67,7 +68,8 @@ public class TransparencyReportRequestedProcessor { private static final int DEFENDANT_IS_18 = 18; private static final String SJP_OFFENCES = "sjpOffences"; private static final String OFFENCES = "offences"; - private static final String PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED = "public.sjp.pending-cases-public-list-generated"; + private static final String LIST_TYPE = "listType"; + private static final String SJP_PUBLISH_LIST = "SJP_PUBLISH_LIST"; public static final String DEFENDANT_NAME = "defendantName"; public static final String PROSECUTOR_NAME = "prosecutorName"; public static final String TITLE = "title"; @@ -104,6 +106,9 @@ public class TransparencyReportRequestedProcessor { @Inject private PayloadHelper payloadHelper; + @Inject + private CourtListPublishingService courtListPublishingService; + private String getTemplateIdentifier(final String type, final String lang) { return "PublicPendingCases" + type + lang; } @@ -140,67 +145,10 @@ public void createTransparencyJSONReport(final JsonEnvelope envelope) { final boolean isWelsh = WELSH.name().equalsIgnoreCase(eventPayload.getString(LANGUAGE)); LOGGER.info("generating public transparency JSON report {}", transparencyReportId); final List filteredCases = getFilteredCases(allPendingCasesFromViewStore); - sendPublicEvent(envelope, buildPayload(filteredCases, isWelsh, true, envelope)); - storeReportMetadata(envelope, transparencyReportId, filteredCases); - } - - /** - * This method is deprecated with CCT-2079. Use the new method createTransparencyPDFReport or - * createTransparencyJSONReport - * - * @deprecated @Link{createTransparencyPDFReport} or @Link{createTransparencyJSONReport} - */ - @Deprecated(forRemoval = true) - @SuppressWarnings({"squid:S00112", "squid:S1133"}) - @Handles(TransparencyReportRequested.EVENT_NAME) - @Transactional - public void createTransparencyReport(final JsonEnvelope envelope) { - payloadHelper.initCache(); - - final JsonObject eventPayload = envelope.payloadAsJsonObject(); - final UUID transparencyReportId = fromString(eventPayload.getString(TRANSPARENCY_REPORT_ID)); - final List allPendingCasesFromViewStore = getPendingCasesFromViewStore(envelope); - final List filteredCases = getFilteredCases(allPendingCasesFromViewStore); + publishCourtList(envelope, buildPayload(filteredCases, isWelsh, true, envelope)); storeReportMetadata(envelope, transparencyReportId, filteredCases); - try { - final JsonObject payloadForDocumentGenerationEnglish = buildPayload(filteredCases, false, false, envelope); - final String englishPayloadFileName = String.format("transparency-report-template-parameters.english.%s.json", transparencyReportId); - final UUID englishPayloadFileId = storeDocumentGeneratorPayload(payloadForDocumentGenerationEnglish, englishPayloadFileName, "type", LANGUAGE); - requestDocumentGeneration(envelope, transparencyReportId, englishPayloadFileId, "type", LANGUAGE); - - final JsonObject payloadForPublicEventInEnglish = buildPayload(filteredCases, false, true, envelope); - if (LOGGER.isInfoEnabled()) { - LOGGER.info("publishing Sjp public event for english report {}, {}", PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED, payloadForPublicEventInEnglish); - } - final JsonObjectBuilder pendingListEnglishBuilder = createObjectBuilder() - .add(LANGUAGE, "ENGLISH") - .add(LIST_PAYLOAD, payloadForPublicEventInEnglish); - sender.send(Envelope.envelopeFrom(metadataFrom(envelope.metadata()) - .withName(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED), - pendingListEnglishBuilder.build())); - - final JsonObject payloadForDocumentGenerationWelsh = buildPayload(filteredCases, true, false, envelope); - final String welshPayloadFileName = String.format("transparency-report-template-parameters.welsh.%s.json", transparencyReportId); - final UUID welshPayloadFileId = storeDocumentGeneratorPayload(payloadForDocumentGenerationWelsh, welshPayloadFileName, "type", LANGUAGE); - requestDocumentGeneration(envelope, transparencyReportId, welshPayloadFileId, "type", LANGUAGE); - - final JsonObject payloadForPublicEventInWelsh = buildPayload(filteredCases, true, true, envelope); - if (LOGGER.isInfoEnabled()) { - LOGGER.info("publishing Sjp public event for welsh report {}, {}", PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED, payloadForPublicEventInEnglish); - } - final JsonObjectBuilder pendingListWelshBuilder = createObjectBuilder() - .add(LANGUAGE, "WELSH") - .add(LIST_PAYLOAD, payloadForPublicEventInWelsh); - sender.send(Envelope.envelopeFrom(metadataFrom(envelope.metadata()) - .withName(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED), - pendingListWelshBuilder.build())); - - } catch (FileServiceException e) { - throw new RuntimeException("IO Exception happened during transparency report generation", e); - } } - private void requestDocumentGeneration(final JsonEnvelope envelope, final UUID reportId, final JsonObject payload) throws FileServiceException { final String payloadFileName = String.format("transparency-report-template-parameters.%s.json", reportId.toString()); String type = envelope.payloadAsJsonObject().getString(REQUEST_TYPE).toLowerCase(); @@ -231,18 +179,22 @@ private void sendDocumentGenerationRequest(final JsonEnvelope eventEnvelope, ); } - private void sendPublicEvent(final JsonEnvelope envelope, final JsonObject payloadForDocumentGeneration) { - LOGGER.info("publishing public event for sjp pending cases for public list in english"); + private void publishCourtList(final JsonEnvelope envelope, final JsonObject payloadForDocumentGeneration) { + LOGGER.info("publishing sjp pending cases public list to court list publishing service"); final String type = envelope.payloadAsJsonObject().getString(REQUEST_TYPE); final String language = envelope.payloadAsJsonObject().getString(LANGUAGE); - final JsonObjectBuilder pendingListEnglishBuilder = createObjectBuilder() + final JsonObject courtListPublishRequest = createObjectBuilder() + .add(LIST_TYPE, SJP_PUBLISH_LIST) .add(LANGUAGE, language) .add(REQUEST_TYPE, type) - .add(LIST_PAYLOAD, payloadForDocumentGeneration); + .add(LIST_PAYLOAD, payloadForDocumentGeneration) + .build(); - sender.send(Envelope.envelopeFrom(metadataFrom(envelope.metadata()) - .withName(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED), - pendingListEnglishBuilder.build())); + try { + courtListPublishingService.publishCourtList(courtListPublishRequest.toString()); + } catch (IOException e) { + throw new RuntimeException("IO Exception happened while publishing sjp court list", e); + } } private List getPendingCasesFromViewStore(final JsonEnvelope envelope) { @@ -286,25 +238,6 @@ private JsonObject buildPayload(final List pendingCases, boolean isW .build(); } - private void requestDocumentGeneration(final JsonEnvelope eventEnvelope, - final UUID transparencyReportId, - final UUID payloadFileServiceUUID, final String type, final String language) { - - final JsonObject docGeneratorPayload = createObjectBuilder() - .add("originatingSource", "sjp") - .add(TEMPLATE_IDENTIFIER_STRING, payloadHelper.getTemplateIdentifier(type, language, ExportType.PUBLIC.name())) - .add(CONVERSION_FORMAT_STRING, CONVERSION_FORMAT) - .add("sourceCorrelationId", transparencyReportId.toString()) - .add("payloadFileServiceId", payloadFileServiceUUID.toString()) - .build(); - sender.sendAsAdmin( - Envelope.envelopeFrom( - metadataFrom(eventEnvelope.metadata()).withName("systemdocgenerator.generate-document"), - docGeneratorPayload - ) - ); - } - private UUID storeDocumentGeneratorPayload(final JsonObject documentGeneratorPayload, final String fileName, final String type, final String language) throws FileServiceException { final byte[] jsonPayloadInBytes = jsonObjectAsByteArray(documentGeneratorPayload); diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java index 73ddfaf296..63e32771ba 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java @@ -15,7 +15,11 @@ public class ApplicationParameters { @Value(key = "RELAY_CASE_ON_CPP_FUNCTION_PATH") private String relayCaseOnCppFunctionPath; - + @Inject + @Value(key = "COURT_LIST_PUBLISHING_SERVICE_URL") + private String courtListPublishingServiceUrl; + + public String getAzureFunctionHostName() { return azureFunctionHostName; @@ -25,4 +29,9 @@ public String getRelayCaseOnCppFunctionPath() { return relayCaseOnCppFunctionPath; } + + public String getCourtListPublishingServiceUrl() { + + return courtListPublishingServiceUrl; + } } diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java new file mode 100644 index 0000000000..98ff71495f --- /dev/null +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java @@ -0,0 +1,31 @@ +package uk.gov.moj.cpp.sjp.event.processor.service; + +import uk.gov.moj.cpp.sjp.event.processor.helper.HttpConnectionHelper; + +import java.io.IOException; + +import javax.inject.Inject; + +public class CourtListPublishingService { + + private static final String PUBLISH_SJP_COURT_LIST_PATH = "/api/court-list-publish/sjp/publishCourtList"; + + private HttpConnectionHelper httpConnectionHelper; + + @Inject + private ApplicationParameters applicationParameters; + + public CourtListPublishingService() { + this.httpConnectionHelper = new HttpConnectionHelper(); + } + + public CourtListPublishingService(final HttpConnectionHelper httpConnectionHelper, final ApplicationParameters applicationParameters) { + this.httpConnectionHelper = httpConnectionHelper; + this.applicationParameters = applicationParameters; + } + + public Integer publishCourtList(final String payload) throws IOException { + return httpConnectionHelper.getResponseCode( + applicationParameters.getCourtListPublishingServiceUrl() + PUBLISH_SJP_COURT_LIST_PATH, payload); + } +} diff --git a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessorTest.java b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessorTest.java index a82128ed24..7065cbcb08 100644 --- a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessorTest.java +++ b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessorTest.java @@ -40,15 +40,17 @@ import uk.gov.justice.services.fileservice.api.FileStorer; import uk.gov.justice.services.messaging.Envelope; import uk.gov.justice.services.messaging.JsonEnvelope; -import uk.gov.justice.services.messaging.spi.DefaultEnvelope; import uk.gov.moj.cpp.sjp.domain.DocumentRequestType; import uk.gov.moj.cpp.sjp.domain.ListType; +import uk.gov.moj.cpp.sjp.event.processor.service.CourtListPublishingService; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataOffencesService; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataService; import uk.gov.moj.cpp.sjp.event.processor.service.SjpService; import uk.gov.moj.cpp.sjp.event.processor.utils.PayloadHelper; +import java.io.IOException; import java.io.InputStream; +import java.io.StringReader; import java.time.DayOfWeek; import java.time.LocalDate; import java.time.LocalDateTime; @@ -63,6 +65,7 @@ import java.util.UUID; import java.util.function.Function; +import javax.json.Json; import javax.json.JsonArray; import javax.json.JsonArrayBuilder; import javax.json.JsonObject; @@ -81,7 +84,6 @@ public class PressTransparencyReportRequestedProcessorTest { private static final DateTimeFormatter DOB_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - private static final String PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED = "public.sjp.press-transparency-report-generated"; private static final String STORE_PRESS_TRANSPARENCY_REPORT_DATA_COMMAND = "sjp.command.store-press-transparency-report-data"; private static final String EXPECTED_TEMPLATE_NAME_DELTA = "PressPendingCasesDeltaEnglish"; private static final String EXPECTED_TEMPLATE_NAME_FULL = "PressPendingCasesFullEnglish"; @@ -164,6 +166,8 @@ public class PressTransparencyReportRequestedProcessorTest { private PayloadHelper payloadHelper; @Mock private SjpService sjpService; + @Mock + private CourtListPublishingService courtListPublishingService; @Captor private ArgumentCaptor payloadForDocumentGenerationCaptor; @Captor @@ -171,7 +175,7 @@ public class PressTransparencyReportRequestedProcessorTest { @Captor private ArgumentCaptor storePressTransparencyReportCommandEnvelopeCaptor; @Captor - private ArgumentCaptor defaultEnvelopeArgumentCaptor; + private ArgumentCaptor courtListPublishRequestCaptor; @BeforeEach public void setUp() throws Exception { @@ -191,33 +195,6 @@ private void mockSjpService(final List sjpService, final List pendingCasesList = pendingCasesList(CASE_IDS, false, defendantDateOfBirth, false); - - mockCommon(sjpService.getPendingDeltaCases(any(), any()), pendingCasesList); - - processor.handlePressTransparencyRequest(PRIVATE_EVENT_PDF_ENVELOPE_DELTA); - - final JsonObject actual = getDocumentGeneratorPayloadFromFileStorer(); - - actual.getJsonArray("readyCases").forEach(rc -> - assertThat(rc.toString(), isJson(withJsonPath("$.dateOfBirth", equalTo(format(getAge(defendantDateOfBirth))))))); - - assertPayloadForDocumentGenerator(actual, pendingCasesList, NUMBER_OF_PENDING_CASES_FOR_EXPORT, false); - - verify(sender).sendAsAdmin(documentGenerationRequestCaptor.capture()); - - assertDocumentGenerationRequest(documentGenerationRequestCaptor.getValue(), EXPECTED_DOC_GENERATION_PAYLOAD_DELTA); - - verify(sender, times(1)).send(storePressTransparencyReportCommandEnvelopeCaptor.capture()); - assertPressTransparencyReportEnvelope(storePressTransparencyReportCommandEnvelopeCaptor.getValue(), REPORT_ID, CASE_IDS, DocumentRequestType.DELTA); - } - @Test public void shouldCreatePressTransparencyPDFReportDelta() throws FileServiceException { @@ -282,7 +259,7 @@ public void shouldCreatePressTransparencyPDFReportFull() throws FileServiceExcep } @Test - public void shouldCreatePressTransparencyJSONReportDelta() { + public void shouldCreatePressTransparencyJSONReportDelta() throws IOException { final String defendantDateOfBirth = "1980-06-12"; @@ -291,11 +268,10 @@ public void shouldCreatePressTransparencyJSONReportDelta() { mockSjpService(sjpService.getPendingDeltaCases(any(), any()), pendingCasesList); processor.handlePressTransparencyJSONReportRequest(PRIVATE_EVENT_ENVELOPE_JSON_DELTA); - verify(sender, times(1)).send(defaultEnvelopeArgumentCaptor.capture()); - final Envelope jsonEnvelope = defaultEnvelopeArgumentCaptor.getAllValues().get(0); - assertThat(jsonEnvelope.metadata().name(), is(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED)); - final JsonObject eventPayload = (JsonObject) jsonEnvelope.payload(); - final JsonObject payload = eventPayload.getJsonObject("listPayload"); + verify(courtListPublishingService, times(1)).publishCourtList(courtListPublishRequestCaptor.capture()); + final JsonObject courtListPublishRequest = Json.createReader(new StringReader(courtListPublishRequestCaptor.getValue())).readObject(); + assertThat(courtListPublishRequest.getString("listType"), is("SJP_PRESS_LIST")); + final JsonObject payload = courtListPublishRequest.getJsonObject("listPayload"); assertThat(payload.getInt("totalNumberOfRecords"), is(1)); final JsonArray readyCases = payload.getJsonArray("readyCases"); assertThat(1, is(readyCases.size())); @@ -307,7 +283,7 @@ public void shouldCreatePressTransparencyJSONReportDelta() { } @Test - public void shouldCreatePressTransparencyJSONReportFull() { + public void shouldCreatePressTransparencyJSONReportFull() throws IOException { final String defendantDateOfBirth = "1980-06-12"; @@ -316,11 +292,10 @@ public void shouldCreatePressTransparencyJSONReportFull() { mockSjpService(sjpService.getPendingCases(any(), any()), pendingCasesList); processor.handlePressTransparencyJSONReportRequest(PRIVATE_EVENT_ENVELOPE_JSON_FULL); - verify(sender, times(1)).send(defaultEnvelopeArgumentCaptor.capture()); - final Envelope jsonEnvelope = defaultEnvelopeArgumentCaptor.getAllValues().get(0); - assertThat(jsonEnvelope.metadata().name(), is(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED)); - final JsonObject eventPayload = (JsonObject) jsonEnvelope.payload(); - final JsonObject payload = eventPayload.getJsonObject("listPayload"); + verify(courtListPublishingService, times(1)).publishCourtList(courtListPublishRequestCaptor.capture()); + final JsonObject courtListPublishRequest = Json.createReader(new StringReader(courtListPublishRequestCaptor.getValue())).readObject(); + assertThat(courtListPublishRequest.getString("listType"), is("SJP_PRESS_LIST")); + final JsonObject payload = courtListPublishRequest.getJsonObject("listPayload"); assertThat(payload.getInt("totalNumberOfRecords"), is(1)); final JsonArray readyCases = payload.getJsonArray("readyCases"); assertThat(1, is(readyCases.size())); @@ -341,44 +316,6 @@ private JsonObject getDocumentGeneratorPayloadFromFileStorer() throws FileServic return streamToJsonObject(payloadBytes); } - @Test - @SuppressWarnings("deprecation") - public void shouldCreatePressTransparencyWhenNoDateOfBirthReport() throws FileServiceException { - - final String defendantDateOfBirth = ""; - - final List pendingCasesList = pendingCasesList(CASE_IDS, false, defendantDateOfBirth, false); - - mockCommon(sjpService.getPendingDeltaCases(any(), any()), pendingCasesList); - - processor.handlePressTransparencyRequest(PRIVATE_EVENT_PDF_ENVELOPE_DELTA); - - final JsonObject actual = getDocumentGeneratorPayloadFromFileStorer(); - - assertThat(actual.containsKey("dateOfBirth"), is(false)); - - - } - - @Test - @SuppressWarnings("deprecation") - public void shouldExcludeYouthDefendants() throws FileServiceException { - - final String defendantDateOfBirth = "1980-06-12"; - - final List pendingCasesList = pendingCasesList(CASE_IDS, true, defendantDateOfBirth, false); - - mockCommon(sjpService.getPendingDeltaCases(any(), any()), pendingCasesList); - - processor.handlePressTransparencyRequest(PRIVATE_EVENT_PDF_ENVELOPE_DELTA); - - verify(fileStorer).store(any(JsonObject.class), payloadForDocumentGenerationCaptor.capture()); - - final InputStream payloadBytes = payloadForDocumentGenerationCaptor.getValue(); - final JsonObject payloadForDocumentGenerator = streamToJsonObject(payloadBytes); - - } - @Test public void shouldCreatePressTransparencyPDFWhenNoDateOfBirthReport() throws FileServiceException { diff --git a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java index e34e2faab9..0154b6dc29 100644 --- a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java +++ b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java @@ -4,10 +4,8 @@ import static java.util.UUID.randomUUID; import static java.util.stream.Collectors.toList; import static java.util.stream.IntStream.range; -import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.everyItem; -import static org.hamcrest.Matchers.isEmptyOrNullString; import static org.hamcrest.Matchers.isIn; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsNull.notNullValue; @@ -29,21 +27,24 @@ import uk.gov.justice.services.messaging.Envelope; import uk.gov.justice.services.messaging.JsonEnvelope; import uk.gov.justice.services.messaging.Metadata; -import uk.gov.justice.services.messaging.spi.DefaultEnvelope; import uk.gov.moj.cpp.sjp.domain.DocumentFormat; import uk.gov.moj.cpp.sjp.domain.DocumentRequestType; +import uk.gov.moj.cpp.sjp.event.processor.service.CourtListPublishingService; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataOffencesService; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataService; import uk.gov.moj.cpp.sjp.event.processor.service.SjpService; import uk.gov.moj.cpp.sjp.event.processor.utils.PayloadHelper; +import java.io.IOException; import java.io.InputStream; +import java.io.StringReader; import java.time.LocalDate; import java.util.LinkedList; import java.util.List; import java.util.Objects; import java.util.UUID; +import javax.json.Json; import javax.json.JsonArray; import javax.json.JsonArrayBuilder; import javax.json.JsonObject; @@ -60,8 +61,6 @@ @ExtendWith(MockitoExtension.class) public class TransparencyReportRequestedProcessorTest { - private static final String PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED = "public.sjp.pending-cases-public-list-generated"; - @InjectMocks private TransparencyReportRequestedProcessor processor; @@ -80,6 +79,9 @@ public class TransparencyReportRequestedProcessorTest { @Mock private SjpService sjpService; + @Mock + private CourtListPublishingService courtListPublishingService; + @Captor private ArgumentCaptor payloadForFileServiceCaptor; @@ -90,75 +92,11 @@ public class TransparencyReportRequestedProcessorTest { private ArgumentCaptor storeTransparencyReportCommandEnvelopeCaptor; @Captor - private ArgumentCaptor defaultEnvelopeArgumentCaptor; + private ArgumentCaptor courtListPublishRequestCaptor; @Mock private PayloadHelper payloadHelper; - @Test - @SuppressWarnings("deprecation") - public void shouldCreateTransparencyReport() throws FileServiceException { - final UUID englishPayloadFileUUID = randomUUID(); - final UUID welshPayloadFileUUID = randomUUID(); - final UUID transparencyReportId = randomUUID(); - final String expectedEnglishTemplateName = "PublicPendingCasesFullEnglish"; - - final String offenceTitle = "OffenceTitle"; - final String prosecutorName = "TFL"; - final String prosecutorEnglish = "Transport For London"; - final String prosecutorWelsh = "Transport For London - Welsh"; - final Integer numberOfPendingCasesForExport = 9; - final List caseIds = range(0, numberOfPendingCasesForExport) - .mapToObj(e -> randomUUID()).collect(toList()); - - // create 5 young offenders - final List youngOffenderCaseIds = range(0, 5) - .mapToObj(e -> randomUUID()).collect(toList()); - - // create 5 press restricted case ids - final List pressRestrictionCaseIds = range(0, 5) - .mapToObj(e -> randomUUID()).collect(toList()); - - when(payloadHelper.buildOffenceTitleFromOffenceArray(any(), eq(false), any())).thenReturn(offenceTitle); - when(payloadHelper.buildOffenceTitleFromOffenceArray(any(), eq(true), any())).thenReturn(offenceTitle); - when(payloadHelper.mapOffenceIntoOffenceTitleString(any(), eq(false), any())).thenReturn(offenceTitle); - when(payloadHelper.mapOffenceIntoOffenceTitleString(any(), eq(true), any())).thenReturn(offenceTitle); - when(payloadHelper.buildProsecutorName(eq(prosecutorName), eq(false), any())).thenReturn(prosecutorEnglish); - when(payloadHelper.buildProsecutorName(eq(prosecutorName), eq(true), any())).thenReturn(prosecutorWelsh); - when(payloadHelper.getStartDate(eq(false))).thenReturn("15 January 2024"); - when(payloadHelper.getStartDate(eq(true))).thenReturn("ers 21 Tachwedd"); - when(payloadHelper.getTemplateIdentifier(any(), any(), any())).thenReturn(expectedEnglishTemplateName); - - final List pendingCasesList = pendingCasesList(caseIds, youngOffenderCaseIds, pressRestrictionCaseIds); - when(sjpService.getPendingCases(any(), any())).thenReturn(pendingCasesList); - when(fileStorer.store(any(), any())) - .thenReturn(englishPayloadFileUUID) - .thenReturn(welshPayloadFileUUID); - - final JsonEnvelope privateEventEnvelope = envelopeFrom( - metadataWithRandomUUID("sjp.events.transparency-report-requested"), - createObjectBuilder() - .add("transparencyReportId", transparencyReportId.toString()) - .add("requestType", DocumentRequestType.FULL.name()) - .add("language", "ENGLISH") - .add("format", DocumentFormat.PDF.name()) - .build() - ); - processor.createTransparencyReport(privateEventEnvelope); - - verify(fileStorer, times(2)).store(any(JsonObject.class), payloadForFileServiceCaptor.capture()); - verify(sender, times(2)).sendAsAdmin(payloadForDocumentGenerationCaptor.capture()); - - final JsonObject payloadForEnglishPdf = streamToJsonObject(payloadForFileServiceCaptor.getAllValues().get(0)); - final JsonObject payloadForWelshPdf = streamToJsonObject(payloadForFileServiceCaptor.getAllValues().get(1)); - - assertPayloadForDocumentGenerator(payloadForEnglishPdf, pendingCasesList, numberOfPendingCasesForExport, false); - assertPayloadForDocumentGenerator(payloadForWelshPdf, pendingCasesList, numberOfPendingCasesForExport, true); - - verify(sender, times(1)).send(storeTransparencyReportCommandEnvelopeCaptor.capture()); - assertTransparencyReportEnvelope(storeTransparencyReportCommandEnvelopeCaptor.getAllValues().get(0), transparencyReportId, caseIds); - } - @Test public void shouldCreateTransparencyPDFReportFULL() throws FileServiceException { final String expectedEnglishTemplateName = "PublicPendingCasesFullEnglish"; @@ -273,7 +211,7 @@ public void shouldCreateTransparencyPDFReportDELTA() throws FileServiceException } @Test - public void shouldCreateTransparencyReportJSONFull() throws FileServiceException { + public void shouldCreateTransparencyReportJSONFull() throws FileServiceException, IOException { final String expectedEnglishTemplateName = "PublicPendingCasesFullEnglish"; final UUID englishPayloadFileUUID = randomUUID(); final UUID welshPayloadFileUUID = randomUUID(); @@ -313,11 +251,10 @@ public void shouldCreateTransparencyReportJSONFull() throws FileServiceException ); processor.createTransparencyJSONReport(privateEventEnvelope); - verify(sender, times(1)).send(defaultEnvelopeArgumentCaptor.capture()); - final Envelope jsonEnvelope = defaultEnvelopeArgumentCaptor.getAllValues().get(0); - assertThat(jsonEnvelope.metadata().name(), is(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED)); - final JsonObject eventPayload = (JsonObject) jsonEnvelope.payload(); - final JsonObject payload = eventPayload.getJsonObject("listPayload"); + verify(courtListPublishingService, times(1)).publishCourtList(courtListPublishRequestCaptor.capture()); + final JsonObject courtListPublishRequest = Json.createReader(new StringReader(courtListPublishRequestCaptor.getValue())).readObject(); + assertThat(courtListPublishRequest.getString("listType"), is("SJP_PUBLISH_LIST")); + final JsonObject payload = courtListPublishRequest.getJsonObject("listPayload"); assertThat(payload.getInt("totalNumberOfRecords"), is(9)); final JsonArray readyCases = payload.getJsonArray("readyCases"); assertThat(9, is(readyCases.size())); @@ -387,22 +324,6 @@ public void shouldCreateTransparencyReportJSONDELTA() throws FileServiceExceptio verify(sender, times(1)).send(storeTransparencyReportCommandEnvelopeCaptor.capture()); } - private void assertSJPPendingPublicListEnvelope(final Envelope jsonEnvelope, final String language, final Integer numberOfPendingCasesForExport, final String prosecutorName) { - assertThat(jsonEnvelope.metadata().name(), is(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED)); - final JsonObject eventPayload = (JsonObject) jsonEnvelope.payload(); - final JsonObject payload = eventPayload.getJsonObject("listPayload"); - assertThat(payload.getInt("totalNumberOfRecords"), is(numberOfPendingCasesForExport)); - final JsonArray readyCases = payload.getJsonArray("readyCases"); - assertThat(numberOfPendingCasesForExport, is(readyCases.size())); - readyCases.getValuesAs(JsonObject.class).forEach(jsonObject -> { - assertThat(jsonObject.getString("prosecutorName"), is(prosecutorName)); - assertThat(jsonObject.getJsonArray("sjpOffences"), notNullValue()); - assertThat(jsonObject.getString("firstName"), not(isEmptyOrNullString())); - assertThat(jsonObject.getString("lastName"), not(isEmptyOrNullString())); - }); - } - - private void assertPayloadForDocumentGenerator(final JsonObject payload, final List pendingCasesList, final Integer totalNumberOfRecords, final Boolean isWelsh) { assertReadyCasesPayloadWithPendingCases(payload, pendingCasesList, "postcode"); diff --git a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.pending-cases-public-list-generated.json b/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.pending-cases-public-list-generated.json deleted file mode 100644 index a4dc7303cc..0000000000 --- a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.pending-cases-public-list-generated.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://cpp.moj.gov.uk/sjp/json/schema/event/public.sjp.pending-cases-public-list-generated.json", - "type": "object", - "properties": { - "requestType": { - "enum": [ - "FULL", - "DELTA" - ] - }, - "language": { - "enum": [ - "ENGLISH", - "WELSH", - "BI_LINGUAL" - ] - }, - "listPayload": { - "type": "object", - "properties": { - "generatedDateAndTime": { - "type": "string" - }, - "totalNumberOfRecords": { - "type": "integer" - }, - "startDate": { - "type": "string" - }, - "readyCases": { - "type": "array", - "items": { - "type": "object", - "properties": { - "defendantName": { - "type": "string" - }, - "prosecutorName": { - "type": "string" - }, - "legalEntityName": { - "type": "string" - }, - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "postcode": { - "type": "string" - }, - "sjpOffences": { - "type": "array", - "items": { - "type": "object", - "properties": { - "title": { - "type": "string" - } - } - } - } - } - } - } - }, - "required": [ - "generatedDateAndTime", - "totalNumberOfRecords", - "readyCases" - ], - "additionalProperties": false - } - }, - "required": [ - "language", - "listPayload" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.press-transparency-report-generated.json b/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.press-transparency-report-generated.json deleted file mode 100644 index 4d7c48226a..0000000000 --- a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.press-transparency-report-generated.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "$schema":"http://json-schema.org/draft-04/schema#", - "id":"http://cpp.moj.gov.uk/sjp/json/schema/event/public.sjp.press-transparency-report-generated.json", - "type":"object", - "properties":{ - "requestType": { - "type": "string", - "enum": [ - "FULL", - "DELTA" - ] - }, - "language":{ - "enum":[ - "ENGLISH", - "WELSH", - "BI_LINGUAL" - ] - }, - "listPayload":{ - "type":"object", - "properties":{ - "generatedDateAndTime":{ - "type":"string" - }, - "totalNumberOfRecords":{ - "type":"integer" - }, - "readyCases":{ - "type":"array", - "items":{ - "type":"object", - "properties":{ - "caseUrn":{ - "type":"string" - }, - "defendantName":{ - "type":"string" - }, - "dateOfBirth":{ - "type":"string" - }, - "age":{ - "type":"string" - }, - "prosecutorName":{ - "type":"string" - }, - "legalEntityName":{ - "type":"string" - }, - "title":{ - "type":"string" - }, - "firstName":{ - "type":"string" - }, - "lastName":{ - "type":"string" - }, - "addressLine1":{ - "type":"string" - }, - "addressLine2":{ - "type":"string" - }, - "addressLine3":{ - "type":"string" - }, - "town":{ - "type":"string" - }, - "county":{ - "type":"string" - }, - "postcode":{ - "type":"string" - }, - "sjpOffences":{ - "type":"array", - "items":{ - "type":"object", - "properties":{ - "title":{ - "type":"string" - }, - "wording":{ - "type":"string" - }, - "reportingRestriction":{ - "type":"boolean" - }, - "pressRestrictionName":{ - "type":"string" - } - } - } - } - } - } - } - }, - "required":[ - "generatedDateAndTime", - "totalNumberOfRecords", - "readyCases" - ] - } - }, - "required":[ - "language", - "listPayload" - ] -} \ No newline at end of file diff --git a/sjp-event/sjp-event-processor/src/yaml/json/schema/sjp.events.transparency-report-requested.json b/sjp-event/sjp-event-processor/src/yaml/json/schema/sjp.events.transparency-report-requested.json deleted file mode 100644 index 20a1091d60..0000000000 --- a/sjp-event/sjp-event-processor/src/yaml/json/schema/sjp.events.transparency-report-requested.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://justice.gov.uk/json/schemas/domains/sjp/events/transparency-report-requested.json", - "type": "object", - "properties": { - "requestedAt": { - "$ref": "http://justice.gov.uk/json/schemas/domains/sjp/temporal.json#/definitions/date-time" - }, - "transparencyReportId" : { - "$ref": "http://justice.gov.uk/domain/core/common/definitions.json#/definitions/uuid" - } - }, - "required": [ - "transparencyReportId", - "requestedAt" - ], - "additionalProperties": false -} diff --git a/sjp-event/sjp-event-processor/src/yaml/json/sjp.events.transparency-report-requested.json b/sjp-event/sjp-event-processor/src/yaml/json/sjp.events.transparency-report-requested.json deleted file mode 100644 index 78b1a1887c..0000000000 --- a/sjp-event/sjp-event-processor/src/yaml/json/sjp.events.transparency-report-requested.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "requestedAt": "2018-02-05T15:14:29.894Z", - "transparencyReportId" : "60ca064a-3d25-4157-a3d1-94e99d00c5a1" -} \ No newline at end of file diff --git a/sjp-event/sjp-event-processor/src/yaml/public-publications-descriptor.yaml b/sjp-event/sjp-event-processor/src/yaml/public-publications-descriptor.yaml index fb12a32995..1d41eeb064 100644 --- a/sjp-event/sjp-event-processor/src/yaml/public-publications-descriptor.yaml +++ b/sjp-event/sjp-event-processor/src/yaml/public-publications-descriptor.yaml @@ -140,15 +140,9 @@ subscriptions_descriptor: - name: public.sjp.events.conviction-court-resolved schema_uri: http://justice.gov.uk/json/schemas/domains/sjp/events/public.sjp.events.conviction-court-resolved.json - - name: public.sjp.pending-cases-public-list-generated - schema_uri: http://cpp.moj.gov.uk/sjp/json/schema/event/public.sjp.pending-cases-public-list-generated.json - - name: public.sjp.case-legal-soc-checked schema_uri: http://cpp.moj.gov.uk/sjp/json/schema/event/public.sjp.marked-as-legal-soc-checked.json - - name: public.sjp.press-transparency-report-generated - schema_uri: http://cpp.moj.gov.uk/sjp/json/schema/event/public.sjp.press-transparency-report-generated.json - - name: public.sjp.case-reserved schema_uri: http://cpp.moj.gov.uk/sjp/json/schema/event/public.sjp.case-reserved.json diff --git a/sjp-event/sjp-event-processor/src/yaml/subscriptions-descriptor.yaml b/sjp-event/sjp-event-processor/src/yaml/subscriptions-descriptor.yaml index 0cdee4dae1..1777d81b93 100644 --- a/sjp-event/sjp-event-processor/src/yaml/subscriptions-descriptor.yaml +++ b/sjp-event/sjp-event-processor/src/yaml/subscriptions-descriptor.yaml @@ -131,18 +131,12 @@ subscriptions_descriptor: - name: sjp.events.case-adjourned-to-later-sjp-hearing-recorded schema_uri: http://cpp.moj.gov.uk/sjp/event/case-adjourned-to-later-sjp-hearing-recorded.json - - name: sjp.events.transparency-report-requested - schema_uri: http://justice.gov.uk/json/schemas/domains/sjp/events/transparency-report-requested.json - - name: sjp.events.transparency-pdf-report-requested schema_uri: http://justice.gov.uk/json/schemas/domains/sjp/events/transparency-pdf-report-requested.json - name: sjp.events.transparency-json-report-requested schema_uri: http://justice.gov.uk/json/schemas/domains/sjp/events/transparency-json-report-requested.json - - name: sjp.events.press-transparency-report-requested - schema_uri: http://justice.gov.uk/json/schemas/domains/sjp/events/press-transparency-report-requested.json - - name: sjp.events.press-transparency-pdf-report-requested schema_uri: http://justice.gov.uk/json/schemas/domains/sjp/events/press-transparency-pdf-report-requested.json diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java new file mode 100644 index 0000000000..de9f243a35 --- /dev/null +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java @@ -0,0 +1,51 @@ +package uk.gov.moj.sjp.it.stub; + +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.findAll; +import static com.github.tomakehurst.wiremock.client.WireMock.post; +import static com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor; +import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; +import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; +import static java.util.Collections.emptyList; +import static java.util.concurrent.TimeUnit.SECONDS; +import static java.util.stream.Collectors.toList; +import static org.apache.http.HttpStatus.SC_OK; +import static org.awaitility.Awaitility.await; +import static uk.gov.moj.sjp.it.util.RestPollerWithDefaults.POLL_INTERVAL; +import static uk.gov.moj.sjp.it.util.RestPollerWithDefaults.TIMEOUT_IN_SECONDS; + +import java.util.Collection; +import java.util.List; + +import com.github.tomakehurst.wiremock.verification.LoggedRequest; +import org.awaitility.core.ConditionTimeoutException; +import org.hamcrest.Matcher; +import org.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class CourtListPublishingServiceStub { + + private static final String PUBLISH_COURT_LIST_URL = "/court-list-publish/sjp/publishCourtList"; + private final static Logger LOGGER = LoggerFactory.getLogger(CourtListPublishingServiceStub.class); + + public static void stubPublishCourtListEndpoint() { + stubFor(post(urlPathEqualTo(PUBLISH_COURT_LIST_URL)) + .willReturn(aResponse().withStatus(SC_OK))); + } + + public static List pollCourtListPublishRequests(final Matcher> matcher) { + try { + return await().pollInterval(POLL_INTERVAL) + .atMost(TIMEOUT_IN_SECONDS, SECONDS).until(() -> + findAll(postRequestedFor(urlPathEqualTo(PUBLISH_COURT_LIST_URL))) + .stream() + .map(LoggedRequest::getBodyAsString) + .map(JSONObject::new) + .collect(toList()), matcher); + } catch (final ConditionTimeoutException timeoutException) { + LOGGER.info("Exception while finding the captured requests in wire mock:" + timeoutException); + return emptyList(); + } + } +} diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PressTransparencyReportIT.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PressTransparencyReportIT.java index 59b2a2b408..ea4b60a1bd 100644 --- a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PressTransparencyReportIT.java +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PressTransparencyReportIT.java @@ -22,6 +22,8 @@ import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubAllReferenceData; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubAnyQueryOffences; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubEnforcementAreaByPostcode; +import static uk.gov.moj.sjp.it.stub.CourtListPublishingServiceStub.pollCourtListPublishRequests; +import static uk.gov.moj.sjp.it.stub.CourtListPublishingServiceStub.stubPublishCourtListEndpoint; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubProsecutorQuery; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubRegionByPostcode; import static uk.gov.moj.sjp.it.stub.SysDocGeneratorStub.pollSysDocGenerationRequests; @@ -68,7 +70,6 @@ public class PressTransparencyReportIT extends BaseIntegrationTest { private static final String SJP_EVENTS_PRESS_TRANSPARENCY_REPORT_GENERATION_STARTED = "sjp.events.press-transparency-pdf-report-generation-started"; private static final String SJP_EVENTS_PRESS_TRANSPARENCY_REPORT_METADATA_ADDED = "sjp.events.press-transparency-pdf-report-metadata-added"; private static final String SJP_EVENTS_PRESS_TRANSPARENCY_REPORT_GENERATION_FAILED = "sjp.events.press-transparency-pdf-report-generation-failed"; - private static final String SJP_PUBLIC_EVENT_PRESS_TRANSPARENCY_REPORT_GENERATED = "public.sjp.press-transparency-report-generated"; private final UUID caseId1 = randomUUID(), caseId2 = randomUUID(); private final UUID offenceId1 = randomUUID(), offenceId2 = randomUUID(); private PressTransparencyReportHelper pressTransparencyReportHelper = new PressTransparencyReportHelper(); @@ -78,6 +79,7 @@ public void beforeEachTest() throws Exception { resetAllRequests(); cleanViewStore(); stubGenerateDocumentEndPoint(); + stubPublishCourtListEndpoint(); stubAllIndividualProsecutorsQueries(); stubAnyQueryOffences(); stubAllReferenceData(); @@ -197,28 +199,19 @@ public void shouldGeneratePressTransparencyJsonReports() { final EventListener eventListener = new EventListener() .withMaxWaitTime(50000) - .subscribe( - SJP_EVENTS_PRESS_TRANSPARENCY_REPORT_REQUESTED_JSON, - SJP_PUBLIC_EVENT_PRESS_TRANSPARENCY_REPORT_GENERATED - ) + .subscribe(SJP_EVENTS_PRESS_TRANSPARENCY_REPORT_REQUESTED_JSON) .run(() -> pressTransparencyReportHelper.requestToGeneratePressTransparencyReport(payload)); final Optional transparencyReportRequestedEvent = eventListener.popEvent(SJP_EVENTS_PRESS_TRANSPARENCY_REPORT_REQUESTED_JSON); - final Optional transparencyReportStartedEvent = eventListener.popEvent(SJP_PUBLIC_EVENT_PRESS_TRANSPARENCY_REPORT_GENERATED); - assertThat(transparencyReportRequestedEvent.isPresent(), is(true)); - assertThat(transparencyReportStartedEvent.isPresent(), is(true)); - - final String pressTransparencyReportId = transparencyReportRequestedEvent - .map(requestedEvent -> requestedEvent.payloadAsJsonObject().getString("pressTransparencyReportId")) - .orElse(""); + final List courtListPublishRequests = pollCourtListPublishRequests(hasSize(1)); + final JSONObject courtListPublishRequest = courtListPublishRequests.get(0); - final JsonEnvelope transparencyReportStartedEnvelope = transparencyReportStartedEvent.get(); - final JsonObject transparencyReportStartedPayload = transparencyReportStartedEnvelope.payloadAsJsonObject(); + assertThat(courtListPublishRequest.getString("listType"), is("SJP_PRESS_LIST")); - JsonArray readyCases = transparencyReportStartedPayload.getJsonObject("listPayload").getJsonArray("readyCases"); - assertThat(readyCases.size(), is(2)); + final JSONObject listPayload = courtListPublishRequest.getJSONObject("listPayload"); + assertThat(listPayload.getJSONArray("readyCases").length(), is(2)); } @Test diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java index 22900113b1..0e64566547 100644 --- a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java @@ -22,6 +22,8 @@ import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubAllReferenceData; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubAnyQueryOffences; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubEnforcementAreaByPostcode; +import static uk.gov.moj.sjp.it.stub.CourtListPublishingServiceStub.pollCourtListPublishRequests; +import static uk.gov.moj.sjp.it.stub.CourtListPublishingServiceStub.stubPublishCourtListEndpoint; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubProsecutorQuery; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubRegionByPostcode; import static uk.gov.moj.sjp.it.stub.SysDocGeneratorStub.pollSysDocGenerationRequests; @@ -67,7 +69,6 @@ public class TransparencyReportIT extends BaseIntegrationTest { private static final String SJP_EVENTS_TRANSPARENCY_REPORT_GENERATION_STARTED = "sjp.events.transparency-pdf-report-generation-started"; private static final String SJP_EVENTS_TRANSPARENCY_REPORT_METADATA_ADDED = "sjp.events.transparency-pdf-report-metadata-added"; private static final String SJP_EVENTS_TRANSPARENCY_REPORT_GENERATION_FAILED = "sjp.events.transparency-pdf-report-generation-failed"; - private static final String SJP_PUBLIC_EVENT_TRANSPARENCY_REPORT_GENERATED = "public.sjp.pending-cases-public-list-generated"; public static final String TRANSPARENCY_REPORT_ID = "transparencyReportId"; private final UUID caseId1 = randomUUID(), caseId2 = randomUUID(); @@ -79,9 +80,11 @@ public void beforeEachTest() throws Exception { resetAllRequests(); cleanViewStore(); stubGenerateDocumentEndPoint(); + stubPublishCourtListEndpoint(); stubAllIndividualProsecutorsQueries(); stubAnyQueryOffences(); stubAllReferenceData(); + setupIdMapperStub(); } @@ -199,23 +202,19 @@ public void shouldGenerateTransparencyJsonReports() { final EventListener eventListener = new EventListener() .withMaxWaitTime(50000) - .subscribe( - SJP_EVENTS_TRANSPARENCY_REPORT_REQUESTED_JSON, - SJP_PUBLIC_EVENT_TRANSPARENCY_REPORT_GENERATED - ) + .subscribe(SJP_EVENTS_TRANSPARENCY_REPORT_REQUESTED_JSON) .run(() -> transparencyReportHelper.requestToGenerateTransparencyReport(payload)); final Optional transparencyReportRequestedEvent = eventListener.popEvent(SJP_EVENTS_TRANSPARENCY_REPORT_REQUESTED_JSON); - final Optional transparencyReportStartedEvent = eventListener.popEvent(SJP_PUBLIC_EVENT_TRANSPARENCY_REPORT_GENERATED); - assertThat(transparencyReportRequestedEvent.isPresent(), is(true)); - assertThat(transparencyReportStartedEvent.isPresent(), is(true)); - final JsonEnvelope transparencyReportStartedEnvelope = transparencyReportStartedEvent.get(); - final JsonObject transparencyReportStartedPayload = transparencyReportStartedEnvelope.payloadAsJsonObject(); + final List courtListPublishRequests = pollCourtListPublishRequests(hasSize(1)); + final JSONObject courtListPublishRequest = courtListPublishRequests.get(0); + + assertThat(courtListPublishRequest.getString("listType"), is("SJP_PUBLISH_LIST")); - JsonArray readyCases = transparencyReportStartedPayload.getJsonObject("listPayload").getJsonArray("readyCases"); - assertThat(readyCases.size(), is(2)); + final JSONObject listPayload = courtListPublishRequest.getJSONObject("listPayload"); + assertThat(listPayload.getJSONArray("readyCases").length(), is(2)); } @Test From 05c7d2528322705604b6ee76efd260ded5b1d14e Mon Sep 17 00:00:00 2001 From: yashpalnegi Date: Wed, 15 Jul 2026 14:23:52 +0100 Subject: [PATCH 02/22] LPT-2348 - Change SJP to POST payload to new SJP publishing endpoint --- .../PressTransparencyReportRequested.java | 51 -------- .../TransparencyReportRequested.java | 57 --------- ...sTransparencyReportRequestedProcessor.java | 54 +++------ .../TransparencyReportRequestedProcessor.java | 105 +++------------- .../service/ApplicationParameters.java | 11 +- .../service/CourtListPublishingService.java | 31 +++++ ...nsparencyReportRequestedProcessorTest.java | 97 +++------------ ...nsparencyReportRequestedProcessorTest.java | 105 ++-------------- ...p.pending-cases-public-list-generated.json | 82 ------------- ...p.press-transparency-report-generated.json | 114 ------------------ ....events.transparency-report-requested.json | 18 --- ....events.transparency-report-requested.json | 4 - .../yaml/public-publications-descriptor.yaml | 6 - .../src/yaml/subscriptions-descriptor.yaml | 6 - .../stub/CourtListPublishingServiceStub.java | 51 ++++++++ .../it/test/PressTransparencyReportIT.java | 25 ++-- .../moj/sjp/it/test/TransparencyReportIT.java | 23 ++-- 17 files changed, 179 insertions(+), 661 deletions(-) delete mode 100644 sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/PressTransparencyReportRequested.java delete mode 100644 sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/TransparencyReportRequested.java create mode 100644 sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java delete mode 100644 sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.pending-cases-public-list-generated.json delete mode 100644 sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.press-transparency-report-generated.json delete mode 100644 sjp-event/sjp-event-processor/src/yaml/json/schema/sjp.events.transparency-report-requested.json delete mode 100644 sjp-event/sjp-event-processor/src/yaml/json/sjp.events.transparency-report-requested.json create mode 100644 sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java diff --git a/sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/PressTransparencyReportRequested.java b/sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/PressTransparencyReportRequested.java deleted file mode 100644 index 510abceabf..0000000000 --- a/sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/PressTransparencyReportRequested.java +++ /dev/null @@ -1,51 +0,0 @@ -package uk.gov.moj.cpp.sjp.event.transparency; - -import static java.util.UUID.randomUUID; - -import uk.gov.justice.domain.annotation.Event; - -import java.time.ZonedDateTime; -import java.util.UUID; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * Event to indicate that the generation of a press transparency report has requested. Use either the JSON or PDF report generation requested events instead. - * - * @deprecated - */ -@Deprecated(forRemoval = true) -@Event(PressTransparencyReportRequested.EVENT_NAME) -@SuppressWarnings("squid:S1133") -public class PressTransparencyReportRequested { - public static final String EVENT_NAME = "sjp.events.press-transparency-report-requested"; - - private UUID pressTransparencyReportId = randomUUID(); - private ZonedDateTime requestedAt; - - @JsonCreator - public PressTransparencyReportRequested( - @JsonProperty("pressTransparencyReportId") final UUID reportId, - @JsonProperty("requestedAt") final ZonedDateTime requestedAt) { - if (reportId != null) { - this.pressTransparencyReportId = reportId; - } - this.requestedAt = requestedAt; - } - - public UUID getPressTransparencyReportId() { - return pressTransparencyReportId; - } - - public ZonedDateTime getRequestedAt() { - return requestedAt; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); - } -} diff --git a/sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/TransparencyReportRequested.java b/sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/TransparencyReportRequested.java deleted file mode 100644 index ddbc8eb156..0000000000 --- a/sjp-domain/sjp-domain-event/src/main/java/uk/gov/moj/cpp/sjp/event/transparency/TransparencyReportRequested.java +++ /dev/null @@ -1,57 +0,0 @@ -package uk.gov.moj.cpp.sjp.event.transparency; - -import static java.util.UUID.randomUUID; - -import uk.gov.justice.domain.annotation.Event; - -import java.time.ZonedDateTime; -import java.util.UUID; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * Event to indicate that the generation of a press transparency report has requested. - * Use either the JSON or PDF report generation requested events instead. - * - * @deprecated - */ -@Deprecated(forRemoval = true) -@Event(TransparencyReportRequested.EVENT_NAME) -@SuppressWarnings("squid:S1133") -public class TransparencyReportRequested { - public static final String EVENT_NAME = "sjp.events.transparency-report-requested"; - - /** - * Default value assigned for event replay where old versions of this - * event don't have an id. - */ - private UUID transparencyReportId = randomUUID(); - - private ZonedDateTime requestedAt; - - @JsonCreator - public TransparencyReportRequested( - @JsonProperty("transparencyReportId") final UUID transparencyReportId, - @JsonProperty("requestedAt") final ZonedDateTime requestedAt) { - if (transparencyReportId != null) { - this.transparencyReportId = transparencyReportId; - } - this.requestedAt = requestedAt; - } - - public ZonedDateTime getRequestedAt() { - return requestedAt; - } - - public UUID getTransparencyReportId() { - return transparencyReportId; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); - } -} diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java index 175cb2d0b6..49b42e0af9 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java @@ -34,6 +34,7 @@ import uk.gov.justice.services.messaging.JsonEnvelope; import uk.gov.justice.services.messaging.JsonObjects; import uk.gov.moj.cpp.sjp.domain.ListType; +import uk.gov.moj.cpp.sjp.event.processor.service.CourtListPublishingService; import uk.gov.moj.cpp.sjp.event.processor.service.ExportType; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataOffencesService; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataService; @@ -43,6 +44,7 @@ import uk.gov.moj.cpp.sjp.event.transparency.PressTransparencyPDFReportRequested; import java.io.ByteArrayInputStream; +import java.io.IOException; import java.time.LocalDate; import java.time.format.DateTimeParseException; import java.util.List; @@ -63,7 +65,8 @@ @ServiceComponent(EVENT_PROCESSOR) public class PressTransparencyReportRequestedProcessor { - public static final String PUBLIC_SJP_PRESS_TRANSPARENCY_REPORT_GENERATED = "public.sjp.press-transparency-report-generated"; + private static final String LIST_TYPE = "listType"; + private static final String SJP_PRESS_LIST = "SJP_PRESS_LIST"; public static final String CASE_URN = "caseUrn"; public static final String FIRST_NAME = "firstName"; public static final String LAST_NAME = "lastName"; @@ -111,6 +114,8 @@ public class PressTransparencyReportRequestedProcessor { @Inject @FrameworkComponent(EVENT_PROCESSOR) private Sender sender; + @Inject + private CourtListPublishingService courtListPublishingService; private String getTemplateIdentifier(final String type, final String lang) { return "PressPendingCases" + type + lang; @@ -148,48 +153,25 @@ public void handlePressTransparencyJSONReportRequest(final JsonEnvelope envelope final UUID reportId = fromString(eventPayload.getString(PRESS_TRANSPARENCY_REPORT_ID)); final boolean isWelsh = WELSH.name().equalsIgnoreCase(eventPayload.getString(LANGUAGE)); LOGGER.info("generating press transparency JSON report for press report {}", reportId); - sendPublicEvent(envelope, buildPayload(pendingCasesFromViewStore, true, envelope, isWelsh)); - } - - /** - * @deprecated with CCT-1587 now we are using two separate events for PDF and JSON report - * generation {@link PressTransparencyPDFReportRequested} and {@link - * PressTransparencyJSONReportRequested} - */ - @Deprecated(forRemoval = true) - @Handles("sjp.events.press-transparency-report-requested") - @Transactional - @SuppressWarnings({"squid:S00112", "squid:S1133"}) - public void handlePressTransparencyRequest(final JsonEnvelope envelope) { - payloadHelper.initCache(); - - final List pendingCasesFromViewStore = getPendingCasesFromViewStore(envelope); - final JsonObject eventPayload = envelope.payloadAsJsonObject(); - final UUID reportId = fromString(eventPayload.getString(PRESS_TRANSPARENCY_REPORT_ID)); - try { - final JsonObject payloadForDocumentGeneration = buildPayload(pendingCasesFromViewStore, false, envelope, false); - requestDocumentGeneration(envelope, reportId, payloadForDocumentGeneration); - sendPublicEvent(envelope, buildPayload(pendingCasesFromViewStore, true, envelope, false)); - storeReportMetadata(envelope, reportId, pendingCasesFromViewStore); - } catch (FileServiceException e) { - throw new RuntimeException("IO Exception happened during press transparency report generation", e); - } + publishCourtList(envelope, buildPayload(pendingCasesFromViewStore, true, envelope, isWelsh)); } - private void sendPublicEvent(final JsonEnvelope envelope, final JsonObject payloadForDocumentGeneration) { - LOGGER.info("publishing public event for sjp pending cases for public list in english"); + private void publishCourtList(final JsonEnvelope envelope, final JsonObject payloadForDocumentGeneration) { + LOGGER.info("publishing sjp press pending cases list to court list publishing service"); final String type = envelope.payloadAsJsonObject().getString(REQUEST_TYPE); final String language = envelope.payloadAsJsonObject().getString(LANGUAGE); - final JsonObjectBuilder pendingListEnglishBuilder = createObjectBuilder() + final JsonObject courtListPublishRequest = createObjectBuilder() + .add(LIST_TYPE, SJP_PRESS_LIST) .add(LANGUAGE, language) .add(REQUEST_TYPE, type) - .add("listPayload", payloadForDocumentGeneration); - if (LOGGER.isInfoEnabled()) { - LOGGER.info("publishing Sjp public event for press report {}, {}", PUBLIC_SJP_PRESS_TRANSPARENCY_REPORT_GENERATED, payloadForDocumentGeneration); + .add("listPayload", payloadForDocumentGeneration) + .build(); + + try { + courtListPublishingService.publishCourtList(courtListPublishRequest.toString()); + } catch (IOException e) { + throw new RuntimeException("IO Exception happened while publishing sjp press court list", e); } - sender.send(Envelope.envelopeFrom(metadataFrom(envelope.metadata()) - .withName(PUBLIC_SJP_PRESS_TRANSPARENCY_REPORT_GENERATED), - pendingListEnglishBuilder.build())); } private void storeReportMetadata(final JsonEnvelope envelope, diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java index d78984bdea..5106d859ca 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java @@ -31,6 +31,7 @@ import uk.gov.justice.services.messaging.JsonEnvelope; import uk.gov.justice.services.messaging.JsonObjects; import uk.gov.moj.cpp.sjp.domain.ListType; +import uk.gov.moj.cpp.sjp.event.processor.service.CourtListPublishingService; import uk.gov.moj.cpp.sjp.event.processor.service.ExportType; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataOffencesService; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataService; @@ -38,9 +39,9 @@ import uk.gov.moj.cpp.sjp.event.processor.utils.PayloadHelper; import uk.gov.moj.cpp.sjp.event.transparency.TransparencyJSONReportRequested; import uk.gov.moj.cpp.sjp.event.transparency.TransparencyPDFReportRequested; -import uk.gov.moj.cpp.sjp.event.transparency.TransparencyReportRequested; import java.io.ByteArrayInputStream; +import java.io.IOException; import java.time.LocalDate; import java.time.Period; import java.util.Comparator; @@ -67,7 +68,8 @@ public class TransparencyReportRequestedProcessor { private static final int DEFENDANT_IS_18 = 18; private static final String SJP_OFFENCES = "sjpOffences"; private static final String OFFENCES = "offences"; - private static final String PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED = "public.sjp.pending-cases-public-list-generated"; + private static final String LIST_TYPE = "listType"; + private static final String SJP_PUBLISH_LIST = "SJP_PUBLISH_LIST"; public static final String DEFENDANT_NAME = "defendantName"; public static final String PROSECUTOR_NAME = "prosecutorName"; public static final String TITLE = "title"; @@ -104,6 +106,9 @@ public class TransparencyReportRequestedProcessor { @Inject private PayloadHelper payloadHelper; + @Inject + private CourtListPublishingService courtListPublishingService; + private String getTemplateIdentifier(final String type, final String lang) { return "PublicPendingCases" + type + lang; } @@ -140,67 +145,10 @@ public void createTransparencyJSONReport(final JsonEnvelope envelope) { final boolean isWelsh = WELSH.name().equalsIgnoreCase(eventPayload.getString(LANGUAGE)); LOGGER.info("generating public transparency JSON report {}", transparencyReportId); final List filteredCases = getFilteredCases(allPendingCasesFromViewStore); - sendPublicEvent(envelope, buildPayload(filteredCases, isWelsh, true, envelope)); - storeReportMetadata(envelope, transparencyReportId, filteredCases); - } - - /** - * This method is deprecated with CCT-2079. Use the new method createTransparencyPDFReport or - * createTransparencyJSONReport - * - * @deprecated @Link{createTransparencyPDFReport} or @Link{createTransparencyJSONReport} - */ - @Deprecated(forRemoval = true) - @SuppressWarnings({"squid:S00112", "squid:S1133"}) - @Handles(TransparencyReportRequested.EVENT_NAME) - @Transactional - public void createTransparencyReport(final JsonEnvelope envelope) { - payloadHelper.initCache(); - - final JsonObject eventPayload = envelope.payloadAsJsonObject(); - final UUID transparencyReportId = fromString(eventPayload.getString(TRANSPARENCY_REPORT_ID)); - final List allPendingCasesFromViewStore = getPendingCasesFromViewStore(envelope); - final List filteredCases = getFilteredCases(allPendingCasesFromViewStore); + publishCourtList(envelope, buildPayload(filteredCases, isWelsh, true, envelope)); storeReportMetadata(envelope, transparencyReportId, filteredCases); - try { - final JsonObject payloadForDocumentGenerationEnglish = buildPayload(filteredCases, false, false, envelope); - final String englishPayloadFileName = String.format("transparency-report-template-parameters.english.%s.json", transparencyReportId); - final UUID englishPayloadFileId = storeDocumentGeneratorPayload(payloadForDocumentGenerationEnglish, englishPayloadFileName, "type", LANGUAGE); - requestDocumentGeneration(envelope, transparencyReportId, englishPayloadFileId, "type", LANGUAGE); - - final JsonObject payloadForPublicEventInEnglish = buildPayload(filteredCases, false, true, envelope); - if (LOGGER.isInfoEnabled()) { - LOGGER.info("publishing Sjp public event for english report {}, {}", PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED, payloadForPublicEventInEnglish); - } - final JsonObjectBuilder pendingListEnglishBuilder = createObjectBuilder() - .add(LANGUAGE, "ENGLISH") - .add(LIST_PAYLOAD, payloadForPublicEventInEnglish); - sender.send(Envelope.envelopeFrom(metadataFrom(envelope.metadata()) - .withName(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED), - pendingListEnglishBuilder.build())); - - final JsonObject payloadForDocumentGenerationWelsh = buildPayload(filteredCases, true, false, envelope); - final String welshPayloadFileName = String.format("transparency-report-template-parameters.welsh.%s.json", transparencyReportId); - final UUID welshPayloadFileId = storeDocumentGeneratorPayload(payloadForDocumentGenerationWelsh, welshPayloadFileName, "type", LANGUAGE); - requestDocumentGeneration(envelope, transparencyReportId, welshPayloadFileId, "type", LANGUAGE); - - final JsonObject payloadForPublicEventInWelsh = buildPayload(filteredCases, true, true, envelope); - if (LOGGER.isInfoEnabled()) { - LOGGER.info("publishing Sjp public event for welsh report {}, {}", PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED, payloadForPublicEventInEnglish); - } - final JsonObjectBuilder pendingListWelshBuilder = createObjectBuilder() - .add(LANGUAGE, "WELSH") - .add(LIST_PAYLOAD, payloadForPublicEventInWelsh); - sender.send(Envelope.envelopeFrom(metadataFrom(envelope.metadata()) - .withName(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED), - pendingListWelshBuilder.build())); - - } catch (FileServiceException e) { - throw new RuntimeException("IO Exception happened during transparency report generation", e); - } } - private void requestDocumentGeneration(final JsonEnvelope envelope, final UUID reportId, final JsonObject payload) throws FileServiceException { final String payloadFileName = String.format("transparency-report-template-parameters.%s.json", reportId.toString()); String type = envelope.payloadAsJsonObject().getString(REQUEST_TYPE).toLowerCase(); @@ -231,18 +179,22 @@ private void sendDocumentGenerationRequest(final JsonEnvelope eventEnvelope, ); } - private void sendPublicEvent(final JsonEnvelope envelope, final JsonObject payloadForDocumentGeneration) { - LOGGER.info("publishing public event for sjp pending cases for public list in english"); + private void publishCourtList(final JsonEnvelope envelope, final JsonObject payloadForDocumentGeneration) { + LOGGER.info("publishing sjp pending cases public list to court list publishing service"); final String type = envelope.payloadAsJsonObject().getString(REQUEST_TYPE); final String language = envelope.payloadAsJsonObject().getString(LANGUAGE); - final JsonObjectBuilder pendingListEnglishBuilder = createObjectBuilder() + final JsonObject courtListPublishRequest = createObjectBuilder() + .add(LIST_TYPE, SJP_PUBLISH_LIST) .add(LANGUAGE, language) .add(REQUEST_TYPE, type) - .add(LIST_PAYLOAD, payloadForDocumentGeneration); + .add(LIST_PAYLOAD, payloadForDocumentGeneration) + .build(); - sender.send(Envelope.envelopeFrom(metadataFrom(envelope.metadata()) - .withName(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED), - pendingListEnglishBuilder.build())); + try { + courtListPublishingService.publishCourtList(courtListPublishRequest.toString()); + } catch (IOException e) { + throw new RuntimeException("IO Exception happened while publishing sjp court list", e); + } } private List getPendingCasesFromViewStore(final JsonEnvelope envelope) { @@ -286,25 +238,6 @@ private JsonObject buildPayload(final List pendingCases, boolean isW .build(); } - private void requestDocumentGeneration(final JsonEnvelope eventEnvelope, - final UUID transparencyReportId, - final UUID payloadFileServiceUUID, final String type, final String language) { - - final JsonObject docGeneratorPayload = createObjectBuilder() - .add("originatingSource", "sjp") - .add(TEMPLATE_IDENTIFIER_STRING, payloadHelper.getTemplateIdentifier(type, language, ExportType.PUBLIC.name())) - .add(CONVERSION_FORMAT_STRING, CONVERSION_FORMAT) - .add("sourceCorrelationId", transparencyReportId.toString()) - .add("payloadFileServiceId", payloadFileServiceUUID.toString()) - .build(); - sender.sendAsAdmin( - Envelope.envelopeFrom( - metadataFrom(eventEnvelope.metadata()).withName("systemdocgenerator.generate-document"), - docGeneratorPayload - ) - ); - } - private UUID storeDocumentGeneratorPayload(final JsonObject documentGeneratorPayload, final String fileName, final String type, final String language) throws FileServiceException { final byte[] jsonPayloadInBytes = jsonObjectAsByteArray(documentGeneratorPayload); diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java index 73ddfaf296..b65dab8e01 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java @@ -15,7 +15,11 @@ public class ApplicationParameters { @Value(key = "RELAY_CASE_ON_CPP_FUNCTION_PATH") private String relayCaseOnCppFunctionPath; - + @Inject + @Value(key = "COURT_LIST_PUBLISHING_SERVICE_URL", defaultValue = "http://localhost:8080") + private String courtListPublishingServiceUrl; + + public String getAzureFunctionHostName() { return azureFunctionHostName; @@ -25,4 +29,9 @@ public String getRelayCaseOnCppFunctionPath() { return relayCaseOnCppFunctionPath; } + + public String getCourtListPublishingServiceUrl() { + + return courtListPublishingServiceUrl; + } } diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java new file mode 100644 index 0000000000..98ff71495f --- /dev/null +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java @@ -0,0 +1,31 @@ +package uk.gov.moj.cpp.sjp.event.processor.service; + +import uk.gov.moj.cpp.sjp.event.processor.helper.HttpConnectionHelper; + +import java.io.IOException; + +import javax.inject.Inject; + +public class CourtListPublishingService { + + private static final String PUBLISH_SJP_COURT_LIST_PATH = "/api/court-list-publish/sjp/publishCourtList"; + + private HttpConnectionHelper httpConnectionHelper; + + @Inject + private ApplicationParameters applicationParameters; + + public CourtListPublishingService() { + this.httpConnectionHelper = new HttpConnectionHelper(); + } + + public CourtListPublishingService(final HttpConnectionHelper httpConnectionHelper, final ApplicationParameters applicationParameters) { + this.httpConnectionHelper = httpConnectionHelper; + this.applicationParameters = applicationParameters; + } + + public Integer publishCourtList(final String payload) throws IOException { + return httpConnectionHelper.getResponseCode( + applicationParameters.getCourtListPublishingServiceUrl() + PUBLISH_SJP_COURT_LIST_PATH, payload); + } +} diff --git a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessorTest.java b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessorTest.java index a82128ed24..7065cbcb08 100644 --- a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessorTest.java +++ b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessorTest.java @@ -40,15 +40,17 @@ import uk.gov.justice.services.fileservice.api.FileStorer; import uk.gov.justice.services.messaging.Envelope; import uk.gov.justice.services.messaging.JsonEnvelope; -import uk.gov.justice.services.messaging.spi.DefaultEnvelope; import uk.gov.moj.cpp.sjp.domain.DocumentRequestType; import uk.gov.moj.cpp.sjp.domain.ListType; +import uk.gov.moj.cpp.sjp.event.processor.service.CourtListPublishingService; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataOffencesService; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataService; import uk.gov.moj.cpp.sjp.event.processor.service.SjpService; import uk.gov.moj.cpp.sjp.event.processor.utils.PayloadHelper; +import java.io.IOException; import java.io.InputStream; +import java.io.StringReader; import java.time.DayOfWeek; import java.time.LocalDate; import java.time.LocalDateTime; @@ -63,6 +65,7 @@ import java.util.UUID; import java.util.function.Function; +import javax.json.Json; import javax.json.JsonArray; import javax.json.JsonArrayBuilder; import javax.json.JsonObject; @@ -81,7 +84,6 @@ public class PressTransparencyReportRequestedProcessorTest { private static final DateTimeFormatter DOB_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd"); - private static final String PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED = "public.sjp.press-transparency-report-generated"; private static final String STORE_PRESS_TRANSPARENCY_REPORT_DATA_COMMAND = "sjp.command.store-press-transparency-report-data"; private static final String EXPECTED_TEMPLATE_NAME_DELTA = "PressPendingCasesDeltaEnglish"; private static final String EXPECTED_TEMPLATE_NAME_FULL = "PressPendingCasesFullEnglish"; @@ -164,6 +166,8 @@ public class PressTransparencyReportRequestedProcessorTest { private PayloadHelper payloadHelper; @Mock private SjpService sjpService; + @Mock + private CourtListPublishingService courtListPublishingService; @Captor private ArgumentCaptor payloadForDocumentGenerationCaptor; @Captor @@ -171,7 +175,7 @@ public class PressTransparencyReportRequestedProcessorTest { @Captor private ArgumentCaptor storePressTransparencyReportCommandEnvelopeCaptor; @Captor - private ArgumentCaptor defaultEnvelopeArgumentCaptor; + private ArgumentCaptor courtListPublishRequestCaptor; @BeforeEach public void setUp() throws Exception { @@ -191,33 +195,6 @@ private void mockSjpService(final List sjpService, final List pendingCasesList = pendingCasesList(CASE_IDS, false, defendantDateOfBirth, false); - - mockCommon(sjpService.getPendingDeltaCases(any(), any()), pendingCasesList); - - processor.handlePressTransparencyRequest(PRIVATE_EVENT_PDF_ENVELOPE_DELTA); - - final JsonObject actual = getDocumentGeneratorPayloadFromFileStorer(); - - actual.getJsonArray("readyCases").forEach(rc -> - assertThat(rc.toString(), isJson(withJsonPath("$.dateOfBirth", equalTo(format(getAge(defendantDateOfBirth))))))); - - assertPayloadForDocumentGenerator(actual, pendingCasesList, NUMBER_OF_PENDING_CASES_FOR_EXPORT, false); - - verify(sender).sendAsAdmin(documentGenerationRequestCaptor.capture()); - - assertDocumentGenerationRequest(documentGenerationRequestCaptor.getValue(), EXPECTED_DOC_GENERATION_PAYLOAD_DELTA); - - verify(sender, times(1)).send(storePressTransparencyReportCommandEnvelopeCaptor.capture()); - assertPressTransparencyReportEnvelope(storePressTransparencyReportCommandEnvelopeCaptor.getValue(), REPORT_ID, CASE_IDS, DocumentRequestType.DELTA); - } - @Test public void shouldCreatePressTransparencyPDFReportDelta() throws FileServiceException { @@ -282,7 +259,7 @@ public void shouldCreatePressTransparencyPDFReportFull() throws FileServiceExcep } @Test - public void shouldCreatePressTransparencyJSONReportDelta() { + public void shouldCreatePressTransparencyJSONReportDelta() throws IOException { final String defendantDateOfBirth = "1980-06-12"; @@ -291,11 +268,10 @@ public void shouldCreatePressTransparencyJSONReportDelta() { mockSjpService(sjpService.getPendingDeltaCases(any(), any()), pendingCasesList); processor.handlePressTransparencyJSONReportRequest(PRIVATE_EVENT_ENVELOPE_JSON_DELTA); - verify(sender, times(1)).send(defaultEnvelopeArgumentCaptor.capture()); - final Envelope jsonEnvelope = defaultEnvelopeArgumentCaptor.getAllValues().get(0); - assertThat(jsonEnvelope.metadata().name(), is(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED)); - final JsonObject eventPayload = (JsonObject) jsonEnvelope.payload(); - final JsonObject payload = eventPayload.getJsonObject("listPayload"); + verify(courtListPublishingService, times(1)).publishCourtList(courtListPublishRequestCaptor.capture()); + final JsonObject courtListPublishRequest = Json.createReader(new StringReader(courtListPublishRequestCaptor.getValue())).readObject(); + assertThat(courtListPublishRequest.getString("listType"), is("SJP_PRESS_LIST")); + final JsonObject payload = courtListPublishRequest.getJsonObject("listPayload"); assertThat(payload.getInt("totalNumberOfRecords"), is(1)); final JsonArray readyCases = payload.getJsonArray("readyCases"); assertThat(1, is(readyCases.size())); @@ -307,7 +283,7 @@ public void shouldCreatePressTransparencyJSONReportDelta() { } @Test - public void shouldCreatePressTransparencyJSONReportFull() { + public void shouldCreatePressTransparencyJSONReportFull() throws IOException { final String defendantDateOfBirth = "1980-06-12"; @@ -316,11 +292,10 @@ public void shouldCreatePressTransparencyJSONReportFull() { mockSjpService(sjpService.getPendingCases(any(), any()), pendingCasesList); processor.handlePressTransparencyJSONReportRequest(PRIVATE_EVENT_ENVELOPE_JSON_FULL); - verify(sender, times(1)).send(defaultEnvelopeArgumentCaptor.capture()); - final Envelope jsonEnvelope = defaultEnvelopeArgumentCaptor.getAllValues().get(0); - assertThat(jsonEnvelope.metadata().name(), is(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED)); - final JsonObject eventPayload = (JsonObject) jsonEnvelope.payload(); - final JsonObject payload = eventPayload.getJsonObject("listPayload"); + verify(courtListPublishingService, times(1)).publishCourtList(courtListPublishRequestCaptor.capture()); + final JsonObject courtListPublishRequest = Json.createReader(new StringReader(courtListPublishRequestCaptor.getValue())).readObject(); + assertThat(courtListPublishRequest.getString("listType"), is("SJP_PRESS_LIST")); + final JsonObject payload = courtListPublishRequest.getJsonObject("listPayload"); assertThat(payload.getInt("totalNumberOfRecords"), is(1)); final JsonArray readyCases = payload.getJsonArray("readyCases"); assertThat(1, is(readyCases.size())); @@ -341,44 +316,6 @@ private JsonObject getDocumentGeneratorPayloadFromFileStorer() throws FileServic return streamToJsonObject(payloadBytes); } - @Test - @SuppressWarnings("deprecation") - public void shouldCreatePressTransparencyWhenNoDateOfBirthReport() throws FileServiceException { - - final String defendantDateOfBirth = ""; - - final List pendingCasesList = pendingCasesList(CASE_IDS, false, defendantDateOfBirth, false); - - mockCommon(sjpService.getPendingDeltaCases(any(), any()), pendingCasesList); - - processor.handlePressTransparencyRequest(PRIVATE_EVENT_PDF_ENVELOPE_DELTA); - - final JsonObject actual = getDocumentGeneratorPayloadFromFileStorer(); - - assertThat(actual.containsKey("dateOfBirth"), is(false)); - - - } - - @Test - @SuppressWarnings("deprecation") - public void shouldExcludeYouthDefendants() throws FileServiceException { - - final String defendantDateOfBirth = "1980-06-12"; - - final List pendingCasesList = pendingCasesList(CASE_IDS, true, defendantDateOfBirth, false); - - mockCommon(sjpService.getPendingDeltaCases(any(), any()), pendingCasesList); - - processor.handlePressTransparencyRequest(PRIVATE_EVENT_PDF_ENVELOPE_DELTA); - - verify(fileStorer).store(any(JsonObject.class), payloadForDocumentGenerationCaptor.capture()); - - final InputStream payloadBytes = payloadForDocumentGenerationCaptor.getValue(); - final JsonObject payloadForDocumentGenerator = streamToJsonObject(payloadBytes); - - } - @Test public void shouldCreatePressTransparencyPDFWhenNoDateOfBirthReport() throws FileServiceException { diff --git a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java index e34e2faab9..0154b6dc29 100644 --- a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java +++ b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java @@ -4,10 +4,8 @@ import static java.util.UUID.randomUUID; import static java.util.stream.Collectors.toList; import static java.util.stream.IntStream.range; -import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.everyItem; -import static org.hamcrest.Matchers.isEmptyOrNullString; import static org.hamcrest.Matchers.isIn; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsNull.notNullValue; @@ -29,21 +27,24 @@ import uk.gov.justice.services.messaging.Envelope; import uk.gov.justice.services.messaging.JsonEnvelope; import uk.gov.justice.services.messaging.Metadata; -import uk.gov.justice.services.messaging.spi.DefaultEnvelope; import uk.gov.moj.cpp.sjp.domain.DocumentFormat; import uk.gov.moj.cpp.sjp.domain.DocumentRequestType; +import uk.gov.moj.cpp.sjp.event.processor.service.CourtListPublishingService; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataOffencesService; import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataService; import uk.gov.moj.cpp.sjp.event.processor.service.SjpService; import uk.gov.moj.cpp.sjp.event.processor.utils.PayloadHelper; +import java.io.IOException; import java.io.InputStream; +import java.io.StringReader; import java.time.LocalDate; import java.util.LinkedList; import java.util.List; import java.util.Objects; import java.util.UUID; +import javax.json.Json; import javax.json.JsonArray; import javax.json.JsonArrayBuilder; import javax.json.JsonObject; @@ -60,8 +61,6 @@ @ExtendWith(MockitoExtension.class) public class TransparencyReportRequestedProcessorTest { - private static final String PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED = "public.sjp.pending-cases-public-list-generated"; - @InjectMocks private TransparencyReportRequestedProcessor processor; @@ -80,6 +79,9 @@ public class TransparencyReportRequestedProcessorTest { @Mock private SjpService sjpService; + @Mock + private CourtListPublishingService courtListPublishingService; + @Captor private ArgumentCaptor payloadForFileServiceCaptor; @@ -90,75 +92,11 @@ public class TransparencyReportRequestedProcessorTest { private ArgumentCaptor storeTransparencyReportCommandEnvelopeCaptor; @Captor - private ArgumentCaptor defaultEnvelopeArgumentCaptor; + private ArgumentCaptor courtListPublishRequestCaptor; @Mock private PayloadHelper payloadHelper; - @Test - @SuppressWarnings("deprecation") - public void shouldCreateTransparencyReport() throws FileServiceException { - final UUID englishPayloadFileUUID = randomUUID(); - final UUID welshPayloadFileUUID = randomUUID(); - final UUID transparencyReportId = randomUUID(); - final String expectedEnglishTemplateName = "PublicPendingCasesFullEnglish"; - - final String offenceTitle = "OffenceTitle"; - final String prosecutorName = "TFL"; - final String prosecutorEnglish = "Transport For London"; - final String prosecutorWelsh = "Transport For London - Welsh"; - final Integer numberOfPendingCasesForExport = 9; - final List caseIds = range(0, numberOfPendingCasesForExport) - .mapToObj(e -> randomUUID()).collect(toList()); - - // create 5 young offenders - final List youngOffenderCaseIds = range(0, 5) - .mapToObj(e -> randomUUID()).collect(toList()); - - // create 5 press restricted case ids - final List pressRestrictionCaseIds = range(0, 5) - .mapToObj(e -> randomUUID()).collect(toList()); - - when(payloadHelper.buildOffenceTitleFromOffenceArray(any(), eq(false), any())).thenReturn(offenceTitle); - when(payloadHelper.buildOffenceTitleFromOffenceArray(any(), eq(true), any())).thenReturn(offenceTitle); - when(payloadHelper.mapOffenceIntoOffenceTitleString(any(), eq(false), any())).thenReturn(offenceTitle); - when(payloadHelper.mapOffenceIntoOffenceTitleString(any(), eq(true), any())).thenReturn(offenceTitle); - when(payloadHelper.buildProsecutorName(eq(prosecutorName), eq(false), any())).thenReturn(prosecutorEnglish); - when(payloadHelper.buildProsecutorName(eq(prosecutorName), eq(true), any())).thenReturn(prosecutorWelsh); - when(payloadHelper.getStartDate(eq(false))).thenReturn("15 January 2024"); - when(payloadHelper.getStartDate(eq(true))).thenReturn("ers 21 Tachwedd"); - when(payloadHelper.getTemplateIdentifier(any(), any(), any())).thenReturn(expectedEnglishTemplateName); - - final List pendingCasesList = pendingCasesList(caseIds, youngOffenderCaseIds, pressRestrictionCaseIds); - when(sjpService.getPendingCases(any(), any())).thenReturn(pendingCasesList); - when(fileStorer.store(any(), any())) - .thenReturn(englishPayloadFileUUID) - .thenReturn(welshPayloadFileUUID); - - final JsonEnvelope privateEventEnvelope = envelopeFrom( - metadataWithRandomUUID("sjp.events.transparency-report-requested"), - createObjectBuilder() - .add("transparencyReportId", transparencyReportId.toString()) - .add("requestType", DocumentRequestType.FULL.name()) - .add("language", "ENGLISH") - .add("format", DocumentFormat.PDF.name()) - .build() - ); - processor.createTransparencyReport(privateEventEnvelope); - - verify(fileStorer, times(2)).store(any(JsonObject.class), payloadForFileServiceCaptor.capture()); - verify(sender, times(2)).sendAsAdmin(payloadForDocumentGenerationCaptor.capture()); - - final JsonObject payloadForEnglishPdf = streamToJsonObject(payloadForFileServiceCaptor.getAllValues().get(0)); - final JsonObject payloadForWelshPdf = streamToJsonObject(payloadForFileServiceCaptor.getAllValues().get(1)); - - assertPayloadForDocumentGenerator(payloadForEnglishPdf, pendingCasesList, numberOfPendingCasesForExport, false); - assertPayloadForDocumentGenerator(payloadForWelshPdf, pendingCasesList, numberOfPendingCasesForExport, true); - - verify(sender, times(1)).send(storeTransparencyReportCommandEnvelopeCaptor.capture()); - assertTransparencyReportEnvelope(storeTransparencyReportCommandEnvelopeCaptor.getAllValues().get(0), transparencyReportId, caseIds); - } - @Test public void shouldCreateTransparencyPDFReportFULL() throws FileServiceException { final String expectedEnglishTemplateName = "PublicPendingCasesFullEnglish"; @@ -273,7 +211,7 @@ public void shouldCreateTransparencyPDFReportDELTA() throws FileServiceException } @Test - public void shouldCreateTransparencyReportJSONFull() throws FileServiceException { + public void shouldCreateTransparencyReportJSONFull() throws FileServiceException, IOException { final String expectedEnglishTemplateName = "PublicPendingCasesFullEnglish"; final UUID englishPayloadFileUUID = randomUUID(); final UUID welshPayloadFileUUID = randomUUID(); @@ -313,11 +251,10 @@ public void shouldCreateTransparencyReportJSONFull() throws FileServiceException ); processor.createTransparencyJSONReport(privateEventEnvelope); - verify(sender, times(1)).send(defaultEnvelopeArgumentCaptor.capture()); - final Envelope jsonEnvelope = defaultEnvelopeArgumentCaptor.getAllValues().get(0); - assertThat(jsonEnvelope.metadata().name(), is(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED)); - final JsonObject eventPayload = (JsonObject) jsonEnvelope.payload(); - final JsonObject payload = eventPayload.getJsonObject("listPayload"); + verify(courtListPublishingService, times(1)).publishCourtList(courtListPublishRequestCaptor.capture()); + final JsonObject courtListPublishRequest = Json.createReader(new StringReader(courtListPublishRequestCaptor.getValue())).readObject(); + assertThat(courtListPublishRequest.getString("listType"), is("SJP_PUBLISH_LIST")); + final JsonObject payload = courtListPublishRequest.getJsonObject("listPayload"); assertThat(payload.getInt("totalNumberOfRecords"), is(9)); final JsonArray readyCases = payload.getJsonArray("readyCases"); assertThat(9, is(readyCases.size())); @@ -387,22 +324,6 @@ public void shouldCreateTransparencyReportJSONDELTA() throws FileServiceExceptio verify(sender, times(1)).send(storeTransparencyReportCommandEnvelopeCaptor.capture()); } - private void assertSJPPendingPublicListEnvelope(final Envelope jsonEnvelope, final String language, final Integer numberOfPendingCasesForExport, final String prosecutorName) { - assertThat(jsonEnvelope.metadata().name(), is(PUBLIC_EVENT_SJP_PENDING_CASES_PUBLIC_LIST_GENERATED)); - final JsonObject eventPayload = (JsonObject) jsonEnvelope.payload(); - final JsonObject payload = eventPayload.getJsonObject("listPayload"); - assertThat(payload.getInt("totalNumberOfRecords"), is(numberOfPendingCasesForExport)); - final JsonArray readyCases = payload.getJsonArray("readyCases"); - assertThat(numberOfPendingCasesForExport, is(readyCases.size())); - readyCases.getValuesAs(JsonObject.class).forEach(jsonObject -> { - assertThat(jsonObject.getString("prosecutorName"), is(prosecutorName)); - assertThat(jsonObject.getJsonArray("sjpOffences"), notNullValue()); - assertThat(jsonObject.getString("firstName"), not(isEmptyOrNullString())); - assertThat(jsonObject.getString("lastName"), not(isEmptyOrNullString())); - }); - } - - private void assertPayloadForDocumentGenerator(final JsonObject payload, final List pendingCasesList, final Integer totalNumberOfRecords, final Boolean isWelsh) { assertReadyCasesPayloadWithPendingCases(payload, pendingCasesList, "postcode"); diff --git a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.pending-cases-public-list-generated.json b/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.pending-cases-public-list-generated.json deleted file mode 100644 index a4dc7303cc..0000000000 --- a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.pending-cases-public-list-generated.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://cpp.moj.gov.uk/sjp/json/schema/event/public.sjp.pending-cases-public-list-generated.json", - "type": "object", - "properties": { - "requestType": { - "enum": [ - "FULL", - "DELTA" - ] - }, - "language": { - "enum": [ - "ENGLISH", - "WELSH", - "BI_LINGUAL" - ] - }, - "listPayload": { - "type": "object", - "properties": { - "generatedDateAndTime": { - "type": "string" - }, - "totalNumberOfRecords": { - "type": "integer" - }, - "startDate": { - "type": "string" - }, - "readyCases": { - "type": "array", - "items": { - "type": "object", - "properties": { - "defendantName": { - "type": "string" - }, - "prosecutorName": { - "type": "string" - }, - "legalEntityName": { - "type": "string" - }, - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "postcode": { - "type": "string" - }, - "sjpOffences": { - "type": "array", - "items": { - "type": "object", - "properties": { - "title": { - "type": "string" - } - } - } - } - } - } - } - }, - "required": [ - "generatedDateAndTime", - "totalNumberOfRecords", - "readyCases" - ], - "additionalProperties": false - } - }, - "required": [ - "language", - "listPayload" - ], - "additionalProperties": false -} \ No newline at end of file diff --git a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.press-transparency-report-generated.json b/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.press-transparency-report-generated.json deleted file mode 100644 index 4d7c48226a..0000000000 --- a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.sjp.press-transparency-report-generated.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "$schema":"http://json-schema.org/draft-04/schema#", - "id":"http://cpp.moj.gov.uk/sjp/json/schema/event/public.sjp.press-transparency-report-generated.json", - "type":"object", - "properties":{ - "requestType": { - "type": "string", - "enum": [ - "FULL", - "DELTA" - ] - }, - "language":{ - "enum":[ - "ENGLISH", - "WELSH", - "BI_LINGUAL" - ] - }, - "listPayload":{ - "type":"object", - "properties":{ - "generatedDateAndTime":{ - "type":"string" - }, - "totalNumberOfRecords":{ - "type":"integer" - }, - "readyCases":{ - "type":"array", - "items":{ - "type":"object", - "properties":{ - "caseUrn":{ - "type":"string" - }, - "defendantName":{ - "type":"string" - }, - "dateOfBirth":{ - "type":"string" - }, - "age":{ - "type":"string" - }, - "prosecutorName":{ - "type":"string" - }, - "legalEntityName":{ - "type":"string" - }, - "title":{ - "type":"string" - }, - "firstName":{ - "type":"string" - }, - "lastName":{ - "type":"string" - }, - "addressLine1":{ - "type":"string" - }, - "addressLine2":{ - "type":"string" - }, - "addressLine3":{ - "type":"string" - }, - "town":{ - "type":"string" - }, - "county":{ - "type":"string" - }, - "postcode":{ - "type":"string" - }, - "sjpOffences":{ - "type":"array", - "items":{ - "type":"object", - "properties":{ - "title":{ - "type":"string" - }, - "wording":{ - "type":"string" - }, - "reportingRestriction":{ - "type":"boolean" - }, - "pressRestrictionName":{ - "type":"string" - } - } - } - } - } - } - } - }, - "required":[ - "generatedDateAndTime", - "totalNumberOfRecords", - "readyCases" - ] - } - }, - "required":[ - "language", - "listPayload" - ] -} \ No newline at end of file diff --git a/sjp-event/sjp-event-processor/src/yaml/json/schema/sjp.events.transparency-report-requested.json b/sjp-event/sjp-event-processor/src/yaml/json/schema/sjp.events.transparency-report-requested.json deleted file mode 100644 index 20a1091d60..0000000000 --- a/sjp-event/sjp-event-processor/src/yaml/json/schema/sjp.events.transparency-report-requested.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://justice.gov.uk/json/schemas/domains/sjp/events/transparency-report-requested.json", - "type": "object", - "properties": { - "requestedAt": { - "$ref": "http://justice.gov.uk/json/schemas/domains/sjp/temporal.json#/definitions/date-time" - }, - "transparencyReportId" : { - "$ref": "http://justice.gov.uk/domain/core/common/definitions.json#/definitions/uuid" - } - }, - "required": [ - "transparencyReportId", - "requestedAt" - ], - "additionalProperties": false -} diff --git a/sjp-event/sjp-event-processor/src/yaml/json/sjp.events.transparency-report-requested.json b/sjp-event/sjp-event-processor/src/yaml/json/sjp.events.transparency-report-requested.json deleted file mode 100644 index 78b1a1887c..0000000000 --- a/sjp-event/sjp-event-processor/src/yaml/json/sjp.events.transparency-report-requested.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "requestedAt": "2018-02-05T15:14:29.894Z", - "transparencyReportId" : "60ca064a-3d25-4157-a3d1-94e99d00c5a1" -} \ No newline at end of file diff --git a/sjp-event/sjp-event-processor/src/yaml/public-publications-descriptor.yaml b/sjp-event/sjp-event-processor/src/yaml/public-publications-descriptor.yaml index fb12a32995..1d41eeb064 100644 --- a/sjp-event/sjp-event-processor/src/yaml/public-publications-descriptor.yaml +++ b/sjp-event/sjp-event-processor/src/yaml/public-publications-descriptor.yaml @@ -140,15 +140,9 @@ subscriptions_descriptor: - name: public.sjp.events.conviction-court-resolved schema_uri: http://justice.gov.uk/json/schemas/domains/sjp/events/public.sjp.events.conviction-court-resolved.json - - name: public.sjp.pending-cases-public-list-generated - schema_uri: http://cpp.moj.gov.uk/sjp/json/schema/event/public.sjp.pending-cases-public-list-generated.json - - name: public.sjp.case-legal-soc-checked schema_uri: http://cpp.moj.gov.uk/sjp/json/schema/event/public.sjp.marked-as-legal-soc-checked.json - - name: public.sjp.press-transparency-report-generated - schema_uri: http://cpp.moj.gov.uk/sjp/json/schema/event/public.sjp.press-transparency-report-generated.json - - name: public.sjp.case-reserved schema_uri: http://cpp.moj.gov.uk/sjp/json/schema/event/public.sjp.case-reserved.json diff --git a/sjp-event/sjp-event-processor/src/yaml/subscriptions-descriptor.yaml b/sjp-event/sjp-event-processor/src/yaml/subscriptions-descriptor.yaml index 0cdee4dae1..1777d81b93 100644 --- a/sjp-event/sjp-event-processor/src/yaml/subscriptions-descriptor.yaml +++ b/sjp-event/sjp-event-processor/src/yaml/subscriptions-descriptor.yaml @@ -131,18 +131,12 @@ subscriptions_descriptor: - name: sjp.events.case-adjourned-to-later-sjp-hearing-recorded schema_uri: http://cpp.moj.gov.uk/sjp/event/case-adjourned-to-later-sjp-hearing-recorded.json - - name: sjp.events.transparency-report-requested - schema_uri: http://justice.gov.uk/json/schemas/domains/sjp/events/transparency-report-requested.json - - name: sjp.events.transparency-pdf-report-requested schema_uri: http://justice.gov.uk/json/schemas/domains/sjp/events/transparency-pdf-report-requested.json - name: sjp.events.transparency-json-report-requested schema_uri: http://justice.gov.uk/json/schemas/domains/sjp/events/transparency-json-report-requested.json - - name: sjp.events.press-transparency-report-requested - schema_uri: http://justice.gov.uk/json/schemas/domains/sjp/events/press-transparency-report-requested.json - - name: sjp.events.press-transparency-pdf-report-requested schema_uri: http://justice.gov.uk/json/schemas/domains/sjp/events/press-transparency-pdf-report-requested.json diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java new file mode 100644 index 0000000000..de9f243a35 --- /dev/null +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java @@ -0,0 +1,51 @@ +package uk.gov.moj.sjp.it.stub; + +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.findAll; +import static com.github.tomakehurst.wiremock.client.WireMock.post; +import static com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor; +import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; +import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; +import static java.util.Collections.emptyList; +import static java.util.concurrent.TimeUnit.SECONDS; +import static java.util.stream.Collectors.toList; +import static org.apache.http.HttpStatus.SC_OK; +import static org.awaitility.Awaitility.await; +import static uk.gov.moj.sjp.it.util.RestPollerWithDefaults.POLL_INTERVAL; +import static uk.gov.moj.sjp.it.util.RestPollerWithDefaults.TIMEOUT_IN_SECONDS; + +import java.util.Collection; +import java.util.List; + +import com.github.tomakehurst.wiremock.verification.LoggedRequest; +import org.awaitility.core.ConditionTimeoutException; +import org.hamcrest.Matcher; +import org.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class CourtListPublishingServiceStub { + + private static final String PUBLISH_COURT_LIST_URL = "/court-list-publish/sjp/publishCourtList"; + private final static Logger LOGGER = LoggerFactory.getLogger(CourtListPublishingServiceStub.class); + + public static void stubPublishCourtListEndpoint() { + stubFor(post(urlPathEqualTo(PUBLISH_COURT_LIST_URL)) + .willReturn(aResponse().withStatus(SC_OK))); + } + + public static List pollCourtListPublishRequests(final Matcher> matcher) { + try { + return await().pollInterval(POLL_INTERVAL) + .atMost(TIMEOUT_IN_SECONDS, SECONDS).until(() -> + findAll(postRequestedFor(urlPathEqualTo(PUBLISH_COURT_LIST_URL))) + .stream() + .map(LoggedRequest::getBodyAsString) + .map(JSONObject::new) + .collect(toList()), matcher); + } catch (final ConditionTimeoutException timeoutException) { + LOGGER.info("Exception while finding the captured requests in wire mock:" + timeoutException); + return emptyList(); + } + } +} diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PressTransparencyReportIT.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PressTransparencyReportIT.java index 59b2a2b408..ea4b60a1bd 100644 --- a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PressTransparencyReportIT.java +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PressTransparencyReportIT.java @@ -22,6 +22,8 @@ import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubAllReferenceData; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubAnyQueryOffences; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubEnforcementAreaByPostcode; +import static uk.gov.moj.sjp.it.stub.CourtListPublishingServiceStub.pollCourtListPublishRequests; +import static uk.gov.moj.sjp.it.stub.CourtListPublishingServiceStub.stubPublishCourtListEndpoint; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubProsecutorQuery; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubRegionByPostcode; import static uk.gov.moj.sjp.it.stub.SysDocGeneratorStub.pollSysDocGenerationRequests; @@ -68,7 +70,6 @@ public class PressTransparencyReportIT extends BaseIntegrationTest { private static final String SJP_EVENTS_PRESS_TRANSPARENCY_REPORT_GENERATION_STARTED = "sjp.events.press-transparency-pdf-report-generation-started"; private static final String SJP_EVENTS_PRESS_TRANSPARENCY_REPORT_METADATA_ADDED = "sjp.events.press-transparency-pdf-report-metadata-added"; private static final String SJP_EVENTS_PRESS_TRANSPARENCY_REPORT_GENERATION_FAILED = "sjp.events.press-transparency-pdf-report-generation-failed"; - private static final String SJP_PUBLIC_EVENT_PRESS_TRANSPARENCY_REPORT_GENERATED = "public.sjp.press-transparency-report-generated"; private final UUID caseId1 = randomUUID(), caseId2 = randomUUID(); private final UUID offenceId1 = randomUUID(), offenceId2 = randomUUID(); private PressTransparencyReportHelper pressTransparencyReportHelper = new PressTransparencyReportHelper(); @@ -78,6 +79,7 @@ public void beforeEachTest() throws Exception { resetAllRequests(); cleanViewStore(); stubGenerateDocumentEndPoint(); + stubPublishCourtListEndpoint(); stubAllIndividualProsecutorsQueries(); stubAnyQueryOffences(); stubAllReferenceData(); @@ -197,28 +199,19 @@ public void shouldGeneratePressTransparencyJsonReports() { final EventListener eventListener = new EventListener() .withMaxWaitTime(50000) - .subscribe( - SJP_EVENTS_PRESS_TRANSPARENCY_REPORT_REQUESTED_JSON, - SJP_PUBLIC_EVENT_PRESS_TRANSPARENCY_REPORT_GENERATED - ) + .subscribe(SJP_EVENTS_PRESS_TRANSPARENCY_REPORT_REQUESTED_JSON) .run(() -> pressTransparencyReportHelper.requestToGeneratePressTransparencyReport(payload)); final Optional transparencyReportRequestedEvent = eventListener.popEvent(SJP_EVENTS_PRESS_TRANSPARENCY_REPORT_REQUESTED_JSON); - final Optional transparencyReportStartedEvent = eventListener.popEvent(SJP_PUBLIC_EVENT_PRESS_TRANSPARENCY_REPORT_GENERATED); - assertThat(transparencyReportRequestedEvent.isPresent(), is(true)); - assertThat(transparencyReportStartedEvent.isPresent(), is(true)); - - final String pressTransparencyReportId = transparencyReportRequestedEvent - .map(requestedEvent -> requestedEvent.payloadAsJsonObject().getString("pressTransparencyReportId")) - .orElse(""); + final List courtListPublishRequests = pollCourtListPublishRequests(hasSize(1)); + final JSONObject courtListPublishRequest = courtListPublishRequests.get(0); - final JsonEnvelope transparencyReportStartedEnvelope = transparencyReportStartedEvent.get(); - final JsonObject transparencyReportStartedPayload = transparencyReportStartedEnvelope.payloadAsJsonObject(); + assertThat(courtListPublishRequest.getString("listType"), is("SJP_PRESS_LIST")); - JsonArray readyCases = transparencyReportStartedPayload.getJsonObject("listPayload").getJsonArray("readyCases"); - assertThat(readyCases.size(), is(2)); + final JSONObject listPayload = courtListPublishRequest.getJSONObject("listPayload"); + assertThat(listPayload.getJSONArray("readyCases").length(), is(2)); } @Test diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java index 22900113b1..0e64566547 100644 --- a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java @@ -22,6 +22,8 @@ import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubAllReferenceData; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubAnyQueryOffences; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubEnforcementAreaByPostcode; +import static uk.gov.moj.sjp.it.stub.CourtListPublishingServiceStub.pollCourtListPublishRequests; +import static uk.gov.moj.sjp.it.stub.CourtListPublishingServiceStub.stubPublishCourtListEndpoint; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubProsecutorQuery; import static uk.gov.moj.sjp.it.stub.ReferenceDataServiceStub.stubRegionByPostcode; import static uk.gov.moj.sjp.it.stub.SysDocGeneratorStub.pollSysDocGenerationRequests; @@ -67,7 +69,6 @@ public class TransparencyReportIT extends BaseIntegrationTest { private static final String SJP_EVENTS_TRANSPARENCY_REPORT_GENERATION_STARTED = "sjp.events.transparency-pdf-report-generation-started"; private static final String SJP_EVENTS_TRANSPARENCY_REPORT_METADATA_ADDED = "sjp.events.transparency-pdf-report-metadata-added"; private static final String SJP_EVENTS_TRANSPARENCY_REPORT_GENERATION_FAILED = "sjp.events.transparency-pdf-report-generation-failed"; - private static final String SJP_PUBLIC_EVENT_TRANSPARENCY_REPORT_GENERATED = "public.sjp.pending-cases-public-list-generated"; public static final String TRANSPARENCY_REPORT_ID = "transparencyReportId"; private final UUID caseId1 = randomUUID(), caseId2 = randomUUID(); @@ -79,9 +80,11 @@ public void beforeEachTest() throws Exception { resetAllRequests(); cleanViewStore(); stubGenerateDocumentEndPoint(); + stubPublishCourtListEndpoint(); stubAllIndividualProsecutorsQueries(); stubAnyQueryOffences(); stubAllReferenceData(); + setupIdMapperStub(); } @@ -199,23 +202,19 @@ public void shouldGenerateTransparencyJsonReports() { final EventListener eventListener = new EventListener() .withMaxWaitTime(50000) - .subscribe( - SJP_EVENTS_TRANSPARENCY_REPORT_REQUESTED_JSON, - SJP_PUBLIC_EVENT_TRANSPARENCY_REPORT_GENERATED - ) + .subscribe(SJP_EVENTS_TRANSPARENCY_REPORT_REQUESTED_JSON) .run(() -> transparencyReportHelper.requestToGenerateTransparencyReport(payload)); final Optional transparencyReportRequestedEvent = eventListener.popEvent(SJP_EVENTS_TRANSPARENCY_REPORT_REQUESTED_JSON); - final Optional transparencyReportStartedEvent = eventListener.popEvent(SJP_PUBLIC_EVENT_TRANSPARENCY_REPORT_GENERATED); - assertThat(transparencyReportRequestedEvent.isPresent(), is(true)); - assertThat(transparencyReportStartedEvent.isPresent(), is(true)); - final JsonEnvelope transparencyReportStartedEnvelope = transparencyReportStartedEvent.get(); - final JsonObject transparencyReportStartedPayload = transparencyReportStartedEnvelope.payloadAsJsonObject(); + final List courtListPublishRequests = pollCourtListPublishRequests(hasSize(1)); + final JSONObject courtListPublishRequest = courtListPublishRequests.get(0); + + assertThat(courtListPublishRequest.getString("listType"), is("SJP_PUBLISH_LIST")); - JsonArray readyCases = transparencyReportStartedPayload.getJsonObject("listPayload").getJsonArray("readyCases"); - assertThat(readyCases.size(), is(2)); + final JSONObject listPayload = courtListPublishRequest.getJSONObject("listPayload"); + assertThat(listPayload.getJSONArray("readyCases").length(), is(2)); } @Test From c6c0d43c4bfb9bcbd8f429758b1840f973e789f5 Mon Sep 17 00:00:00 2001 From: yashpalnegi Date: Fri, 17 Jul 2026 12:01:33 +0100 Subject: [PATCH 03/22] fix enforcer rules have failed --- pom.xml | 2 +- .../uk/gov/moj/cpp/sjp/event/processor/service/SjpService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 253ce2839e..ea7c1e2d15 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ 17.0.11 0.1.49 17.104.48 - 17.0.262 + 17.0.279 17.0.66 4.1.4-ATCM true diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/SjpService.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/SjpService.java index 7cb835080f..288680b3c9 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/SjpService.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/SjpService.java @@ -82,7 +82,7 @@ public JsonObject getSessionDetails(final UUID sessionId, final JsonEnvelope env final JsonObject payload = createObjectBuilder().add(SESSION_ID, sessionId.toString()).build(); final JsonEnvelope request = envelopeFrom(metadataFrom(envelope.metadata()).withName("sjp.query.session"), payload); final JsonEnvelope response = requester.requestAsAdmin(request); - return response.payloadAsJsonObject(); + return response.payload() != JsonValue.NULL ? response.payloadAsJsonObject() : null; } public JsonObject getLatestAocpSessionDetails(final JsonEnvelope envelope) { From 34cc124921407cb5ec81986c76010cc87dcc3b7a Mon Sep 17 00:00:00 2001 From: yashpalnegi Date: Tue, 21 Jul 2026 12:20:31 +0100 Subject: [PATCH 04/22] keep the actual and stub URL same for testing --- .../uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java index de9f243a35..49ef8ac36d 100644 --- a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java @@ -26,7 +26,7 @@ public class CourtListPublishingServiceStub { - private static final String PUBLISH_COURT_LIST_URL = "/court-list-publish/sjp/publishCourtList"; + private static final String PUBLISH_COURT_LIST_URL = "/api/court-list-publish/sjp/publishCourtList"; private final static Logger LOGGER = LoggerFactory.getLogger(CourtListPublishingServiceStub.class); public static void stubPublishCourtListEndpoint() { From cbf473c884df46df824f4c3c17b1785b145c498f Mon Sep 17 00:00:00 2001 From: devops-team Date: Tue, 21 Jul 2026 14:00:12 +0000 Subject: [PATCH 05/22] New 17.104.183-SNAPSHOT --- pom.xml | 2 +- sjp-command/pom.xml | 2 +- sjp-command/sjp-command-api/pom.xml | 2 +- sjp-command/sjp-command-controller/pom.xml | 2 +- sjp-command/sjp-command-handler/pom.xml | 2 +- sjp-domain/pom.xml | 2 +- sjp-domain/sjp-domain-aggregate/pom.xml | 2 +- sjp-domain/sjp-domain-common/pom.xml | 2 +- sjp-domain/sjp-domain-event-processor/pom.xml | 2 +- sjp-domain/sjp-domain-event/pom.xml | 2 +- sjp-domain/sjp-domain-prosecution/pom.xml | 2 +- sjp-domain/sjp-domain-transformation/pom.xml | 2 +- .../sjp-domain-transformation-anonymise/pom.xml | 2 +- .../sjp-domain-transformation-postcode/pom.xml | 2 +- sjp-event-sources/pom.xml | 2 +- sjp-event/pom.xml | 2 +- sjp-event/sjp-event-indexer/pom.xml | 2 +- sjp-event/sjp-event-listener/pom.xml | 2 +- sjp-event/sjp-event-processor/pom.xml | 2 +- sjp-healthchecks/pom.xml | 2 +- sjp-integration-test/pom.xml | 2 +- sjp-json/pom.xml | 2 +- sjp-query/pom.xml | 2 +- sjp-query/sjp-query-api/pom.xml | 2 +- sjp-query/sjp-query-view/pom.xml | 2 +- sjp-service/pom.xml | 2 +- sjp-viewstore/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-liquibase/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-persistence/pom.xml | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index ea7c1e2d15..4a5f9fcf4a 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT pom diff --git a/sjp-command/pom.xml b/sjp-command/pom.xml index a447bb7242..364579d7de 100644 --- a/sjp-command/pom.xml +++ b/sjp-command/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-api/pom.xml b/sjp-command/sjp-command-api/pom.xml index 0a97762dfd..7505deeb6b 100644 --- a/sjp-command/sjp-command-api/pom.xml +++ b/sjp-command/sjp-command-api/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-controller/pom.xml b/sjp-command/sjp-command-controller/pom.xml index d81189cb7d..ab0f048812 100644 --- a/sjp-command/sjp-command-controller/pom.xml +++ b/sjp-command/sjp-command-controller/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-handler/pom.xml b/sjp-command/sjp-command-handler/pom.xml index 2b3106fed7..768dcc7379 100644 --- a/sjp-command/sjp-command-handler/pom.xml +++ b/sjp-command/sjp-command-handler/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-domain/pom.xml b/sjp-domain/pom.xml index 76ad98e20f..193acb3647 100644 --- a/sjp-domain/pom.xml +++ b/sjp-domain/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT sjp-domain diff --git a/sjp-domain/sjp-domain-aggregate/pom.xml b/sjp-domain/sjp-domain-aggregate/pom.xml index 6994a3c97e..99cd8433d0 100644 --- a/sjp-domain/sjp-domain-aggregate/pom.xml +++ b/sjp-domain/sjp-domain-aggregate/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT sjp-domain-aggregate diff --git a/sjp-domain/sjp-domain-common/pom.xml b/sjp-domain/sjp-domain-common/pom.xml index 542fb40816..b3270c56be 100644 --- a/sjp-domain/sjp-domain-common/pom.xml +++ b/sjp-domain/sjp-domain-common/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT diff --git a/sjp-domain/sjp-domain-event-processor/pom.xml b/sjp-domain/sjp-domain-event-processor/pom.xml index ea03557ad1..6934dd8c91 100644 --- a/sjp-domain/sjp-domain-event-processor/pom.xml +++ b/sjp-domain/sjp-domain-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-event/pom.xml b/sjp-domain/sjp-domain-event/pom.xml index 98775037f2..aebf107763 100644 --- a/sjp-domain/sjp-domain-event/pom.xml +++ b/sjp-domain/sjp-domain-event/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT sjp-domain-event diff --git a/sjp-domain/sjp-domain-prosecution/pom.xml b/sjp-domain/sjp-domain-prosecution/pom.xml index 773e0deb46..203d43c549 100644 --- a/sjp-domain/sjp-domain-prosecution/pom.xml +++ b/sjp-domain/sjp-domain-prosecution/pom.xml @@ -4,7 +4,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT sjp-domain-prosecution diff --git a/sjp-domain/sjp-domain-transformation/pom.xml b/sjp-domain/sjp-domain-transformation/pom.xml index 6eb14666d7..db64fab654 100644 --- a/sjp-domain/sjp-domain-transformation/pom.xml +++ b/sjp-domain/sjp-domain-transformation/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml index f53c0a3db6..bd9f0ce669 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml index 0f523a67c4..5537facc3a 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-event-sources/pom.xml b/sjp-event-sources/pom.xml index 8d5a0424af..1d0838d158 100644 --- a/sjp-event-sources/pom.xml +++ b/sjp-event-sources/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sjp-event/pom.xml b/sjp-event/pom.xml index 21716df14a..d12804ecb8 100644 --- a/sjp-event/pom.xml +++ b/sjp-event/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-indexer/pom.xml b/sjp-event/sjp-event-indexer/pom.xml index b3cb2ae296..cecc454ffa 100644 --- a/sjp-event/sjp-event-indexer/pom.xml +++ b/sjp-event/sjp-event-indexer/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-listener/pom.xml b/sjp-event/sjp-event-listener/pom.xml index 9840673d3e..efd31f8a19 100644 --- a/sjp-event/sjp-event-listener/pom.xml +++ b/sjp-event/sjp-event-listener/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-processor/pom.xml b/sjp-event/sjp-event-processor/pom.xml index 8a76656ebb..b41a2846fd 100644 --- a/sjp-event/sjp-event-processor/pom.xml +++ b/sjp-event/sjp-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-healthchecks/pom.xml b/sjp-healthchecks/pom.xml index 80d875357f..5666f7f62a 100644 --- a/sjp-healthchecks/pom.xml +++ b/sjp-healthchecks/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-integration-test/pom.xml b/sjp-integration-test/pom.xml index 5e1107a497..10cd481db6 100644 --- a/sjp-integration-test/pom.xml +++ b/sjp-integration-test/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-json/pom.xml b/sjp-json/pom.xml index bdbe347df6..e049e3a4d1 100644 --- a/sjp-json/pom.xml +++ b/sjp-json/pom.xml @@ -2,7 +2,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-query/pom.xml b/sjp-query/pom.xml index 7917e49ef1..ad41ba9ac1 100644 --- a/sjp-query/pom.xml +++ b/sjp-query/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-api/pom.xml b/sjp-query/sjp-query-api/pom.xml index ccf1a9251a..5cf13413b5 100644 --- a/sjp-query/sjp-query-api/pom.xml +++ b/sjp-query/sjp-query-api/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-view/pom.xml b/sjp-query/sjp-query-view/pom.xml index 4c216934c6..723eb8c004 100644 --- a/sjp-query/sjp-query-view/pom.xml +++ b/sjp-query/sjp-query-view/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 diff --git a/sjp-service/pom.xml b/sjp-service/pom.xml index 2e268d5306..2857382f17 100644 --- a/sjp-service/pom.xml +++ b/sjp-service/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT sjp-service war diff --git a/sjp-viewstore/pom.xml b/sjp-viewstore/pom.xml index 06ee63ae04..f99bf53f7a 100644 --- a/sjp-viewstore/pom.xml +++ b/sjp-viewstore/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 sjp-viewstore diff --git a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml index 32fb8e928c..c59807a669 100644 --- a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml +++ b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-viewstore - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT sjp-viewstore-liquibase diff --git a/sjp-viewstore/sjp-viewstore-persistence/pom.xml b/sjp-viewstore/sjp-viewstore-persistence/pom.xml index 7cf9c13585..74348750dd 100644 --- a/sjp-viewstore/sjp-viewstore-persistence/pom.xml +++ b/sjp-viewstore/sjp-viewstore-persistence/pom.xml @@ -3,7 +3,7 @@ sjp-viewstore uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.183-SNAPSHOT 4.0.0 From 6cd69bf69d7d7878eb098a6ade0b7f94b1eb095d Mon Sep 17 00:00:00 2001 From: yashpalnegi Date: Tue, 28 Jul 2026 13:54:55 +0100 Subject: [PATCH 06/22] LPT-2348 - updated POMs version --- pom.xml | 2 +- sjp-command/pom.xml | 2 +- sjp-command/sjp-command-api/pom.xml | 2 +- sjp-command/sjp-command-controller/pom.xml | 2 +- sjp-command/sjp-command-handler/pom.xml | 2 +- sjp-domain/pom.xml | 2 +- sjp-domain/sjp-domain-aggregate/pom.xml | 2 +- sjp-domain/sjp-domain-common/pom.xml | 2 +- sjp-domain/sjp-domain-event-processor/pom.xml | 2 +- sjp-domain/sjp-domain-event/pom.xml | 2 +- sjp-domain/sjp-domain-prosecution/pom.xml | 2 +- sjp-domain/sjp-domain-transformation/pom.xml | 2 +- .../sjp-domain-transformation-anonymise/pom.xml | 2 +- .../sjp-domain-transformation-postcode/pom.xml | 2 +- sjp-event-sources/pom.xml | 2 +- sjp-event/pom.xml | 2 +- sjp-event/sjp-event-indexer/pom.xml | 2 +- sjp-event/sjp-event-listener/pom.xml | 2 +- sjp-event/sjp-event-processor/pom.xml | 2 +- sjp-healthchecks/pom.xml | 2 +- sjp-integration-test/pom.xml | 2 +- sjp-json/pom.xml | 2 +- sjp-query/pom.xml | 2 +- sjp-query/sjp-query-api/pom.xml | 2 +- sjp-query/sjp-query-view/pom.xml | 2 +- sjp-service/pom.xml | 2 +- sjp-viewstore/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-liquibase/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-persistence/pom.xml | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index ea7c1e2d15..701c826c4f 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT pom diff --git a/sjp-command/pom.xml b/sjp-command/pom.xml index a447bb7242..2276197ecf 100644 --- a/sjp-command/pom.xml +++ b/sjp-command/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-api/pom.xml b/sjp-command/sjp-command-api/pom.xml index 0a97762dfd..4e555fbbb2 100644 --- a/sjp-command/sjp-command-api/pom.xml +++ b/sjp-command/sjp-command-api/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-controller/pom.xml b/sjp-command/sjp-command-controller/pom.xml index d81189cb7d..8f56c496c9 100644 --- a/sjp-command/sjp-command-controller/pom.xml +++ b/sjp-command/sjp-command-controller/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-handler/pom.xml b/sjp-command/sjp-command-handler/pom.xml index 2b3106fed7..81d81bcf9e 100644 --- a/sjp-command/sjp-command-handler/pom.xml +++ b/sjp-command/sjp-command-handler/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/pom.xml b/sjp-domain/pom.xml index 76ad98e20f..204d3ed775 100644 --- a/sjp-domain/pom.xml +++ b/sjp-domain/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT sjp-domain diff --git a/sjp-domain/sjp-domain-aggregate/pom.xml b/sjp-domain/sjp-domain-aggregate/pom.xml index 6994a3c97e..9dbeafea2e 100644 --- a/sjp-domain/sjp-domain-aggregate/pom.xml +++ b/sjp-domain/sjp-domain-aggregate/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT sjp-domain-aggregate diff --git a/sjp-domain/sjp-domain-common/pom.xml b/sjp-domain/sjp-domain-common/pom.xml index 542fb40816..3a72214a5d 100644 --- a/sjp-domain/sjp-domain-common/pom.xml +++ b/sjp-domain/sjp-domain-common/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT diff --git a/sjp-domain/sjp-domain-event-processor/pom.xml b/sjp-domain/sjp-domain-event-processor/pom.xml index ea03557ad1..b9c7ee1638 100644 --- a/sjp-domain/sjp-domain-event-processor/pom.xml +++ b/sjp-domain/sjp-domain-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-event/pom.xml b/sjp-domain/sjp-domain-event/pom.xml index 98775037f2..3acf27d7af 100644 --- a/sjp-domain/sjp-domain-event/pom.xml +++ b/sjp-domain/sjp-domain-event/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT sjp-domain-event diff --git a/sjp-domain/sjp-domain-prosecution/pom.xml b/sjp-domain/sjp-domain-prosecution/pom.xml index 773e0deb46..83b753de40 100644 --- a/sjp-domain/sjp-domain-prosecution/pom.xml +++ b/sjp-domain/sjp-domain-prosecution/pom.xml @@ -4,7 +4,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT sjp-domain-prosecution diff --git a/sjp-domain/sjp-domain-transformation/pom.xml b/sjp-domain/sjp-domain-transformation/pom.xml index 6eb14666d7..4cfb69f841 100644 --- a/sjp-domain/sjp-domain-transformation/pom.xml +++ b/sjp-domain/sjp-domain-transformation/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml index f53c0a3db6..a99ed04774 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml index 0f523a67c4..1a5acfaacd 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event-sources/pom.xml b/sjp-event-sources/pom.xml index 8d5a0424af..c57a7ffa5e 100644 --- a/sjp-event-sources/pom.xml +++ b/sjp-event-sources/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sjp-event/pom.xml b/sjp-event/pom.xml index 21716df14a..5b893538e2 100644 --- a/sjp-event/pom.xml +++ b/sjp-event/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-indexer/pom.xml b/sjp-event/sjp-event-indexer/pom.xml index b3cb2ae296..be06a25425 100644 --- a/sjp-event/sjp-event-indexer/pom.xml +++ b/sjp-event/sjp-event-indexer/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-listener/pom.xml b/sjp-event/sjp-event-listener/pom.xml index 9840673d3e..efb412f975 100644 --- a/sjp-event/sjp-event-listener/pom.xml +++ b/sjp-event/sjp-event-listener/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-processor/pom.xml b/sjp-event/sjp-event-processor/pom.xml index 8a76656ebb..b381a3db20 100644 --- a/sjp-event/sjp-event-processor/pom.xml +++ b/sjp-event/sjp-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-healthchecks/pom.xml b/sjp-healthchecks/pom.xml index 80d875357f..ab12165dc0 100644 --- a/sjp-healthchecks/pom.xml +++ b/sjp-healthchecks/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-integration-test/pom.xml b/sjp-integration-test/pom.xml index 5e1107a497..fa9fed43e2 100644 --- a/sjp-integration-test/pom.xml +++ b/sjp-integration-test/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-json/pom.xml b/sjp-json/pom.xml index bdbe347df6..bd46dcabb8 100644 --- a/sjp-json/pom.xml +++ b/sjp-json/pom.xml @@ -2,7 +2,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/pom.xml b/sjp-query/pom.xml index 7917e49ef1..8b9e9cd653 100644 --- a/sjp-query/pom.xml +++ b/sjp-query/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-api/pom.xml b/sjp-query/sjp-query-api/pom.xml index ccf1a9251a..d747798f04 100644 --- a/sjp-query/sjp-query-api/pom.xml +++ b/sjp-query/sjp-query-api/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-view/pom.xml b/sjp-query/sjp-query-view/pom.xml index 4c216934c6..eff6acac11 100644 --- a/sjp-query/sjp-query-view/pom.xml +++ b/sjp-query/sjp-query-view/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-service/pom.xml b/sjp-service/pom.xml index 2e268d5306..61e9dfe9a0 100644 --- a/sjp-service/pom.xml +++ b/sjp-service/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT sjp-service war diff --git a/sjp-viewstore/pom.xml b/sjp-viewstore/pom.xml index 06ee63ae04..a361e754d5 100644 --- a/sjp-viewstore/pom.xml +++ b/sjp-viewstore/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 sjp-viewstore diff --git a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml index 32fb8e928c..3a98fd8d3a 100644 --- a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml +++ b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-viewstore - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT sjp-viewstore-liquibase diff --git a/sjp-viewstore/sjp-viewstore-persistence/pom.xml b/sjp-viewstore/sjp-viewstore-persistence/pom.xml index 7cf9c13585..0f259f3cc4 100644 --- a/sjp-viewstore/sjp-viewstore-persistence/pom.xml +++ b/sjp-viewstore/sjp-viewstore-persistence/pom.xml @@ -3,7 +3,7 @@ sjp-viewstore uk.gov.moj.cpp.sjp - 17.104.182-SNAPSHOT + 17.104.182-CCT-1981-SNAPSHOT 4.0.0 From 60a44a2a9e4d54e9447b35842f155d4b8a3f8872 Mon Sep 17 00:00:00 2001 From: devops-team Date: Tue, 28 Jul 2026 15:24:25 +0000 Subject: [PATCH 07/22] New 17.104.184-CCT-1981-SNAPSHOT --- pom.xml | 2 +- sjp-command/pom.xml | 2 +- sjp-command/sjp-command-api/pom.xml | 2 +- sjp-command/sjp-command-controller/pom.xml | 2 +- sjp-command/sjp-command-handler/pom.xml | 2 +- sjp-domain/pom.xml | 2 +- sjp-domain/sjp-domain-aggregate/pom.xml | 2 +- sjp-domain/sjp-domain-common/pom.xml | 2 +- sjp-domain/sjp-domain-event-processor/pom.xml | 2 +- sjp-domain/sjp-domain-event/pom.xml | 2 +- sjp-domain/sjp-domain-prosecution/pom.xml | 2 +- sjp-domain/sjp-domain-transformation/pom.xml | 2 +- .../sjp-domain-transformation-anonymise/pom.xml | 2 +- .../sjp-domain-transformation-postcode/pom.xml | 2 +- sjp-event-sources/pom.xml | 2 +- sjp-event/pom.xml | 2 +- sjp-event/sjp-event-indexer/pom.xml | 2 +- sjp-event/sjp-event-listener/pom.xml | 2 +- sjp-event/sjp-event-processor/pom.xml | 2 +- sjp-healthchecks/pom.xml | 2 +- sjp-integration-test/pom.xml | 2 +- sjp-json/pom.xml | 2 +- sjp-query/pom.xml | 2 +- sjp-query/sjp-query-api/pom.xml | 2 +- sjp-query/sjp-query-view/pom.xml | 2 +- sjp-service/pom.xml | 2 +- sjp-viewstore/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-liquibase/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-persistence/pom.xml | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index 9be2a3f2c7..82989d52e5 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT pom diff --git a/sjp-command/pom.xml b/sjp-command/pom.xml index 2987f8b1ae..ad0d21dfd7 100644 --- a/sjp-command/pom.xml +++ b/sjp-command/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-api/pom.xml b/sjp-command/sjp-command-api/pom.xml index 9b262e3476..9eb375e7f7 100644 --- a/sjp-command/sjp-command-api/pom.xml +++ b/sjp-command/sjp-command-api/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-controller/pom.xml b/sjp-command/sjp-command-controller/pom.xml index 7485b137d3..f47265ab09 100644 --- a/sjp-command/sjp-command-controller/pom.xml +++ b/sjp-command/sjp-command-controller/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-handler/pom.xml b/sjp-command/sjp-command-handler/pom.xml index 34dd76e621..7cbff1114e 100644 --- a/sjp-command/sjp-command-handler/pom.xml +++ b/sjp-command/sjp-command-handler/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/pom.xml b/sjp-domain/pom.xml index 1777a4cf16..d92ae34ad2 100644 --- a/sjp-domain/pom.xml +++ b/sjp-domain/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT sjp-domain diff --git a/sjp-domain/sjp-domain-aggregate/pom.xml b/sjp-domain/sjp-domain-aggregate/pom.xml index 98c8d9cb44..f888510799 100644 --- a/sjp-domain/sjp-domain-aggregate/pom.xml +++ b/sjp-domain/sjp-domain-aggregate/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT sjp-domain-aggregate diff --git a/sjp-domain/sjp-domain-common/pom.xml b/sjp-domain/sjp-domain-common/pom.xml index 5df89325be..dc476174a8 100644 --- a/sjp-domain/sjp-domain-common/pom.xml +++ b/sjp-domain/sjp-domain-common/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT diff --git a/sjp-domain/sjp-domain-event-processor/pom.xml b/sjp-domain/sjp-domain-event-processor/pom.xml index 45240f1969..70e61e737a 100644 --- a/sjp-domain/sjp-domain-event-processor/pom.xml +++ b/sjp-domain/sjp-domain-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-event/pom.xml b/sjp-domain/sjp-domain-event/pom.xml index 49ab15045c..71966f52a7 100644 --- a/sjp-domain/sjp-domain-event/pom.xml +++ b/sjp-domain/sjp-domain-event/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT sjp-domain-event diff --git a/sjp-domain/sjp-domain-prosecution/pom.xml b/sjp-domain/sjp-domain-prosecution/pom.xml index 228c86caa9..e32c7fc9dd 100644 --- a/sjp-domain/sjp-domain-prosecution/pom.xml +++ b/sjp-domain/sjp-domain-prosecution/pom.xml @@ -4,7 +4,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT sjp-domain-prosecution diff --git a/sjp-domain/sjp-domain-transformation/pom.xml b/sjp-domain/sjp-domain-transformation/pom.xml index d21acbdb46..17b20fd589 100644 --- a/sjp-domain/sjp-domain-transformation/pom.xml +++ b/sjp-domain/sjp-domain-transformation/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml index b093d870ea..ee087f4f12 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml index 913053c3f3..70e8a6dc24 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event-sources/pom.xml b/sjp-event-sources/pom.xml index 905331bec6..54a9106b67 100644 --- a/sjp-event-sources/pom.xml +++ b/sjp-event-sources/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sjp-event/pom.xml b/sjp-event/pom.xml index 52a89e5a1c..219970edca 100644 --- a/sjp-event/pom.xml +++ b/sjp-event/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-indexer/pom.xml b/sjp-event/sjp-event-indexer/pom.xml index 31124dcaf8..4adacc3ff0 100644 --- a/sjp-event/sjp-event-indexer/pom.xml +++ b/sjp-event/sjp-event-indexer/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-listener/pom.xml b/sjp-event/sjp-event-listener/pom.xml index 029bcb57f8..e6a30ce88a 100644 --- a/sjp-event/sjp-event-listener/pom.xml +++ b/sjp-event/sjp-event-listener/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-processor/pom.xml b/sjp-event/sjp-event-processor/pom.xml index 55a545fb56..1a3f793bab 100644 --- a/sjp-event/sjp-event-processor/pom.xml +++ b/sjp-event/sjp-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-healthchecks/pom.xml b/sjp-healthchecks/pom.xml index 342e06e044..9e9a581c1c 100644 --- a/sjp-healthchecks/pom.xml +++ b/sjp-healthchecks/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-integration-test/pom.xml b/sjp-integration-test/pom.xml index 40cd4ea414..a514be4ad3 100644 --- a/sjp-integration-test/pom.xml +++ b/sjp-integration-test/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-json/pom.xml b/sjp-json/pom.xml index 3584ec0a6f..a7c418b8a6 100644 --- a/sjp-json/pom.xml +++ b/sjp-json/pom.xml @@ -2,7 +2,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/pom.xml b/sjp-query/pom.xml index b06f586f77..22e873fe1b 100644 --- a/sjp-query/pom.xml +++ b/sjp-query/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-api/pom.xml b/sjp-query/sjp-query-api/pom.xml index 9a8872838a..559a8181de 100644 --- a/sjp-query/sjp-query-api/pom.xml +++ b/sjp-query/sjp-query-api/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-view/pom.xml b/sjp-query/sjp-query-view/pom.xml index e9aba6ee9a..0d25ed35b5 100644 --- a/sjp-query/sjp-query-view/pom.xml +++ b/sjp-query/sjp-query-view/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-service/pom.xml b/sjp-service/pom.xml index 2602d5439c..2c152c1722 100644 --- a/sjp-service/pom.xml +++ b/sjp-service/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT sjp-service war diff --git a/sjp-viewstore/pom.xml b/sjp-viewstore/pom.xml index 6e07a81ccc..d05cf2329f 100644 --- a/sjp-viewstore/pom.xml +++ b/sjp-viewstore/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 sjp-viewstore diff --git a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml index 069e7a1958..65bd29925d 100644 --- a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml +++ b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-viewstore - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT sjp-viewstore-liquibase diff --git a/sjp-viewstore/sjp-viewstore-persistence/pom.xml b/sjp-viewstore/sjp-viewstore-persistence/pom.xml index 8b6cded41c..bafd7cbcf0 100644 --- a/sjp-viewstore/sjp-viewstore-persistence/pom.xml +++ b/sjp-viewstore/sjp-viewstore-persistence/pom.xml @@ -3,7 +3,7 @@ sjp-viewstore uk.gov.moj.cpp.sjp - 17.104.183-CCT-1981-SNAPSHOT + 17.104.184-CCT-1981-SNAPSHOT 4.0.0 From 71fb6992458ee5b1f0f4e37912b0affe6f5128a1 Mon Sep 17 00:00:00 2001 From: yashpalnegi Date: Mon, 10 Aug 2026 16:18:25 +0100 Subject: [PATCH 08/22] fix end URL and added extra logging --- ...ssTransparencyReportRequestedProcessor.java | 18 +++++++++++++++--- .../processor/helper/HttpConnectionHelper.java | 18 ++++++++++++++---- .../service/ApplicationParameters.java | 2 +- .../service/CourtListPublishingService.java | 15 +++++++++++++-- .../stub/CourtListPublishingServiceStub.java | 2 +- 5 files changed, 44 insertions(+), 11 deletions(-) diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java index 49b42e0af9..2b67788bbe 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java @@ -148,18 +148,27 @@ public void handlePressTransparencyPDFReportRequest(final JsonEnvelope envelope) public void handlePressTransparencyJSONReportRequest(final JsonEnvelope envelope) { payloadHelper.initCache(); - final List pendingCasesFromViewStore = getPendingCasesFromViewStore(envelope); final JsonObject eventPayload = envelope.payloadAsJsonObject(); final UUID reportId = fromString(eventPayload.getString(PRESS_TRANSPARENCY_REPORT_ID)); - final boolean isWelsh = WELSH.name().equalsIgnoreCase(eventPayload.getString(LANGUAGE)); + final String requestType = eventPayload.getString(REQUEST_TYPE); + final String language = eventPayload.getString(LANGUAGE); + LOGGER.info("handling press transparency JSON report request for press report {}, requestType {}, language {}", + reportId, requestType, language); + + final List pendingCasesFromViewStore = getPendingCasesFromViewStore(envelope); + LOGGER.info("fetched {} pending case(s) from view store for press report {}", pendingCasesFromViewStore.size(), reportId); + + final boolean isWelsh = WELSH.name().equalsIgnoreCase(language); LOGGER.info("generating press transparency JSON report for press report {}", reportId); publishCourtList(envelope, buildPayload(pendingCasesFromViewStore, true, envelope, isWelsh)); + LOGGER.info("completed handling press transparency JSON report request for press report {}", reportId); } private void publishCourtList(final JsonEnvelope envelope, final JsonObject payloadForDocumentGeneration) { - LOGGER.info("publishing sjp press pending cases list to court list publishing service"); final String type = envelope.payloadAsJsonObject().getString(REQUEST_TYPE); final String language = envelope.payloadAsJsonObject().getString(LANGUAGE); + LOGGER.info("building sjp press court list publish request, listType {}, requestType {}, language {}", + SJP_PRESS_LIST, type, language); final JsonObject courtListPublishRequest = createObjectBuilder() .add(LIST_TYPE, SJP_PRESS_LIST) .add(LANGUAGE, language) @@ -167,9 +176,12 @@ private void publishCourtList(final JsonEnvelope envelope, final JsonObject payl .add("listPayload", payloadForDocumentGeneration) .build(); + LOGGER.info("publishing sjp press pending cases list to court list publishing service"); try { courtListPublishingService.publishCourtList(courtListPublishRequest.toString()); + LOGGER.info("publishing sjp press pending cases list to court list publishing service called successfully"); } catch (IOException e) { + LOGGER.error("IO Exception happened while publishing sjp press court list", e); throw new RuntimeException("IO Exception happened while publishing sjp press court list", e); } } diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/helper/HttpConnectionHelper.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/helper/HttpConnectionHelper.java index a4aa12c623..c248ebaa01 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/helper/HttpConnectionHelper.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/helper/HttpConnectionHelper.java @@ -3,28 +3,38 @@ import uk.gov.justice.services.common.http.HeaderConstants; import java.io.IOException; -import java.util.UUID; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class HttpConnectionHelper { + private static final Logger LOGGER = LoggerFactory.getLogger(HttpConnectionHelper.class); + private static final String CONTENT_TYPE = "content-type"; - private static final String APPLICATION_JSON_CONTENT_TYPE = "application/json"; + private static final String APPLICATION_JSON_CONTENT_TYPE = "application/vnd.courtlistpublishing-service.sjp.post+json"; + private static final String SYSTEM_USER_ID = "abce7b02-7872-4c0d-8ffc-a475fafd2819"; public Integer getResponseCode(final String url, final String payload) throws IOException { final HttpPost post = new HttpPost(url); post.addHeader(CONTENT_TYPE, APPLICATION_JSON_CONTENT_TYPE); - post.addHeader(HeaderConstants.USER_ID, UUID.randomUUID().toString()); + post.addHeader(HeaderConstants.USER_ID, SYSTEM_USER_ID); post.setEntity(new StringEntity(payload)); + LOGGER.info("sending POST request to url {}", url); try (CloseableHttpClient httpClient = HttpClients.createDefault(); CloseableHttpResponse response = httpClient.execute(post)) { - return response.getStatusLine().getStatusCode(); + final int statusCode = response.getStatusLine().getStatusCode(); + LOGGER.info("received response from url {}, statusCode {}", url, statusCode); + return statusCode; + } catch (final IOException e) { + LOGGER.error("failed to send POST request to url {}", url, e); + throw e; } } } diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java index b65dab8e01..62a5bb4fa0 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java @@ -16,7 +16,7 @@ public class ApplicationParameters { private String relayCaseOnCppFunctionPath; @Inject - @Value(key = "COURT_LIST_PUBLISHING_SERVICE_URL", defaultValue = "http://localhost:8080") + @Value(key = "COURT_LIST_PUBLISHING_SERVICE_URL", defaultValue = "http://localhost:8080/courtlistpublishing-service") private String courtListPublishingServiceUrl; diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java index 98ff71495f..1160f8e21b 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java @@ -1,5 +1,7 @@ package uk.gov.moj.cpp.sjp.event.processor.service; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import uk.gov.moj.cpp.sjp.event.processor.helper.HttpConnectionHelper; import java.io.IOException; @@ -8,6 +10,7 @@ public class CourtListPublishingService { + private static final Logger LOGGER = LoggerFactory.getLogger(CourtListPublishingService.class); private static final String PUBLISH_SJP_COURT_LIST_PATH = "/api/court-list-publish/sjp/publishCourtList"; private HttpConnectionHelper httpConnectionHelper; @@ -25,7 +28,15 @@ public CourtListPublishingService(final HttpConnectionHelper httpConnectionHelpe } public Integer publishCourtList(final String payload) throws IOException { - return httpConnectionHelper.getResponseCode( - applicationParameters.getCourtListPublishingServiceUrl() + PUBLISH_SJP_COURT_LIST_PATH, payload); + final String url = applicationParameters.getCourtListPublishingServiceUrl() + PUBLISH_SJP_COURT_LIST_PATH; + LOGGER.info("publishing court list to url {}, payload size {} bytes", url, payload.length()); + try { + final Integer responseCode = httpConnectionHelper.getResponseCode(url, payload); + LOGGER.info("publish court list response from url {}, responseCode {}", url, responseCode); + return responseCode; + } catch (final IOException e) { + LOGGER.error("failed to publish court list to url {}", url, e); + throw e; + } } } diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java index 49ef8ac36d..b65724b544 100644 --- a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java @@ -26,7 +26,7 @@ public class CourtListPublishingServiceStub { - private static final String PUBLISH_COURT_LIST_URL = "/api/court-list-publish/sjp/publishCourtList"; + private static final String PUBLISH_COURT_LIST_URL = "/courtlistpublishing-service/api/court-list-publish/sjp/publishCourtList"; private final static Logger LOGGER = LoggerFactory.getLogger(CourtListPublishingServiceStub.class); public static void stubPublishCourtListEndpoint() { From b603c993a4d130453557306d59ace09c0d9b9419 Mon Sep 17 00:00:00 2001 From: yashpalnegi Date: Mon, 10 Aug 2026 16:18:25 +0100 Subject: [PATCH 09/22] fix end URL and added extra logging --- ...sTransparencyReportRequestedProcessor.java | 18 ++++++++++--- .../helper/HttpConnectionHelper.java | 20 +++++++++++--- .../service/ApplicationParameters.java | 2 +- .../service/CourtListPublishingService.java | 26 +++++++++++++------ .../stub/CourtListPublishingServiceStub.java | 2 +- 5 files changed, 52 insertions(+), 16 deletions(-) diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java index 49b42e0af9..2b67788bbe 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java @@ -148,18 +148,27 @@ public void handlePressTransparencyPDFReportRequest(final JsonEnvelope envelope) public void handlePressTransparencyJSONReportRequest(final JsonEnvelope envelope) { payloadHelper.initCache(); - final List pendingCasesFromViewStore = getPendingCasesFromViewStore(envelope); final JsonObject eventPayload = envelope.payloadAsJsonObject(); final UUID reportId = fromString(eventPayload.getString(PRESS_TRANSPARENCY_REPORT_ID)); - final boolean isWelsh = WELSH.name().equalsIgnoreCase(eventPayload.getString(LANGUAGE)); + final String requestType = eventPayload.getString(REQUEST_TYPE); + final String language = eventPayload.getString(LANGUAGE); + LOGGER.info("handling press transparency JSON report request for press report {}, requestType {}, language {}", + reportId, requestType, language); + + final List pendingCasesFromViewStore = getPendingCasesFromViewStore(envelope); + LOGGER.info("fetched {} pending case(s) from view store for press report {}", pendingCasesFromViewStore.size(), reportId); + + final boolean isWelsh = WELSH.name().equalsIgnoreCase(language); LOGGER.info("generating press transparency JSON report for press report {}", reportId); publishCourtList(envelope, buildPayload(pendingCasesFromViewStore, true, envelope, isWelsh)); + LOGGER.info("completed handling press transparency JSON report request for press report {}", reportId); } private void publishCourtList(final JsonEnvelope envelope, final JsonObject payloadForDocumentGeneration) { - LOGGER.info("publishing sjp press pending cases list to court list publishing service"); final String type = envelope.payloadAsJsonObject().getString(REQUEST_TYPE); final String language = envelope.payloadAsJsonObject().getString(LANGUAGE); + LOGGER.info("building sjp press court list publish request, listType {}, requestType {}, language {}", + SJP_PRESS_LIST, type, language); final JsonObject courtListPublishRequest = createObjectBuilder() .add(LIST_TYPE, SJP_PRESS_LIST) .add(LANGUAGE, language) @@ -167,9 +176,12 @@ private void publishCourtList(final JsonEnvelope envelope, final JsonObject payl .add("listPayload", payloadForDocumentGeneration) .build(); + LOGGER.info("publishing sjp press pending cases list to court list publishing service"); try { courtListPublishingService.publishCourtList(courtListPublishRequest.toString()); + LOGGER.info("publishing sjp press pending cases list to court list publishing service called successfully"); } catch (IOException e) { + LOGGER.error("IO Exception happened while publishing sjp press court list", e); throw new RuntimeException("IO Exception happened while publishing sjp press court list", e); } } diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/helper/HttpConnectionHelper.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/helper/HttpConnectionHelper.java index a4aa12c623..84294f1b68 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/helper/HttpConnectionHelper.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/helper/HttpConnectionHelper.java @@ -10,21 +10,35 @@ import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class HttpConnectionHelper { + private static final Logger LOGGER = LoggerFactory.getLogger(HttpConnectionHelper.class); + private static final String CONTENT_TYPE = "content-type"; - private static final String APPLICATION_JSON_CONTENT_TYPE = "application/json"; + private static final String APPLICATION_JSON_CONTENT_TYPE = "application/vnd.courtlistpublishing-service.sjp.post+json"; public Integer getResponseCode(final String url, final String payload) throws IOException { + return getResponseCode(url, payload, UUID.randomUUID().toString()); + } + + public Integer getResponseCode(final String url, final String payload, final String userId) throws IOException { final HttpPost post = new HttpPost(url); post.addHeader(CONTENT_TYPE, APPLICATION_JSON_CONTENT_TYPE); - post.addHeader(HeaderConstants.USER_ID, UUID.randomUUID().toString()); + post.addHeader(HeaderConstants.USER_ID, userId); post.setEntity(new StringEntity(payload)); + LOGGER.info("sending POST request to url {}", url); try (CloseableHttpClient httpClient = HttpClients.createDefault(); CloseableHttpResponse response = httpClient.execute(post)) { - return response.getStatusLine().getStatusCode(); + final int statusCode = response.getStatusLine().getStatusCode(); + LOGGER.info("received response from url {}, statusCode {}", url, statusCode); + return statusCode; + } catch (final IOException e) { + LOGGER.error("failed to send POST request to url {}", url, e); + throw e; } } } diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java index b65dab8e01..62a5bb4fa0 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/ApplicationParameters.java @@ -16,7 +16,7 @@ public class ApplicationParameters { private String relayCaseOnCppFunctionPath; @Inject - @Value(key = "COURT_LIST_PUBLISHING_SERVICE_URL", defaultValue = "http://localhost:8080") + @Value(key = "COURT_LIST_PUBLISHING_SERVICE_URL", defaultValue = "http://localhost:8080/courtlistpublishing-service") private String courtListPublishingServiceUrl; diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java index 98ff71495f..95c12b7457 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java @@ -1,5 +1,7 @@ package uk.gov.moj.cpp.sjp.event.processor.service; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import uk.gov.moj.cpp.sjp.event.processor.helper.HttpConnectionHelper; import java.io.IOException; @@ -8,24 +10,32 @@ public class CourtListPublishingService { + private static final Logger LOGGER = LoggerFactory.getLogger(CourtListPublishingService.class); private static final String PUBLISH_SJP_COURT_LIST_PATH = "/api/court-list-publish/sjp/publishCourtList"; - private HttpConnectionHelper httpConnectionHelper; + private final HttpConnectionHelper httpConnectionHelper; @Inject private ApplicationParameters applicationParameters; + @Inject + private SystemIdMapperService systemIdMapperService; + public CourtListPublishingService() { this.httpConnectionHelper = new HttpConnectionHelper(); } - public CourtListPublishingService(final HttpConnectionHelper httpConnectionHelper, final ApplicationParameters applicationParameters) { - this.httpConnectionHelper = httpConnectionHelper; - this.applicationParameters = applicationParameters; - } - public Integer publishCourtList(final String payload) throws IOException { - return httpConnectionHelper.getResponseCode( - applicationParameters.getCourtListPublishingServiceUrl() + PUBLISH_SJP_COURT_LIST_PATH, payload); + final String url = applicationParameters.getCourtListPublishingServiceUrl() + PUBLISH_SJP_COURT_LIST_PATH; + final String systemUserId = systemIdMapperService.getSystemUserId().toString(); + LOGGER.info("publishing court list to url {}, payload size {} bytes", url, payload.length()); + try { + final Integer responseCode = httpConnectionHelper.getResponseCode(url, payload, systemUserId); + LOGGER.info("publish court list response from url {}, responseCode {}", url, responseCode); + return responseCode; + } catch (final IOException e) { + LOGGER.error("failed to publish court list to url {}", url, e); + throw e; + } } } diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java index 49ef8ac36d..b65724b544 100644 --- a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/stub/CourtListPublishingServiceStub.java @@ -26,7 +26,7 @@ public class CourtListPublishingServiceStub { - private static final String PUBLISH_COURT_LIST_URL = "/api/court-list-publish/sjp/publishCourtList"; + private static final String PUBLISH_COURT_LIST_URL = "/courtlistpublishing-service/api/court-list-publish/sjp/publishCourtList"; private final static Logger LOGGER = LoggerFactory.getLogger(CourtListPublishingServiceStub.class); public static void stubPublishCourtListEndpoint() { From 4f6cffbe5e37d59dc92e86cda41b493c7ae8d6b6 Mon Sep 17 00:00:00 2001 From: devops-team Date: Thu, 13 Aug 2026 15:18:33 +0000 Subject: [PATCH 10/22] New 17.104.185-CCT-1981-SNAPSHOT --- pom.xml | 2 +- sjp-command/pom.xml | 2 +- sjp-command/sjp-command-api/pom.xml | 2 +- sjp-command/sjp-command-controller/pom.xml | 2 +- sjp-command/sjp-command-handler/pom.xml | 2 +- sjp-domain/pom.xml | 2 +- sjp-domain/sjp-domain-aggregate/pom.xml | 2 +- sjp-domain/sjp-domain-common/pom.xml | 2 +- sjp-domain/sjp-domain-event-processor/pom.xml | 2 +- sjp-domain/sjp-domain-event/pom.xml | 2 +- sjp-domain/sjp-domain-prosecution/pom.xml | 2 +- sjp-domain/sjp-domain-transformation/pom.xml | 2 +- .../sjp-domain-transformation-anonymise/pom.xml | 2 +- .../sjp-domain-transformation-postcode/pom.xml | 2 +- sjp-event-sources/pom.xml | 2 +- sjp-event/pom.xml | 2 +- sjp-event/sjp-event-indexer/pom.xml | 2 +- sjp-event/sjp-event-listener/pom.xml | 2 +- sjp-event/sjp-event-processor/pom.xml | 2 +- sjp-healthchecks/pom.xml | 2 +- sjp-integration-test/pom.xml | 2 +- sjp-json/pom.xml | 2 +- sjp-query/pom.xml | 2 +- sjp-query/sjp-query-api/pom.xml | 2 +- sjp-query/sjp-query-view/pom.xml | 2 +- sjp-service/pom.xml | 2 +- sjp-viewstore/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-liquibase/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-persistence/pom.xml | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index b2bcaa2715..3fffdfceff 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT pom diff --git a/sjp-command/pom.xml b/sjp-command/pom.xml index ad0d21dfd7..50337293b2 100644 --- a/sjp-command/pom.xml +++ b/sjp-command/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-api/pom.xml b/sjp-command/sjp-command-api/pom.xml index 9eb375e7f7..837ffd6fe5 100644 --- a/sjp-command/sjp-command-api/pom.xml +++ b/sjp-command/sjp-command-api/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-controller/pom.xml b/sjp-command/sjp-command-controller/pom.xml index f47265ab09..fa8da48da0 100644 --- a/sjp-command/sjp-command-controller/pom.xml +++ b/sjp-command/sjp-command-controller/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-handler/pom.xml b/sjp-command/sjp-command-handler/pom.xml index 7cbff1114e..9f9fce6365 100644 --- a/sjp-command/sjp-command-handler/pom.xml +++ b/sjp-command/sjp-command-handler/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/pom.xml b/sjp-domain/pom.xml index d92ae34ad2..713251fb2b 100644 --- a/sjp-domain/pom.xml +++ b/sjp-domain/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT sjp-domain diff --git a/sjp-domain/sjp-domain-aggregate/pom.xml b/sjp-domain/sjp-domain-aggregate/pom.xml index f888510799..a56e2f12ba 100644 --- a/sjp-domain/sjp-domain-aggregate/pom.xml +++ b/sjp-domain/sjp-domain-aggregate/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT sjp-domain-aggregate diff --git a/sjp-domain/sjp-domain-common/pom.xml b/sjp-domain/sjp-domain-common/pom.xml index dc476174a8..49e06e6565 100644 --- a/sjp-domain/sjp-domain-common/pom.xml +++ b/sjp-domain/sjp-domain-common/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT diff --git a/sjp-domain/sjp-domain-event-processor/pom.xml b/sjp-domain/sjp-domain-event-processor/pom.xml index 70e61e737a..a0afba60a3 100644 --- a/sjp-domain/sjp-domain-event-processor/pom.xml +++ b/sjp-domain/sjp-domain-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-event/pom.xml b/sjp-domain/sjp-domain-event/pom.xml index 71966f52a7..5d0a0def74 100644 --- a/sjp-domain/sjp-domain-event/pom.xml +++ b/sjp-domain/sjp-domain-event/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT sjp-domain-event diff --git a/sjp-domain/sjp-domain-prosecution/pom.xml b/sjp-domain/sjp-domain-prosecution/pom.xml index e32c7fc9dd..5008ac337c 100644 --- a/sjp-domain/sjp-domain-prosecution/pom.xml +++ b/sjp-domain/sjp-domain-prosecution/pom.xml @@ -4,7 +4,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT sjp-domain-prosecution diff --git a/sjp-domain/sjp-domain-transformation/pom.xml b/sjp-domain/sjp-domain-transformation/pom.xml index 17b20fd589..42fe45f50c 100644 --- a/sjp-domain/sjp-domain-transformation/pom.xml +++ b/sjp-domain/sjp-domain-transformation/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml index ee087f4f12..f91793fc72 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml index 70e8a6dc24..b09da912e7 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event-sources/pom.xml b/sjp-event-sources/pom.xml index 54a9106b67..cb2c357c90 100644 --- a/sjp-event-sources/pom.xml +++ b/sjp-event-sources/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sjp-event/pom.xml b/sjp-event/pom.xml index 219970edca..187189a52a 100644 --- a/sjp-event/pom.xml +++ b/sjp-event/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-indexer/pom.xml b/sjp-event/sjp-event-indexer/pom.xml index 4adacc3ff0..95760ddf45 100644 --- a/sjp-event/sjp-event-indexer/pom.xml +++ b/sjp-event/sjp-event-indexer/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-listener/pom.xml b/sjp-event/sjp-event-listener/pom.xml index e6a30ce88a..9c8e68d5ff 100644 --- a/sjp-event/sjp-event-listener/pom.xml +++ b/sjp-event/sjp-event-listener/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-processor/pom.xml b/sjp-event/sjp-event-processor/pom.xml index 1a3f793bab..d66363e9f8 100644 --- a/sjp-event/sjp-event-processor/pom.xml +++ b/sjp-event/sjp-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-healthchecks/pom.xml b/sjp-healthchecks/pom.xml index 9e9a581c1c..478a0264e9 100644 --- a/sjp-healthchecks/pom.xml +++ b/sjp-healthchecks/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-integration-test/pom.xml b/sjp-integration-test/pom.xml index a514be4ad3..b63fa11fa9 100644 --- a/sjp-integration-test/pom.xml +++ b/sjp-integration-test/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-json/pom.xml b/sjp-json/pom.xml index a7c418b8a6..7c33c1c8e3 100644 --- a/sjp-json/pom.xml +++ b/sjp-json/pom.xml @@ -2,7 +2,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/pom.xml b/sjp-query/pom.xml index 22e873fe1b..76fc4dab6a 100644 --- a/sjp-query/pom.xml +++ b/sjp-query/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-api/pom.xml b/sjp-query/sjp-query-api/pom.xml index 559a8181de..b53dce18b0 100644 --- a/sjp-query/sjp-query-api/pom.xml +++ b/sjp-query/sjp-query-api/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-view/pom.xml b/sjp-query/sjp-query-view/pom.xml index 0d25ed35b5..a25a370427 100644 --- a/sjp-query/sjp-query-view/pom.xml +++ b/sjp-query/sjp-query-view/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-service/pom.xml b/sjp-service/pom.xml index 2c152c1722..b8a4ab1f63 100644 --- a/sjp-service/pom.xml +++ b/sjp-service/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT sjp-service war diff --git a/sjp-viewstore/pom.xml b/sjp-viewstore/pom.xml index d05cf2329f..50e0d77b78 100644 --- a/sjp-viewstore/pom.xml +++ b/sjp-viewstore/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 sjp-viewstore diff --git a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml index 65bd29925d..6be39c56f8 100644 --- a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml +++ b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-viewstore - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT sjp-viewstore-liquibase diff --git a/sjp-viewstore/sjp-viewstore-persistence/pom.xml b/sjp-viewstore/sjp-viewstore-persistence/pom.xml index bafd7cbcf0..cf7471be26 100644 --- a/sjp-viewstore/sjp-viewstore-persistence/pom.xml +++ b/sjp-viewstore/sjp-viewstore-persistence/pom.xml @@ -3,7 +3,7 @@ sjp-viewstore uk.gov.moj.cpp.sjp - 17.104.184-CCT-1981-SNAPSHOT + 17.104.185-CCT-1981-SNAPSHOT 4.0.0 From 004ca16604d97c50df028e41274ab840515d3076 Mon Sep 17 00:00:00 2001 From: ynegi Date: Fri, 14 Aug 2026 10:40:03 +0100 Subject: [PATCH 11/22] Adding log Transparency report (#135) * added more logging Transparency Report * logging-patern-for-monitoring --- ...ssTransparencyReportRequestedProcessor.java | 9 +-------- .../TransparencyReportRequestedProcessor.java | 18 ++++++++---------- .../service/CourtListPublishingService.java | 3 +-- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java index 2b67788bbe..db8265851e 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java @@ -36,8 +36,6 @@ import uk.gov.moj.cpp.sjp.domain.ListType; import uk.gov.moj.cpp.sjp.event.processor.service.CourtListPublishingService; import uk.gov.moj.cpp.sjp.event.processor.service.ExportType; -import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataOffencesService; -import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataService; import uk.gov.moj.cpp.sjp.event.processor.service.SjpService; import uk.gov.moj.cpp.sjp.event.processor.utils.PayloadHelper; import uk.gov.moj.cpp.sjp.event.transparency.PressTransparencyJSONReportRequested; @@ -82,7 +80,6 @@ public class PressTransparencyReportRequestedProcessor { public static final String OFFENCES = "offences"; public static final String PROSECUTOR_NAME = "prosecutorName"; public static final String EMPTY = ""; - public static final String STRING_FORMAT_COMMA = " %s,"; public static final String STRING_FORMAT_COMMA_PREFIX = ", %s"; public static final String STRING_FORMAT = " %s"; public static final String SJP_OFFENCES = "sjpOffences"; @@ -106,10 +103,6 @@ public class PressTransparencyReportRequestedProcessor { @Inject private SjpService sjpService; @Inject - private ReferenceDataOffencesService referenceDataOffencesService; - @Inject - private ReferenceDataService referenceDataService; - @Inject private PayloadHelper payloadHelper; @Inject @FrameworkComponent(EVENT_PROCESSOR) @@ -421,7 +414,7 @@ private boolean hasDefendantDateOfBirth(final JsonObject pendingCase) { private Optional getPersonDefendantFullName(final JsonObject pendingCase) { if( JsonObjects.getString(pendingCase, FIRST_NAME).isPresent() || JsonObjects.getString(pendingCase, LAST_NAME).isPresent() ) { - return Optional.of((String) format("%s %s", pendingCase.getString(FIRST_NAME, ""), pendingCase.getString(LAST_NAME, "").toUpperCase())); + return Optional.of(format("%s %s", pendingCase.getString(FIRST_NAME, ""), pendingCase.getString(LAST_NAME, "").toUpperCase())); } return Optional.empty(); } diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java index 5106d859ca..4bf6ed77ef 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java @@ -33,8 +33,6 @@ import uk.gov.moj.cpp.sjp.domain.ListType; import uk.gov.moj.cpp.sjp.event.processor.service.CourtListPublishingService; import uk.gov.moj.cpp.sjp.event.processor.service.ExportType; -import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataOffencesService; -import uk.gov.moj.cpp.sjp.event.processor.service.ReferenceDataService; import uk.gov.moj.cpp.sjp.event.processor.service.SjpService; import uk.gov.moj.cpp.sjp.event.processor.utils.PayloadHelper; import uk.gov.moj.cpp.sjp.event.transparency.TransparencyJSONReportRequested; @@ -90,12 +88,6 @@ public class TransparencyReportRequestedProcessor { @Inject private FileStorer fileStorer; - @Inject - private ReferenceDataService referenceDataService; - - @Inject - private ReferenceDataOffencesService referenceDataOffencesService; - @Inject private SjpService sjpService; @@ -145,7 +137,9 @@ public void createTransparencyJSONReport(final JsonEnvelope envelope) { final boolean isWelsh = WELSH.name().equalsIgnoreCase(eventPayload.getString(LANGUAGE)); LOGGER.info("generating public transparency JSON report {}", transparencyReportId); final List filteredCases = getFilteredCases(allPendingCasesFromViewStore); + LOGGER.info("generating public transparency JSON report for press report {}", transparencyReportId); publishCourtList(envelope, buildPayload(filteredCases, isWelsh, true, envelope)); + LOGGER.info("completed handling public transparency JSON report request for press report {}", transparencyReportId); storeReportMetadata(envelope, transparencyReportId, filteredCases); } @@ -183,17 +177,21 @@ private void publishCourtList(final JsonEnvelope envelope, final JsonObject payl LOGGER.info("publishing sjp pending cases public list to court list publishing service"); final String type = envelope.payloadAsJsonObject().getString(REQUEST_TYPE); final String language = envelope.payloadAsJsonObject().getString(LANGUAGE); + LOGGER.info("building sjp public court list publish request, listType {}, requestType {}, language {}", + SJP_PUBLISH_LIST, type, language); final JsonObject courtListPublishRequest = createObjectBuilder() .add(LIST_TYPE, SJP_PUBLISH_LIST) .add(LANGUAGE, language) .add(REQUEST_TYPE, type) .add(LIST_PAYLOAD, payloadForDocumentGeneration) .build(); + LOGGER.info("publishing sjp public court list pending cases list to court list publishing service"); try { courtListPublishingService.publishCourtList(courtListPublishRequest.toString()); } catch (IOException e) { - throw new RuntimeException("IO Exception happened while publishing sjp court list", e); + LOGGER.error("IO Exception happened while publishing sjp public court list", e); + throw new RuntimeException("IO Exception happened while publishing sjp public court list", e); } } @@ -362,7 +360,7 @@ private String getDefendantLastName(final JsonObject pendingCase) { private Optional getPersonDefendantFullName(final JsonObject pendingCase) { if( JsonObjects.getString(pendingCase, FIRST_NAME).isPresent() || JsonObjects.getString(pendingCase, LAST_NAME).isPresent() ) { - return Optional.of((String) format("%s %s", pendingCase.getString(FIRST_NAME).length() > 0 ? pendingCase.getString(FIRST_NAME).toUpperCase().charAt(0) : "", capitalize(lowerCase(pendingCase.getString(LAST_NAME, ""))))); + return Optional.of(format("%s %s", pendingCase.getString(FIRST_NAME).length() > 0 ? pendingCase.getString(FIRST_NAME).toUpperCase().charAt(0) : "", capitalize(lowerCase(pendingCase.getString(LAST_NAME, ""))))); } return Optional.empty(); } diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java index 95c12b7457..54aceb0645 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/service/CourtListPublishingService.java @@ -25,14 +25,13 @@ public CourtListPublishingService() { this.httpConnectionHelper = new HttpConnectionHelper(); } - public Integer publishCourtList(final String payload) throws IOException { + public void publishCourtList(final String payload) throws IOException { final String url = applicationParameters.getCourtListPublishingServiceUrl() + PUBLISH_SJP_COURT_LIST_PATH; final String systemUserId = systemIdMapperService.getSystemUserId().toString(); LOGGER.info("publishing court list to url {}, payload size {} bytes", url, payload.length()); try { final Integer responseCode = httpConnectionHelper.getResponseCode(url, payload, systemUserId); LOGGER.info("publish court list response from url {}, responseCode {}", url, responseCode); - return responseCode; } catch (final IOException e) { LOGGER.error("failed to publish court list to url {}", url, e); throw e; From e6d4394bd4761f1e5e3d022eca9efe2e5542022b Mon Sep 17 00:00:00 2001 From: yashpalnegi Date: Mon, 17 Aug 2026 10:52:26 +0100 Subject: [PATCH 12/22] merge main into cct-1981 branch SJP --- .../judicialresult/JudicialResultHelper.java | 14 +- .../DismissDecisionResultAggregator.java | 8 + .../JudicialResultHelperTest.java | 162 ++++++++++++ .../DismissDecisionResultAggregatorTest.java | 20 +- .../test/resources/ddq-result-definition.json | 232 ++++++++++++++++++ 5 files changed, 432 insertions(+), 4 deletions(-) create mode 100644 sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/JudicialResultHelperTest.java create mode 100644 sjp-event/sjp-event-processor/src/test/resources/ddq-result-definition.json diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/JudicialResultHelper.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/JudicialResultHelper.java index 6adcdc2925..f72d98a4c5 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/JudicialResultHelper.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/JudicialResultHelper.java @@ -4,6 +4,7 @@ import static java.lang.System.lineSeparator; import static java.util.UUID.fromString; import static java.util.stream.Collectors.joining; +import static org.apache.commons.lang3.StringUtils.isNotBlank; import static uk.gov.justice.core.courts.JudicialResult.judicialResult; import uk.gov.justice.core.courts.JudicialResult; @@ -65,6 +66,7 @@ public class JudicialResultHelper { "I", "INTERMEDIARY"); public static final String Y = "Y"; + public static final String DURATION = "duration"; private JudicialResultHelper() { @@ -93,13 +95,21 @@ public static JudicialResultPrompt.Builder populatePromptDefinitionAttributesBas resultDefinition.getJsonArray("prompts") .getValuesAs(JsonObject.class) .stream() - .filter(prompt -> prompt.getString("id").equals(jsPrompt.getId().toString()) - && duration.equals(prompt.getString("duration"))) + .filter(prompt -> prompt.getString("id").equals(jsPrompt.getId().toString())) + .filter(prompt -> prompt.containsKey(DURATION)) + .filter(prompt -> isNotBlank(prompt.getString(DURATION)) && isNotBlank(duration)) + .filter(prompt -> isDurationStringMatchesPromptValue(duration, prompt)) .findFirst(); return populatePrompt(jsPrompt, promptJson); } + private static boolean isDurationStringMatchesPromptValue(final String duration, final JsonObject prompt) { + final String alphaOnlyPattern = "[^a-zA-Z]"; + final String promptValue = prompt.getString(DURATION).replaceAll(alphaOnlyPattern, ""); + return duration.equals(promptValue) || duration.toUpperCase().contains(promptValue.toUpperCase()) || promptValue.toUpperCase().contains(duration.toUpperCase()); + } + @SuppressWarnings("squid:S00112") private static JudicialResultPrompt.Builder populatePrompt(final JPrompt jsPrompt, final Optional promptJson) { diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregator.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregator.java index e8ace4c81f..22b7286f51 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregator.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregator.java @@ -8,6 +8,7 @@ import uk.gov.justice.services.messaging.JsonEnvelope; import uk.gov.moj.cpp.sjp.domain.decision.Dismiss; import uk.gov.moj.cpp.sjp.domain.decision.OffenceDecision; +import uk.gov.moj.cpp.sjp.event.processor.results.converter.ConvictionInfo; import uk.gov.moj.cpp.sjp.event.processor.results.converter.judicialresult.JCachedReferenceData; import uk.gov.moj.cpp.sjp.event.processor.results.converter.judicialresult.DecisionAggregate; @@ -49,6 +50,13 @@ public void aggregate(final OffenceDecision offenceDecision, setFinalOffence(decisionAggregate, offenceId, judicialResults); + // conviction information - a dismissal carries the FOUND_NOT_GUILTY verdict dated on the + // resulting date but has no convicting court + decisionAggregate.putConvictionInfo(offenceId, + new ConvictionInfo(offenceId, + dismissOffenceDecision.getOffenceDecisionInformation().getVerdict(), + resultedOn.toLocalDate(), + null)); } } diff --git a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/JudicialResultHelperTest.java b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/JudicialResultHelperTest.java new file mode 100644 index 0000000000..2b484c286a --- /dev/null +++ b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/JudicialResultHelperTest.java @@ -0,0 +1,162 @@ +package uk.gov.moj.cpp.sjp.event.processor.results.converter.judicialresult; + +import static java.util.UUID.fromString; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static uk.gov.moj.cpp.sjp.event.processor.results.converter.judicialresult.JPrompt.DDP_DISQUALIFICATION_PERIOD; +import static uk.gov.moj.cpp.sjp.event.processor.utils.FileUtil.getFileContentAsJson; + +import uk.gov.justice.core.courts.JudicialResultPrompt; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.UUID; + +import javax.json.Json; +import javax.json.JsonObject; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class JudicialResultHelperTest { + + private static final String RESULT_DEFINITION_FILE = "ddq-result-definition.json"; + private static final UUID DISQUALIFICATION_PERIOD_PROMPT_ID = fromString("2bf54447-328c-4c1b-a123-341adbd52172"); + + private JsonObject resultDefinition; + + @BeforeEach + public void setUp() { + resultDefinition = getFileContentAsJson(RESULT_DEFINITION_FILE, new HashMap<>()); + } + + @Test + public void shouldPopulatePromptDefinitionAttributesForYearsDuration() { + final JudicialResultPrompt.Builder builder = JudicialResultHelper.populatePromptDefinitionAttributesBasedOnDuration( + DDP_DISQUALIFICATION_PERIOD, resultDefinition, "Years"); + + final JudicialResultPrompt prompt = builder.build(); + + assertThat(prompt.getJudicialResultPromptTypeId(), is(DISQUALIFICATION_PERIOD_PROMPT_ID)); + assertThat(prompt.getLabel(), is("Disqualification period")); + assertThat(prompt.getWelshLabel(), is("Cyfnod gwahardd")); + assertThat(prompt.getPromptReference(), is("disqualificationPeriod")); + assertThat(prompt.getType(), is("INTM")); + assertThat(prompt.getCourtExtract(), is("Y")); + assertThat(prompt.getDurationSequence(), is(1)); + assertThat(prompt.getPromptSequence(), is(new BigDecimal(100))); + assertThat(prompt.getIsFinancialImposition(), is(false)); + } + + @Test + public void shouldPopulatePromptDefinitionAttributesForMonthsDuration() { + final JudicialResultPrompt.Builder builder = JudicialResultHelper.populatePromptDefinitionAttributesBasedOnDuration( + DDP_DISQUALIFICATION_PERIOD, resultDefinition, "Months"); + + final JudicialResultPrompt prompt = builder.build(); + + assertThat(prompt.getJudicialResultPromptTypeId(), is(DISQUALIFICATION_PERIOD_PROMPT_ID)); + assertThat(prompt.getLabel(), is("Disqualification period")); + assertThat(prompt.getWelshLabel(), is("Cyfnod gwahardd")); + assertThat(prompt.getPromptReference(), is("disqualificationPeriod")); + assertThat(prompt.getType(), is("INTM")); + assertThat(prompt.getCourtExtract(), is("Y")); + assertThat(prompt.getDurationSequence(), is(1)); + assertThat(prompt.getPromptSequence(), is(new BigDecimal(100))); + assertThat(prompt.getIsFinancialImposition(), is(false)); + } + + @Test + public void shouldPopulatePromptDefinitionAttributesForDaysDuration() { + final JudicialResultPrompt.Builder builder = JudicialResultHelper.populatePromptDefinitionAttributesBasedOnDuration( + DDP_DISQUALIFICATION_PERIOD, resultDefinition, "Days"); + + final JudicialResultPrompt prompt = builder.build(); + + assertThat(prompt.getJudicialResultPromptTypeId(), is(DISQUALIFICATION_PERIOD_PROMPT_ID)); + assertThat(prompt.getLabel(), is("Disqualification period")); + assertThat(prompt.getWelshLabel(), is("Cyfnod gwahardd")); + assertThat(prompt.getPromptReference(), is("disqualificationPeriod")); + assertThat(prompt.getType(), is("INTM")); + assertThat(prompt.getCourtExtract(), is("Y")); + assertThat(prompt.getDurationSequence(), is(1)); + assertThat(prompt.getPromptSequence(), is(new BigDecimal(100))); + assertThat(prompt.getIsFinancialImposition(), is(false)); + } + + @Test + public void shouldPopulatePromptDefinitionAttributesWhenDurationDiffersOnlyByCase() { + final JudicialResultPrompt.Builder builder = JudicialResultHelper.populatePromptDefinitionAttributesBasedOnDuration( + DDP_DISQUALIFICATION_PERIOD, resultDefinition, "months"); + + final JudicialResultPrompt prompt = builder.build(); + + assertThat(prompt.getJudicialResultPromptTypeId(), is(DISQUALIFICATION_PERIOD_PROMPT_ID)); + assertThat(prompt.getPromptReference(), is("disqualificationPeriod")); + } + + @Test + public void shouldPopulatePromptDefinitionAttributesWhenDurationIsSingularFormOfPromptValue() { + final JudicialResultPrompt.Builder builder = JudicialResultHelper.populatePromptDefinitionAttributesBasedOnDuration( + DDP_DISQUALIFICATION_PERIOD, resultDefinition, "Year"); + + final JudicialResultPrompt prompt = builder.build(); + + assertThat(prompt.getJudicialResultPromptTypeId(), is(DISQUALIFICATION_PERIOD_PROMPT_ID)); + assertThat(prompt.getPromptReference(), is("disqualificationPeriod")); + } + + @Test + public void shouldPopulatePromptDefinitionAttributesWhenPromptValueIsSubstringOfDuration() { + final JudicialResultPrompt.Builder builder = JudicialResultHelper.populatePromptDefinitionAttributesBasedOnDuration( + DDP_DISQUALIFICATION_PERIOD, resultDefinition, "CalendarDays"); + + final JudicialResultPrompt prompt = builder.build(); + + assertThat(prompt.getJudicialResultPromptTypeId(), is(DISQUALIFICATION_PERIOD_PROMPT_ID)); + assertThat(prompt.getPromptReference(), is("disqualificationPeriod")); + } + + @Test + public void shouldThrowRuntimeExceptionWhenPromptNotFoundForDuration() { + assertThrows(RuntimeException.class, () -> + JudicialResultHelper.populatePromptDefinitionAttributesBasedOnDuration( + JPrompt.AMOUNT_OF_FINE, resultDefinition, "Years")); + } + + @Test + public void shouldThrowRuntimeExceptionWhenDurationDoesNotMatchAnyPromptValue() { + assertThrows(RuntimeException.class, () -> + JudicialResultHelper.populatePromptDefinitionAttributesBasedOnDuration( + DDP_DISQUALIFICATION_PERIOD, resultDefinition, "Weeks")); + } + + @Test + public void shouldThrowRuntimeExceptionWhenDurationIsBlank() { + assertThrows(RuntimeException.class, () -> + JudicialResultHelper.populatePromptDefinitionAttributesBasedOnDuration( + DDP_DISQUALIFICATION_PERIOD, resultDefinition, "")); + } + + @Test + public void shouldThrowRuntimeExceptionWhenDurationIsNull() { + assertThrows(RuntimeException.class, () -> + JudicialResultHelper.populatePromptDefinitionAttributesBasedOnDuration( + DDP_DISQUALIFICATION_PERIOD, resultDefinition, null)); + } + + @Test + public void shouldThrowRuntimeExceptionWhenMatchingPromptHasBlankDurationValue() { + final JsonObject resultDefinitionWithBlankDuration = Json.createObjectBuilder() + .add("prompts", Json.createArrayBuilder() + .add(Json.createObjectBuilder() + .add("id", DISQUALIFICATION_PERIOD_PROMPT_ID.toString()) + .add("duration", ""))) + .build(); + + assertThrows(RuntimeException.class, () -> + JudicialResultHelper.populatePromptDefinitionAttributesBasedOnDuration( + DDP_DISQUALIFICATION_PERIOD, resultDefinitionWithBlankDuration, "Years")); + } +} \ No newline at end of file diff --git a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregatorTest.java b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregatorTest.java index 5758a2ff8f..b028eed2aa 100644 --- a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregatorTest.java +++ b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/results/converter/judicialresult/aggregator/DismissDecisionResultAggregatorTest.java @@ -8,10 +8,11 @@ import static org.hamcrest.Matchers.hasProperty; import static org.hamcrest.MatcherAssert.assertThat; import static uk.gov.moj.cpp.sjp.domain.decision.OffenceDecisionInformation.createOffenceDecisionInformation; -import static uk.gov.moj.cpp.sjp.domain.verdict.VerdictType.FOUND_GUILTY; +import static uk.gov.moj.cpp.sjp.domain.verdict.VerdictType.FOUND_NOT_GUILTY; import static uk.gov.moj.cpp.sjp.event.processor.results.converter.judicialresult.JCaseResultsConstants.DATE_FORMAT; import uk.gov.moj.cpp.sjp.domain.decision.Dismiss; +import uk.gov.moj.cpp.sjp.event.processor.results.converter.ConvictionInfo; import uk.gov.moj.cpp.sjp.event.processor.results.converter.judicialresult.DecisionAggregate; import org.hamcrest.Matchers; @@ -37,7 +38,7 @@ public void setUp() { @Test public void shouldPopulateResultWithRightPrompts() { final Dismiss offenceDecision - = new Dismiss(null, createOffenceDecisionInformation(offence1Id, FOUND_GUILTY)); + = new Dismiss(null, createOffenceDecisionInformation(offence1Id, FOUND_NOT_GUILTY)); aggregator.aggregate(offenceDecision, sjpSessionEnvelope, resultsAggregate, resultedOn); @@ -49,4 +50,19 @@ public void shouldPopulateResultWithRightPrompts() { hasProperty("judicialResultPrompts", is(nullValue())))))); assertThat(resultsAggregate.getFinalOffence(offenceDecision.getOffenceIds().get(0)),Matchers.is(true)); } + + @Test + public void shouldPopulateConvictionInfoWithFoundNotGuiltyVerdict() { + final Dismiss offenceDecision + = new Dismiss(null, createOffenceDecisionInformation(offence1Id, FOUND_NOT_GUILTY)); + + aggregator.aggregate(offenceDecision, sjpSessionEnvelope, resultsAggregate, resultedOn); + + final ConvictionInfo convictionInfo = resultsAggregate.getConvictionInfo(offence1Id); + assertThat(convictionInfo, is(Matchers.notNullValue())); + assertThat(convictionInfo.getOffenceId(), Matchers.is(offence1Id)); + assertThat(convictionInfo.getVerdictType(), Matchers.is(FOUND_NOT_GUILTY)); + assertThat(convictionInfo.getConvictionDate(), is(resultedOn.toLocalDate())); + assertThat(convictionInfo.getConvictingCourt(), is(nullValue())); + } } diff --git a/sjp-event/sjp-event-processor/src/test/resources/ddq-result-definition.json b/sjp-event/sjp-event-processor/src/test/resources/ddq-result-definition.json new file mode 100644 index 0000000000..ca234bfcd8 --- /dev/null +++ b/sjp-event/sjp-event-processor/src/test/resources/ddq-result-definition.json @@ -0,0 +1,232 @@ +{ + "id": "73fe22ca-76bd-4aba-bdea-6dfef8ee03a2", + "version": "2026-07-06T15:43:41.279Z", + "startDate": "2026-07-07", + "label": "Points disqualification", + "shortCode": "DDP", + "level": "O", + "rank": 94000, + "wordGroups": [ + { + "wordGroup": [ + "DDP" + ] + }, + { + "wordGroup": [ + "disqualification", + "points" + ] + } + ], + "prompts": [ + { + "id": "2bf54447-328c-4c1b-a123-341adbd52172", + "label": "Disqualification period", + "welshLabel": "Cyfnod gwahardd", + "resultPromptRule": "mandatory", + "type": "INTM", + "sequence": 100, + "duration": "Year(s)", + "financial": "N", + "reference": "disqualificationPeriod", + "userGroups": [], + "min": "1", + "max": "999", + "durationSequence": 1, + "welshDuration": "Flynedd", + "courtExtract": "Y", + "jurisdiction": "B", + "hidden": false, + "nameEmail": false, + "associatedWithReferenceData": false + }, + { + "id": "2bf54447-328c-4c1b-a123-341adbd52172", + "label": "Disqualification period", + "welshLabel": "Cyfnod gwahardd", + "resultPromptRule": "mandatory", + "type": "INTM", + "sequence": 100, + "duration": "Month(s)", + "financial": "N", + "reference": "disqualificationPeriod", + "userGroups": [], + "min": "1", + "max": "999", + "durationSequence": 1, + "welshDuration": "Mis", + "courtExtract": "Y", + "jurisdiction": "B", + "hidden": false, + "nameEmail": false, + "associatedWithReferenceData": false + }, + { + "id": "2bf54447-328c-4c1b-a123-341adbd52172", + "label": "Disqualification period", + "welshLabel": "Cyfnod gwahardd", + "resultPromptRule": "mandatory", + "type": "INTM", + "sequence": 100, + "duration": "Day(s)", + "financial": "N", + "reference": "disqualificationPeriod", + "userGroups": [], + "min": "1", + "max": "999", + "durationSequence": 1, + "welshDuration": "Niwrnod", + "courtExtract": "Y", + "jurisdiction": "B", + "hidden": false, + "nameEmail": false, + "associatedWithReferenceData": false + }, + { + "id": "2bf54447-328c-4c1b-a123-341adbd52172", + "label": "Disqualification period", + "welshLabel": "Cyfnod gwahardd", + "resultPromptRule": "mandatory", + "type": "INTM", + "sequence": 100, + "financial": "N", + "reference": "disqualificationPeriod", + "wordGroup": [ + "months", + "Years" + ], + "userGroups": [], + "min": "1", + "max": "999", + "durationSequence": 1, + "courtExtract": "Y", + "jurisdiction": "B", + "hidden": false, + "nameEmail": false, + "associatedWithReferenceData": false + }, + { + "id": "0143f821-7cab-4e53-a00b-2fd1c3dc8204", + "label": "Extension period section 35B (effect of custodial sentence noted)", + "welshLabel": "Cyfnod estyniad adran 35B (effaith dedfryd o garchar wedi’i nodi)", + "resultPromptRule": "optional", + "type": "TXT", + "sequence": 400, + "financial": "N", + "reference": "extensionPeriodSection35BEffectOfCustodialSentenceNoted", + "userGroups": [], + "min": "1", + "max": "100", + "courtExtract": "Y", + "jurisdiction": "B", + "hidden": false, + "nameEmail": false, + "associatedWithReferenceData": false + }, + { + "id": "462d5ba8-7a1c-44a0-a732-6c75601bd6af", + "label": "Notional penalty points", + "welshLabel": "Pwyntiau cosb tybiedig", + "resultPromptRule": "mandatory", + "type": "INT", + "sequence": 500, + "financial": "N", + "reference": "notionalPenaltyPoints", + "userGroups": [], + "min": "1", + "max": "999", + "courtExtract": "Y", + "jurisdiction": "B", + "hidden": false, + "nameEmail": false, + "associatedWithReferenceData": false + }, + { + "id": "a593ae4a-9d69-45b9-9585-c11aeed28404", + "label": "Defendant driving licence number", + "welshLabel": "Rhif trwydded yrru'r Diffynnydd", + "resultPromptRule": "optional", + "type": "TXT", + "sequence": 600, + "financial": "N", + "reference": "defendantDrivingLicenceNumber", + "userGroups": [ + "CPS", + "Defence", + "Judiciary", + "NCES", + "Prosecuting Authorities", + "Probation", + "YOTs" + ], + "min": "1", + "max": "16", + "courtExtract": "N", + "jurisdiction": "B", + "hidden": false, + "nameEmail": false, + "cacheable": 2, + "cacheDataPath": "personDefendant.driverNumber", + "associatedWithReferenceData": false + }, + { + "id": "81638260-3cd1-41e7-9725-c8e91e23bda1", + "label": "Extension period section 35A (immediate custodial sentence)", + "welshLabel": "Cyfnod estyniad adran 35A (dedfryd o garchar ar unwaith)", + "resultPromptRule": "optional", + "type": "TXT", + "sequence": 300, + "financial": "N", + "reference": "extensionPeriodSection35AImmediateCustodialSentence", + "userGroups": [], + "min": "1", + "max": "100", + "courtExtract": "Y", + "jurisdiction": "B", + "hidden": false, + "nameEmail": false, + "associatedWithReferenceData": false + } + ], + "financial": "N", + "unscheduled": false, + "adjournment": "N", + "category": "A", + "urgent": true, + "convicted": "Y", + "d20": true, + "cjsCode": "3072", + "postHearingCustodyStatus": "A", + "terminatesOffenceProceedings": false, + "lifeDuration": false, + "rollUpPrompts": true, + "publishedForNows": false, + "publishedAsAPrompt": false, + "excludedFromResults": false, + "alwaysPublished": false, + "jurisdiction": "B", + "libraCode": "DDP", + "resultWording": "Disqualified for holding or obtaining a driving licence. Disqualification obligatory due to repeat offending. Driving record endorsed. Section 35(1) Road Traffic Offenders Act 1988", + "welshResultWording": "Gwahardd rhag dal neu gael trwydded yrru. Gwaharddiad yn orfodol oherwydd aildroseddu. Cofnod gyrru wedi’i ardystio. Adran 35 (1) Deddf Troseddwyr Traffig Ffyrdd 1988", + "resultDefinitionRules": [ + { + "childResultDefinitionId": "429fb553-4fb3-45eb-a700-7e5e69d1ca29", + "ruleType": "mandatory" + }, + { + "childResultDefinitionId": "ea1ee5a4-be13-48dc-8411-78f22e01c236", + "ruleType": "optional" + } + ], + "canBeSubjectOfBreach": false, + "canBeSubjectOfVariation": true, + "pointsDisqualificationCode": "TT99", + "resultTextTemplate": "Disqualified for holding or obtaining a driving licence for {disqualificationPeriod}.[ %INTD%] Disqualification obligatory due to repeat offending. Driving record endorsed.[ ({notionalPenaltyPoints} penalty points determined).] Section 35(1) Road Traffic Offenders Act 1988.[ This includes an extension period of {extensionPeriodSection35AImmediateCustodialSentence} in accordance with section 35A (immediate custodial sentence).][ This includes an extension period of {extensionPeriodSection35BEffectOfCustodialSentenceNoted} in accordance with section 35B (effect of custodial sentence noted).]", + "sentToCC": false, + "committedToCC": false, + "isDeemedServed": false, + "unpaidWorkExtensionCommunityOrdYro": false, + "isAvailableForCourtExtract": true, + "isBooleanResult": false +} \ No newline at end of file From c1f09b709f40879dcc02dea1dc95cca782fb1bdb Mon Sep 17 00:00:00 2001 From: yashpalnegi Date: Tue, 18 Aug 2026 12:54:40 +0100 Subject: [PATCH 13/22] LPT-2348 - fix publish court list issue --- .../TransparencyReportRequestedProcessor.java | 6 +++--- .../TransparencyReportRequestedProcessorTest.java | 12 ++++-------- .../uk/gov/moj/sjp/it/test/TransparencyReportIT.java | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java index 4bf6ed77ef..fbb3b439c1 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java @@ -67,7 +67,7 @@ public class TransparencyReportRequestedProcessor { private static final String SJP_OFFENCES = "sjpOffences"; private static final String OFFENCES = "offences"; private static final String LIST_TYPE = "listType"; - private static final String SJP_PUBLISH_LIST = "SJP_PUBLISH_LIST"; + private static final String SJP_PUBLIC_LIST = "SJP_PUBLIC_LIST"; public static final String DEFENDANT_NAME = "defendantName"; public static final String PROSECUTOR_NAME = "prosecutorName"; public static final String TITLE = "title"; @@ -178,9 +178,9 @@ private void publishCourtList(final JsonEnvelope envelope, final JsonObject payl final String type = envelope.payloadAsJsonObject().getString(REQUEST_TYPE); final String language = envelope.payloadAsJsonObject().getString(LANGUAGE); LOGGER.info("building sjp public court list publish request, listType {}, requestType {}, language {}", - SJP_PUBLISH_LIST, type, language); + SJP_PUBLIC_LIST, type, language); final JsonObject courtListPublishRequest = createObjectBuilder() - .add(LIST_TYPE, SJP_PUBLISH_LIST) + .add(LIST_TYPE, SJP_PUBLIC_LIST) .add(LANGUAGE, language) .add(REQUEST_TYPE, type) .add(LIST_PAYLOAD, payloadForDocumentGeneration) diff --git a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java index 0154b6dc29..d06af37bdc 100644 --- a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java +++ b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java @@ -211,16 +211,12 @@ public void shouldCreateTransparencyPDFReportDELTA() throws FileServiceException } @Test - public void shouldCreateTransparencyReportJSONFull() throws FileServiceException, IOException { - final String expectedEnglishTemplateName = "PublicPendingCasesFullEnglish"; - final UUID englishPayloadFileUUID = randomUUID(); - final UUID welshPayloadFileUUID = randomUUID(); + public void shouldCreateTransparencyReportJSONFull() throws IOException { final UUID transparencyReportId = randomUUID(); final String offenceTitle = "OffenceTitle"; final String prosecutorName = "TFL"; final String prosecutorEnglish = "Transport For London"; - final String prosecutorWelsh = "Transport For London - Welsh"; final Integer numberOfPendingCasesForExport = 9; final List caseIds = range(0, numberOfPendingCasesForExport) .mapToObj(e -> randomUUID()).collect(toList()); @@ -253,11 +249,11 @@ public void shouldCreateTransparencyReportJSONFull() throws FileServiceException verify(courtListPublishingService, times(1)).publishCourtList(courtListPublishRequestCaptor.capture()); final JsonObject courtListPublishRequest = Json.createReader(new StringReader(courtListPublishRequestCaptor.getValue())).readObject(); - assertThat(courtListPublishRequest.getString("listType"), is("SJP_PUBLISH_LIST")); + assertThat(courtListPublishRequest.getString("listType"), is("SJP_PUBLIC_LIST")); final JsonObject payload = courtListPublishRequest.getJsonObject("listPayload"); - assertThat(payload.getInt("totalNumberOfRecords"), is(9)); + assertThat(payload.getInt("totalNumberOfRecords"), is(numberOfPendingCasesForExport)); final JsonArray readyCases = payload.getJsonArray("readyCases"); - assertThat(9, is(readyCases.size())); + assertThat(readyCases.size(), is(numberOfPendingCasesForExport)); readyCases.getValuesAs(JsonObject.class).forEach(jsonObject -> { assertThat(jsonObject.getJsonArray("sjpOffences"), notNullValue()); assertThat(jsonObject.getString("firstName"), is("A")); diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java index 0e64566547..46fb7156c5 100644 --- a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java @@ -211,7 +211,7 @@ public void shouldGenerateTransparencyJsonReports() { final List courtListPublishRequests = pollCourtListPublishRequests(hasSize(1)); final JSONObject courtListPublishRequest = courtListPublishRequests.get(0); - assertThat(courtListPublishRequest.getString("listType"), is("SJP_PUBLISH_LIST")); + assertThat(courtListPublishRequest.getString("listType"), is("SJP_PUBLIC_LIST")); final JSONObject listPayload = courtListPublishRequest.getJSONObject("listPayload"); assertThat(listPayload.getJSONArray("readyCases").length(), is(2)); From f48cc01cee171cf572c0e01d398a1f4845c1a5a0 Mon Sep 17 00:00:00 2001 From: yashpalnegi Date: Tue, 18 Aug 2026 17:24:00 +0100 Subject: [PATCH 14/22] fix intergation test --- pom.xml | 2 +- sjp-command/pom.xml | 2 +- sjp-command/sjp-command-api/pom.xml | 2 +- sjp-command/sjp-command-controller/pom.xml | 2 +- sjp-command/sjp-command-handler/pom.xml | 2 +- sjp-domain/pom.xml | 2 +- sjp-domain/sjp-domain-aggregate/pom.xml | 2 +- sjp-domain/sjp-domain-common/pom.xml | 2 +- sjp-domain/sjp-domain-event-processor/pom.xml | 2 +- sjp-domain/sjp-domain-event/pom.xml | 2 +- sjp-domain/sjp-domain-prosecution/pom.xml | 2 +- sjp-domain/sjp-domain-transformation/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- sjp-event-sources/pom.xml | 2 +- sjp-event/pom.xml | 2 +- sjp-event/sjp-event-indexer/pom.xml | 2 +- sjp-event/sjp-event-listener/pom.xml | 2 +- sjp-event/sjp-event-processor/pom.xml | 2 +- sjp-healthchecks/pom.xml | 2 +- sjp-integration-test/pom.xml | 2 +- .../uk/gov/moj/sjp/it/test/PleadOnlineIT.java | 34 ++++++++++--------- .../moj/sjp/it/test/TransparencyReportIT.java | 2 +- sjp-json/pom.xml | 2 +- sjp-query/pom.xml | 2 +- sjp-query/sjp-query-api/pom.xml | 2 +- sjp-query/sjp-query-view/pom.xml | 2 +- sjp-service/pom.xml | 2 +- sjp-viewstore/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-liquibase/pom.xml | 2 +- .../sjp-viewstore-persistence/pom.xml | 2 +- 31 files changed, 48 insertions(+), 46 deletions(-) diff --git a/pom.xml b/pom.xml index 3fffdfceff..a321e83838 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT pom diff --git a/sjp-command/pom.xml b/sjp-command/pom.xml index 50337293b2..8e17bcdd17 100644 --- a/sjp-command/pom.xml +++ b/sjp-command/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-api/pom.xml b/sjp-command/sjp-command-api/pom.xml index 837ffd6fe5..0bcfda6d83 100644 --- a/sjp-command/sjp-command-api/pom.xml +++ b/sjp-command/sjp-command-api/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-controller/pom.xml b/sjp-command/sjp-command-controller/pom.xml index fa8da48da0..07abdd4836 100644 --- a/sjp-command/sjp-command-controller/pom.xml +++ b/sjp-command/sjp-command-controller/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-handler/pom.xml b/sjp-command/sjp-command-handler/pom.xml index 9f9fce6365..dd40fdaeec 100644 --- a/sjp-command/sjp-command-handler/pom.xml +++ b/sjp-command/sjp-command-handler/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/pom.xml b/sjp-domain/pom.xml index 713251fb2b..8a425d02d2 100644 --- a/sjp-domain/pom.xml +++ b/sjp-domain/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT sjp-domain diff --git a/sjp-domain/sjp-domain-aggregate/pom.xml b/sjp-domain/sjp-domain-aggregate/pom.xml index a56e2f12ba..4c56259370 100644 --- a/sjp-domain/sjp-domain-aggregate/pom.xml +++ b/sjp-domain/sjp-domain-aggregate/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT sjp-domain-aggregate diff --git a/sjp-domain/sjp-domain-common/pom.xml b/sjp-domain/sjp-domain-common/pom.xml index 49e06e6565..ae6ab1155f 100644 --- a/sjp-domain/sjp-domain-common/pom.xml +++ b/sjp-domain/sjp-domain-common/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT diff --git a/sjp-domain/sjp-domain-event-processor/pom.xml b/sjp-domain/sjp-domain-event-processor/pom.xml index a0afba60a3..1596a1c530 100644 --- a/sjp-domain/sjp-domain-event-processor/pom.xml +++ b/sjp-domain/sjp-domain-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-event/pom.xml b/sjp-domain/sjp-domain-event/pom.xml index 5d0a0def74..8dbf5070d4 100644 --- a/sjp-domain/sjp-domain-event/pom.xml +++ b/sjp-domain/sjp-domain-event/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT sjp-domain-event diff --git a/sjp-domain/sjp-domain-prosecution/pom.xml b/sjp-domain/sjp-domain-prosecution/pom.xml index 5008ac337c..b2708a2659 100644 --- a/sjp-domain/sjp-domain-prosecution/pom.xml +++ b/sjp-domain/sjp-domain-prosecution/pom.xml @@ -4,7 +4,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT sjp-domain-prosecution diff --git a/sjp-domain/sjp-domain-transformation/pom.xml b/sjp-domain/sjp-domain-transformation/pom.xml index 42fe45f50c..3735eb1572 100644 --- a/sjp-domain/sjp-domain-transformation/pom.xml +++ b/sjp-domain/sjp-domain-transformation/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml index f91793fc72..3b749dbd21 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml index b09da912e7..4d77b90d3e 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event-sources/pom.xml b/sjp-event-sources/pom.xml index cb2c357c90..315aabd284 100644 --- a/sjp-event-sources/pom.xml +++ b/sjp-event-sources/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sjp-event/pom.xml b/sjp-event/pom.xml index 187189a52a..5eef50313c 100644 --- a/sjp-event/pom.xml +++ b/sjp-event/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-indexer/pom.xml b/sjp-event/sjp-event-indexer/pom.xml index 95760ddf45..0012ce5ae4 100644 --- a/sjp-event/sjp-event-indexer/pom.xml +++ b/sjp-event/sjp-event-indexer/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-listener/pom.xml b/sjp-event/sjp-event-listener/pom.xml index 9c8e68d5ff..abb2f9ea82 100644 --- a/sjp-event/sjp-event-listener/pom.xml +++ b/sjp-event/sjp-event-listener/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-processor/pom.xml b/sjp-event/sjp-event-processor/pom.xml index d66363e9f8..d4ec7e83cc 100644 --- a/sjp-event/sjp-event-processor/pom.xml +++ b/sjp-event/sjp-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-healthchecks/pom.xml b/sjp-healthchecks/pom.xml index 478a0264e9..064d0a73ee 100644 --- a/sjp-healthchecks/pom.xml +++ b/sjp-healthchecks/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-integration-test/pom.xml b/sjp-integration-test/pom.xml index b63fa11fa9..3ed15a35b6 100644 --- a/sjp-integration-test/pom.xml +++ b/sjp-integration-test/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PleadOnlineIT.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PleadOnlineIT.java index cbecb3e6f1..1ca95d0bd9 100644 --- a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PleadOnlineIT.java +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PleadOnlineIT.java @@ -1059,7 +1059,7 @@ public void shouldPleaNotGuiltyWithoutFinancialMeansWithPublicEvent() { pleaPayload.remove("financialMeans"); assertThat(pleaPayload.has("financialMeans"), is(false)); assertThat(pleaPayload.has("outgoings"), is(true)); - final JsonPath response = pleadOnlineWithPublicEvent(pleaPayload); + final JsonPath response = pleadOnlineWithPublicEvent(pleaPayload, false); verifyResponseCase(response, TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_CASE_RESPONSE); verifyResponseOnlinePlea(TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_RESPONSE, notGuilty); } @@ -1072,7 +1072,7 @@ public void shouldPleaNotGuiltyWithoutFinancialMeans() { pleaPayload.remove("financialMeans"); assertThat(pleaPayload.has("financialMeans"), is(false)); assertThat(pleaPayload.has("outgoings"), is(true)); - final JsonPath response = pleadOnline(pleaPayload); + final JsonPath response = pleadOnline(pleaPayload, false); verifyResponseCase(response, TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_CASE_RESPONSE); verifyResponseOnlinePlea(TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_RESPONSE, notGuilty); } @@ -1084,7 +1084,7 @@ public void shouldPleaNotGuiltyWithoutOutgoingsWithPublicEvent() { pleaPayload.remove("outgoings"); assertThat(pleaPayload.has("financialMeans"), is(true)); assertThat(pleaPayload.has("outgoings"), is(false)); - final JsonPath response = pleadOnlineWithPublicEvent(pleaPayload); + final JsonPath response = pleadOnlineWithPublicEvent(pleaPayload, false); verifyResponseCase(response, TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_CASE_RESPONSE); verifyResponseOnlinePlea(TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_OUTGOINGS_RESPONSE, notGuilty); } @@ -1096,7 +1096,7 @@ public void shouldPleaNotGuiltyWithoutOutgoings() { pleaPayload.remove("outgoings"); assertThat(pleaPayload.has("financialMeans"), is(true)); assertThat(pleaPayload.has("outgoings"), is(false)); - final JsonPath response = pleadOnline(pleaPayload); + final JsonPath response = pleadOnline(pleaPayload, false); verifyResponseCase(response, TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_CASE_RESPONSE); verifyResponseOnlinePlea(TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_OUTGOINGS_RESPONSE, notGuilty); } @@ -1111,7 +1111,7 @@ public void shouldPleaNotGuiltyAndUpdateDefendantDetailsWithPublicEvent() { pleaPayload.getJSONObject("personalDetails").put("nationalInsuranceNumber", "SR569876FD"); assertThat(pleaPayload.has("financialMeans"), is(true)); assertThat(pleaPayload.has("outgoings"), is(false)); - final JsonPath response = pleadOnlineWithPublicEvent(pleaPayload); + final JsonPath response = pleadOnlineWithPublicEvent(pleaPayload, false); verifyResponseCase(response, TEMPLATE_PLEA_NOT_GUILTY_WITH_CHANGED_DETAILS_CASE_RESPONSE); verifyResponseOnlinePlea(TEMPLATE_PLEA_NOT_GUILTY_WITH_CHANGED_DETAILS_RESPONSE, notGuilty); @@ -1127,7 +1127,7 @@ public void shouldPleaNotGuiltyAndUpdateDefendantDetails() { pleaPayload.getJSONObject("personalDetails").put("nationalInsuranceNumber", "SR569876FD"); assertThat(pleaPayload.has("financialMeans"), is(true)); assertThat(pleaPayload.has("outgoings"), is(false)); - final JsonPath response = pleadOnline(pleaPayload); + final JsonPath response = pleadOnline(pleaPayload, false); verifyResponseCase(response, TEMPLATE_PLEA_NOT_GUILTY_WITH_CHANGED_DETAILS_CASE_RESPONSE); verifyResponseOnlinePlea(TEMPLATE_PLEA_NOT_GUILTY_WITH_CHANGED_DETAILS_RESPONSE, notGuilty); @@ -1141,7 +1141,7 @@ public void shouldPleaNotGuiltyWithoutFinancialMeansAndOutgoingsWithPublicEvent( pleaPayload.remove("outgoings"); assertThat(pleaPayload.has("financialMeans"), is(false)); assertThat(pleaPayload.has("outgoings"), is(false)); - final JsonPath response = pleadOnlineWithPublicEvent(pleaPayload); + final JsonPath response = pleadOnlineWithPublicEvent(pleaPayload, false); verifyResponseCase(response, TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_CASE_RESPONSE); verifyResponseOnlinePlea(TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_AND_OUTGOINGS_RESPONSE, notGuilty); } @@ -1154,7 +1154,7 @@ public void shouldPleaNotGuiltyWithoutFinancialMeansAndOutgoings() { pleaPayload.remove("outgoings"); assertThat(pleaPayload.has("financialMeans"), is(false)); assertThat(pleaPayload.has("outgoings"), is(false)); - final JsonPath response = pleadOnline(pleaPayload); + final JsonPath response = pleadOnline(pleaPayload, false); verifyResponseCase(response, TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_CASE_RESPONSE); verifyResponseOnlinePlea(TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_AND_OUTGOINGS_RESPONSE, notGuilty); } @@ -1165,7 +1165,7 @@ public void shouldPleaNotGuiltyWithEmptyFinancialMeansWithPublicEvent() { final JSONObject pleaPayload = getOnlinePleaPayload(notGuilty); pleaPayload.put("financialMeans", createObjectBuilder().build()); assertThat(pleaPayload.getJSONObject("financialMeans").keySet(), is(empty())); - final JsonPath response = pleadOnlineWithPublicEvent(pleaPayload); + final JsonPath response = pleadOnlineWithPublicEvent(pleaPayload, false); verifyResponseCase(response, TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_CASE_RESPONSE); verifyResponseOnlinePlea(TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_RESPONSE, notGuilty); } @@ -1176,7 +1176,7 @@ public void shouldPleaNotGuiltyWithEmptyFinancialMeans() { final JSONObject pleaPayload = getOnlinePleaPayload(notGuilty); pleaPayload.put("financialMeans", createObjectBuilder().build()); assertThat(pleaPayload.getJSONObject("financialMeans").keySet(), is(empty())); - final JsonPath response = pleadOnline(pleaPayload); + final JsonPath response = pleadOnline(pleaPayload, false); verifyResponseCase(response, TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_CASE_RESPONSE); verifyResponseOnlinePlea(TEMPLATE_PLEA_NOT_GUILTY_WITHOUT_FINANCIAL_MEANS_RESPONSE, notGuilty); } @@ -1186,7 +1186,7 @@ public void shouldPleaGuiltyWithFinancialMeansWithPublicEvent() { final PleaType guilty = GUILTY; final JSONObject pleaPayload = getOnlinePleaPayload(guilty); assertThat(pleaPayload.has("financialMeans"), is(true)); - final JsonPath response = pleadOnlineWithPublicEvent(pleaPayload); + final JsonPath response = pleadOnlineWithPublicEvent(pleaPayload, true); verifyResponseCase(response, TEMPLATE_PLEA_GUILTY_WITH_FINANCIAL_MEANS_CASE_RESPONSE); verifyResponseOnlinePlea(TEMPLATE_PLEA_GUILTY_WITH_FINANCIAL_MEANS_RESPONSE, guilty); } @@ -1196,7 +1196,7 @@ public void shouldPleaGuiltyWithFinancialMeans() { final PleaType guilty = GUILTY; final JSONObject pleaPayload = getOnlinePleaPayload(guilty); assertThat(pleaPayload.has("financialMeans"), is(true)); - final JsonPath response = pleadOnline(pleaPayload); + final JsonPath response = pleadOnline(pleaPayload, true); verifyResponseCase(response, TEMPLATE_PLEA_GUILTY_WITH_FINANCIAL_MEANS_CASE_RESPONSE); verifyResponseOnlinePlea(TEMPLATE_PLEA_GUILTY_WITH_FINANCIAL_MEANS_RESPONSE, guilty); } @@ -1462,7 +1462,7 @@ private JsonPath fillTemplate(final String nameFile, final Map v return JsonPath.from(new StrSubstitutor(values).replace(getPayload(nameFile))); } - private JsonPath pleadOnlineWithPublicEvent(final JSONObject pleaPayload) { + private JsonPath pleadOnlineWithPublicEvent(final JSONObject pleaPayload, final boolean expectedReadyForDecision) { final PleaType pleaType = PleaType.valueOf(pleaPayload.getJSONArray("offences").getJSONObject(0).getString("plea")); try (final PleadOnlineHelper pleadOnlineHelper = new PleadOnlineHelper(createCasePayloadBuilder.getId())) { pleadOnlineHelper.pleadOnlinePublicEvent(stringToJsonObjectConverter.convert(pleaPayload.toString())); @@ -1470,13 +1470,14 @@ private JsonPath pleadOnlineWithPublicEvent(final JSONObject pleaPayload) { withJsonPath("defendant.offences[0].plea", is(pleaType.name())), withJsonPath("defendant.offences[0].pleaMethod", is(PleaMethod.ONLINE.name())), withJsonPath("defendant.offences[0].pleaDate", notNullValue()), - withJsonPath("onlinePleaReceived", is(true)) + withJsonPath("onlinePleaReceived", is(true)), + withJsonPath("readyForDecision", is(expectedReadyForDecision)) }; return pleadOnlineHelper.verifyPleaUpdated(createCasePayloadBuilder.getId(), pleaMatchers); } } - private JsonPath pleadOnline(final JSONObject pleaPayload) { + private JsonPath pleadOnline(final JSONObject pleaPayload, final boolean expectedReadyForDecision) { final PleaType pleaType = PleaType.valueOf(pleaPayload.getJSONArray("offences").getJSONObject(0).getString("plea")); try (final PleadOnlineHelper pleadOnlineHelper = new PleadOnlineHelper(createCasePayloadBuilder.getId())) { pleadOnlineHelper.pleadOnline(pleaPayload.toString()); @@ -1484,7 +1485,8 @@ private JsonPath pleadOnline(final JSONObject pleaPayload) { withJsonPath("defendant.offences[0].plea", is(pleaType.name())), withJsonPath("defendant.offences[0].pleaMethod", is(PleaMethod.ONLINE.name())), withJsonPath("defendant.offences[0].pleaDate", notNullValue()), - withJsonPath("onlinePleaReceived", is(true)) + withJsonPath("onlinePleaReceived", is(true)), + withJsonPath("readyForDecision", is(expectedReadyForDecision)) }; return pleadOnlineHelper.verifyPleaUpdated(createCasePayloadBuilder.getId(), pleaMatchers); } diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java index 46fb7156c5..b857b94ec1 100644 --- a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java @@ -73,7 +73,7 @@ public class TransparencyReportIT extends BaseIntegrationTest { private final UUID caseId1 = randomUUID(), caseId2 = randomUUID(); private final UUID offenceId1 = randomUUID(), offenceId2 = randomUUID(); - private TransparencyReportHelper transparencyReportHelper = new TransparencyReportHelper(); + private final TransparencyReportHelper transparencyReportHelper = new TransparencyReportHelper(); @BeforeEach public void beforeEachTest() throws Exception { diff --git a/sjp-json/pom.xml b/sjp-json/pom.xml index 7c33c1c8e3..babf1b3b34 100644 --- a/sjp-json/pom.xml +++ b/sjp-json/pom.xml @@ -2,7 +2,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/pom.xml b/sjp-query/pom.xml index 76fc4dab6a..ec7730c112 100644 --- a/sjp-query/pom.xml +++ b/sjp-query/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-api/pom.xml b/sjp-query/sjp-query-api/pom.xml index b53dce18b0..2ad324938a 100644 --- a/sjp-query/sjp-query-api/pom.xml +++ b/sjp-query/sjp-query-api/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-view/pom.xml b/sjp-query/sjp-query-view/pom.xml index a25a370427..ee3fcea273 100644 --- a/sjp-query/sjp-query-view/pom.xml +++ b/sjp-query/sjp-query-view/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-service/pom.xml b/sjp-service/pom.xml index b8a4ab1f63..8d7feb0d97 100644 --- a/sjp-service/pom.xml +++ b/sjp-service/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT sjp-service war diff --git a/sjp-viewstore/pom.xml b/sjp-viewstore/pom.xml index 50e0d77b78..57d722cb5f 100644 --- a/sjp-viewstore/pom.xml +++ b/sjp-viewstore/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 sjp-viewstore diff --git a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml index 6be39c56f8..7684acab37 100644 --- a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml +++ b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-viewstore - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT sjp-viewstore-liquibase diff --git a/sjp-viewstore/sjp-viewstore-persistence/pom.xml b/sjp-viewstore/sjp-viewstore-persistence/pom.xml index cf7471be26..66672752ab 100644 --- a/sjp-viewstore/sjp-viewstore-persistence/pom.xml +++ b/sjp-viewstore/sjp-viewstore-persistence/pom.xml @@ -3,7 +3,7 @@ sjp-viewstore uk.gov.moj.cpp.sjp - 17.104.185-CCT-1981-SNAPSHOT + 17.104.186-CCT-1981-SNAPSHOT 4.0.0 From 1076fb231b06e940fb6b8dc5f276006ff6809501 Mon Sep 17 00:00:00 2001 From: devops-team Date: Tue, 18 Aug 2026 19:22:54 +0000 Subject: [PATCH 15/22] New 17.104.187-CCT-1981-SNAPSHOT --- pom.xml | 2 +- sjp-command/pom.xml | 2 +- sjp-command/sjp-command-api/pom.xml | 2 +- sjp-command/sjp-command-controller/pom.xml | 2 +- sjp-command/sjp-command-handler/pom.xml | 2 +- sjp-domain/pom.xml | 2 +- sjp-domain/sjp-domain-aggregate/pom.xml | 2 +- sjp-domain/sjp-domain-common/pom.xml | 2 +- sjp-domain/sjp-domain-event-processor/pom.xml | 2 +- sjp-domain/sjp-domain-event/pom.xml | 2 +- sjp-domain/sjp-domain-prosecution/pom.xml | 2 +- sjp-domain/sjp-domain-transformation/pom.xml | 2 +- .../sjp-domain-transformation-anonymise/pom.xml | 2 +- .../sjp-domain-transformation-postcode/pom.xml | 2 +- sjp-event-sources/pom.xml | 2 +- sjp-event/pom.xml | 2 +- sjp-event/sjp-event-indexer/pom.xml | 2 +- sjp-event/sjp-event-listener/pom.xml | 2 +- sjp-event/sjp-event-processor/pom.xml | 2 +- sjp-healthchecks/pom.xml | 2 +- sjp-integration-test/pom.xml | 2 +- sjp-json/pom.xml | 2 +- sjp-query/pom.xml | 2 +- sjp-query/sjp-query-api/pom.xml | 2 +- sjp-query/sjp-query-view/pom.xml | 2 +- sjp-service/pom.xml | 2 +- sjp-viewstore/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-liquibase/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-persistence/pom.xml | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index a321e83838..c79209beab 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT pom diff --git a/sjp-command/pom.xml b/sjp-command/pom.xml index 8e17bcdd17..ef3b55d406 100644 --- a/sjp-command/pom.xml +++ b/sjp-command/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-api/pom.xml b/sjp-command/sjp-command-api/pom.xml index 0bcfda6d83..398eabf684 100644 --- a/sjp-command/sjp-command-api/pom.xml +++ b/sjp-command/sjp-command-api/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-controller/pom.xml b/sjp-command/sjp-command-controller/pom.xml index 07abdd4836..5b15335b2f 100644 --- a/sjp-command/sjp-command-controller/pom.xml +++ b/sjp-command/sjp-command-controller/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-handler/pom.xml b/sjp-command/sjp-command-handler/pom.xml index dd40fdaeec..d4284a60f5 100644 --- a/sjp-command/sjp-command-handler/pom.xml +++ b/sjp-command/sjp-command-handler/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/pom.xml b/sjp-domain/pom.xml index 8a425d02d2..e4784ba91e 100644 --- a/sjp-domain/pom.xml +++ b/sjp-domain/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT sjp-domain diff --git a/sjp-domain/sjp-domain-aggregate/pom.xml b/sjp-domain/sjp-domain-aggregate/pom.xml index 4c56259370..6e9650d3dc 100644 --- a/sjp-domain/sjp-domain-aggregate/pom.xml +++ b/sjp-domain/sjp-domain-aggregate/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT sjp-domain-aggregate diff --git a/sjp-domain/sjp-domain-common/pom.xml b/sjp-domain/sjp-domain-common/pom.xml index ae6ab1155f..d3d417784f 100644 --- a/sjp-domain/sjp-domain-common/pom.xml +++ b/sjp-domain/sjp-domain-common/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT diff --git a/sjp-domain/sjp-domain-event-processor/pom.xml b/sjp-domain/sjp-domain-event-processor/pom.xml index 1596a1c530..9d75deb9d0 100644 --- a/sjp-domain/sjp-domain-event-processor/pom.xml +++ b/sjp-domain/sjp-domain-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-event/pom.xml b/sjp-domain/sjp-domain-event/pom.xml index 8dbf5070d4..ee3907ad4d 100644 --- a/sjp-domain/sjp-domain-event/pom.xml +++ b/sjp-domain/sjp-domain-event/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT sjp-domain-event diff --git a/sjp-domain/sjp-domain-prosecution/pom.xml b/sjp-domain/sjp-domain-prosecution/pom.xml index b2708a2659..e67ae8ad70 100644 --- a/sjp-domain/sjp-domain-prosecution/pom.xml +++ b/sjp-domain/sjp-domain-prosecution/pom.xml @@ -4,7 +4,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT sjp-domain-prosecution diff --git a/sjp-domain/sjp-domain-transformation/pom.xml b/sjp-domain/sjp-domain-transformation/pom.xml index 3735eb1572..858060e1a1 100644 --- a/sjp-domain/sjp-domain-transformation/pom.xml +++ b/sjp-domain/sjp-domain-transformation/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml index 3b749dbd21..14503cd427 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml index 4d77b90d3e..34f47630bf 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event-sources/pom.xml b/sjp-event-sources/pom.xml index 315aabd284..94554d9f40 100644 --- a/sjp-event-sources/pom.xml +++ b/sjp-event-sources/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sjp-event/pom.xml b/sjp-event/pom.xml index 5eef50313c..c88c05d0da 100644 --- a/sjp-event/pom.xml +++ b/sjp-event/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-indexer/pom.xml b/sjp-event/sjp-event-indexer/pom.xml index 0012ce5ae4..4320a66dc2 100644 --- a/sjp-event/sjp-event-indexer/pom.xml +++ b/sjp-event/sjp-event-indexer/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-listener/pom.xml b/sjp-event/sjp-event-listener/pom.xml index abb2f9ea82..797484f205 100644 --- a/sjp-event/sjp-event-listener/pom.xml +++ b/sjp-event/sjp-event-listener/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-processor/pom.xml b/sjp-event/sjp-event-processor/pom.xml index d4ec7e83cc..296737c1a0 100644 --- a/sjp-event/sjp-event-processor/pom.xml +++ b/sjp-event/sjp-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-healthchecks/pom.xml b/sjp-healthchecks/pom.xml index 064d0a73ee..46d8459ea5 100644 --- a/sjp-healthchecks/pom.xml +++ b/sjp-healthchecks/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-integration-test/pom.xml b/sjp-integration-test/pom.xml index 3ed15a35b6..c89c77998d 100644 --- a/sjp-integration-test/pom.xml +++ b/sjp-integration-test/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-json/pom.xml b/sjp-json/pom.xml index babf1b3b34..da8195ac62 100644 --- a/sjp-json/pom.xml +++ b/sjp-json/pom.xml @@ -2,7 +2,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/pom.xml b/sjp-query/pom.xml index ec7730c112..c22db28e10 100644 --- a/sjp-query/pom.xml +++ b/sjp-query/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-api/pom.xml b/sjp-query/sjp-query-api/pom.xml index 2ad324938a..05b7d9e10a 100644 --- a/sjp-query/sjp-query-api/pom.xml +++ b/sjp-query/sjp-query-api/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-view/pom.xml b/sjp-query/sjp-query-view/pom.xml index ee3fcea273..c378374024 100644 --- a/sjp-query/sjp-query-view/pom.xml +++ b/sjp-query/sjp-query-view/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-service/pom.xml b/sjp-service/pom.xml index 8d7feb0d97..4f6a1f2747 100644 --- a/sjp-service/pom.xml +++ b/sjp-service/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT sjp-service war diff --git a/sjp-viewstore/pom.xml b/sjp-viewstore/pom.xml index 57d722cb5f..5a15ea7d81 100644 --- a/sjp-viewstore/pom.xml +++ b/sjp-viewstore/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 sjp-viewstore diff --git a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml index 7684acab37..e95d7c4b37 100644 --- a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml +++ b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-viewstore - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT sjp-viewstore-liquibase diff --git a/sjp-viewstore/sjp-viewstore-persistence/pom.xml b/sjp-viewstore/sjp-viewstore-persistence/pom.xml index 66672752ab..7aeb5dc2bf 100644 --- a/sjp-viewstore/sjp-viewstore-persistence/pom.xml +++ b/sjp-viewstore/sjp-viewstore-persistence/pom.xml @@ -3,7 +3,7 @@ sjp-viewstore uk.gov.moj.cpp.sjp - 17.104.186-CCT-1981-SNAPSHOT + 17.104.187-CCT-1981-SNAPSHOT 4.0.0 From 8c367fda518b827c402676d4e260d7b00b2ea776 Mon Sep 17 00:00:00 2001 From: Arcadius Ahouansou HMCTS Date: Thu, 20 Aug 2026 07:01:41 +0100 Subject: [PATCH 16/22] async sjp publishing (#141) Co-authored-by: Arcadius Ahouansou --- ...sTransparencyReportRequestedProcessor.java | 8 +++-- .../TransparencyReportRequestedProcessor.java | 8 +++-- ...nsparencyReportRequestedProcessorTest.java | 2 +- ...nsparencyReportRequestedProcessorTest.java | 31 +++++++++++++++++++ 4 files changed, 44 insertions(+), 5 deletions(-) diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java index db8265851e..6c1b79cbd9 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessor.java @@ -65,6 +65,7 @@ public class PressTransparencyReportRequestedProcessor { private static final String LIST_TYPE = "listType"; private static final String SJP_PRESS_LIST = "SJP_PRESS_LIST"; + private static final String SJP_DELTA_PRESS_LIST = "SJP_DELTA_PRESS_LIST"; public static final String CASE_URN = "caseUrn"; public static final String FIRST_NAME = "firstName"; public static final String LAST_NAME = "lastName"; @@ -160,10 +161,13 @@ public void handlePressTransparencyJSONReportRequest(final JsonEnvelope envelope private void publishCourtList(final JsonEnvelope envelope, final JsonObject payloadForDocumentGeneration) { final String type = envelope.payloadAsJsonObject().getString(REQUEST_TYPE); final String language = envelope.payloadAsJsonObject().getString(LANGUAGE); + // FULL/DELTA is part of the CaTH list-type vocabulary, not a separate field: sending + // SJP_PRESS_LIST for delta content makes CaTH render it with the full-list template. + final String listType = FULL.name().equals(type) ? SJP_PRESS_LIST : SJP_DELTA_PRESS_LIST; LOGGER.info("building sjp press court list publish request, listType {}, requestType {}, language {}", - SJP_PRESS_LIST, type, language); + listType, type, language); final JsonObject courtListPublishRequest = createObjectBuilder() - .add(LIST_TYPE, SJP_PRESS_LIST) + .add(LIST_TYPE, listType) .add(LANGUAGE, language) .add(REQUEST_TYPE, type) .add("listPayload", payloadForDocumentGeneration) diff --git a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java index fbb3b439c1..2db0adf48b 100644 --- a/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java +++ b/sjp-event/sjp-event-processor/src/main/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessor.java @@ -68,6 +68,7 @@ public class TransparencyReportRequestedProcessor { private static final String OFFENCES = "offences"; private static final String LIST_TYPE = "listType"; private static final String SJP_PUBLIC_LIST = "SJP_PUBLIC_LIST"; + private static final String SJP_DELTA_PUBLIC_LIST = "SJP_DELTA_PUBLIC_LIST"; public static final String DEFENDANT_NAME = "defendantName"; public static final String PROSECUTOR_NAME = "prosecutorName"; public static final String TITLE = "title"; @@ -177,10 +178,13 @@ private void publishCourtList(final JsonEnvelope envelope, final JsonObject payl LOGGER.info("publishing sjp pending cases public list to court list publishing service"); final String type = envelope.payloadAsJsonObject().getString(REQUEST_TYPE); final String language = envelope.payloadAsJsonObject().getString(LANGUAGE); + // FULL/DELTA is part of the CaTH list-type vocabulary, not a separate field: sending + // SJP_PUBLIC_LIST for delta content makes CaTH render it with the full-list template. + final String listType = FULL.name().equals(type) ? SJP_PUBLIC_LIST : SJP_DELTA_PUBLIC_LIST; LOGGER.info("building sjp public court list publish request, listType {}, requestType {}, language {}", - SJP_PUBLIC_LIST, type, language); + listType, type, language); final JsonObject courtListPublishRequest = createObjectBuilder() - .add(LIST_TYPE, SJP_PUBLIC_LIST) + .add(LIST_TYPE, listType) .add(LANGUAGE, language) .add(REQUEST_TYPE, type) .add(LIST_PAYLOAD, payloadForDocumentGeneration) diff --git a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessorTest.java b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessorTest.java index 7065cbcb08..6dae8cad07 100644 --- a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessorTest.java +++ b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/PressTransparencyReportRequestedProcessorTest.java @@ -270,7 +270,7 @@ public void shouldCreatePressTransparencyJSONReportDelta() throws IOException { processor.handlePressTransparencyJSONReportRequest(PRIVATE_EVENT_ENVELOPE_JSON_DELTA); verify(courtListPublishingService, times(1)).publishCourtList(courtListPublishRequestCaptor.capture()); final JsonObject courtListPublishRequest = Json.createReader(new StringReader(courtListPublishRequestCaptor.getValue())).readObject(); - assertThat(courtListPublishRequest.getString("listType"), is("SJP_PRESS_LIST")); + assertThat(courtListPublishRequest.getString("listType"), is("SJP_DELTA_PRESS_LIST")); final JsonObject payload = courtListPublishRequest.getJsonObject("listPayload"); assertThat(payload.getInt("totalNumberOfRecords"), is(1)); final JsonArray readyCases = payload.getJsonArray("readyCases"); diff --git a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java index d06af37bdc..92d7050497 100644 --- a/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java +++ b/sjp-event/sjp-event-processor/src/test/java/uk/gov/moj/cpp/sjp/event/processor/TransparencyReportRequestedProcessorTest.java @@ -3,6 +3,7 @@ import static java.util.UUID.fromString; import static java.util.UUID.randomUUID; import static java.util.stream.Collectors.toList; +import static java.util.Collections.emptyList; import static java.util.stream.IntStream.range; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.everyItem; @@ -490,4 +491,34 @@ private JsonObjectBuilder getPendingCaseWithPressRestriction(final List ca return pendingCase; } + + @Test + public void shouldPublishDeltaPublicListTypeWhenRequestTypeIsDelta() throws Exception { + final UUID transparencyReportId = randomUUID(); + + when(payloadHelper.mapOffenceIntoOffenceTitleString(any(), eq(false), any())).thenReturn("OffenceTitle"); + when(payloadHelper.buildProsecutorName(any(), eq(false), any())).thenReturn("Transport For London"); + when(payloadHelper.getStartDate(eq(false))).thenReturn("15 January 2024"); + + final List caseIds = range(0, 3).mapToObj(e -> randomUUID()).collect(toList()); + when(sjpService.getPendingDeltaCases(any(), any())) + .thenReturn(pendingCasesList(caseIds, emptyList(), emptyList())); + + final JsonEnvelope privateEventEnvelope = envelopeFrom( + metadataWithRandomUUID("sjp.events.transparency-json-report-requested"), + createObjectBuilder() + .add("transparencyReportId", transparencyReportId.toString()) + .add("format", DocumentFormat.JSON.name()) + .add("requestType", DocumentRequestType.DELTA.name()) + .add("language", "ENGLISH") + .build() + ); + + processor.createTransparencyJSONReport(privateEventEnvelope); + + verify(courtListPublishingService, times(1)).publishCourtList(courtListPublishRequestCaptor.capture()); + final JsonObject courtListPublishRequest = + Json.createReader(new StringReader(courtListPublishRequestCaptor.getValue())).readObject(); + assertThat(courtListPublishRequest.getString("listType"), is("SJP_DELTA_PUBLIC_LIST")); + } } From 54e17ba86b432d3a610af8b5ab5a17e116d50695 Mon Sep 17 00:00:00 2001 From: yashpalnegi Date: Fri, 21 Aug 2026 13:23:56 +0100 Subject: [PATCH 17/22] fix IT test for LPT-2348 --- .../sjp/it/test/PressTransparencyReportIT.java | 15 ++++++++++++--- .../gov/moj/sjp/it/test/TransparencyReportIT.java | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PressTransparencyReportIT.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PressTransparencyReportIT.java index ea4b60a1bd..467f3fb351 100644 --- a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PressTransparencyReportIT.java +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/PressTransparencyReportIT.java @@ -175,7 +175,16 @@ public void shouldGeneratePressTransparencyPDFReports() throws IOException { } @Test - public void shouldGeneratePressTransparencyJsonReports() { + public void shouldGeneratePressTransparencyJsonReportsFull() { + verifyGeneratePressTransparencyJsonReport("FULL", "SJP_PRESS_LIST"); + } + + @Test + public void shouldGeneratePressTransparencyJsonReportsDelta() { + verifyGeneratePressTransparencyJsonReport("DELTA", "SJP_DELTA_PRESS_LIST"); + } + + private void verifyGeneratePressTransparencyJsonReport(final String requestType, final String expectedListType) { final CreateCase.DefendantBuilder defendant1 = defaultDefendant() .withRandomLastName(); @@ -193,7 +202,7 @@ public void shouldGeneratePressTransparencyJsonReports() { final JsonObject payload = createObjectBuilder() .add("format", "JSON") - .add("requestType", "DELTA") + .add("requestType", requestType) .add("language", "ENGLISH") .build(); @@ -208,7 +217,7 @@ public void shouldGeneratePressTransparencyJsonReports() { final List courtListPublishRequests = pollCourtListPublishRequests(hasSize(1)); final JSONObject courtListPublishRequest = courtListPublishRequests.get(0); - assertThat(courtListPublishRequest.getString("listType"), is("SJP_PRESS_LIST")); + assertThat(courtListPublishRequest.getString("listType"), is(expectedListType)); final JSONObject listPayload = courtListPublishRequest.getJSONObject("listPayload"); assertThat(listPayload.getJSONArray("readyCases").length(), is(2)); diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java index b857b94ec1..59a159341e 100644 --- a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/test/TransparencyReportIT.java @@ -178,7 +178,16 @@ public void shouldGenerateTransparencyPDFReports() throws IOException { } @Test - public void shouldGenerateTransparencyJsonReports() { + public void shouldGenerateTransparencyJsonReportsFull() { + verifyGenerateTransparencyJsonReport("FULL", "SJP_PUBLIC_LIST"); + } + + @Test + public void shouldGenerateTransparencyJsonReportsDelta() { + verifyGenerateTransparencyJsonReport("DELTA", "SJP_DELTA_PUBLIC_LIST"); + } + + private void verifyGenerateTransparencyJsonReport(final String requestType, final String expectedListType) { final CreateCase.DefendantBuilder defendant1 = defaultDefendant() .withRandomLastName(); @@ -196,7 +205,7 @@ public void shouldGenerateTransparencyJsonReports() { final JsonObject payload = createObjectBuilder() .add("format", "JSON") - .add("requestType", "DELTA") + .add("requestType", requestType) .add("language", "ENGLISH") .build(); @@ -211,7 +220,7 @@ public void shouldGenerateTransparencyJsonReports() { final List courtListPublishRequests = pollCourtListPublishRequests(hasSize(1)); final JSONObject courtListPublishRequest = courtListPublishRequests.get(0); - assertThat(courtListPublishRequest.getString("listType"), is("SJP_PUBLIC_LIST")); + assertThat(courtListPublishRequest.getString("listType"), is(expectedListType)); final JSONObject listPayload = courtListPublishRequest.getJSONObject("listPayload"); assertThat(listPayload.getJSONArray("readyCases").length(), is(2)); From e769def1f0d0f57aff63b51a3cdd5f0ff391d8e2 Mon Sep 17 00:00:00 2001 From: devops-team Date: Fri, 21 Aug 2026 15:22:27 +0000 Subject: [PATCH 18/22] New 17.104.188-CCT-1981-SNAPSHOT --- pom.xml | 2 +- sjp-command/pom.xml | 2 +- sjp-command/sjp-command-api/pom.xml | 2 +- sjp-command/sjp-command-controller/pom.xml | 2 +- sjp-command/sjp-command-handler/pom.xml | 2 +- sjp-domain/pom.xml | 2 +- sjp-domain/sjp-domain-aggregate/pom.xml | 2 +- sjp-domain/sjp-domain-common/pom.xml | 2 +- sjp-domain/sjp-domain-event-processor/pom.xml | 2 +- sjp-domain/sjp-domain-event/pom.xml | 2 +- sjp-domain/sjp-domain-prosecution/pom.xml | 2 +- sjp-domain/sjp-domain-transformation/pom.xml | 2 +- .../sjp-domain-transformation-anonymise/pom.xml | 2 +- .../sjp-domain-transformation-postcode/pom.xml | 2 +- sjp-event-sources/pom.xml | 2 +- sjp-event/pom.xml | 2 +- sjp-event/sjp-event-indexer/pom.xml | 2 +- sjp-event/sjp-event-listener/pom.xml | 2 +- sjp-event/sjp-event-processor/pom.xml | 2 +- sjp-healthchecks/pom.xml | 2 +- sjp-integration-test/pom.xml | 2 +- sjp-json/pom.xml | 2 +- sjp-query/pom.xml | 2 +- sjp-query/sjp-query-api/pom.xml | 2 +- sjp-query/sjp-query-view/pom.xml | 2 +- sjp-service/pom.xml | 2 +- sjp-viewstore/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-liquibase/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-persistence/pom.xml | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index c79209beab..8a35a000bc 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT pom diff --git a/sjp-command/pom.xml b/sjp-command/pom.xml index ef3b55d406..7c5c8ec05d 100644 --- a/sjp-command/pom.xml +++ b/sjp-command/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-api/pom.xml b/sjp-command/sjp-command-api/pom.xml index 398eabf684..d645b1b206 100644 --- a/sjp-command/sjp-command-api/pom.xml +++ b/sjp-command/sjp-command-api/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-controller/pom.xml b/sjp-command/sjp-command-controller/pom.xml index 5b15335b2f..868d913464 100644 --- a/sjp-command/sjp-command-controller/pom.xml +++ b/sjp-command/sjp-command-controller/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-handler/pom.xml b/sjp-command/sjp-command-handler/pom.xml index d4284a60f5..c53967e466 100644 --- a/sjp-command/sjp-command-handler/pom.xml +++ b/sjp-command/sjp-command-handler/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/pom.xml b/sjp-domain/pom.xml index e4784ba91e..9b676bc488 100644 --- a/sjp-domain/pom.xml +++ b/sjp-domain/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT sjp-domain diff --git a/sjp-domain/sjp-domain-aggregate/pom.xml b/sjp-domain/sjp-domain-aggregate/pom.xml index 6e9650d3dc..16bf82c6f2 100644 --- a/sjp-domain/sjp-domain-aggregate/pom.xml +++ b/sjp-domain/sjp-domain-aggregate/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT sjp-domain-aggregate diff --git a/sjp-domain/sjp-domain-common/pom.xml b/sjp-domain/sjp-domain-common/pom.xml index d3d417784f..059132207b 100644 --- a/sjp-domain/sjp-domain-common/pom.xml +++ b/sjp-domain/sjp-domain-common/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT diff --git a/sjp-domain/sjp-domain-event-processor/pom.xml b/sjp-domain/sjp-domain-event-processor/pom.xml index 9d75deb9d0..dbb9f6bfcf 100644 --- a/sjp-domain/sjp-domain-event-processor/pom.xml +++ b/sjp-domain/sjp-domain-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-event/pom.xml b/sjp-domain/sjp-domain-event/pom.xml index ee3907ad4d..3c9761bce4 100644 --- a/sjp-domain/sjp-domain-event/pom.xml +++ b/sjp-domain/sjp-domain-event/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT sjp-domain-event diff --git a/sjp-domain/sjp-domain-prosecution/pom.xml b/sjp-domain/sjp-domain-prosecution/pom.xml index e67ae8ad70..5f41918ccf 100644 --- a/sjp-domain/sjp-domain-prosecution/pom.xml +++ b/sjp-domain/sjp-domain-prosecution/pom.xml @@ -4,7 +4,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT sjp-domain-prosecution diff --git a/sjp-domain/sjp-domain-transformation/pom.xml b/sjp-domain/sjp-domain-transformation/pom.xml index 858060e1a1..3f03280254 100644 --- a/sjp-domain/sjp-domain-transformation/pom.xml +++ b/sjp-domain/sjp-domain-transformation/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml index 14503cd427..86d3608792 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml index 34f47630bf..0b3f02dbf8 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event-sources/pom.xml b/sjp-event-sources/pom.xml index 94554d9f40..ffbfb2367d 100644 --- a/sjp-event-sources/pom.xml +++ b/sjp-event-sources/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sjp-event/pom.xml b/sjp-event/pom.xml index c88c05d0da..5556619853 100644 --- a/sjp-event/pom.xml +++ b/sjp-event/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-indexer/pom.xml b/sjp-event/sjp-event-indexer/pom.xml index 4320a66dc2..4aa01e7d46 100644 --- a/sjp-event/sjp-event-indexer/pom.xml +++ b/sjp-event/sjp-event-indexer/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-listener/pom.xml b/sjp-event/sjp-event-listener/pom.xml index 797484f205..0b4b6cde0f 100644 --- a/sjp-event/sjp-event-listener/pom.xml +++ b/sjp-event/sjp-event-listener/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-processor/pom.xml b/sjp-event/sjp-event-processor/pom.xml index 296737c1a0..0bd808c865 100644 --- a/sjp-event/sjp-event-processor/pom.xml +++ b/sjp-event/sjp-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-healthchecks/pom.xml b/sjp-healthchecks/pom.xml index 46d8459ea5..e3a85dc908 100644 --- a/sjp-healthchecks/pom.xml +++ b/sjp-healthchecks/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-integration-test/pom.xml b/sjp-integration-test/pom.xml index c89c77998d..c8b175babf 100644 --- a/sjp-integration-test/pom.xml +++ b/sjp-integration-test/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-json/pom.xml b/sjp-json/pom.xml index da8195ac62..512b1b14ad 100644 --- a/sjp-json/pom.xml +++ b/sjp-json/pom.xml @@ -2,7 +2,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/pom.xml b/sjp-query/pom.xml index c22db28e10..7873654ea5 100644 --- a/sjp-query/pom.xml +++ b/sjp-query/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-api/pom.xml b/sjp-query/sjp-query-api/pom.xml index 05b7d9e10a..bbcfd782e9 100644 --- a/sjp-query/sjp-query-api/pom.xml +++ b/sjp-query/sjp-query-api/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-view/pom.xml b/sjp-query/sjp-query-view/pom.xml index c378374024..bcd79bf46b 100644 --- a/sjp-query/sjp-query-view/pom.xml +++ b/sjp-query/sjp-query-view/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-service/pom.xml b/sjp-service/pom.xml index 4f6a1f2747..e20de5016b 100644 --- a/sjp-service/pom.xml +++ b/sjp-service/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT sjp-service war diff --git a/sjp-viewstore/pom.xml b/sjp-viewstore/pom.xml index 5a15ea7d81..793fef3010 100644 --- a/sjp-viewstore/pom.xml +++ b/sjp-viewstore/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 sjp-viewstore diff --git a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml index e95d7c4b37..e0717af3c1 100644 --- a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml +++ b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-viewstore - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT sjp-viewstore-liquibase diff --git a/sjp-viewstore/sjp-viewstore-persistence/pom.xml b/sjp-viewstore/sjp-viewstore-persistence/pom.xml index 7aeb5dc2bf..3e3572b18d 100644 --- a/sjp-viewstore/sjp-viewstore-persistence/pom.xml +++ b/sjp-viewstore/sjp-viewstore-persistence/pom.xml @@ -3,7 +3,7 @@ sjp-viewstore uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 From 7c7cc65c7e221c9b2598ce26dcced09c80ace069 Mon Sep 17 00:00:00 2001 From: yashpalnegi Date: Fri, 21 Aug 2026 17:19:13 +0100 Subject: [PATCH 19/22] bump POMs version --- pom.xml | 2 +- sjp-command/pom.xml | 2 +- sjp-command/sjp-command-api/pom.xml | 2 +- sjp-command/sjp-command-controller/pom.xml | 2 +- sjp-command/sjp-command-handler/pom.xml | 2 +- sjp-domain/pom.xml | 2 +- sjp-domain/sjp-domain-aggregate/pom.xml | 2 +- sjp-domain/sjp-domain-common/pom.xml | 2 +- sjp-domain/sjp-domain-event-processor/pom.xml | 2 +- sjp-domain/sjp-domain-event/pom.xml | 2 +- sjp-domain/sjp-domain-prosecution/pom.xml | 2 +- sjp-domain/sjp-domain-transformation/pom.xml | 2 +- .../sjp-domain-transformation-anonymise/pom.xml | 2 +- .../sjp-domain-transformation-postcode/pom.xml | 2 +- sjp-event-sources/pom.xml | 2 +- sjp-event/pom.xml | 2 +- sjp-event/sjp-event-indexer/pom.xml | 2 +- sjp-event/sjp-event-listener/pom.xml | 2 +- sjp-event/sjp-event-processor/pom.xml | 2 +- sjp-healthchecks/pom.xml | 2 +- sjp-integration-test/pom.xml | 2 +- .../java/uk/gov/moj/sjp/it/helper/AssignmentHelper.java | 7 ++++--- sjp-json/pom.xml | 2 +- sjp-query/pom.xml | 2 +- sjp-query/sjp-query-api/pom.xml | 2 +- sjp-query/sjp-query-view/pom.xml | 2 +- sjp-service/pom.xml | 2 +- sjp-viewstore/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-liquibase/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-persistence/pom.xml | 2 +- 30 files changed, 33 insertions(+), 32 deletions(-) diff --git a/pom.xml b/pom.xml index c79209beab..8a35a000bc 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT pom diff --git a/sjp-command/pom.xml b/sjp-command/pom.xml index ef3b55d406..7c5c8ec05d 100644 --- a/sjp-command/pom.xml +++ b/sjp-command/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-api/pom.xml b/sjp-command/sjp-command-api/pom.xml index 398eabf684..d645b1b206 100644 --- a/sjp-command/sjp-command-api/pom.xml +++ b/sjp-command/sjp-command-api/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-controller/pom.xml b/sjp-command/sjp-command-controller/pom.xml index 5b15335b2f..868d913464 100644 --- a/sjp-command/sjp-command-controller/pom.xml +++ b/sjp-command/sjp-command-controller/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-handler/pom.xml b/sjp-command/sjp-command-handler/pom.xml index d4284a60f5..c53967e466 100644 --- a/sjp-command/sjp-command-handler/pom.xml +++ b/sjp-command/sjp-command-handler/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/pom.xml b/sjp-domain/pom.xml index e4784ba91e..9b676bc488 100644 --- a/sjp-domain/pom.xml +++ b/sjp-domain/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT sjp-domain diff --git a/sjp-domain/sjp-domain-aggregate/pom.xml b/sjp-domain/sjp-domain-aggregate/pom.xml index 6e9650d3dc..16bf82c6f2 100644 --- a/sjp-domain/sjp-domain-aggregate/pom.xml +++ b/sjp-domain/sjp-domain-aggregate/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT sjp-domain-aggregate diff --git a/sjp-domain/sjp-domain-common/pom.xml b/sjp-domain/sjp-domain-common/pom.xml index d3d417784f..059132207b 100644 --- a/sjp-domain/sjp-domain-common/pom.xml +++ b/sjp-domain/sjp-domain-common/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT diff --git a/sjp-domain/sjp-domain-event-processor/pom.xml b/sjp-domain/sjp-domain-event-processor/pom.xml index 9d75deb9d0..dbb9f6bfcf 100644 --- a/sjp-domain/sjp-domain-event-processor/pom.xml +++ b/sjp-domain/sjp-domain-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-event/pom.xml b/sjp-domain/sjp-domain-event/pom.xml index ee3907ad4d..3c9761bce4 100644 --- a/sjp-domain/sjp-domain-event/pom.xml +++ b/sjp-domain/sjp-domain-event/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT sjp-domain-event diff --git a/sjp-domain/sjp-domain-prosecution/pom.xml b/sjp-domain/sjp-domain-prosecution/pom.xml index e67ae8ad70..5f41918ccf 100644 --- a/sjp-domain/sjp-domain-prosecution/pom.xml +++ b/sjp-domain/sjp-domain-prosecution/pom.xml @@ -4,7 +4,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT sjp-domain-prosecution diff --git a/sjp-domain/sjp-domain-transformation/pom.xml b/sjp-domain/sjp-domain-transformation/pom.xml index 858060e1a1..3f03280254 100644 --- a/sjp-domain/sjp-domain-transformation/pom.xml +++ b/sjp-domain/sjp-domain-transformation/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml index 14503cd427..86d3608792 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml index 34f47630bf..0b3f02dbf8 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event-sources/pom.xml b/sjp-event-sources/pom.xml index 94554d9f40..ffbfb2367d 100644 --- a/sjp-event-sources/pom.xml +++ b/sjp-event-sources/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sjp-event/pom.xml b/sjp-event/pom.xml index c88c05d0da..5556619853 100644 --- a/sjp-event/pom.xml +++ b/sjp-event/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-indexer/pom.xml b/sjp-event/sjp-event-indexer/pom.xml index 4320a66dc2..4aa01e7d46 100644 --- a/sjp-event/sjp-event-indexer/pom.xml +++ b/sjp-event/sjp-event-indexer/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-listener/pom.xml b/sjp-event/sjp-event-listener/pom.xml index 797484f205..0b4b6cde0f 100644 --- a/sjp-event/sjp-event-listener/pom.xml +++ b/sjp-event/sjp-event-listener/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-processor/pom.xml b/sjp-event/sjp-event-processor/pom.xml index 296737c1a0..0bd808c865 100644 --- a/sjp-event/sjp-event-processor/pom.xml +++ b/sjp-event/sjp-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-healthchecks/pom.xml b/sjp-healthchecks/pom.xml index 46d8459ea5..e3a85dc908 100644 --- a/sjp-healthchecks/pom.xml +++ b/sjp-healthchecks/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-integration-test/pom.xml b/sjp-integration-test/pom.xml index c89c77998d..c8b175babf 100644 --- a/sjp-integration-test/pom.xml +++ b/sjp-integration-test/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/helper/AssignmentHelper.java b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/helper/AssignmentHelper.java index ab1bdcffbd..5f620a1cda 100644 --- a/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/helper/AssignmentHelper.java +++ b/sjp-integration-test/src/test/java/uk/gov/moj/sjp/it/helper/AssignmentHelper.java @@ -11,7 +11,6 @@ import static uk.gov.moj.sjp.it.util.HttpClientUtil.makeGetCall; import static uk.gov.moj.sjp.it.util.HttpClientUtil.makePostCall; import static uk.gov.moj.sjp.it.util.RestPollerWithDefaults.POLL_INTERVAL; -import static uk.gov.moj.sjp.it.util.RestPollerWithDefaults.TIMEOUT_IN_SECONDS; import uk.gov.justice.services.messaging.JsonEnvelope; import uk.gov.moj.cpp.sjp.event.session.CaseAssigned; @@ -28,6 +27,8 @@ public class AssignmentHelper { + private static final long ASSIGNMENT_TIMEOUT_IN_SECONDS = 20L; + public static UUID requestCaseAssignmentAsync(final UUID sessionId, final UUID userId) { final String contentType = "application/vnd.sjp.assign-next-case+json"; final String url = String.format("/sessions/%s", sessionId); @@ -66,11 +67,11 @@ public static boolean isCaseAssignedToUser(final UUID caseId, final UUID userId) } public static boolean pollUntilCaseAssignedToUser(final UUID caseId, final UUID userId) { - return await().pollInterval(POLL_INTERVAL).atMost(TIMEOUT_IN_SECONDS, SECONDS).until(() -> isCaseAssignedToUser(caseId, userId), is(true)); + return await().pollInterval(POLL_INTERVAL).atMost(ASSIGNMENT_TIMEOUT_IN_SECONDS, SECONDS).until(() -> isCaseAssignedToUser(caseId, userId), is(true)); } public static boolean pollUntilCaseNotAssignedToUser(final UUID caseId, final UUID userId) { - return await().pollInterval(POLL_INTERVAL).atMost(TIMEOUT_IN_SECONDS, SECONDS).until(() -> isCaseAssignedToUser(caseId, userId), is(false)); + return await().pollInterval(POLL_INTERVAL).atMost(ASSIGNMENT_TIMEOUT_IN_SECONDS, SECONDS).until(() -> isCaseAssignedToUser(caseId, userId), is(false)); } public static void pollCaseUnassigned(final UUID caseId) { diff --git a/sjp-json/pom.xml b/sjp-json/pom.xml index da8195ac62..512b1b14ad 100644 --- a/sjp-json/pom.xml +++ b/sjp-json/pom.xml @@ -2,7 +2,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/pom.xml b/sjp-query/pom.xml index c22db28e10..7873654ea5 100644 --- a/sjp-query/pom.xml +++ b/sjp-query/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-api/pom.xml b/sjp-query/sjp-query-api/pom.xml index 05b7d9e10a..bbcfd782e9 100644 --- a/sjp-query/sjp-query-api/pom.xml +++ b/sjp-query/sjp-query-api/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-view/pom.xml b/sjp-query/sjp-query-view/pom.xml index c378374024..bcd79bf46b 100644 --- a/sjp-query/sjp-query-view/pom.xml +++ b/sjp-query/sjp-query-view/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-service/pom.xml b/sjp-service/pom.xml index 4f6a1f2747..e20de5016b 100644 --- a/sjp-service/pom.xml +++ b/sjp-service/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT sjp-service war diff --git a/sjp-viewstore/pom.xml b/sjp-viewstore/pom.xml index 5a15ea7d81..793fef3010 100644 --- a/sjp-viewstore/pom.xml +++ b/sjp-viewstore/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 sjp-viewstore diff --git a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml index e95d7c4b37..e0717af3c1 100644 --- a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml +++ b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-viewstore - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT sjp-viewstore-liquibase diff --git a/sjp-viewstore/sjp-viewstore-persistence/pom.xml b/sjp-viewstore/sjp-viewstore-persistence/pom.xml index 7aeb5dc2bf..3e3572b18d 100644 --- a/sjp-viewstore/sjp-viewstore-persistence/pom.xml +++ b/sjp-viewstore/sjp-viewstore-persistence/pom.xml @@ -3,7 +3,7 @@ sjp-viewstore uk.gov.moj.cpp.sjp - 17.104.187-CCT-1981-SNAPSHOT + 17.104.188-CCT-1981-SNAPSHOT 4.0.0 From 4b9c6ab8eb2a7017248f9534f620fe878512f22e Mon Sep 17 00:00:00 2001 From: devops-team Date: Fri, 21 Aug 2026 17:40:18 +0000 Subject: [PATCH 20/22] New 17.104.189-CCT-1981-SNAPSHOT --- pom.xml | 2 +- sjp-command/pom.xml | 2 +- sjp-command/sjp-command-api/pom.xml | 2 +- sjp-command/sjp-command-controller/pom.xml | 2 +- sjp-command/sjp-command-handler/pom.xml | 2 +- sjp-domain/pom.xml | 2 +- sjp-domain/sjp-domain-aggregate/pom.xml | 2 +- sjp-domain/sjp-domain-common/pom.xml | 2 +- sjp-domain/sjp-domain-event-processor/pom.xml | 2 +- sjp-domain/sjp-domain-event/pom.xml | 2 +- sjp-domain/sjp-domain-prosecution/pom.xml | 2 +- sjp-domain/sjp-domain-transformation/pom.xml | 2 +- .../sjp-domain-transformation-anonymise/pom.xml | 2 +- .../sjp-domain-transformation-postcode/pom.xml | 2 +- sjp-event-sources/pom.xml | 2 +- sjp-event/pom.xml | 2 +- sjp-event/sjp-event-indexer/pom.xml | 2 +- sjp-event/sjp-event-listener/pom.xml | 2 +- sjp-event/sjp-event-processor/pom.xml | 2 +- sjp-healthchecks/pom.xml | 2 +- sjp-integration-test/pom.xml | 2 +- sjp-json/pom.xml | 2 +- sjp-query/pom.xml | 2 +- sjp-query/sjp-query-api/pom.xml | 2 +- sjp-query/sjp-query-view/pom.xml | 2 +- sjp-service/pom.xml | 2 +- sjp-viewstore/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-liquibase/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-persistence/pom.xml | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index 8a35a000bc..f52d18aeec 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT pom diff --git a/sjp-command/pom.xml b/sjp-command/pom.xml index 7c5c8ec05d..f25db9cd3a 100644 --- a/sjp-command/pom.xml +++ b/sjp-command/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-api/pom.xml b/sjp-command/sjp-command-api/pom.xml index d645b1b206..8ed0f470f4 100644 --- a/sjp-command/sjp-command-api/pom.xml +++ b/sjp-command/sjp-command-api/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-controller/pom.xml b/sjp-command/sjp-command-controller/pom.xml index 868d913464..8c48656599 100644 --- a/sjp-command/sjp-command-controller/pom.xml +++ b/sjp-command/sjp-command-controller/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-handler/pom.xml b/sjp-command/sjp-command-handler/pom.xml index c53967e466..bc0d86ff6c 100644 --- a/sjp-command/sjp-command-handler/pom.xml +++ b/sjp-command/sjp-command-handler/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/pom.xml b/sjp-domain/pom.xml index 9b676bc488..33b799cbe8 100644 --- a/sjp-domain/pom.xml +++ b/sjp-domain/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT sjp-domain diff --git a/sjp-domain/sjp-domain-aggregate/pom.xml b/sjp-domain/sjp-domain-aggregate/pom.xml index 16bf82c6f2..054c10f6a8 100644 --- a/sjp-domain/sjp-domain-aggregate/pom.xml +++ b/sjp-domain/sjp-domain-aggregate/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT sjp-domain-aggregate diff --git a/sjp-domain/sjp-domain-common/pom.xml b/sjp-domain/sjp-domain-common/pom.xml index 059132207b..01260c91fc 100644 --- a/sjp-domain/sjp-domain-common/pom.xml +++ b/sjp-domain/sjp-domain-common/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT diff --git a/sjp-domain/sjp-domain-event-processor/pom.xml b/sjp-domain/sjp-domain-event-processor/pom.xml index dbb9f6bfcf..cb043bbc10 100644 --- a/sjp-domain/sjp-domain-event-processor/pom.xml +++ b/sjp-domain/sjp-domain-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-event/pom.xml b/sjp-domain/sjp-domain-event/pom.xml index 3c9761bce4..1186564805 100644 --- a/sjp-domain/sjp-domain-event/pom.xml +++ b/sjp-domain/sjp-domain-event/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT sjp-domain-event diff --git a/sjp-domain/sjp-domain-prosecution/pom.xml b/sjp-domain/sjp-domain-prosecution/pom.xml index 5f41918ccf..2762bdae59 100644 --- a/sjp-domain/sjp-domain-prosecution/pom.xml +++ b/sjp-domain/sjp-domain-prosecution/pom.xml @@ -4,7 +4,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT sjp-domain-prosecution diff --git a/sjp-domain/sjp-domain-transformation/pom.xml b/sjp-domain/sjp-domain-transformation/pom.xml index 3f03280254..4292dcd708 100644 --- a/sjp-domain/sjp-domain-transformation/pom.xml +++ b/sjp-domain/sjp-domain-transformation/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml index 86d3608792..8ec09c3c66 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml index 0b3f02dbf8..9afc3c0ad0 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event-sources/pom.xml b/sjp-event-sources/pom.xml index ffbfb2367d..4002d18168 100644 --- a/sjp-event-sources/pom.xml +++ b/sjp-event-sources/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sjp-event/pom.xml b/sjp-event/pom.xml index 5556619853..63976a97e8 100644 --- a/sjp-event/pom.xml +++ b/sjp-event/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-indexer/pom.xml b/sjp-event/sjp-event-indexer/pom.xml index 4aa01e7d46..c14c4df75e 100644 --- a/sjp-event/sjp-event-indexer/pom.xml +++ b/sjp-event/sjp-event-indexer/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-listener/pom.xml b/sjp-event/sjp-event-listener/pom.xml index 0b4b6cde0f..d3cf9a299a 100644 --- a/sjp-event/sjp-event-listener/pom.xml +++ b/sjp-event/sjp-event-listener/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-processor/pom.xml b/sjp-event/sjp-event-processor/pom.xml index 0bd808c865..2d6e8c984d 100644 --- a/sjp-event/sjp-event-processor/pom.xml +++ b/sjp-event/sjp-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-healthchecks/pom.xml b/sjp-healthchecks/pom.xml index e3a85dc908..b3e7edd547 100644 --- a/sjp-healthchecks/pom.xml +++ b/sjp-healthchecks/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-integration-test/pom.xml b/sjp-integration-test/pom.xml index c8b175babf..14ab973a9b 100644 --- a/sjp-integration-test/pom.xml +++ b/sjp-integration-test/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-json/pom.xml b/sjp-json/pom.xml index 512b1b14ad..81b4ca0238 100644 --- a/sjp-json/pom.xml +++ b/sjp-json/pom.xml @@ -2,7 +2,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/pom.xml b/sjp-query/pom.xml index 7873654ea5..9e1bffa566 100644 --- a/sjp-query/pom.xml +++ b/sjp-query/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-api/pom.xml b/sjp-query/sjp-query-api/pom.xml index bbcfd782e9..964a5f07fc 100644 --- a/sjp-query/sjp-query-api/pom.xml +++ b/sjp-query/sjp-query-api/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-view/pom.xml b/sjp-query/sjp-query-view/pom.xml index bcd79bf46b..544654df98 100644 --- a/sjp-query/sjp-query-view/pom.xml +++ b/sjp-query/sjp-query-view/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-service/pom.xml b/sjp-service/pom.xml index e20de5016b..1ab52f5111 100644 --- a/sjp-service/pom.xml +++ b/sjp-service/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT sjp-service war diff --git a/sjp-viewstore/pom.xml b/sjp-viewstore/pom.xml index 793fef3010..c10bfd6660 100644 --- a/sjp-viewstore/pom.xml +++ b/sjp-viewstore/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 sjp-viewstore diff --git a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml index e0717af3c1..e466a78560 100644 --- a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml +++ b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-viewstore - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT sjp-viewstore-liquibase diff --git a/sjp-viewstore/sjp-viewstore-persistence/pom.xml b/sjp-viewstore/sjp-viewstore-persistence/pom.xml index 3e3572b18d..1a789ca6b4 100644 --- a/sjp-viewstore/sjp-viewstore-persistence/pom.xml +++ b/sjp-viewstore/sjp-viewstore-persistence/pom.xml @@ -3,7 +3,7 @@ sjp-viewstore uk.gov.moj.cpp.sjp - 17.104.188-CCT-1981-SNAPSHOT + 17.104.189-CCT-1981-SNAPSHOT 4.0.0 From 3d5f3225313e2436ab7d4a991d0b89b9144a9472 Mon Sep 17 00:00:00 2001 From: yashpalnegi Date: Tue, 1 Sep 2026 14:11:39 +0100 Subject: [PATCH 21/22] LPT-2486 - merge main into team/cct-1981 --- ...-financial-imposition-acknowledgement.json | 12 +++++++- ...-financial-imposition-acknowledgement.json | 28 ++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/sjp-event/sjp-event-processor/src/yaml/json/public.stagingenforcement.enforce-financial-imposition-acknowledgement.json b/sjp-event/sjp-event-processor/src/yaml/json/public.stagingenforcement.enforce-financial-imposition-acknowledgement.json index ff9bc7113f..87ea1f2052 100644 --- a/sjp-event/sjp-event-processor/src/yaml/json/public.stagingenforcement.enforce-financial-imposition-acknowledgement.json +++ b/sjp-event/sjp-event-processor/src/yaml/json/public.stagingenforcement.enforce-financial-imposition-acknowledgement.json @@ -2,7 +2,17 @@ "originator": "ATCM", "requestId": "C22dA7cB-CBEE-D7ee-6BBc-ACF2cB50cBDF", "acknowledgement": { - "accountNumber": "123456780" + "accountNumber": "987654321", + "minorCreditors": [ + { + "minorCreditorId": "b2c3d4e5-6789-01bc-def0-234567890abc", + "minorCreditorAccountNumber": "MC12345678" + }, + { + "minorCreditorId": "c3d4e5f6-7890-12cd-ef01-34567890abcd", + "minorCreditorAccountNumber": "MC87654321" + } + ] }, "exportStatus": "ENFORCEMENT_REQUEST_SELECTED", "updated": "2018-06-01T09:00:00Z" diff --git a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.stagingenforcement.enforce-financial-imposition-acknowledgement.json b/sjp-event/sjp-event-processor/src/yaml/json/schema/public.stagingenforcement.enforce-financial-imposition-acknowledgement.json index 8b50ccdfeb..44193d0324 100644 --- a/sjp-event/sjp-event-processor/src/yaml/json/schema/public.stagingenforcement.enforce-financial-imposition-acknowledgement.json +++ b/sjp-event/sjp-event-processor/src/yaml/json/schema/public.stagingenforcement.enforce-financial-imposition-acknowledgement.json @@ -41,7 +41,7 @@ "definitions": { "uuid": { "type": "string", - "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" }, "acknowledgement": { "type": "object", @@ -52,6 +52,13 @@ "type": "string", "minLength": 9, "maxLength": 9 + }, + "minorCreditors": { + "description": "Minor creditors with GoB-generated account numbers (optional)", + "type": "array", + "items": { + "$ref": "#/definitions/minorCreditorAcknowledgement" + } } }, "additionalProperties": false, @@ -76,6 +83,25 @@ ] } ] + }, + "minorCreditorAcknowledgement": { + "type": "object", + "properties": { + "minorCreditorId": { + "description": "UUID of the minor creditor (Compensate) in Common Platform", + "type": "string", + "maxLength": 36 + }, + "minorCreditorAccountNumber": { + "description": "GoB-generated account number for the minor creditor", + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "minorCreditorId", + "minorCreditorAccountNumber" + ] } } } From 194781d51cbbd83d764097e0f0bdcb28abe3a6be Mon Sep 17 00:00:00 2001 From: devops-team Date: Tue, 1 Sep 2026 16:15:21 +0000 Subject: [PATCH 22/22] New 17.104.190-CCT-1981-SNAPSHOT --- pom.xml | 2 +- sjp-command/pom.xml | 2 +- sjp-command/sjp-command-api/pom.xml | 2 +- sjp-command/sjp-command-controller/pom.xml | 2 +- sjp-command/sjp-command-handler/pom.xml | 2 +- sjp-domain/pom.xml | 2 +- sjp-domain/sjp-domain-aggregate/pom.xml | 2 +- sjp-domain/sjp-domain-common/pom.xml | 2 +- sjp-domain/sjp-domain-event-processor/pom.xml | 2 +- sjp-domain/sjp-domain-event/pom.xml | 2 +- sjp-domain/sjp-domain-prosecution/pom.xml | 2 +- sjp-domain/sjp-domain-transformation/pom.xml | 2 +- .../sjp-domain-transformation-anonymise/pom.xml | 2 +- .../sjp-domain-transformation-postcode/pom.xml | 2 +- sjp-event-sources/pom.xml | 2 +- sjp-event/pom.xml | 2 +- sjp-event/sjp-event-indexer/pom.xml | 2 +- sjp-event/sjp-event-listener/pom.xml | 2 +- sjp-event/sjp-event-processor/pom.xml | 2 +- sjp-healthchecks/pom.xml | 2 +- sjp-integration-test/pom.xml | 2 +- sjp-json/pom.xml | 2 +- sjp-query/pom.xml | 2 +- sjp-query/sjp-query-api/pom.xml | 2 +- sjp-query/sjp-query-view/pom.xml | 2 +- sjp-service/pom.xml | 2 +- sjp-viewstore/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-liquibase/pom.xml | 2 +- sjp-viewstore/sjp-viewstore-persistence/pom.xml | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index f52d18aeec..111d094a90 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT pom diff --git a/sjp-command/pom.xml b/sjp-command/pom.xml index f25db9cd3a..295c5bc2da 100644 --- a/sjp-command/pom.xml +++ b/sjp-command/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-api/pom.xml b/sjp-command/sjp-command-api/pom.xml index 8ed0f470f4..32de1ac5f9 100644 --- a/sjp-command/sjp-command-api/pom.xml +++ b/sjp-command/sjp-command-api/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-controller/pom.xml b/sjp-command/sjp-command-controller/pom.xml index 8c48656599..4745749cc7 100644 --- a/sjp-command/sjp-command-controller/pom.xml +++ b/sjp-command/sjp-command-controller/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-command/sjp-command-handler/pom.xml b/sjp-command/sjp-command-handler/pom.xml index bc0d86ff6c..c451133e6b 100644 --- a/sjp-command/sjp-command-handler/pom.xml +++ b/sjp-command/sjp-command-handler/pom.xml @@ -3,7 +3,7 @@ sjp-command uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/pom.xml b/sjp-domain/pom.xml index 33b799cbe8..9073ae7554 100644 --- a/sjp-domain/pom.xml +++ b/sjp-domain/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT sjp-domain diff --git a/sjp-domain/sjp-domain-aggregate/pom.xml b/sjp-domain/sjp-domain-aggregate/pom.xml index 054c10f6a8..fec875c8f4 100644 --- a/sjp-domain/sjp-domain-aggregate/pom.xml +++ b/sjp-domain/sjp-domain-aggregate/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT sjp-domain-aggregate diff --git a/sjp-domain/sjp-domain-common/pom.xml b/sjp-domain/sjp-domain-common/pom.xml index 01260c91fc..499b6ee908 100644 --- a/sjp-domain/sjp-domain-common/pom.xml +++ b/sjp-domain/sjp-domain-common/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT diff --git a/sjp-domain/sjp-domain-event-processor/pom.xml b/sjp-domain/sjp-domain-event-processor/pom.xml index cb043bbc10..2794eb4975 100644 --- a/sjp-domain/sjp-domain-event-processor/pom.xml +++ b/sjp-domain/sjp-domain-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-event/pom.xml b/sjp-domain/sjp-domain-event/pom.xml index 1186564805..8ac40a6b46 100644 --- a/sjp-domain/sjp-domain-event/pom.xml +++ b/sjp-domain/sjp-domain-event/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-domain - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT sjp-domain-event diff --git a/sjp-domain/sjp-domain-prosecution/pom.xml b/sjp-domain/sjp-domain-prosecution/pom.xml index 2762bdae59..6f91640eb8 100644 --- a/sjp-domain/sjp-domain-prosecution/pom.xml +++ b/sjp-domain/sjp-domain-prosecution/pom.xml @@ -4,7 +4,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT sjp-domain-prosecution diff --git a/sjp-domain/sjp-domain-transformation/pom.xml b/sjp-domain/sjp-domain-transformation/pom.xml index 4292dcd708..c93ba8cc65 100644 --- a/sjp-domain/sjp-domain-transformation/pom.xml +++ b/sjp-domain/sjp-domain-transformation/pom.xml @@ -3,7 +3,7 @@ sjp-domain uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml index 8ec09c3c66..ac5aaff64e 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-anonymise/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml index 9afc3c0ad0..f6c2911ddf 100644 --- a/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml +++ b/sjp-domain/sjp-domain-transformation/sjp-domain-transformation-postcode/pom.xml @@ -3,7 +3,7 @@ sjp-domain-transformation uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event-sources/pom.xml b/sjp-event-sources/pom.xml index 4002d18168..4b9789b0f6 100644 --- a/sjp-event-sources/pom.xml +++ b/sjp-event-sources/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sjp-event/pom.xml b/sjp-event/pom.xml index 63976a97e8..fd544208f8 100644 --- a/sjp-event/pom.xml +++ b/sjp-event/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-indexer/pom.xml b/sjp-event/sjp-event-indexer/pom.xml index c14c4df75e..07b01e565f 100644 --- a/sjp-event/sjp-event-indexer/pom.xml +++ b/sjp-event/sjp-event-indexer/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-listener/pom.xml b/sjp-event/sjp-event-listener/pom.xml index d3cf9a299a..10028af588 100644 --- a/sjp-event/sjp-event-listener/pom.xml +++ b/sjp-event/sjp-event-listener/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-event/sjp-event-processor/pom.xml b/sjp-event/sjp-event-processor/pom.xml index 2d6e8c984d..7a6376d896 100644 --- a/sjp-event/sjp-event-processor/pom.xml +++ b/sjp-event/sjp-event-processor/pom.xml @@ -3,7 +3,7 @@ sjp-event uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-healthchecks/pom.xml b/sjp-healthchecks/pom.xml index b3e7edd547..4746c59af6 100644 --- a/sjp-healthchecks/pom.xml +++ b/sjp-healthchecks/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-integration-test/pom.xml b/sjp-integration-test/pom.xml index 14ab973a9b..228b0d03b8 100644 --- a/sjp-integration-test/pom.xml +++ b/sjp-integration-test/pom.xml @@ -4,7 +4,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-json/pom.xml b/sjp-json/pom.xml index 81b4ca0238..d639058471 100644 --- a/sjp-json/pom.xml +++ b/sjp-json/pom.xml @@ -2,7 +2,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/pom.xml b/sjp-query/pom.xml index 9e1bffa566..0d09a3f193 100644 --- a/sjp-query/pom.xml +++ b/sjp-query/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-api/pom.xml b/sjp-query/sjp-query-api/pom.xml index 964a5f07fc..a1bbd98f65 100644 --- a/sjp-query/sjp-query-api/pom.xml +++ b/sjp-query/sjp-query-api/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-query/sjp-query-view/pom.xml b/sjp-query/sjp-query-view/pom.xml index 544654df98..54eee5efe3 100644 --- a/sjp-query/sjp-query-view/pom.xml +++ b/sjp-query/sjp-query-view/pom.xml @@ -3,7 +3,7 @@ sjp-query uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 diff --git a/sjp-service/pom.xml b/sjp-service/pom.xml index 1ab52f5111..0d34864d2d 100644 --- a/sjp-service/pom.xml +++ b/sjp-service/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-parent - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT sjp-service war diff --git a/sjp-viewstore/pom.xml b/sjp-viewstore/pom.xml index c10bfd6660..1caa802387 100644 --- a/sjp-viewstore/pom.xml +++ b/sjp-viewstore/pom.xml @@ -3,7 +3,7 @@ sjp-parent uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0 sjp-viewstore diff --git a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml index e466a78560..a58966d225 100644 --- a/sjp-viewstore/sjp-viewstore-liquibase/pom.xml +++ b/sjp-viewstore/sjp-viewstore-liquibase/pom.xml @@ -5,7 +5,7 @@ uk.gov.moj.cpp.sjp sjp-viewstore - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT sjp-viewstore-liquibase diff --git a/sjp-viewstore/sjp-viewstore-persistence/pom.xml b/sjp-viewstore/sjp-viewstore-persistence/pom.xml index 1a789ca6b4..ccc324094e 100644 --- a/sjp-viewstore/sjp-viewstore-persistence/pom.xml +++ b/sjp-viewstore/sjp-viewstore-persistence/pom.xml @@ -3,7 +3,7 @@ sjp-viewstore uk.gov.moj.cpp.sjp - 17.104.189-CCT-1981-SNAPSHOT + 17.104.190-CCT-1981-SNAPSHOT 4.0.0