From d92f327edc8e034ee1728154199249564cc6bb39 Mon Sep 17 00:00:00 2001 From: Josh Blackmoor Date: Tue, 23 May 2023 09:24:24 +0100 Subject: [PATCH] Remove sessionDuration --- .../uk/gov/hmcts/reform/hmi/models/external/Session.java | 5 ----- .../gov/hmcts/reform/hmi/service/ConversionService.java | 9 --------- 2 files changed, 14 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/reform/hmi/models/external/Session.java b/src/main/java/uk/gov/hmcts/reform/hmi/models/external/Session.java index e11c341..339fabe 100644 --- a/src/main/java/uk/gov/hmcts/reform/hmi/models/external/Session.java +++ b/src/main/java/uk/gov/hmcts/reform/hmi/models/external/Session.java @@ -15,11 +15,6 @@ public class Session { private List johs = new ArrayList<>(); private Location room; - /** - * If Session in CLP table is AM, duration will be 180, otherwise 120. - */ - private Integer sessionDuration; - /** * ID from the CLP table. */ diff --git a/src/main/java/uk/gov/hmcts/reform/hmi/service/ConversionService.java b/src/main/java/uk/gov/hmcts/reform/hmi/service/ConversionService.java index 2752aeb..05df7f2 100644 --- a/src/main/java/uk/gov/hmcts/reform/hmi/service/ConversionService.java +++ b/src/main/java/uk/gov/hmcts/reform/hmi/service/ConversionService.java @@ -85,7 +85,6 @@ public Session formatRequestJson(String clpId) { Optional courtListingProfile = courtListingProfileRepository.findById(clpId); if (courtListingProfile.isPresent()) { session.setRoom(formatLocation(courtListingProfile.get(), true)); - session.setSessionDuration(calculateSessionDuration(courtListingProfile.get())); session.setSessionReference(courtListingProfile.get().getId()); session.setSessionStart(calculateSessionStartTime(courtListingProfile.get())); session.setVenue(formatLocation(courtListingProfile.get(), false)); @@ -112,14 +111,6 @@ private Location formatLocation(CourtListingProfile courtListingProfile, boolean return new Location(courtListingProfile.getLocationId(), LocationType.COURT.label); } - private Integer calculateSessionDuration(CourtListingProfile courtListingProfile) { - if ("AM".equals(courtListingProfile.getSession())) { - return 180; - } - - return 120; - } - private String calculateSessionStartTime(CourtListingProfile courtListingProfile) { if ("AM".equals(courtListingProfile.getSession())) { return courtListingProfile.getSessionDate().toString() + "T10:00:00Z";