Skip to content

Commit

Permalink
implement comments
Browse files Browse the repository at this point in the history
  • Loading branch information
eckermania committed Oct 22, 2024
1 parent ca134f1 commit fe25892
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
src/main/java/ca/bc/gov/educ/eas/api/model/**,
src/main/java/ca/bc/gov/educ/eas/api/struct/**
</sonar.exclusions>
<java.version>21</java.version>
<java.version>17</java.version>

<maven.compiler.version>3.13.0</maven.compiler.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package ca.bc.gov.educ.eas.api.controller.v1;

import ca.bc.gov.educ.eas.api.endpoint.v1.StudentMergeEndpoint;
import ca.bc.gov.educ.eas.api.service.v1.StudentMergeService;
import ca.bc.gov.educ.eas.api.struct.v1.StudentMerge;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
public class StudentMergeController implements StudentMergeEndpoint {
private final StudentMergeService studentMergeService;

public StudentMergeController(StudentMergeService studentMergeService){
this.studentMergeService = studentMergeService;
}

@Override
public List<StudentMerge> getMergedStudentsForDateRange(String createDateStart, String createDateEnd){
return studentMergeService.getMergedStudentsForDateRange(createDateStart, createDateEnd);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

import java.util.List;

@RequestMapping(URL.BASE_URL + "/pen-records/createDateInRange")
public interface PENRecordEndpoint {
@RequestMapping(URL.BASE_URL + "/student-merges")
public interface StudentMergeEndpoint {

@GetMapping()
@PreAuthorize("hasAuthority('SCOPE_READ_EAS_STUDENT')")
Expand Down
3 changes: 1 addition & 2 deletions api/src/main/java/ca/bc/gov/educ/eas/api/rest/RestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,7 @@ public List<School> getAllSchoolList(UUID correlationID) {
throw new EasAPIRuntimeException(NATS_TIMEOUT + correlationID + ex.getMessage());
}
}

@Retryable(retryFor = {Exception.class}, noRetryFor = {EasAPIRuntimeException.class}, backoff = @Backoff(multiplier = 2, delay = 2000))

public List<StudentMerge> getMergedStudentsForDateRange(UUID correlationID, String createDateStart, String createDateEnd) {
try {
final TypeReference<Event> refEventResponse = new TypeReference<>() {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import java.util.UUID;

@Service
public class PENRecordService {
public class StudentMergeService {

private final RestUtils restUtils;

@Autowired
public PENRecordService(RestUtils restUtils){
public StudentMergeService(RestUtils restUtils){
this.restUtils = restUtils;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,26 @@ public class StudentMerge extends BaseRequest implements Serializable {
/**
* The Student merge id.
*/
@NotNull(message = "Student Merge ID cannot be null")
String studentMergeID;
/**
* The Student id.
*/
@NotNull(message = "Student ID can not be null.")
@NotNull(message = "Student ID cannot be null.")
String studentID;
/**
* The Merge student id.
*/
@NotNull(message = "Merge Student ID can not be null.")
@NotNull(message = "Merge Student ID cannot be null.")
String mergeStudentID;
/**
* The Student merge direction code.
*/
@NotNull(message = "Student Merge Direction Code can not be null.")
@NotNull(message = "Student Merge Direction Code cannot be null.")
String studentMergeDirectionCode;
/**
* The Student merge source code.
*/
@NotNull(message = "Student Merge Source Code can not be null.")
@NotNull(message = "Student Merge Source Code cannot be null.")
String studentMergeSourceCode;
}

0 comments on commit fe25892

Please sign in to comment.