diff --git a/pom.xml b/pom.xml
index 652018abc3..62ffe4c74d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
uk.gov.moj.cpp.sjp
sjp-parent
- 17.104.194-SNAPSHOT
+ 17.104.194-REL-3RD-LINE-2627-SNAPSHOT
pom
diff --git a/sjp-command/pom.xml b/sjp-command/pom.xml
index 3fb7981f83..d38a77af0a 100644
--- a/sjp-command/pom.xml
+++ b/sjp-command/pom.xml
@@ -3,7 +3,7 @@
sjp-parent
uk.gov.moj.cpp.sjp
- 17.104.194-SNAPSHOT
+ 17.104.194-REL-3RD-LINE-2627-SNAPSHOT
4.0.0
diff --git a/sjp-command/sjp-command-api/pom.xml b/sjp-command/sjp-command-api/pom.xml
index dadb0c5bce..e68227b465 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.194-SNAPSHOT
+ 17.104.194-REL-3RD-LINE-2627-SNAPSHOT
4.0.0
diff --git a/sjp-command/sjp-command-api/src/main/java/uk/gov/moj/cpp/sjp/command/api/SessionApi.java b/sjp-command/sjp-command-api/src/main/java/uk/gov/moj/cpp/sjp/command/api/SessionApi.java
index 80d5fa0549..053ce8c51b 100644
--- a/sjp-command/sjp-command-api/src/main/java/uk/gov/moj/cpp/sjp/command/api/SessionApi.java
+++ b/sjp-command/sjp-command-api/src/main/java/uk/gov/moj/cpp/sjp/command/api/SessionApi.java
@@ -68,6 +68,12 @@ public void endSession(final JsonEnvelope envelope) {
sender.send(enveloper.withMetadataFrom(envelope, "sjp.command.end-session").apply(envelope.payloadAsJsonObject()));
}
+ @Handles("sjp.update-session-bdf")
+ public void updateSessionBdf(final JsonEnvelope updateSessionCommand) {
+ validateSessionId(updateSessionCommand);
+ sender.send(enveloper.withMetadataFrom(updateSessionCommand, "sjp.command.update-session-bdf").apply(updateSessionCommand.payloadAsJsonObject()));
+ }
+
@Handles("sjp.assign-next-case")
public void assignNextCase(final JsonEnvelope assignCaseCommand) {
sender.send(enveloper.withMetadataFrom(assignCaseCommand, "sjp.command.assign-next-case").apply(assignCaseCommand.payloadAsJsonObject()));
diff --git a/sjp-command/sjp-command-api/src/main/resources/rules/command-session-api.drl b/sjp-command/sjp-command-api/src/main/resources/rules/command-session-api.drl
index 945eb9c8f8..7531f3ffa9 100644
--- a/sjp-command/sjp-command-api/src/main/resources/rules/command-session-api.drl
+++ b/sjp-command/sjp-command-api/src/main/resources/rules/command-session-api.drl
@@ -25,6 +25,15 @@ rule "Command - Rule for end session"
$outcome.setSuccess(true);
end
+rule "Command - Rule for update session"
+ when
+ $outcome: Outcome();
+ $action: Action(name == "sjp.update-session-bdf");
+ eval(userAndGroupProvider.isMemberOfAnyOfTheSuppliedGroups($action, RuleConstants.getSystemUsers()));
+ then
+ $outcome.setSuccess(true);
+end
+
rule "Command - Rule for assigning case"
when
$outcome: Outcome();
diff --git a/sjp-command/sjp-command-api/src/raml/json/schema/sjp.update-session-bdf.json b/sjp-command/sjp-command-api/src/raml/json/schema/sjp.update-session-bdf.json
new file mode 100644
index 0000000000..75fd8c3ac3
--- /dev/null
+++ b/sjp-command/sjp-command-api/src/raml/json/schema/sjp.update-session-bdf.json
@@ -0,0 +1,27 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "magistrate": {
+ "type": "string"
+ },
+ "courtHouseCode": {
+ "type": "string"
+ },
+ "courtHouseName": {
+ "type": "string"
+ },
+ "localJusticeAreaNationalCourtCode": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "enum": ["MAGISTRATE", "DELEGATED_POWERS", "AOCP"]
+ },
+ "legalAdviserUserId": {
+ "$ref": "http://justice.gov.uk/domain/core/common/definitions.json#/definitions/uuid"
+ }
+ },
+ "minProperties": 1,
+ "additionalProperties": false
+}
diff --git a/sjp-command/sjp-command-api/src/raml/json/sjp.update-session-bdf.json b/sjp-command/sjp-command-api/src/raml/json/sjp.update-session-bdf.json
new file mode 100644
index 0000000000..41b546a756
--- /dev/null
+++ b/sjp-command/sjp-command-api/src/raml/json/sjp.update-session-bdf.json
@@ -0,0 +1,8 @@
+{
+ "magistrate": "Alan Smith",
+ "courtHouseCode": "B01LY",
+ "courtHouseName": "Coventry Magistrates' Court",
+ "localJusticeAreaNationalCourtCode": "2924",
+ "type": "MAGISTRATE",
+ "legalAdviserUserId": "31ec3a16-8721-498c-8da5-f099390ee254"
+}
diff --git a/sjp-command/sjp-command-api/src/raml/sjp-command-api.raml b/sjp-command/sjp-command-api/src/raml/sjp-command-api.raml
index 6b01825c49..a183296127 100644
--- a/sjp-command/sjp-command-api/src/raml/sjp-command-api.raml
+++ b/sjp-command/sjp-command-api/src/raml/sjp-command-api.raml
@@ -502,6 +502,9 @@ baseUri: http://localhost:8080/sjp-command-api/command/api/rest/sjp
(mapping):
requestType: application/vnd.sjp.assign-next-case+json
name: sjp.assign-next-case
+ (mapping):
+ requestType: application/vnd.sjp.update-session-bdf+json
+ name: sjp.update-session-bdf
...
body:
application/vnd.sjp.start-session+json:
@@ -511,6 +514,11 @@ baseUri: http://localhost:8080/sjp-command-api/command/api/rest/sjp
!include json/schema/sjp.start-session.json
application/vnd.sjp.end-session+json: !!null
application/vnd.sjp.assign-next-case+json: !!null
+ application/vnd.sjp.update-session-bdf+json:
+ example:
+ !include json/sjp.update-session-bdf.json
+ schema:
+ !include json/schema/sjp.update-session-bdf.json
responses:
202:
description: Accepted
diff --git a/sjp-command/sjp-command-controller/pom.xml b/sjp-command/sjp-command-controller/pom.xml
index 41ed1c96c0..e89a949cdc 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.194-SNAPSHOT
+ 17.104.194-REL-3RD-LINE-2627-SNAPSHOT
4.0.0
diff --git a/sjp-command/sjp-command-controller/src/main/java/uk/gov/moj/cpp/sjp/command/controller/NoActionController.java b/sjp-command/sjp-command-controller/src/main/java/uk/gov/moj/cpp/sjp/command/controller/NoActionController.java
index 9731c88991..ce59da4c07 100644
--- a/sjp-command/sjp-command-controller/src/main/java/uk/gov/moj/cpp/sjp/command/controller/NoActionController.java
+++ b/sjp-command/sjp-command-controller/src/main/java/uk/gov/moj/cpp/sjp/command/controller/NoActionController.java
@@ -72,6 +72,11 @@ public void endSession(final JsonEnvelope envelope) {
send(envelope);
}
+ @Handles("sjp.command.update-session-bdf")
+ public void updateSessionBdf(final JsonEnvelope envelope) {
+ send(envelope);
+ }
+
@Handles("sjp.command.reset-aocp-session")
public void resetAocpSession(final JsonEnvelope envelope) {
send(envelope);
diff --git a/sjp-command/sjp-command-controller/src/main/resources/rules/command-session.drl b/sjp-command/sjp-command-controller/src/main/resources/rules/command-session.drl
index 8b651cd4c7..2239706273 100644
--- a/sjp-command/sjp-command-controller/src/main/resources/rules/command-session.drl
+++ b/sjp-command/sjp-command-controller/src/main/resources/rules/command-session.drl
@@ -19,6 +19,14 @@ rule "Command - Rule for end session"
$outcome.setSuccess(true);
end
+rule "Command - Rule for update session"
+ when
+ $outcome: Outcome();
+ $action: Action(name == "sjp.command.update-session-bdf");
+ then
+ $outcome.setSuccess(true);
+end
+
rule "Command - Rule for reset aocp session request"
when
$outcome: Outcome();
diff --git a/sjp-command/sjp-command-controller/src/raml/json/schema/sjp.command.update-session-bdf.json b/sjp-command/sjp-command-controller/src/raml/json/schema/sjp.command.update-session-bdf.json
new file mode 100644
index 0000000000..649c08b1db
--- /dev/null
+++ b/sjp-command/sjp-command-controller/src/raml/json/schema/sjp.command.update-session-bdf.json
@@ -0,0 +1,5 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "http://justice.gov.uk/json/schemas/domains/sjp/command/sjp.update-session-bdf.json",
+ "$ref": "http://justice.gov.uk/json/schemas/domains/sjp/commands/sjp.update-session-bdf.json"
+}
diff --git a/sjp-command/sjp-command-controller/src/raml/json/sjp.command.update-session-bdf.json b/sjp-command/sjp-command-controller/src/raml/json/sjp.command.update-session-bdf.json
new file mode 100644
index 0000000000..c7c8d14af0
--- /dev/null
+++ b/sjp-command/sjp-command-controller/src/raml/json/sjp.command.update-session-bdf.json
@@ -0,0 +1,9 @@
+{
+ "sessionId": "c70867c0-3d9b-4cd4-978d-056a2915bb75",
+ "magistrate": "Alan Smith",
+ "courtHouseCode": "B01LY",
+ "courtHouseName": "Coventry Magistrates' Court",
+ "localJusticeAreaNationalCourtCode": "2924",
+ "type": "MAGISTRATE",
+ "legalAdviserUserId": "31ec3a16-8721-498c-8da5-f099390ee254"
+}
diff --git a/sjp-command/sjp-command-controller/src/raml/sjp-command-controller.messaging.raml b/sjp-command/sjp-command-controller/src/raml/sjp-command-controller.messaging.raml
index b3366901c4..adb0f6a706 100644
--- a/sjp-command/sjp-command-controller/src/raml/sjp-command-controller.messaging.raml
+++ b/sjp-command/sjp-command-controller/src/raml/sjp-command-controller.messaging.raml
@@ -82,6 +82,10 @@ version: v1
example: !include json/sjp.command.end-session.json
schema: !include json/schema/sjp.command.end-session.json
+ application/vnd.sjp.command.update-session-bdf+json:
+ example: !include json/sjp.command.update-session-bdf.json
+ schema: !include json/schema/sjp.command.update-session-bdf.json
+
application/vnd.sjp.command.reset-aocp-session+json: !!null
application/vnd.sjp.command.assign-next-case+json:
diff --git a/sjp-command/sjp-command-handler/pom.xml b/sjp-command/sjp-command-handler/pom.xml
index f2f299dd54..f18d027798 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.194-SNAPSHOT
+ 17.104.194-REL-3RD-LINE-2627-SNAPSHOT
4.0.0
diff --git a/sjp-command/sjp-command-handler/src/main/java/uk/gov/moj/cpp/sjp/command/handler/SessionHandler.java b/sjp-command/sjp-command-handler/src/main/java/uk/gov/moj/cpp/sjp/command/handler/SessionHandler.java
index 86f977a0af..ba515470e3 100644
--- a/sjp-command/sjp-command-handler/src/main/java/uk/gov/moj/cpp/sjp/command/handler/SessionHandler.java
+++ b/sjp-command/sjp-command-handler/src/main/java/uk/gov/moj/cpp/sjp/command/handler/SessionHandler.java
@@ -23,6 +23,7 @@
import uk.gov.justice.services.eventsourcing.source.core.exception.EventStreamException;
import uk.gov.justice.services.messaging.JsonEnvelope;
import uk.gov.justice.services.messaging.JsonObjects;
+import uk.gov.moj.cpp.sjp.domain.SessionType;
import uk.gov.moj.cpp.sjp.domain.aggregate.Session;
import uk.gov.moj.cpp.sjp.event.session.ResetAocpSession;
@@ -94,6 +95,21 @@ public void endSession(final JsonEnvelope endSessionCommand) throws EventStreamE
applyToSessionAggregate(endSessionCommand, session -> session.endSession(sessionId, clock.now()));
}
+ @Handles("sjp.command.update-session-bdf")
+ public void updateSessionBdf(final JsonEnvelope updateSessionCommand) throws EventStreamException {
+ final JsonObject updateSession = updateSessionCommand.payloadAsJsonObject();
+ final UUID sessionId = UUID.fromString(updateSession.getString(SESSION_ID));
+ final Optional magistrate = JsonObjects.getString(updateSession, MAGISTRATE);
+ final Optional courtHouseCode = JsonObjects.getString(updateSession, COURT_HOUSE_CODE);
+ final Optional courtHouseName = JsonObjects.getString(updateSession, COURT_HOUSE_NAME);
+ final Optional localJusticeAreaNationalCourtCode = JsonObjects.getString(updateSession, LOCAL_JUSTICE_AREA_NATIONAL_COURT_CODE);
+ final Optional type = JsonObjects.getString(updateSession, "type").map(SessionType::valueOf);
+ final Optional legalAdviserUserId = JsonObjects.getString(updateSession, "legalAdviserUserId").map(UUID::fromString);
+
+ applyToSessionAggregate(updateSessionCommand, session ->
+ session.updateSessionBdf(sessionId, magistrate, courtHouseCode, courtHouseName, localJusticeAreaNationalCourtCode, type, legalAdviserUserId));
+ }
+
@Handles("sjp.command.reset-aocp-session")
public void resetAocpSessionRequest(final JsonEnvelope command) throws EventStreamException {
diff --git a/sjp-command/sjp-command-handler/src/raml/json/schema/sjp.command.update-session-bdf.json b/sjp-command/sjp-command-handler/src/raml/json/schema/sjp.command.update-session-bdf.json
new file mode 100644
index 0000000000..649c08b1db
--- /dev/null
+++ b/sjp-command/sjp-command-handler/src/raml/json/schema/sjp.command.update-session-bdf.json
@@ -0,0 +1,5 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "id": "http://justice.gov.uk/json/schemas/domains/sjp/command/sjp.update-session-bdf.json",
+ "$ref": "http://justice.gov.uk/json/schemas/domains/sjp/commands/sjp.update-session-bdf.json"
+}
diff --git a/sjp-command/sjp-command-handler/src/raml/json/sjp.command.update-session-bdf.json b/sjp-command/sjp-command-handler/src/raml/json/sjp.command.update-session-bdf.json
new file mode 100644
index 0000000000..c7c8d14af0
--- /dev/null
+++ b/sjp-command/sjp-command-handler/src/raml/json/sjp.command.update-session-bdf.json
@@ -0,0 +1,9 @@
+{
+ "sessionId": "c70867c0-3d9b-4cd4-978d-056a2915bb75",
+ "magistrate": "Alan Smith",
+ "courtHouseCode": "B01LY",
+ "courtHouseName": "Coventry Magistrates' Court",
+ "localJusticeAreaNationalCourtCode": "2924",
+ "type": "MAGISTRATE",
+ "legalAdviserUserId": "31ec3a16-8721-498c-8da5-f099390ee254"
+}
diff --git a/sjp-command/sjp-command-handler/src/raml/sjp-command-handler.messaging.raml b/sjp-command/sjp-command-handler/src/raml/sjp-command-handler.messaging.raml
index 4423815d7f..28891bce76 100644
--- a/sjp-command/sjp-command-handler/src/raml/sjp-command-handler.messaging.raml
+++ b/sjp-command/sjp-command-handler/src/raml/sjp-command-handler.messaging.raml
@@ -84,6 +84,10 @@ version: v1
schema: !include json/schema/sjp.command.end-session.json
example: !include json/sjp.command.end-session.json
+ application/vnd.sjp.command.update-session-bdf+json:
+ schema: !include json/schema/sjp.command.update-session-bdf.json
+ example: !include json/sjp.command.update-session-bdf.json
+
application/vnd.sjp.command.assign-next-case+json:
schema: !include json/schema/sjp.command.assign-next-case.json
example: !include json/sjp.command.assign-next-case.json
diff --git a/sjp-command/sjp-command-handler/src/test/java/uk/gov/moj/cpp/sjp/command/handler/SessionHandlerTest.java b/sjp-command/sjp-command-handler/src/test/java/uk/gov/moj/cpp/sjp/command/handler/SessionHandlerTest.java
index 235f2a3be6..699b73ee8d 100644
--- a/sjp-command/sjp-command-handler/src/test/java/uk/gov/moj/cpp/sjp/command/handler/SessionHandlerTest.java
+++ b/sjp-command/sjp-command-handler/src/test/java/uk/gov/moj/cpp/sjp/command/handler/SessionHandlerTest.java
@@ -40,6 +40,7 @@
import uk.gov.justice.services.messaging.JsonEnvelope;
import uk.gov.justice.services.messaging.MetadataBuilder;
import uk.gov.justice.services.test.utils.common.helper.StoppedClock;
+import uk.gov.moj.cpp.sjp.domain.SessionType;
import uk.gov.moj.cpp.sjp.domain.aggregate.Session;
import uk.gov.moj.cpp.sjp.event.session.DelegatedPowersSessionEnded;
import uk.gov.moj.cpp.sjp.event.session.DelegatedPowersSessionStarted;
@@ -47,6 +48,7 @@
import uk.gov.moj.cpp.sjp.event.session.MagistrateSessionStarted;
import uk.gov.moj.cpp.sjp.event.session.ResetAocpSession;
import uk.gov.moj.cpp.sjp.event.session.SessionEnded;
+import uk.gov.moj.cpp.sjp.event.session.SessionUpdatedBdf;
import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit;
@@ -73,6 +75,7 @@ public class SessionHandlerTest {
private static final String START_SESSION_COMMAND = "sjp.command.start-session";
private static final String END_SESSION_COMMAND = "sjp.command.end-session";
private static final String RESET_SESSION_COMMAND = "sjp.command.reset-aocp-session";
+ private static final String UPDATE_SESSION_BDF_COMMAND = "sjp.command.update-session-bdf";
@Mock
private EventSource eventSource;
@@ -98,7 +101,8 @@ public class SessionHandlerTest {
MagistrateSessionEnded.class,
DelegatedPowersSessionStarted.class,
DelegatedPowersSessionEnded.class,
- ResetAocpSession.class);
+ ResetAocpSession.class,
+ SessionUpdatedBdf.class);
@Spy
private Clock clock = new StoppedClock(ZonedDateTime.now(UTC));
@@ -131,7 +135,8 @@ public void shouldHandleSessionCommands() {
.with(allOf(
method("startSession").thatHandles(START_SESSION_COMMAND),
method("endSession").thatHandles(END_SESSION_COMMAND),
- method("resetAocpSessionRequest").thatHandles(RESET_SESSION_COMMAND)
+ method("resetAocpSessionRequest").thatHandles(RESET_SESSION_COMMAND),
+ method("updateSessionBdf").thatHandles(UPDATE_SESSION_BDF_COMMAND)
)));
}
@@ -249,6 +254,88 @@ public void shouldResetSession() throws EventStreamException {
}
+ @Test
+ public void shouldUpdateSessionBdfWithAllFields() throws EventStreamException {
+
+ final String magistrate = randomAlphanumeric(20);
+ final UUID legalAdviserUserId = randomUUID();
+
+ final JsonEnvelope updateSessionCommand = envelopeFrom(metadataWithRandomUUID(UPDATE_SESSION_BDF_COMMAND),
+ createObjectBuilder()
+ .add("sessionId", sessionId.toString())
+ .add("magistrate", magistrate)
+ .add("courtHouseCode", courtHouseCode)
+ .add("courtHouseName", courtHouseName)
+ .add("localJusticeAreaNationalCourtCode", localJusticeAreaNationalCourtCode)
+ .add("type", SessionType.MAGISTRATE.name())
+ .add("legalAdviserUserId", legalAdviserUserId.toString())
+ .build());
+
+ final SessionUpdatedBdf sessionUpdatedBdf = new SessionUpdatedBdf(sessionId, Optional.of(magistrate), Optional.of(courtHouseCode), Optional.of(courtHouseName),
+ Optional.of(localJusticeAreaNationalCourtCode), Optional.of(SessionType.MAGISTRATE), Optional.of(legalAdviserUserId));
+
+ when(eventSource.getStreamById(sessionId)).thenReturn(sessionEventStream);
+ when(aggregateService.get(sessionEventStream, Session.class)).thenReturn(session);
+ when(session.updateSessionBdf(sessionId, Optional.of(magistrate), Optional.of(courtHouseCode), Optional.of(courtHouseName),
+ Optional.of(localJusticeAreaNationalCourtCode), Optional.of(SessionType.MAGISTRATE), Optional.of(legalAdviserUserId)))
+ .thenReturn(Stream.of(sessionUpdatedBdf));
+
+ sessionHandler.updateSessionBdf(updateSessionCommand);
+
+ assertThat(sessionEventStream, eventStreamAppendedWith(
+ streamContaining(
+ jsonEnvelope(
+ withMetadataEnvelopedFrom(updateSessionCommand)
+ .withName(SessionUpdatedBdf.EVENT_NAME),
+ payloadIsJson(allOf(
+ withJsonPath("$.sessionId", equalTo(sessionId.toString())),
+ withJsonPath("$.magistrate", equalTo(magistrate)),
+ withJsonPath("$.courtHouseCode", equalTo(courtHouseCode)),
+ withJsonPath("$.courtHouseName", equalTo(courtHouseName)),
+ withJsonPath("$.localJusticeAreaNationalCourtCode", equalTo(localJusticeAreaNationalCourtCode)),
+ withJsonPath("$.type", equalTo(SessionType.MAGISTRATE.name())),
+ withJsonPath("$.legalAdviserUserId", equalTo(legalAdviserUserId.toString()))
+ ))))));
+ }
+
+ @Test
+ public void shouldUpdateSessionBdfWithOnlyMagistrate() throws EventStreamException {
+
+ final String magistrate = randomAlphanumeric(20);
+
+ final JsonEnvelope updateSessionCommand = envelopeFrom(metadataWithRandomUUID(UPDATE_SESSION_BDF_COMMAND),
+ createObjectBuilder()
+ .add("sessionId", sessionId.toString())
+ .add("magistrate", magistrate)
+ .build());
+
+ final SessionUpdatedBdf sessionUpdatedBdf = new SessionUpdatedBdf(sessionId, Optional.of(magistrate), Optional.empty(), Optional.empty(),
+ Optional.empty(), Optional.empty(), Optional.empty());
+
+ when(eventSource.getStreamById(sessionId)).thenReturn(sessionEventStream);
+ when(aggregateService.get(sessionEventStream, Session.class)).thenReturn(session);
+ when(session.updateSessionBdf(sessionId, Optional.of(magistrate), Optional.empty(), Optional.empty(),
+ Optional.empty(), Optional.empty(), Optional.empty()))
+ .thenReturn(Stream.of(sessionUpdatedBdf));
+
+ sessionHandler.updateSessionBdf(updateSessionCommand);
+
+ assertThat(sessionEventStream, eventStreamAppendedWith(
+ streamContaining(
+ jsonEnvelope(
+ withMetadataEnvelopedFrom(updateSessionCommand)
+ .withName(SessionUpdatedBdf.EVENT_NAME),
+ payloadIsJson(allOf(
+ withJsonPath("$.sessionId", equalTo(sessionId.toString())),
+ withJsonPath("$.magistrate", equalTo(magistrate)),
+ withoutJsonPath("$.courtHouseCode"),
+ withoutJsonPath("$.courtHouseName"),
+ withoutJsonPath("$.localJusticeAreaNationalCourtCode"),
+ withoutJsonPath("$.type"),
+ withoutJsonPath("$.legalAdviserUserId")
+ ))))));
+ }
+
private void shouldEndSession(final SessionEnded sessionEnded) throws EventStreamException {
final JsonEnvelope endSessionCommand = envelopeFrom(metadataWithRandomUUID(END_SESSION_COMMAND),
createObjectBuilder().add("sessionId", sessionEnded.getSessionId().toString()).build());
diff --git a/sjp-domain/pom.xml b/sjp-domain/pom.xml
index c3732ae460..4a0ff362db 100644
--- a/sjp-domain/pom.xml
+++ b/sjp-domain/pom.xml
@@ -5,7 +5,7 @@
uk.gov.moj.cpp.sjp
sjp-parent
- 17.104.194-SNAPSHOT
+ 17.104.194-REL-3RD-LINE-2627-SNAPSHOT
sjp-domain
diff --git a/sjp-domain/sjp-domain-aggregate/pom.xml b/sjp-domain/sjp-domain-aggregate/pom.xml
index 424fec42f2..2096b92bd3 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.194-SNAPSHOT
+ 17.104.194-REL-3RD-LINE-2627-SNAPSHOT
sjp-domain-aggregate
diff --git a/sjp-domain/sjp-domain-aggregate/src/main/java/uk/gov/moj/cpp/sjp/domain/aggregate/Session.java b/sjp-domain/sjp-domain-aggregate/src/main/java/uk/gov/moj/cpp/sjp/domain/aggregate/Session.java
index c788b3ad15..9a2408bdcc 100644
--- a/sjp-domain/sjp-domain-aggregate/src/main/java/uk/gov/moj/cpp/sjp/domain/aggregate/Session.java
+++ b/sjp-domain/sjp-domain-aggregate/src/main/java/uk/gov/moj/cpp/sjp/domain/aggregate/Session.java
@@ -19,6 +19,7 @@
import uk.gov.moj.cpp.sjp.event.session.DelegatedPowersSessionStarted;
import uk.gov.moj.cpp.sjp.event.session.MagistrateSessionEnded;
import uk.gov.moj.cpp.sjp.event.session.MagistrateSessionStarted;
+import uk.gov.moj.cpp.sjp.event.session.SessionUpdatedBdf;
import uk.gov.moj.cpp.sjp.event.session.SessionStarted;
import java.time.ZonedDateTime;
@@ -106,6 +107,26 @@ public Stream