Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
This class provides methods that allow importing data from external parties,
import(record, testMode)
record - запись из таблицы sys_import_source
testMode - булево значение. Если true то проведет тестовую загрузку, обозначит статус операции как тестовый.
Метод принимает запись из таблицы sys_import_source и переносит записи из прикрипленного аттача в таблицу, которая была создана через поле import_set_table_name у sys_import_source.
В результате мы получаем таблицу со временными записями - ImportSet(из которого уже будет произведен перенос записей в любую другую таблицу).
Parameter(s):
Name | Type | Mandatory | Default Value |
---|---|---|---|
record | SimpleRecord | Y | N |
testMode | Boolean | N | FALSE |
Return:
Type | Description |
---|---|
Void | This method does not return a value. |
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
var imp = new SimpleImport(); imp.import(current); |
transform(record)
This method transposes entries from the import set to the table. It uses the active transformation map, which is located in the sys_map_transform table. For this process, the field ratios must be set up in the transformation map:
- source - the current import set table;
- target - the target import set table.
The record parameter must be the entry from the sys_import_set table.
Уточнить у Добынды, чего тут и зачем, чтобы расписать подробнее: Для переноса в карте трансформации должны быть настроены соотношения полей (source - таблица текущего импорт сета и target - таблица в которую будет осуществлятсья перенос).Method description
Parameter(s):
Name | Type | Mandatory | Default Value |
---|---|---|---|
record | SimpleRecord | Y | N |
Return:
Type | Description |
---|---|
Void | This method does not return a value. |
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
var imp = new SimpleImport(); imp.transform(current); |
testLdapConnection(record)
Method descriptionrecord - должен быть сущностью LdapServer или LdapDefinition
Метод проверяет подключение к Ldap серверу и выдает сообщение об успешном подключении, либо об ошибке.
Parameter(s):
Name | Type | Mandatory | Default Value |
---|---|---|---|
record | SimpleRecord | Y | N |
Return:
Type | Description |
---|---|
Array | Returns array containing description of connection status. |
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
var imp = new SimpleImport(); var result = imp.testLdapConnection(current); if (result.flash.type === "success") { ss.addInfoMessage(result.flash.message); } if (result.flash.type === "error") { ss.addErrorMessage(result.flash.message); } (edited) |
importTransform(record)
This method is used for the automatic scheduled import.
The record parameter must be the entry from the sys_schedule_import table.
Method gets the record from the sys_schedule_import table and performs import and transform and one time.Method description
Parameter(s):
Name | Type | Mandatory | Default Value |
---|---|---|---|
record | SimpleRecord | Y | N |
Return:
Type | Description | ||
---|---|---|---|
Void | This method does not return a value | Array | Returns array containing description of connection status. |
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
var imp = new SimpleImport(); imp.importTransform(current); |
Table of Contents | ||||
---|---|---|---|---|
|