ILIAS
Release_5_0_x_branch Revision 61816
|
Reads ECS events and stores them in the database. More...
Public Member Functions | |
__construct ($a_server_id) | |
Constructor. | |
getServer () | |
get server setting | |
getEvents () | |
get all events | |
deleteAll () | |
Delete all events. | |
deleteAllEContentEvents (array $a_types) | |
Delete all econtents. | |
refresh () | |
Fetch events from fifo Using fifo public. | |
shift () | |
get and delete the first event entry | |
add ($a_type, $a_id, $a_op) | |
add | |
delete ($a_event_id) | |
delete private | |
read () | |
Read public. |
Static Public Member Functions | |
static | handleImportReset (ilECSSetting $server) |
Reread all imported econtent. | |
static | handleExportReset (ilECSSetting $server) |
Handle export reset. | |
static | deleteServer ($a_server_id) |
Delete by server id ilDB $ilDB. | |
static | deleteByServerId ($a_server_id) |
Data Fields | |
const | TYPE_EXPORTED = 'exported' |
const | TYPE_DIRECTORY_TREES = 'directory_trees' |
const | TYPE_CMS_COURSES = 'courses' |
const | TYPE_CMS_COURSE_MEMBERS = 'course_members' |
const | TYPE_REMOTE_COURSE = 'rcrs' |
const | TYPE_REMOTE_CATEGORY = 'rcat' |
const | TYPE_REMOTE_FILE = 'rfil' |
const | TYPE_REMOTE_GLOSSARY = 'rglo' |
const | TYPE_REMOTE_GROUP = 'rgrp' |
const | TYPE_REMOTE_LEARNING_MODULE = 'rlm' |
const | TYPE_REMOTE_WIKI = 'rwik' |
const | TYPE_REMOTE_TEST = 'rtst' |
const | TYPE_COURSE_URLS = 'course_urls' |
const | TYPE_ENROLMENT_STATUS = 'member_status' |
Protected Member Functions | |
deleteAllExportedEvents () | |
Delete all exported events. |
Static Protected Member Functions | |
static | getEventTypeFromObjectType ($a_obj_type) |
Convert object type to event type. | |
static | getAllEContentTypes () |
All available content types. | |
static | getAllResourceIds (ilECSSetting $server, array $a_types, $a_sender_only=false) |
Get all resource ids by resource type. |
Protected Attributes | |
$log | |
$db | |
$events = array() | |
$econtent_ids = array() |
Private Member Functions | |
writeEventToDB (ilECSEvent $ev) | |
Write event to db. | |
update ($a_type, $a_id, $a_operation) | |
update one entry |
Reads ECS events and stores them in the database.
Definition at line 36 of file class.ilECSEventQueueReader.php.
ilECSEventQueueReader::__construct | ( | $a_server_id | ) |
Constructor.
public
Definition at line 64 of file class.ilECSEventQueueReader.php.
References $ilDB, $ilLog, ilECSSetting\getInstanceByServerId(), and read().
ilECSEventQueueReader::add | ( | $a_type, | |
$a_id, | |||
$a_op | |||
) |
add
public
Definition at line 545 of file class.ilECSEventQueueReader.php.
References $ilDB, $query, $res, and getServer().
ilECSEventQueueReader::delete | ( | $a_event_id | ) |
delete private
int | event id |
Definition at line 594 of file class.ilECSEventQueueReader.php.
References $ilDB, $query, $res, and getServer().
ilECSEventQueueReader::deleteAll | ( | ) |
Delete all events.
public
Definition at line 296 of file class.ilECSEventQueueReader.php.
References $ilDB, $query, $res, and getServer().
ilECSEventQueueReader::deleteAllEContentEvents | ( | array | $a_types | ) |
Delete all econtents.
public
array | $a_types |
Definition at line 312 of file class.ilECSEventQueueReader.php.
References $ilDB, $query, $res, and getServer().
Referenced by handleImportReset().
|
protected |
Delete all exported events.
public
Definition at line 328 of file class.ilECSEventQueueReader.php.
References $ilDB, $query, $res, and getServer().
Referenced by handleExportReset().
|
static |
Definition at line 633 of file class.ilECSEventQueueReader.php.
Referenced by ilECSSetting\delete().
|
static |
Delete by server id ilDB $ilDB.
int | $a_server_id |
Definition at line 389 of file class.ilECSEventQueueReader.php.
Referenced by ilECSSettingsGUI\doDelete().
|
staticprotected |
All available content types.
Definition at line 94 of file class.ilECSEventQueueReader.php.
Referenced by handleExportReset(), and handleImportReset().
|
staticprotected |
Get all resource ids by resource type.
ilECSSetting | $server | |
array | $a_types | |
bool | $a_sender_only |
Definition at line 109 of file class.ilECSEventQueueReader.php.
References ilRemoteObjectBase\getInstanceByEventType().
Referenced by handleExportReset(), and handleImportReset().
ilECSEventQueueReader::getEvents | ( | ) |
get all events
public
Definition at line 286 of file class.ilECSEventQueueReader.php.
|
staticprotected |
Convert object type to event type.
string | $a_obj_type |
Definition at line 83 of file class.ilECSEventQueueReader.php.
Referenced by handleImportReset().
ilECSEventQueueReader::getServer | ( | ) |
get server setting
Definition at line 274 of file class.ilECSEventQueueReader.php.
Referenced by add(), delete(), deleteAll(), deleteAllEContentEvents(), deleteAllExportedEvents(), read(), refresh(), update(), and writeEventToDB().
|
static |
Handle export reset.
Delete exported econtent and create it again
Definition at line 231 of file class.ilECSEventQueueReader.php.
References $GLOBALS, ilECSExport\_deleteEContentIds(), ilECSExport\_getAllEContentIds(), deleteAllExportedEvents(), getAllEContentTypes(), getAllResourceIds(), and ilECSSetting\getServerId().
Referenced by ilECSSettingsGUI\readAll().
|
static |
Reread all imported econtent.
Definition at line 132 of file class.ilECSEventQueueReader.php.
References $GLOBALS, $ilLog, ilObject\_lookupType(), ilECSEvent\CREATED, deleteAllEContentEvents(), ilECSEvent\DESTROYED, getAllEContentTypes(), ilECSImport\getAllImportedRemoteObjects(), getAllResourceIds(), getEventTypeFromObjectType(), ilECSUtils\getPossibleRemoteTypes(), ilECSSetting\getServerId(), and ilECSEvent\UPDATED.
Referenced by ilECSSettingsGUI\readAll().
ilECSEventQueueReader::read | ( | ) |
Read public.
Definition at line 610 of file class.ilECSEventQueueReader.php.
References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and getServer().
Referenced by __construct().
ilECSEventQueueReader::refresh | ( | ) |
Fetch events from fifo Using fifo public.
ilECSConnectorException |
Definition at line 345 of file class.ilECSEventQueueReader.php.
References $GLOBALS, $res, $result, getServer(), and writeEventToDB().
ilECSEventQueueReader::shift | ( | ) |
get and delete the first event entry
public
Definition at line 524 of file class.ilECSEventQueueReader.php.
|
private |
update one entry
private
Definition at line 576 of file class.ilECSEventQueueReader.php.
References $ilDB, $query, $res, and getServer().
|
private |
Write event to db.
Definition at line 401 of file class.ilECSEventQueueReader.php.
References $ilDB, $query, $res, $row, ilECSEvent\CREATED, DB_FETCHMODE_OBJECT, ilECSEvent\DESTROYED, ilECSEvent\getRessourceId(), ilECSEvent\getRessourceType(), getServer(), ilECSEvent\getStatus(), TYPE_CMS_COURSE_MEMBERS, TYPE_CMS_COURSES, TYPE_COURSE_URLS, TYPE_DIRECTORY_TREES, TYPE_ENROLMENT_STATUS, TYPE_REMOTE_CATEGORY, TYPE_REMOTE_COURSE, TYPE_REMOTE_FILE, TYPE_REMOTE_GLOSSARY, TYPE_REMOTE_GROUP, TYPE_REMOTE_LEARNING_MODULE, TYPE_REMOTE_TEST, TYPE_REMOTE_WIKI, and ilECSEvent\UPDATED.
Referenced by refresh().
|
protected |
Definition at line 54 of file class.ilECSEventQueueReader.php.
|
protected |
Definition at line 57 of file class.ilECSEventQueueReader.php.
|
protected |
Definition at line 56 of file class.ilECSEventQueueReader.php.
|
protected |
Definition at line 53 of file class.ilECSEventQueueReader.php.
const ilECSEventQueueReader::TYPE_CMS_COURSE_MEMBERS = 'course_members' |
Definition at line 41 of file class.ilECSEventQueueReader.php.
Referenced by ilECSTaskScheduler\handleEvents(), and writeEventToDB().
const ilECSEventQueueReader::TYPE_CMS_COURSES = 'courses' |
Definition at line 40 of file class.ilECSEventQueueReader.php.
Referenced by ilECSTaskScheduler\handleEvents(), and writeEventToDB().
const ilECSEventQueueReader::TYPE_COURSE_URLS = 'course_urls' |
Definition at line 50 of file class.ilECSEventQueueReader.php.
Referenced by ilECSTaskScheduler\handleEvents(), and writeEventToDB().
const ilECSEventQueueReader::TYPE_DIRECTORY_TREES = 'directory_trees' |
Definition at line 39 of file class.ilECSEventQueueReader.php.
Referenced by ilECSMappingSettingsGUI\dSynchronizeTrees(), ilECSTaskScheduler\handleEvents(), and writeEventToDB().
const ilECSEventQueueReader::TYPE_ENROLMENT_STATUS = 'member_status' |
Definition at line 51 of file class.ilECSEventQueueReader.php.
Referenced by ilECSTaskScheduler\handleEvents(), and writeEventToDB().
const ilECSEventQueueReader::TYPE_EXPORTED = 'exported' |
Definition at line 38 of file class.ilECSEventQueueReader.php.
const ilECSEventQueueReader::TYPE_REMOTE_CATEGORY = 'rcat' |
Definition at line 43 of file class.ilECSEventQueueReader.php.
Referenced by ilRemoteObjectBase\getInstanceByEventType(), ilECSTaskScheduler\handleEvents(), and writeEventToDB().
const ilECSEventQueueReader::TYPE_REMOTE_COURSE = 'rcrs' |
Definition at line 42 of file class.ilECSEventQueueReader.php.
Referenced by ilRemoteObjectBase\getInstanceByEventType(), ilECSTaskScheduler\handleEvents(), and writeEventToDB().
const ilECSEventQueueReader::TYPE_REMOTE_FILE = 'rfil' |
Definition at line 44 of file class.ilECSEventQueueReader.php.
Referenced by ilRemoteObjectBase\getInstanceByEventType(), ilECSTaskScheduler\handleEvents(), and writeEventToDB().
const ilECSEventQueueReader::TYPE_REMOTE_GLOSSARY = 'rglo' |
Definition at line 45 of file class.ilECSEventQueueReader.php.
Referenced by ilRemoteObjectBase\getInstanceByEventType(), ilECSTaskScheduler\handleEvents(), and writeEventToDB().
const ilECSEventQueueReader::TYPE_REMOTE_GROUP = 'rgrp' |
Definition at line 46 of file class.ilECSEventQueueReader.php.
Referenced by ilRemoteObjectBase\getInstanceByEventType(), ilECSTaskScheduler\handleEvents(), and writeEventToDB().
const ilECSEventQueueReader::TYPE_REMOTE_LEARNING_MODULE = 'rlm' |
Definition at line 47 of file class.ilECSEventQueueReader.php.
Referenced by ilRemoteObjectBase\getInstanceByEventType(), ilECSTaskScheduler\handleEvents(), and writeEventToDB().
const ilECSEventQueueReader::TYPE_REMOTE_TEST = 'rtst' |
Definition at line 49 of file class.ilECSEventQueueReader.php.
Referenced by ilRemoteObjectBase\getInstanceByEventType(), ilECSTaskScheduler\handleEvents(), and writeEventToDB().
const ilECSEventQueueReader::TYPE_REMOTE_WIKI = 'rwik' |
Definition at line 48 of file class.ilECSEventQueueReader.php.
Referenced by ilRemoteObjectBase\getInstanceByEventType(), ilECSTaskScheduler\handleEvents(), and writeEventToDB().