Enum Class KbextSetupKeys

java.lang.Object
java.lang.Enum<KbextSetupKeys>
ru.bitel.bgbilling.plugins.kbext.server.bean.enums.KbextSetupKeys
All Implemented Interfaces:
Serializable, Comparable<KbextSetupKeys>, Constable, ParameterMapKey

public enum KbextSetupKeys extends Enum<KbextSetupKeys> implements ParameterMapKey
Настройки плагина «Базы знаний (расширения)».

Ключи и значения по умолчанию живут здесь, а не в настройках сервера: конфигурация плагина хранится в таблице plugin_config и приходит в BGPluginServer.getSetup(). Чтение — через KbextSettings, которая отдаёт дефолт из этого перечисления, когда значения в конфигурации плагина ещё нет.

Три текста у константы разные, и путать их нельзя: getName() — то, что администратор пишет в конфигурации плагина, getTitle() — подпись в панели, getDescription() — текст справки.

Глобальные переключатели ядра (kb.enabled, интервал фоновой синхронизации) — на стороне KbSetupKeys и в этих настройках не дублируются.

  • Enum Constant Details

    • SYNC_ENABLED

      public static final KbextSetupKeys SYNC_ENABLED

      Включение синхронизации

      kbext.sync.enabled=true

      Общее включение операций синхронизации и веб-авторинга плагина; при выключении эти операции отклоняются

    • SYNC_MAX_PARALLEL

      public static final KbextSetupKeys SYNC_MAX_PARALLEL

      Параллельность синхронизации

      kbext.sync.max.parallel=2

      Число одновременных записей документов в локальный RAG при синхронизации; 0 — последовательно

    • SYNC_TIMEOUT_S

      public static final KbextSetupKeys SYNC_TIMEOUT_S

      Таймаут синхронизации

      kbext.sync.timeout.s=60

      Таймаут одной операции синхронизации (партии документов), секунд

    • WEBUI_ALLOWED_ROLES

      public static final KbextSetupKeys WEBUI_ALLOWED_ROLES

      Доступ к веб-авторингу

      kbext.webui.allowed.roles=

      Список id разрешённых договоров через запятую (web-сессия договорная, поэтому именно договоры); пусто — доступна любому договору с правом WRITE на БЗ

    • WEBUI_MAX_DOC_SIZE_B

      public static final KbextSetupKeys WEBUI_MAX_DOC_SIZE_B

      Размер документа

      kbext.webui.max.doc.size.b=1048576

      Максимальный размер загружаемого документа в веб-авторинге, байт; превышение отклоняется

  • Method Details

    • values

      public static KbextSetupKeys[] 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 KbextSetupKeys 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()
      Specified by:
      getName in interface ParameterMapKey
    • getDefaultValue

      public String getDefaultValue()
      Specified by:
      getDefaultValue in interface ParameterMapKey
    • getTitle

      public String getTitle()
      Specified by:
      getTitle in interface ParameterMapKey
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface ParameterMapKey