-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SSCS-12006 Work allocation ph tasks update (#3564)
* allow invalid languages to update case data (#3530) * Tribs: change error (#3506) * Tribs: change error SSCS-12094 * common bump SSCS-12094 * common bump SSCS-12094 --------- Co-authored-by: Nicholas Hill <nicholas.hill@HMCTS.net> Co-authored-by: AV <46674657+vishwa-amit@users.noreply.github.com> * SSCSCI-579 - Elinks feature toggling (#3524) * SSCSCI-84 - Postponement doc appears twice V2 (#3534) * Fixed an issue with blank decision notice (#3535) Co-authored-by: Andrei Trushkov <andrei.trushkov@hmcts.net> Co-authored-by: NickHill111 <47982351+nickhill111@users.noreply.github.com> * SSCSCI-595 - Interpreter Language not showing in Appeal Details (#3539) * SSCSCI-5 (#3509) * Update dependency com.github.hmcts:sscs-common to v5.2.2 (#3550) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * global search changes (#3549) * global search changes --------- Co-authored-by: Andrei Trushkov <andrei.trushkov@hmcts.net> * Implemented prePostHearing field in 'Send to interloc' and 'Send to Judge' events (#3516) * SSCS-12139: implemented prePostHearing field in 'Send to interloc' and 'Send to Judge' events * common bump SSCS-12139 * cleanup, sscs-common bump * tests * fixed prePosthearing value is not null in about to start handler * Update build.gradle * update suppressions SSCS-12139 * update flags SSCS-12139 --------- Co-authored-by: Andrei Trushkov <andrei.trushkov@hmcts.net> Co-authored-by: NickHill111 <47982351+nickhill111@users.noreply.github.com> Co-authored-by: Nicholas Hill <nicholas.hill@HMCTS.net> * New sscs-common version for QA (#3507) * new sscs-common version for QA * common bump * sscs-common bump * change to correct embedded title SSCS-12122 * add unit test SSCS-12122 * update suppressions SSCS-12122 --------- Co-authored-by: Andrei Trushkov <andrei.trushkov@hmcts.net> Co-authored-by: NickHill111 <47982351+nickhill111@users.noreply.github.com> Co-authored-by: Nicholas Hill <nicholas.hill@HMCTS.net> Co-authored-by: AV <46674657+vishwa-amit@users.noreply.github.com> * fix ES match_all query (#3559) * Fix merge * SSCS-12223 Testing (#3565) * SSCS-12223 Testing * CCD Defs S12006PnonProd on preview --------- Co-authored-by: gemmatalbot <116297417+gemmatalbot@users.noreply.github.com> Co-authored-by: NickHill111 <47982351+nickhill111@users.noreply.github.com> Co-authored-by: Nicholas Hill <nicholas.hill@HMCTS.net> Co-authored-by: AV <46674657+vishwa-amit@users.noreply.github.com> Co-authored-by: Andrei Trushkov <54980948+AndreiTrushkov@users.noreply.github.com> Co-authored-by: Andrei Trushkov <andrei.trushkov@hmcts.net> Co-authored-by: hashimalisolirius <140517911+hashimalisolirius@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: taleb <20416858+benouaer@users.noreply.github.com>
- Loading branch information
1 parent
d2d417f
commit df1c5f2
Showing
15 changed files
with
243 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...va/uk/gov/hmcts/reform/sscs/ccd/presubmit/sendtojudge/SendToJudgeAboutToStartHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package uk.gov.hmcts.reform.sscs.ccd.presubmit.sendtojudge; | ||
|
||
import static java.util.Objects.requireNonNull; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.stereotype.Component; | ||
import uk.gov.hmcts.reform.sscs.ccd.callback.Callback; | ||
import uk.gov.hmcts.reform.sscs.ccd.callback.CallbackType; | ||
import uk.gov.hmcts.reform.sscs.ccd.callback.PreSubmitCallbackResponse; | ||
import uk.gov.hmcts.reform.sscs.ccd.domain.EventType; | ||
import uk.gov.hmcts.reform.sscs.ccd.domain.SscsCaseData; | ||
import uk.gov.hmcts.reform.sscs.ccd.presubmit.PreSubmitCallbackHandler; | ||
|
||
@Component | ||
@Slf4j | ||
public class SendToJudgeAboutToStartHandler implements PreSubmitCallbackHandler<SscsCaseData> { | ||
private final boolean postHearingsB; | ||
|
||
public SendToJudgeAboutToStartHandler(@Value("${feature.postHearingsB.enabled}") boolean postHearingsB) { | ||
this.postHearingsB = postHearingsB; | ||
} | ||
|
||
@Override | ||
public boolean canHandle(CallbackType callbackType, Callback<SscsCaseData> callback) { | ||
requireNonNull(callback, "callback must not be null"); | ||
requireNonNull(callbackType, "callbackType must not be null"); | ||
|
||
return callbackType.equals(CallbackType.ABOUT_TO_START) | ||
&& (callback.getEvent() == EventType.TCW_REFER_TO_JUDGE); | ||
} | ||
|
||
@Override | ||
public PreSubmitCallbackResponse<SscsCaseData> handle(CallbackType callbackType, Callback<SscsCaseData> callback, String userAuthorisation) { | ||
if (!canHandle(callbackType, callback)) { | ||
throw new IllegalStateException("Cannot handle callback"); | ||
} | ||
|
||
SscsCaseData sscsCaseData = callback.getCaseDetails().getCaseData(); | ||
if (postHearingsB) { | ||
sscsCaseData.setPrePostHearing(null); | ||
} | ||
|
||
return new PreSubmitCallbackResponse<>(sscsCaseData); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.