Skip to content

Commit

Permalink
PR Amendments
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilDigitalJustice committed Jan 19, 2024
1 parent f275d88 commit de44d8b
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 18 deletions.
16 changes: 9 additions & 7 deletions caab-api/open-api-specification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ paths:
get:
tags:
- applications
summary: 'Get an application''s prior authorities'
summary: 'Get an application''s cost structure'
operationId: 'getApplicationCostStructure'
parameters:
- name: 'id'
Expand Down Expand Up @@ -417,6 +417,7 @@ paths:
/applications/{id}/linked-cases:
get:
tags:
- applications
- linked cases
summary: 'Get an application''s linked cases'
operationId: 'getApplicationLinkedCases'
Expand Down Expand Up @@ -447,6 +448,7 @@ paths:
description: 'Internal server error'
post:
tags:
- applications
- linked cases
summary: 'Add a linked case to an application'
operationId: 'addApplicationLinkedCase'
Expand Down Expand Up @@ -484,8 +486,8 @@ paths:
delete:
tags:
- linked cases
summary: 'Remove a linked case from an application'
operationId: 'removeApplicationLinkedCase'
summary: 'Remove a linked case'
operationId: 'removeLinkedCase'
parameters:
- name: 'linked-case-id'
in: 'path'
Expand Down Expand Up @@ -513,8 +515,8 @@ paths:
patch:
tags:
- linked cases
summary: 'Update a linked case of an application'
operationId: 'updateApplicationLinkedCase'
summary: 'Update a linked case '
operationId: 'updateLinkedCase'
parameters:
- name: 'linked-case-id'
in: 'path'
Expand Down Expand Up @@ -680,8 +682,8 @@ paths:
get:
tags:
- scope limitations
summary: 'Get a proceedings''s scope limitations'
operationId: 'getApplicationScopeLimitations'
summary: 'Get a proceeding''s scope limitations'
operationId: 'getProceedingsScopeLimitations'
parameters:
- name: 'proceeding-id'
in: 'path'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public void deleteLinkedCase() {
Long caseRef = 41L;
Long linkedCaseRef = 2L;

applicationController.removeApplicationLinkedCase(linkedCaseRef, caabUserLoginId);
applicationController.removeLinkedCase(linkedCaseRef, caabUserLoginId);
ResponseEntity<List<LinkedCase>> responseEntity = applicationController.getApplicationLinkedCases(caseRef);

assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
Expand Down Expand Up @@ -511,7 +511,7 @@ public void updateScopeLimitationInProceeding() throws IOException {
public void getScopeLimitationsForProceeding() {
Long proceedingId = 2L;

ResponseEntity<List<ScopeLimitation>> responseEntity = applicationController.getApplicationScopeLimitations(proceedingId);
ResponseEntity<List<ScopeLimitation>> responseEntity = applicationController.getProceedingsScopeLimitations(proceedingId);

assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
assertNotNull(responseEntity.getBody());
Expand All @@ -531,7 +531,7 @@ public void removeScopeLimitationFromProceeding() {
ResponseEntity<Void> response = applicationController.removeScopeLimitation(scopeLimitationId, caabUserLoginId);
assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());

ResponseEntity<List<ScopeLimitation>> responseEntity = applicationController.getApplicationScopeLimitations(2L);
ResponseEntity<List<ScopeLimitation>> responseEntity = applicationController.getProceedingsScopeLimitations(2L);

assertEquals(HttpStatus.OK, responseEntity.getStatusCode());
assertNotNull(responseEntity.getBody());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public ResponseEntity<Void> addApplicationLinkedCase(
* @return a ResponseEntity with no content
*/
@Override
public ResponseEntity<Void> updateApplicationLinkedCase(
public ResponseEntity<Void> updateLinkedCase(
final Long linkedCaseId,
final String caabUserLoginId,
final LinkedCase linkedCase) {
Expand All @@ -292,7 +292,7 @@ public ResponseEntity<Void> updateApplicationLinkedCase(
* @return a ResponseEntity indicating the case was successfully removed
*/
@Override
public ResponseEntity<Void> removeApplicationLinkedCase(
public ResponseEntity<Void> removeLinkedCase(
final Long linkedCaseId,
final String caabUserLoginId) {
linkedCaseService.removeLinkedCase(linkedCaseId);
Expand Down Expand Up @@ -346,7 +346,7 @@ public ResponseEntity<Void> addProceedingScopeLimitation(
}

@Override
public ResponseEntity<List<ScopeLimitation>> getApplicationScopeLimitations(
public ResponseEntity<List<ScopeLimitation>> getProceedingsScopeLimitations(
final Long proceedingId) {
List<ScopeLimitation> scopeLimitations =
proceedingService.getScopeLimitationsForProceeding(proceedingId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public class Application implements Serializable {
private Address correspondenceAddress;

@OneToMany(mappedBy = "application", cascade = CascadeType.ALL, orphanRemoval = true)
@OrderBy("id asc")
@OrderBy("leadProceedingInd desc, id asc")
private List<Proceeding> proceedings;

@OneToMany(mappedBy = "application", cascade = CascadeType.ALL, orphanRemoval = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import uk.gov.laa.ccms.caab.api.entity.LinkedCase;

/**
* Repository interface for managing {@link uk.gov.laa.ccms.caab.api.entity.Application} entities.
* Repository interface for managing {@link uk.gov.laa.ccms.caab.api.entity.LinkedCase} entities.
*
* <p>This interface provides CRUD (Create, Read, Update, Delete) operations
* for the {@link uk.gov.laa.ccms.caab.api.entity.LinkedCase} entity, leveraging the power of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import uk.gov.laa.ccms.caab.api.entity.Proceeding;

/**
* Repository interface for managing {@link uk.gov.laa.ccms.caab.api.entity.Application} entities.
* Repository interface for managing {@link uk.gov.laa.ccms.caab.api.entity.PriorAuthority} entities.
*
* <p>This interface provides CRUD (Create, Read, Update, Delete) operations
* for the {@link uk.gov.laa.ccms.caab.api.entity.PriorAuthority} entity, leveraging the power of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import uk.gov.laa.ccms.caab.api.entity.Proceeding;

/**
* Repository interface for managing {@link uk.gov.laa.ccms.caab.api.entity.Application} entities.
* Repository interface for managing {@link uk.gov.laa.ccms.caab.api.entity.Proceeding} entities.
*
* <p>This interface provides CRUD (Create, Read, Update, Delete) operations
* for the {@link uk.gov.laa.ccms.caab.api.entity.Proceeding} entity, leveraging the power of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import uk.gov.laa.ccms.caab.api.entity.ScopeLimitation;

/**
* Repository interface for managing {@link uk.gov.laa.ccms.caab.api.entity.Application} entities.
* Repository interface for managing {@link uk.gov.laa.ccms.caab.api.entity.ScopeLimitation} entities.
*
* <p>This interface provides CRUD (Create, Read, Update, Delete) operations
* for the {@link uk.gov.laa.ccms.caab.api.entity.ScopeLimitation} entity, leveraging the power of
Expand Down

0 comments on commit de44d8b

Please sign in to comment.