Enum Class KbCapability

java.lang.Object
java.lang.Enum<KbCapability>
ru.bitel.bgbilling.kernel.kb.server.bean.enums.KbCapability
All Implemented Interfaces:
Serializable, Comparable<KbCapability>, Constable

public enum KbCapability extends Enum<KbCapability>
Права на базу знаний в порядке возрастания: ASK < READ < WRITE < MANAGE. Право большего уровня подразумевает все меньшие (MANAGE позволяет и задать вопрос).
  • Enum Constant Details

    • ASK

      public static final KbCapability ASK
      Задать вопрос (получить ответ).
    • READ

      public static final KbCapability READ
      Чтение источников (поиск без LLM).
    • WRITE

      public static final KbCapability WRITE
      Написание/изменение контента.
    • MANAGE

      public static final KbCapability MANAGE
      Управление БЗ: настройки, ACL, sync, удаление (для CUSTOM).
  • Method Details

    • values

      public static KbCapability[] 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 KbCapability 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
    • getLevel

      public int getLevel()
      Уровень права; чем больше, тем шире набор действий.
    • isGranting

      public boolean isGranting(KbCapability required)
      Выдаёт ли это право запрошенное (или более низкое).
    • fromString

      public static KbCapability fromString(String value, KbCapability defaultValue)
      По строке (значение из БД); нераспознано - defaultValue.