Skip to content

Commit

Permalink
Validations Fixes | SIS-189 (#107)
Browse files Browse the repository at this point in the history
* NotEmpty Annotation Has Been Added to StudentLessonRegistrationInfoRequest/lessonsIds Field

* NotEmpty Annotation Has Been Added to StudentsLessonAbsenteeismUpdateRequest/absenteeismIdsAndTheoreticalHoursAndPracticeHours Field

* NotNull Annotation Has Been Added to StudentLessonAbsenteeismSaveRequest/operationInfoRequest and StudentsLessonAbsenteeismUpdateRequest/operationInfoRequest Fields

* NotNull Annotation Has Been Added to FeatureToggleRequest/operationInfoRequest Field

* NotNull Annotation Has Been Added to operationInfoRequest Field in StudentGraduationSaveRequest, StudentGraduationApproveRequest, StudentGraduationConfirmRequest, StudentGraduationRejectRequest ve StudentGraduationUnconfirmRequest Classes

* NotNull Annotation Has Been Added to operationInfoRequest Field in StudentLessonNoteSaveRequest, StudentsLessonFinalNotesConfirmRequest, StudentsLessonMidtermNotesConfirmRequest, StudentsLessonNoteStatusUpdateRequest and StudentsLessonResitNotesConfirmRequest Classes

* NotNull Annotation Has Been Added to operationInfoRequest Field in StudentsLessonFinalNotesUpdateRequest, StudentsLessonMidtermNotesUpdateRequest and StudentsLessonResitNotesUpdateRequest Classes

* NotNull Annotation Has Been Added to finalNoteIdsAndNotes Field in StudentsLessonFinalNotesUpdateRequest Class

* NotNull Annotation Has Been Added to midtermNoteIdsAndNotes Field in StudentsLessonMidtermNotesUpdateRequest Class

* NotNull Annotation Has Been Added to resitNoteIdsAndNotes Field in StudentsLessonResitNotesUpdateRequest Class
  • Loading branch information
agitrubard authored May 7, 2022
1 parent 27d27cd commit fbe77d7
Show file tree
Hide file tree
Showing 17 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ public class StudentLessonAbsenteeismSaveRequest implements Serializable {
private Integer maxPracticeHours;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.Getter;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serial;
import java.io.Serializable;
Expand All @@ -16,8 +17,10 @@ public class StudentsLessonAbsenteeismUpdateRequest implements Serializable {
private static final long serialVersionUID = -4786087456831453643L;

@NotNull
@NotEmpty
private Map<String, Map<String, Integer>> absenteeismIdsAndTheoreticalHoursAndPracticeHours;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ public class FeatureToggleRequest implements Serializable {
private FeatureToggleName name;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ public class StudentGraduationApproveRequest implements Serializable {
private String graduationId;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ public class StudentGraduationConfirmRequest implements Serializable {
private String graduationId;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ public class StudentGraduationRejectRequest implements Serializable {
private String graduationId;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ public class StudentGraduationSaveRequest implements Serializable {
private Long studentId;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ public class StudentGraduationUnconfirmRequest implements Serializable {
private String graduationId;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.graduationproject.studentinformationsystem.common.util.validation.id.StudentID;
import lombok.Getter;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serial;
import java.io.Serializable;
Expand All @@ -19,5 +20,6 @@ public class StudentLessonRegistrationInfoRequest implements Serializable {
private Long studentId;

@NotNull
@NotEmpty
private List<Long> lessonsIds;
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ public class StudentLessonNoteSaveRequest implements Serializable {
private Long lessonId;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ public class StudentsLessonFinalNotesConfirmRequest implements Serializable {
private List<String> lessonNoteIds;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serial;
import java.io.Serializable;
import java.util.Map;
Expand All @@ -19,9 +20,11 @@ public class StudentsLessonFinalNotesUpdateRequest implements Serializable {
@Serial
private static final long serialVersionUID = 5093920385984058988L;

@NotNull
@NotEmpty
private Map<String, Double> finalNoteIdsAndNotes;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ public class StudentsLessonMidtermNotesConfirmRequest implements Serializable {
private List<String> lessonNoteIds;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serial;
import java.io.Serializable;
import java.util.Map;
Expand All @@ -19,9 +20,11 @@ public class StudentsLessonMidtermNotesUpdateRequest implements Serializable {
@Serial
private static final long serialVersionUID = 5142587290257640755L;

@NotNull
@NotEmpty
private Map<String, Double> midtermNoteIdsAndNotes;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ public class StudentsLessonNoteStatusUpdateRequest implements Serializable {
private StudentLessonNoteStatus status;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ public class StudentsLessonResitNotesConfirmRequest implements Serializable {
private List<String> lessonNoteIds;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serial;
import java.io.Serializable;
import java.util.Map;
Expand All @@ -19,9 +20,11 @@ public class StudentsLessonResitNotesUpdateRequest implements Serializable {
@Serial
private static final long serialVersionUID = 4495180748614571012L;

@NotNull
@NotEmpty
private Map<String, Double> resitNoteIdsAndNotes;

@Valid
@NotNull
private SisOperationInfoRequest operationInfoRequest;
}

0 comments on commit fbe77d7

Please sign in to comment.