Skip to content

Commit

Permalink
update to use resolveCaveatStopState in caseData
Browse files Browse the repository at this point in the history
  • Loading branch information
GEvans-HMCTS committed Dec 3, 2024
1 parent 1765ad5 commit 4b402e4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
{"LiveFrom": "01/01/2017", "CaseTypeID": "GrantOfRepresentation", "ID": "boRequestInfoForCaseStopped", "Name": "Request information", "Description": "Request information", "DisplayOrder": 132, "PreConditionState(s)": "BOCaseStopped;BOGrantIssued;BOPostGrantIssued;BOCaseStoppedReissue", "PostConditionState": "*", "CallBackURLAboutToStartEvent": "http://${CCD_DEF_CASE_SERVICE_BASE_URL}/notify/request-information-default-values", "CallBackURLAboutToSubmitEvent": "http://${CCD_DEF_CASE_SERVICE_BASE_URL}/notify/stopped-information-request", "SecurityClassification": "Public", "ShowSummary": "N", "ShowEventNotes": "Y"},
{"LiveFrom": "01/01/2017", "CaseTypeID": "GrantOfRepresentation", "ID": "boResolvePostGrantIssue", "Name": "Resolve Post Grant Issue", "Description": "Resolve Post Grant Issue", "DisplayOrder": 133, "PreConditionState(s)": "BOPostGrantIssued;BOPostGrantIssuedRegistrarEscalation;", "PostConditionState": "BOGrantIssued", "SecurityClassification": "Public","CallBackURLAboutToSubmitEvent": "http://${CCD_DEF_CASE_SERVICE_BASE_URL}/case/setLastModifiedDate", "ShowSummary": "N", "ShowEventNotes": "Y"},
{"LiveFrom": "01/01/2017", "CaseTypeID": "GrantOfRepresentation", "ID": "resolveCWEscalation", "Name": "Resolve SME Referral", "Description": "Resolve SME Referral", "DisplayOrder": 134, "PreConditionState(s)": "BOCaseWorkerEscalation", "PostConditionState": "*", "CallBackURLAboutToSubmitEvent": "http://${CCD_DEF_CASE_SERVICE_BASE_URL}/case/resolve-case-worker-escalated", "SecurityClassification": "Public", "ShowSummary": "N", "ShowEventNotes": "Y"},
{"LiveFrom": "01/01/2017", "CaseTypeID": "GrantOfRepresentation", "ID": "boResolveCaveatStop", "Name": "Resolve Caveat Stop", "Description": "Resolve Caveat Stop", "DisplayOrder": 135, "PreConditionState(s)": "BOCaveatPermenant", "PostConditionState": "*", "SecurityClassification": "Public", "CallBackURLAboutToSubmitEvent": "http://${CCD_DEF_CASE_SERVICE_BASE_URL}/case/changeCaseState","ShowSummary": "N", "ShowEventNotes": "Y"},
{"LiveFrom": "01/01/2017", "CaseTypeID": "GrantOfRepresentation", "ID": "boResolveCaveatStop", "Name": "Resolve Caveat Stop", "Description": "Resolve Caveat Stop", "DisplayOrder": 135, "PreConditionState(s)": "BOCaveatPermenant", "PostConditionState": "*", "SecurityClassification": "Public", "CallBackURLAboutToSubmitEvent": "http://${CCD_DEF_CASE_SERVICE_BASE_URL}/case/resolveCaveatStopState","ShowSummary": "N", "ShowEventNotes": "Y"},
{"LiveFrom": "01/01/2017", "CaseTypeID": "GrantOfRepresentation", "ID": "boResolveStop", "Name": "Resolve stop", "Description": "Resolve the stop placed on the case", "DisplayOrder": 136, "PreConditionState(s)": "BOCaseStopped", "PostConditionState": "CasePrinted", "CallBackURLAboutToSubmitEvent": "http://${CCD_DEF_CASE_SERVICE_BASE_URL}/case/resolveStop", "SecurityClassification": "Public", "ShowSummary": "N", "ShowEventNotes": "Y"},
{"LiveFrom": "01/01/2017", "CaseTypeID": "GrantOfRepresentation", "ID": "boResolveStopReissue", "Name": "Resolve stop", "Description": "Resolve the stop placed on the case", "DisplayOrder": 137, "PreConditionState(s)": "BOCaseStoppedReissue", "PostConditionState": "BOExaminingReissue", "CallBackURLAboutToSubmitEvent": "http://${CCD_DEF_CASE_SERVICE_BASE_URL}/tasklist/update", "SecurityClassification": "Public", "ShowSummary": "N", "ShowEventNotes": "Y"},
{"LiveFrom": "01/01/2017", "CaseTypeID": "GrantOfRepresentation", "ID": "boSelectForQA", "Name": "Select for QA", "Description": "Select the case for quality assurance", "DisplayOrder": 138, "PreConditionState(s)": "CasePrinted", "PostConditionState": "BOCaseQA", "CallBackURLAboutToSubmitEvent": "http://${CCD_DEF_CASE_SERVICE_BASE_URL}/tasklist/update", "SecurityClassification": "Public", "ShowSummary": "N", "ShowEventNotes": "Y"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,16 @@ public ResponseEntity<CallbackResponse> changeCaseState(@RequestBody CallbackReq
return ResponseEntity.ok(response);
}

@PostMapping(path = "/resolveCaveatStopState", consumes = MediaType.APPLICATION_JSON_VALUE,
produces = {APPLICATION_JSON_VALUE})
public ResponseEntity<CallbackResponse> resolveCaveatStopState(@RequestBody CallbackRequest callbackRequest,
HttpServletRequest request) {
logRequest(request.getRequestURI(), callbackRequest);
log.info("resolve caveat stop state started");
CallbackResponse response = callbackResponseTransformer.transferCaveatStopState(callbackRequest);
return ResponseEntity.ok(response);
}

@PostMapping(path = "/changeDob", consumes = MediaType.APPLICATION_JSON_VALUE,
produces = {APPLICATION_JSON_VALUE})
public ResponseEntity<CallbackResponse> changeDob(@RequestBody CallbackRequest callbackRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ public class CaseData extends CaseDataParent {
private final String dateOfDeathType;
private final String resolveStopState;
private final String transferToState;
private final String resolveCaveatStopState;
private final String orderNeeded;
private final List<CollectionMember<Reissue>> reissueReason;
private final String reissueReasonNotation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,11 @@ public CallbackResponse transferToState(CallbackRequest callbackRequest) {
.getData().getTransferToState()));
}

public CallbackResponse transferCaveatStopState(CallbackRequest callbackRequest) {
return transformWithConditionalStateChange(callbackRequest, Optional.of(callbackRequest.getCaseDetails()
.getData().getResolveCaveatStopState()));
}

public CallbackResponse rollback(CallbackRequest callbackRequest) {
ResponseCaseDataBuilder<?, ?> responseCaseDataBuilder =
getResponseCaseData(callbackRequest.getCaseDetails(), callbackRequest.getEventId(), false);
Expand Down

0 comments on commit 4b402e4

Please sign in to comment.