Skip to content

Commit dca7a26

Browse files
committed
added logs
1 parent 94ec087 commit dca7a26

File tree

2 files changed

+152
-0
lines changed

2 files changed

+152
-0
lines changed

src/main/java/uk/gov/hmcts/cp/services/CaseUrnMapperService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public String getCaseId(final String caseUrn) {
3636
getRequestEntity(),
3737
CaseMapperResponse.class
3838
);
39+
LOG.info(">>>> CaseMapperResponse is : {} and body : {} caseurn : {} ", responseEntity.getStatusCode(), responseEntity.getBody(), caseUrn);
40+
3941
if (responseEntity.getStatusCode().is2xxSuccessful() && responseEntity.getBody() != null) {
4042
CaseMapperResponse body = responseEntity.getBody();
4143
return body.getCaseId();
@@ -48,6 +50,7 @@ public String getCaseId(final String caseUrn) {
4850

4951
public String getCaseMapperServiceUrl() {
5052
if (this.caseMapperServiceUrl != null) {
53+
LOG.info(">>>> caseMapperServiceUrl is : {}", this.caseMapperServiceUrl);
5154
return this.caseMapperServiceUrl;
5255
}
5356
LOG.atError().log("caseMapperServiceUrl is empty");

src/main/resources/a.json

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
{
2+
"hearings": [
3+
{
4+
"id": "8bc27f20-89b2-4102-92b8-be1aa32437be",
5+
"type": {
6+
"id": "4a0e892d-c0c5-3c51-95b8-704d8c781776",
7+
"description": "First hearing"
8+
},
9+
"endDate": "2025-07-31",
10+
"allocated": true,
11+
"judiciary": [],
12+
"startDate": "2025-07-31",
13+
"courtRoomId": "9e4932f7-97b2-3010-b942-ddd2624e4dd8",
14+
"hearingDays": [
15+
{
16+
"endTime": "2025-07-31T22:50:00.000Z",
17+
"sequence": 0,
18+
"startTime": "2025-07-31T22:30:00.000Z",
19+
"courtRoomId": "9e4932f7-97b2-3010-b942-ddd2624e4dd8",
20+
"hearingDate": "2025-07-31",
21+
"courtCentreId": "f8254db1-1683-483e-afb3-b87fde5a0a26",
22+
"durationMinutes": 20
23+
}
24+
],
25+
"listedCases": [
26+
{
27+
"id": "7a2e94c4-38af-43dd-906b-40d632d159b0",
28+
"markers": [],
29+
"defendants": [
30+
{
31+
"id": "0fc52b27-e775-439c-aff7-28e6726cb464",
32+
"address": {
33+
"address1": "9999A9999AAAA",
34+
"address2": "Woodlane",
35+
"address3": "addressline 3",
36+
"address4": "Bristol",
37+
"address5": "Avon",
38+
"postcode": "YO43 3DE"
39+
},
40+
"isYouth": false,
41+
"lastName": "Jody",
42+
"offences": [
43+
{
44+
"id": "9cc94830-60d2-4f29-b46c-4f07722909c0",
45+
"count": 0,
46+
"startDate": "2019-11-28",
47+
"orderIndex": 1,
48+
"offenceCode": "CA03012",
49+
"shadowListed": false,
50+
"offenceWording": "Theft of pedal cycle.",
51+
"statementOfOffence": {
52+
"title": "Possess / control TV set with intent another use install without a licence",
53+
"welshTitle": "Meddu ar/mewn rheolaeth set deledu gan fwriadu i unigolyn arall ei ddefnyddio/osod heb drwydded",
54+
"legislation": "Contrary to section 363(3)(b) and (4) of the Communications Act 2003.",
55+
"welshLegislation": "Yn groes i adran 363(3)(b) a (4) Deddf Cyfathrebu 2003."
56+
},
57+
"restrictFromCourtList": false
58+
}
59+
],
60+
"firstName": "Gabriel",
61+
"bailStatus": {
62+
"id": "12e69486-4d01-3403-a50a-7419ca040635",
63+
"code": "C",
64+
"description": "Custody"
65+
},
66+
"dateOfBirth": "1990-06-26",
67+
"masterDefendantId": "0fc52b27-e775-439c-aff7-28e6726cb464",
68+
"hearingLanguageNeeds": "ENGLISH",
69+
"restrictFromCourtList": false,
70+
"courtProceedingsInitiated": "2025-07-31T10:07:51.144Z"
71+
},
72+
{
73+
"id": "6c069ee4-d338-488d-9da5-b8f31aad3a70",
74+
"address": {
75+
"address1": "9999A9999AAAA",
76+
"address2": "Woodlane",
77+
"address3": "addressline 3",
78+
"address4": "Bristol",
79+
"address5": "Avon",
80+
"postcode": "YO43 3DE"
81+
},
82+
"isYouth": false,
83+
"lastName": "Karli",
84+
"offences": [
85+
{
86+
"id": "577cc785-336b-47d2-a1a2-ab026635929d",
87+
"count": 0,
88+
"startDate": "2019-11-28",
89+
"orderIndex": 1,
90+
"offenceCode": "CA03012",
91+
"shadowListed": false,
92+
"offenceWording": "Theft of pedal cycle.",
93+
"statementOfOffence": {
94+
"title": "Possess / control TV set with intent another use install without a licence",
95+
"welshTitle": "Meddu ar/mewn rheolaeth set deledu gan fwriadu i unigolyn arall ei ddefnyddio/osod heb drwydded",
96+
"legislation": "Contrary to section 363(3)(b) and (4) of the Communications Act 2003.",
97+
"welshLegislation": "Yn groes i adran 363(3)(b) a (4) Deddf Cyfathrebu 2003."
98+
},
99+
"restrictFromCourtList": false
100+
}
101+
],
102+
"firstName": "Santiago",
103+
"bailStatus": {
104+
"id": "12e69486-4d01-3403-a50a-7419ca040635",
105+
"code": "C",
106+
"description": "Custody"
107+
},
108+
"dateOfBirth": "1990-06-26",
109+
"masterDefendantId": "6c069ee4-d338-488d-9da5-b8f31aad3a70",
110+
"hearingLanguageNeeds": "ENGLISH",
111+
"restrictFromCourtList": false,
112+
"courtProceedingsInitiated": "2025-07-31T10:07:51.148Z"
113+
}
114+
],
115+
"shadowListed": false,
116+
"caseIdentifier": {
117+
"authorityId": "bdc190e7-c939-37ca-be4b-9f615d6ef40e",
118+
"authorityCode": "DERPF",
119+
"caseReference": "28DI1953715"
120+
},
121+
"restrictFromCourtList": false
122+
}
123+
],
124+
"courtCentreId": "f8254db1-1683-483e-afb3-b87fde5a0a26",
125+
"isSlotsBooked": false,
126+
"nonDefaultDays": [
127+
{
128+
"roomId": "9e4932f7-97b2-3010-b942-ddd2624e4dd8",
129+
"duration": 20,
130+
"startTime": "2025-07-31T22:30:00.000Z",
131+
"courtCentreId": "f8254db1-1683-483e-afb3-b87fde5a0a26"
132+
}
133+
],
134+
"nonSittingDays": [],
135+
"hearingLanguage": "ENGLISH",
136+
"estimatedMinutes": 20,
137+
"jurisdictionType": "MAGISTRATES",
138+
"courtApplications": [],
139+
"courtCentreDetails": {
140+
"id": "f8254db1-1683-483e-afb3-b87fde5a0a26",
141+
"defaultDuration": 420,
142+
"defaultStartTime": "10:00:00"
143+
},
144+
"isGroupProceedings": false,
145+
"numberOfGroupCases": 1,
146+
"sendNotificationToParties": false
147+
}
148+
]
149+
}%

0 commit comments

Comments
 (0)