-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGraduationUserDomainExceptionCode.java
More file actions
34 lines (28 loc) · 1.6 KB
/
GraduationUserDomainExceptionCode.java
File metadata and controls
34 lines (28 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package kgu.developers.domain.graduationUser.exception;
import kgu.developers.common.exception.ExceptionCode;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.http.HttpStatus;
import static org.springframework.http.HttpStatus.BAD_REQUEST;
import static org.springframework.http.HttpStatus.CONFLICT;
import static org.springframework.http.HttpStatus.FORBIDDEN;
import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
import static org.springframework.http.HttpStatus.NOT_FOUND;
@Getter
@AllArgsConstructor
public enum GraduationUserDomainExceptionCode implements ExceptionCode {
GRADUATION_USER_NOT_FOUND(NOT_FOUND, "해당 졸업 대상자를 찾을 수 없습니다."),
GRADUATION_USER_MISMATCH(FORBIDDEN, "해당 졸업 대상자로의 접근 권한이 없습니다."),
GRADUATION_USER_ID_DUPLICATED(CONFLICT, "이미 동일한 학번의 졸업 대상자 정보가 존재합니다."),
GRADUATION_USER_EXCEL_GENERATION_FAILED(INTERNAL_SERVER_ERROR, "졸업 대상자 엑셀 파일의 생성 중 오류가 발생했습니다."),
GRADUATION_TYPE_SUBMISSION_PERIOD_CLOSED(BAD_REQUEST, "현재 졸업 방식을 제출하는 기간이 아닙니다."),
GRADUATION_TYPE_NOT_SELECTED(NOT_FOUND, "해당 졸업 대상자는 졸업 방식을 선택하지 않았습니다."),
GRADUATION_USER_SUBMISSION_MISMATCH(BAD_REQUEST, "해당 제출물은 해당 졸업 대상자가 제출하지 않았습니다."),
;
private final HttpStatus status;
private final String message;
@Override
public String getCode() {
return this.name();
}
}