Enum Class SecurityL10NKey

java.lang.Object
java.lang.Enum<SecurityL10NKey>
com.easydesk.localization.enums.SecurityL10NKey
All Implemented Interfaces:
LocalizableKey, Serializable, Comparable<SecurityL10NKey>, Constable

public enum SecurityL10NKey extends Enum<SecurityL10NKey> implements LocalizableKey
Java 코드에서 쓰는 resource key 모음 (EasyDeskBundle_ko.properties, EasyDeskModuleBundle_ko.properties). bundle 의 key 마다 상수가 하나씩 있고, 상수 이름은 key 를 대문자 + '_' 로 바꾼 것이다 (예: MovedFromItemDescription -> MOVED_FROM_ITEM_DESCRIPTION). toString() 은 실제 bundle key 를 돌려준다.
 service.getString(locale, L10NKey.ACCEPT);                                   // "Accept"
 service.format(new L10NMessage(L10NKey.MOVED_FROM_ITEM_DESCRIPTION, args), locale);
 L10NKey.fromKey("Accept");                                                   // L10NKey.ACCEPT
 
Author:
조 영 호
  • Enum Constant Details

  • Method Details

    • values

      public static SecurityL10NKey[] 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 SecurityL10NKey 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
    • getKey

      public String getKey()
      Returns:
      bundle 의 key (예: "MovedFromItemDescription")
    • toString

      public String toString()
      Overrides:
      toString in class Enum<SecurityL10NKey>
      Returns:
      bundle 의 key
    • fromKey

      public static SecurityL10NKey fromKey(String key)
      bundle key 로 상수를 찾는다.
      Throws:
      IllegalArgumentException - 그런 key 가 없을 때