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)

The method takes the entry from the sys_import_source tables and imports the entries from the attachment to the table created via the import_set_table_name field of the sys_import_source table. As a result, we get a table with temporary records - an Importset, from which the records import to any other table will be performed.

The record parameter must be the entry from the sys_import_source table.

The testmode parameter is a Boolean parameter. If its value is TRUE, then it will perform the test import and indicate operation status as "test".



Parameter(s):

NameTypeMandatoryDefault Value
recordSimpleRecordYN
testModeBooleanNFALSE


Return:

TypeDescription
VoidThis method does not return a value.


Example:

Code Block
languagejs
themeEclipse
titleimport
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 transform map, which is located in the sys_map_transform table. For this process, the field ratios must be set up in the transformation transform 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 - таблица в которую будет осуществлятсья перенос).


Parameter(s):

NameTypeMandatoryDefault Value
recordSimpleRecordYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

Code Block
languagejs
themeEclipse
titletransform
var imp = new SimpleImport();
imp.transform(current);


testLdapConnection(record)

This method checks the connection to the LDAP server and alerts about the successful connection, or about an error.


record - должен быть сущностью LdapServer или LdapDefinition


Parameter(s):

NameTypeMandatoryDefault Value
recordSimpleRecordYN


Return:

TypeDescription
ArrayReturns array containing description of connection status.


Example:

Code Block
languagejs
themeEclipse
titletestLdapConnection
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.


Parameter(s):

NameTypeMandatoryDefault Value
recordSimpleRecordYN


Return:

TypeDescription
Void

This method does not return a value.


Example:

Code Block
languagejs
themeEclipse
titleimportTransform
var imp = new SimpleImport();
imp.importTransform(current);


Table of Contents
absoluteUrltrue
classfixedPosition