You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Данный серверный класс API позволяет расширять функциональность Engine Management.


getAllEngines()


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


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

ТипОписание
ArrayСписок механизмов в массиве строк.


Пример:

getAllEngines
ss.importIncludeScript('SimpleEngine'); 
ss.info(SimpleEngine.getAllEngines());

getEngineOption(optionName)


This method returns the engine option by the name specified.

Параметры:

NameTypeОбязательныйЗначение по умолчанию
optionNameStringYN


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

TypeОписание
SimpleEngine objectThe object containing the engine option.


Пример:

getEngineOption
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.


Параметры:

NameTypeОбязательныйЗначение по умолчанию
optionNameStringYN
tableNameStringYN


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

TypeОписание
StringThe engine option value for the table specified.


Пример:

getOptionValueForTable
ss.importIncludeScript('SimpleEngine'); 
const engine = new SimpleEngine('Following Engine')
ss.info(engine.getOptionValueForTable('Active', 'itsm_inquiry')) // TRUE

isEngineEnable(tableName)


This method verifies if the engine is enabled for the table specified.

Параметры:

NameTypeОбязательныйЗначение по умолчанию
tableNameStringYN


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

TypeОписание
BooleanIf an engine is enabled for the table is specified, the method returns 'true'; otherwise, it returns 'false'.


Пример:

isEngineEnable
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');
}

  • No labels