Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Данный серверный класс API позволяет расширять функциональность Engine Managementсодержит методы, которые расширяют функциональность Управления механизмами.

getAllEngines()


Используйте этот метод, чтобы получить список всех механизмов.

Возвращаемое значение:

ТипОписание
Array of Strings
Список
Метод возвращает список механизмов в массиве строк.

Пример:

Code Block
languagejs
themeEclipse
titlegetAllEngines
linenumberstrue
ss.importIncludeScript('SimpleEngine'); 
ss.info(SimpleEngine.getAllEngines());

getEngineOption(optionName)

This method returns the engine option by the name specified.

Параметры:


Используйте метод, чтобы получить опцию механизма по указанному имени.

Параметр:

НазваниеТип
NameType
ОбязательныйЗначение по умолчанию
optionNameString
Y
Да
N
Нет

Возвращаемое значение:

Type
ТипОписание
SimpleEngine object
The object containing the engine option
Метод возвращает объект с опцией механизма.

Пример:

Code Block
languagejs
themeEclipse
titlegetEngineOption
linenumberstrue
ss.importIncludeScript('SimpleEngine'); 
const engine = new SimpleEngine('Following Engine')
ss.info(engine.getEngineOption('Active'))

getOptionValueForTable(optionName, tableName)


This method gets the engine option values for the table specifiedИспользуйте этот метод, чтобы получить значения опций механизма для указанной таблицы.

Параметры:

Name
Название
Type
ТипОбязательныйЗначение по умолчанию
optionNameString
Y
Да
N
Нет
tableNameString
Y
Да
N
Нет

Возвращаемое значение:

Type
ТипОписание
String
The engine option value for the table specified
Метод возвращает значение опции механизма для указанной таблицы.

Пример:

Code Block
languagejs
themeEclipse
titlegetOptionValueForTable
linenumberstrue
ss.importIncludeScript('SimpleEngine'); 
const engine = new SimpleEngine('Following Engine')
ss.info(engine.getOptionValueForTable('Active', 'itsm_inquiry')) // TRUEtrue

isEngineEnable(tableName)


This method verifies if the engine is enabled for the table specifiedИспользуйте этот метод, чтобы проверить, включен ли механизм для конкретной таблицы.

Параметры:

Name
Название
Type
ТипОбязательныйЗначение по умолчанию
tableNameString
Y
Да
N
Нет

Возвращаемое значение:

Type
ТипОписание
Boolean
If an engine is enabled for the table is specified, the method returns 'true'; otherwise, it returns 'false'
Метод возвращаетs true, если механизм включен; если нет, то метод возвращает false.

Пример:

Code Block
languagejs
themeEclipse
titleisEngineEnable
linenumberstrue
ss.importIncludeScript('SimpleEngine'); 
const engine = new SimpleEngine('Following Engine')
if (engine.isEngineEnable('itsm_inquiry')) {
  ss.info('Following Engine включен enabledдля onтаблицы itsm_inquiry');
} else {
  ss.info('Following Engine отключен disabledдля onтаблицы itsm_inquiry');
}


Table of Contents
absoluteUrltrue
classfixedPosition