Enum Class RoleEnum

java.lang.Object
java.lang.Enum<RoleEnum>
com.easydesk.enums.RoleEnum
All Implemented Interfaces:
Entitiable<Integer,EasyDeskRole>, Serializable, Comparable<RoleEnum>, Constable

public enum RoleEnum extends Enum<RoleEnum> implements Entitiable<Integer,EasyDeskRole>
System 에서 사용하는 Role 을 id 로 정의한 enum.
Version:
$Revision$, $Date$
Author:
YounghoCho
  • Enum Constant Details

    • ANONYMOUS

      public static final RoleEnum ANONYMOUS
      An anonymous User Role (Not LoggedIn User)
    • GUEST

      public static final RoleEnum GUEST
      A LoggedIn User Role
    • HELPDESK

      public static final RoleEnum HELPDESK
      System User for Notification
    • MEMBER

      public static final RoleEnum MEMBER
      A member who subscribe a group
    • OWNER

      public static final RoleEnum OWNER
      A group owner
    • ADMIN

      public static final RoleEnum ADMIN
      A system admin
    • ROOT

      public static final RoleEnum ROOT
      System 최상위 관리자
    • TESTER

      public static final RoleEnum TESTER
      테스트 용도
  • Method Details

    • values

      public static RoleEnum[] 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

      public static RoleEnum valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getName

      public String getName()
      enum 이름을 CamelCase 로 변환한 role 이름을 구한다. (예: ANONYMOUS → Anonymous)
      Returns:
      role 이름
    • getId

      public Integer getId()
      role id 를 구한다.
      Specified by:
      getId in interface Entitiable<Integer,EasyDeskRole>
      Returns:
      role id
    • represent

      public boolean represent(Role role)
    • getInstance

      public EasyDeskRole getInstance()
      id 에 해당하는 EasyDeskRole 을 구한다.
      Specified by:
      getInstance in interface Entitiable<Integer,EasyDeskRole>
      Returns:
      EasyDeskRole
      Throws:
      RuntimeException - 조회 중 오류가 발생한 경우
    • getGuestRoles

      public Set<RoleEnum> getGuestRoles()
      Guest 성격의 role 들(Anonymous, Guest)을 구한다.
      Returns:
      Anonymous, Guest role Set