Skip to content

Commit d204fb9

Browse files
deprecate /api/data/jurisdictions/{jurisdiction_id}/case-type and dis… (#1498)
* deprecate /api/data/jurisdictions/{jurisdiction_id}/case-type and disable FTs * deprecate /api/data/jurisdictions/{jurisdiction_id}/case-type and disable FTs * deprecate /api/data/jurisdictions/{jurisdiction_id}/case-type and disable FTs --------- Co-authored-by: dinesh1patel <74076102+dinesh1patel@users.noreply.github.com>
1 parent 7b60ea1 commit d204fb9

File tree

8 files changed

+30
-5
lines changed

8 files changed

+30
-5
lines changed

Jenkinsfile_CNP

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ env.CCD_STUB_SERVICE_URI_BASE="ccd-test-stubs-service-aat.aat.platform.hmcts.net
5656
env.BEFTA_RETRY_MAX_ATTEMPTS = "3"
5757
env.BEFTA_RETRY_STATUS_CODES = "500,502,503,504"
5858
env.BEFTA_RETRY_MAX_DELAY = "1000"
59-
env.BEFTA_RETRY_NON_RETRYABLE_HTTP_METHODS = "POST,PUT"
59+
env.BEFTA_RETRY_NON_RETRYABLE_HTTP_METHODS = "PUT"
6060

6161
env.DEFAULT_COLLECTION_ASSERTION_MODE="UNORDERED"
6262

Jenkinsfile_nightly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ env.CCD_STUB_SERVICE_URI_BASE="ccd-test-stubs-service-aat.service.core-compute-a
5454
env.BEFTA_RETRY_MAX_ATTEMPTS = "3"
5555
env.BEFTA_RETRY_STATUS_CODES = "500,502,503,504"
5656
env.BEFTA_RETRY_MAX_DELAY = "1000"
57-
env.BEFTA_RETRY_NON_RETRYABLE_HTTP_METHODS = "POST,PUT"
57+
env.BEFTA_RETRY_NON_RETRYABLE_HTTP_METHODS = "PUT"
5858

5959
env.DEFAULT_COLLECTION_ASSERTION_MODE="UNORDERED"
6060

aat/src/aat/resources/features/F-081/F-081.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Background:
77
Given an appropriate test context as detailed in the test data source
88

99
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
10-
@S-347
10+
@S-347 @Smoke
1111
Scenario: must return 200 with List of jurisdictions
1212

1313
Given a user with [an active profile in CCD]

aat/src/aat/resources/features/F-082/F-082.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Background:
77
Given an appropriate test context as detailed in the test data source
88

99
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
10-
@S-082.1 @Smoke
10+
@S-082.1 @Smoke @Ignore
1111
Scenario: must return 200
1212

1313
Given a user with [an active profile in CCD]
@@ -21,7 +21,7 @@ Scenario: must return 200
2121
And the response has all other details as expected
2222

2323
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
24-
@S-082.2
24+
@S-082.2 @Ignore
2525
Scenario: must return 401 when request does not provide valid authentication credentials
2626

2727
Given a user with [an active profile in CCD]

domain/src/main/java/uk/gov/hmcts/ccd/definition/store/domain/service/casetype/CaseTypeServiceImpl.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ public boolean caseTypeExistsInAnyJurisdiction(String reference, String jurisdic
6868
return repository.caseTypeExistsInAnyJurisdiction(reference, jurisdictionId) > 0;
6969
}
7070

71+
/**
72+
* Find by jurisdiction id.
73+
*
74+
* @deprecated This endpoint is deprecated due to performance issues
75+
*/
76+
@Deprecated(forRemoval = true)
77+
@SuppressWarnings("squid:S1133")
7178
@Transactional
7279
@Override
7380
public List<CaseType> findByJurisdictionId(String jurisdictionId) {

repository/src/main/java/uk/gov/hmcts/ccd/definition/store/repository/CaseTypeRepository.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ public interface CaseTypeRepository extends VersionedDefinitionRepository<CaseTy
1818
@Query(SELECT_LATEST_CASE_TYPE_ENTITY_FOR_REFERENCE)
1919
Optional<CaseTypeEntity> findCurrentVersionForReference(@Param("caseTypeReference") String caseTypeReference);
2020

21+
/**
22+
* Find by jurisdiction id.
23+
*
24+
* @deprecated This endpoint is deprecated due to performance issues
25+
*/
26+
@Deprecated(forRemoval = true)
27+
@SuppressWarnings("squid:S1133")
2128
@Query("select c from CaseTypeEntity c where c.version in (select max(cm.version) from CaseTypeEntity cm "
2229
+ "where cm.reference=c.reference) and c.jurisdiction.reference=:jurisdictionReference")
2330
List<CaseTypeEntity> findByJurisdictionId(@Param("jurisdictionReference") String jurisdiction);

rest-api/src/main/java/uk/gov/hmcts/ccd/definition/store/rest/endpoint/CaseDefinitionController.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ public List<RoleAssignment> getRoleToAccessProfiles(
105105
return roleToAccessProfilesService.findRoleAssignmentsByCaseTypeId(caseTypeId);
106106
}
107107

108+
/**
109+
* Find by jurisdiction id.
110+
*
111+
* @deprecated This endpoint is deprecated due to performance issues and is no longer used by any service from the
112+
* data store.
113+
*/
114+
@Deprecated(forRemoval = true)
115+
@SuppressWarnings("squid:S1133")
108116
@GetMapping(value = "/data/jurisdictions/{jurisdiction_id}/case-type",
109117
produces = {"application/json"})
110118
@ApiOperation(value = "Get case types",

rest-api/src/test/java/uk/gov/hmcts/ccd/definition/store/rest/endpoint/CaseDefinitionControllerTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package uk.gov.hmcts.ccd.definition.store.rest.endpoint;
22

33
import org.junit.jupiter.api.BeforeEach;
4+
import org.junit.jupiter.api.Disabled;
45
import org.junit.jupiter.api.DisplayName;
56
import org.junit.jupiter.api.Nested;
67
import org.junit.jupiter.api.Test;
@@ -66,6 +67,8 @@ private CaseType createCaseType(String caseTypeId, String jurisdictionPostfix) {
6667
return caseType;
6768
}
6869

70+
@Deprecated
71+
@Disabled
6972
@Nested
7073
@DisplayName("Test the dataJurisdictionsJurisdictionIdCaseTypeGet method")
7174
class DataJurisdictionsJurisdictionIdCaseTypeGetTests {

0 commit comments

Comments
 (0)