Skip to content

Commit

Permalink
Po 430 update response for legacy xml (#428)
Browse files Browse the repository at this point in the history
* update schemas, update defendantaccount details service to retrieve notes

* jaxb util classes

* Add xml annotations to response classes

* Add xml annotations to response classes

* Add unmarshaller to response handler

* Fix tests

* Add xml names for fields in dto layer

* Tests for utils and tidy-up

* Update entities with xml annotations

* Add gateway call to legacy services and provide wrapper class for search responses root element

* Use proxy qualifier for mode switching

* Add adapter for date and datetime fields

* Add missing wrapper class and remove unused generic wrapper

* Use wrapper class and extract entities list

* Additional wrapper classes for search results

* Checkstyle organise imports

* Checkstyle change package name

* Checkstyle change package name

* Remove auth header as no permission exists

* Checkstyle issues

* Add builder

* Update tests for newly implemented legacy services

* Update integration tests to use proxy qualifier

* merge conflict fix

---------

Co-authored-by: RustyHMCTS <149379845+RustyHMCTS@users.noreply.github.com>
  • Loading branch information
DeclanClarkeCGI and RustyHMCTS authored Jul 9, 2024
1 parent a61e916 commit 7e31376
Show file tree
Hide file tree
Showing 221 changed files with 2,981 additions and 1,397 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class BusinessUnitControllerIntegrationTest {
MockMvc mockMvc;

@MockBean
@Qualifier("businessUnitService")
@Qualifier("businessUnitServiceProxy")
BusinessUnitService businessUnitService;

@MockBean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CourtControllerIntegrationTest {
MockMvc mockMvc;

@MockBean
@Qualifier("courtService")
@Qualifier("courtServiceProxy")
CourtService courtService;

@MockBean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class EnforcerControllerIntegrationTest {
MockMvc mockMvc;

@MockBean
@Qualifier("enforcerService")
@Qualifier("enforcerServiceProxy")
EnforcerService enforcerService;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class LocalJusticeAreaControllerIntegrationTest {
MockMvc mockMvc;

@MockBean
@Qualifier("localJusticeAreaService")
@Qualifier("localJusticeAreaServiceProxy")
LocalJusticeAreaService localJusticeAreaService;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MajorCreditorControllerIntegrationTest {
MockMvc mockMvc;

@MockBean
@Qualifier("majorCreditorService")
@Qualifier("majorCreditorServiceProxy")
MajorCreditorService majorCreditorService;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ConfigurationItemControllerIntegrationTest {
MockMvc mockMvc;

@MockBean
@Qualifier("configurationItemService")
@Qualifier("configurationItemServiceProxy")
ConfigurationItemService configurationItemService;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ImpositionControllerIntegrationTest {
MockMvc mockMvc;

@MockBean
@Qualifier("impositionService")
@Qualifier("impositionServiceProxy")
ImpositionService impositionService;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class LogActionControllerIntegrationTest {
MockMvc mockMvc;

@MockBean
@Qualifier("logActionService")
@Qualifier("logActionServiceProxy")
LogActionService logActionService;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class LogAuditDetailControllerIntegrationTest {
MockMvc mockMvc;

@MockBean
@Qualifier("logAuditDetailService")
@Qualifier("logAuditDetailServiceProxy")
LogAuditDetailService logAuditDetailService;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class OffenceControllerIntegrationTest {
MockMvc mockMvc;

@MockBean
@Qualifier("offenceService")
@Qualifier("offenceServiceProxy")
OffenceService offenceService;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ResultControllerIntegrationTest {
MockMvc mockMvc;

@MockBean
@Qualifier("resultService")
@Qualifier("resultServiceProxy")
ResultService resultService;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TillControllerIntegrationTest {
MockMvc mockMvc;

@MockBean
@Qualifier("tillService")
@Qualifier("tillServiceProxy")
TillService tillService;

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class BusinessUnitController {
private final UserStateService userStateService;

public BusinessUnitController(
@Qualifier("businessUnitService") BusinessUnitServiceInterface businessUnitService,
@Qualifier("businessUnitServiceProxy") BusinessUnitServiceInterface businessUnitService,
BusinessUnitService opalBusinessUnitService, UserStateService userStateService) {
this.businessUnitService = businessUnitService;
this.opalBusinessUnitService = opalBusinessUnitService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class CourtController {

private final UserStateService userStateService;

public CourtController(@Qualifier("courtService") CourtServiceInterface courtService,
public CourtController(@Qualifier("courtServiceProxy") CourtServiceInterface courtService,
UserStateService userStateService, CourtService opalCourtService) {
this.courtService = courtService;
this.userStateService = userStateService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class EnforcerController {

private final EnforcerService opalEnforcerService;

public EnforcerController(@Qualifier("enforcerService") EnforcerServiceInterface enforcerService,
public EnforcerController(@Qualifier("enforcerServiceProxy") EnforcerServiceInterface enforcerService,
EnforcerService opalEnforcerService) {
this.enforcerService = enforcerService;
this.opalEnforcerService = opalEnforcerService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class LocalJusticeAreaController {
private final LocalJusticeAreaService opalLocalJusticeAreaService;

public LocalJusticeAreaController(
@Qualifier("localJusticeAreaService") LocalJusticeAreaServiceInterface localJusticeAreaService,
@Qualifier("localJusticeAreaServiceProxy") LocalJusticeAreaServiceInterface localJusticeAreaService,
LocalJusticeAreaService opalLocalJusticeAreaService) {
this.localJusticeAreaService = localJusticeAreaService;
this.opalLocalJusticeAreaService = opalLocalJusticeAreaService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class MajorCreditorController {

private final MajorCreditorService opalMajorCreditorService;

public MajorCreditorController(@Qualifier("majorCreditorService") MajorCreditorServiceInterface
public MajorCreditorController(@Qualifier("majorCreditorServiceProxy") MajorCreditorServiceInterface
majorCreditorService, MajorCreditorService opalMajorCreditorService) {
this.majorCreditorService = majorCreditorService;
this.opalMajorCreditorService = opalMajorCreditorService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class OffenceController {
private final OffenceServiceInterface offenceService;
private final OffenceService opalOffenceService;

public OffenceController(@Qualifier("offenceService") OffenceServiceInterface offenceService,
public OffenceController(@Qualifier("offenceServiceProxy") OffenceServiceInterface offenceService,
OffenceService opalOffenceService) {
this.offenceService = offenceService;
this.opalOffenceService = opalOffenceService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class AccountTransferController {
private final AccountTransferServiceInterface accountTransferService;

public AccountTransferController(
@Qualifier("accountTransferService") AccountTransferServiceInterface accountTransferService) {
@Qualifier("accountTransferServiceProxy") AccountTransferServiceInterface accountTransferService) {
this.accountTransferService = accountTransferService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class AliasController {

private final AliasServiceInterface aliasService;

public AliasController(@Qualifier("aliasService") AliasServiceInterface aliasService) {
public AliasController(@Qualifier("aliasServiceProxy") AliasServiceInterface aliasService) {
this.aliasService = aliasService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class AmendmentController {

private final AmendmentServiceInterface amendmentService;

public AmendmentController(@Qualifier("amendmentService") AmendmentServiceInterface amendmentService) {
public AmendmentController(@Qualifier("amendmentServiceProxy") AmendmentServiceInterface amendmentService) {
this.amendmentService = amendmentService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ApplicationFunctionController {
private final ApplicationFunctionServiceInterface applicationFunctionService;

public ApplicationFunctionController(
@Qualifier("applicationFunctionService") ApplicationFunctionServiceInterface applicationFunctionService) {
@Qualifier("applicationFunctionServiceProxy") ApplicationFunctionServiceInterface applicationFunctionService) {
this.applicationFunctionService = applicationFunctionService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class BusinessUnitUserController {
private final BusinessUnitUserServiceInterface businessUnitUserService;

public BusinessUnitUserController(
@Qualifier("businessUnitUserService") BusinessUnitUserServiceInterface businessUnitUserService) {
@Qualifier("businessUnitUserServiceProxy") BusinessUnitUserServiceInterface businessUnitUserService) {
this.businessUnitUserService = businessUnitUserService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class CommittalWarrantProgressController {

private final CommittalWarrantProgressServiceInterface committalWarrantProgressService;

public CommittalWarrantProgressController(@Qualifier("committalWarrantProgressService")
public CommittalWarrantProgressController(@Qualifier("committalWarrantProgressServiceProxy")
CommittalWarrantProgressServiceInterface committalWarrantProgressService) {
this.committalWarrantProgressService = committalWarrantProgressService;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ConfigurationItemController {
private final ConfigurationItemServiceInterface configurationItemService;

public ConfigurationItemController(
@Qualifier("configurationItemService") ConfigurationItemServiceInterface configurationItemService) {
@Qualifier("configurationItemServiceProxy") ConfigurationItemServiceInterface configurationItemService) {
this.configurationItemService = configurationItemService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class CourtFeeController {

private final CourtFeeServiceInterface courtFeeService;

public CourtFeeController(@Qualifier("courtFeeService") CourtFeeServiceInterface courtFeeService) {
public CourtFeeController(@Qualifier("courtFeeServiceProxy") CourtFeeServiceInterface courtFeeService) {
this.courtFeeService = courtFeeService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class CreditorAccountController {

private final CreditorAccountServiceInterface creditorAccountService;

public CreditorAccountController(@Qualifier("creditorAccountService")
public CreditorAccountController(@Qualifier("creditorAccountServiceProxy")
CreditorAccountServiceInterface creditorAccountService) {
this.creditorAccountService = creditorAccountService;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class CreditorTransactionController {

private final CreditorTransactionServiceInterface creditorTransactionService;

public CreditorTransactionController(@Qualifier("creditorTransactionService")
public CreditorTransactionController(@Qualifier("creditorTransactionServiceProxy")
CreditorTransactionServiceInterface creditorTransactionService) {
this.creditorTransactionService = creditorTransactionService;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class DebtorDetailController {
private final DebtorDetailServiceInterface debtorDetailService;

public DebtorDetailController(
@Qualifier("debtorDetailService") DebtorDetailServiceInterface debtorDetailService) {
@Qualifier("debtorDetailServiceProxy") DebtorDetailServiceInterface debtorDetailService) {
this.debtorDetailService = debtorDetailService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class DefendantTransactionController {

private final DefendantTransactionServiceInterface defendantTransactionService;

public DefendantTransactionController(@Qualifier("defendantTransactionService")
public DefendantTransactionController(@Qualifier("defendantTransactionServiceProxy")
DefendantTransactionServiceInterface defendantTransactionService) {
this.defendantTransactionService = defendantTransactionService;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class DocumentController {

private final DocumentServiceInterface documentService;

public DocumentController(@Qualifier("documentService") DocumentServiceInterface documentService) {
public DocumentController(@Qualifier("documentServiceProxy") DocumentServiceInterface documentService) {
this.documentService = documentService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class DocumentInstanceController {
private final DocumentInstanceServiceInterface documentInstanceService;

public DocumentInstanceController(
@Qualifier("documentInstanceService") DocumentInstanceServiceInterface documentInstanceService) {
@Qualifier("documentInstanceServiceProxy") DocumentInstanceServiceInterface documentInstanceService) {
this.documentInstanceService = documentInstanceService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class EnforcementController {

private final EnforcementServiceInterface enforcementService;

public EnforcementController(@Qualifier("enforcementService") EnforcementServiceInterface enforcementService) {
public EnforcementController(@Qualifier("enforcementServiceProxy") EnforcementServiceInterface enforcementService) {
this.enforcementService = enforcementService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class FixedPenaltyOffenceController {
private final FixedPenaltyOffenceServiceInterface fixedPenaltyOffenceService;

public FixedPenaltyOffenceController(
@Qualifier("fixedPenaltyOffenceService") FixedPenaltyOffenceServiceInterface fixedPenaltyOffenceService) {
@Qualifier("fixedPenaltyOffenceServiceProxy") FixedPenaltyOffenceServiceInterface fixedPenaltyOffenceService) {
this.fixedPenaltyOffenceService = fixedPenaltyOffenceService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class ImpositionController {

private final ImpositionServiceInterface impositionService;

public ImpositionController(@Qualifier("impositionService") ImpositionServiceInterface impositionService) {
public ImpositionController(@Qualifier("impositionServiceProxy") ImpositionServiceInterface impositionService) {
this.impositionService = impositionService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class LogActionController {

private final LogActionServiceInterface logActionService;

public LogActionController(@Qualifier("logActionService") LogActionServiceInterface logActionService) {
public LogActionController(@Qualifier("logActionServiceProxy") LogActionServiceInterface logActionService) {
this.logActionService = logActionService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class LogAuditDetailController {
private final LogAuditDetailServiceInterface logAuditDetailService;

public LogAuditDetailController(
@Qualifier("logAuditDetailService") LogAuditDetailServiceInterface logAuditDetailService) {
@Qualifier("logAuditDetailServiceProxy") LogAuditDetailServiceInterface logAuditDetailService) {
this.logAuditDetailService = logAuditDetailService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class MisDebtorController {

private final MisDebtorServiceInterface misDebtorService;

public MisDebtorController(@Qualifier("misDebtorService") MisDebtorServiceInterface misDebtorService) {
public MisDebtorController(@Qualifier("misDebtorServiceProxy") MisDebtorServiceInterface misDebtorService) {
this.misDebtorService = misDebtorService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class MiscellaneousAccountController {

private final MiscellaneousAccountServiceInterface miscellaneousAccountService;

public MiscellaneousAccountController(@Qualifier("miscellaneousAccountService")
public MiscellaneousAccountController(@Qualifier("miscellaneousAccountServiceProxy")
MiscellaneousAccountServiceInterface miscellaneousAccountService) {
this.miscellaneousAccountService = miscellaneousAccountService;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class NoteController {

private final UserStateService userStateService;

public NoteController(@Qualifier("noteService") NoteServiceInterface noteService,
public NoteController(@Qualifier("noteServiceProxy") NoteServiceInterface noteService,
UserStateService userStateService) {
this.noteService = noteService;
this.userStateService = userStateService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class PartyController {

private final PartyServiceInterface partyService;

public PartyController(@Qualifier("partyService") PartyServiceInterface partyService) {
public PartyController(@Qualifier("partyServiceProxy") PartyServiceInterface partyService) {
this.partyService = partyService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class PaymentInController {

private final PaymentInServiceInterface paymentInService;

public PaymentInController(@Qualifier("paymentInService") PaymentInServiceInterface paymentInService) {
public PaymentInController(@Qualifier("paymentInServiceProxy") PaymentInServiceInterface paymentInService) {
this.paymentInService = paymentInService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class PaymentTermsController {
private final PaymentTermsServiceInterface paymentTermsService;

public PaymentTermsController(
@Qualifier("paymentTermsService") PaymentTermsServiceInterface paymentTermsService) {
@Qualifier("paymentTermsServiceProxy") PaymentTermsServiceInterface paymentTermsService) {
this.paymentTermsService = paymentTermsService;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class PrisonController {

private final PrisonServiceInterface prisonService;

public PrisonController(@Qualifier("prisonService") PrisonServiceInterface prisonService) {
public PrisonController(@Qualifier("prisonServiceProxy") PrisonServiceInterface prisonService) {
this.prisonService = prisonService;
}

Expand Down
Loading

0 comments on commit 7e31376

Please sign in to comment.