Package inha.dayoook_e.user.domain.enums
Enum Class Role
- All Implemented Interfaces:
Serializable
,Comparable<Role>
,Constable
Role 열거형은 사용자 역할을 정의.
각 역할은 해당 역할에 부여된 권한 세트를 가짐.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionList<org.springframework.security.core.authority.SimpleGrantedAuthority>
역할에 해당하는 권한 리스트를 반환.static Role
Returns the enum constant of this class with the specified name.static Role[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TUTEE
-
ADMIN
-
TUTOR
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getAuthorities
역할에 해당하는 권한 리스트를 반환.권한은 SimpleGrantedAuthority 객체로 변환.
- Returns:
- 역할에 해당하는 권한 리스트
-