ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLuceneIndexer Class Reference
+ Inheritance diagram for ilLuceneIndexer:
+ Collaboration diagram for ilLuceneIndexer:

Public Member Functions

 getId ()
 Get id.
 getTitle ()
 Get title.
 getDescription ()
 Get description.
 getDefaultScheduleType ()
 Get schedule type.
 getDefaultScheduleValue ()
 Get schedule value.
 hasAutoActivation ()
 Is to be activated on "installation".
 hasFlexibleSchedule ()
 Can the schedule be configured?
 run ()
 Run job.
- Public Member Functions inherited from ilCronJob
 isActive ($a_ts_last_run, $a_schedule_type, $a_schedule_value, $a_manual=false)
 Is job currently active?
 getScheduleType ()
 Get current schedule type (if flexible)
 getScheduleValue ()
 Get current schedule value (if flexible)
 setSchedule ($a_type, $a_value)
 Update current schedule (if flexible)
 getValidScheduleTypes ()
 Get all available schedule types.
 isManuallyExecutable ()
 Defines whether or not a cron job can be started manually.
 hasCustomSettings ()
 Has cron job any custom setting which can be edited?
 addCustomSettingsToForm (ilPropertyFormGUI $a_form)
 Add custom settings to form.
 saveCustomSettings (ilPropertyFormGUI $a_form)
 Save custom settings.
 addToExternalSettingsForm ($a_form_id, array &$a_fields, $a_is_active)
 Add external settings to form.
 activationWasToggled ($a_currently_active)
 Cron job status was changed.

Static Public Member Functions

static updateLuceneIndex ($a_obj_ids)
 Update lucene index.

Additional Inherited Members

- Data Fields inherited from ilCronJob
const SCHEDULE_TYPE_DAILY = 1
const SCHEDULE_TYPE_IN_MINUTES = 2
const SCHEDULE_TYPE_IN_HOURS = 3
const SCHEDULE_TYPE_IN_DAYS = 4
const SCHEDULE_TYPE_WEEKLY = 5
const SCHEDULE_TYPE_MONTHLY = 6
const SCHEDULE_TYPE_QUARTERLY = 7
const SCHEDULE_TYPE_YEARLY = 8
- Protected Member Functions inherited from ilCronJob
 checkSchedule ($a_ts_last_run, $a_schedule_type, $a_schedule_value)

Detailed Description

Definition at line 15 of file class.ilLuceneIndexer.php.

Member Function Documentation

ilLuceneIndexer::getDefaultScheduleType ( )

Get schedule type.

Returns
int

Reimplemented from ilCronJob.

Definition at line 36 of file class.ilLuceneIndexer.php.

References ilCronJob\SCHEDULE_TYPE_DAILY.

ilLuceneIndexer::getDefaultScheduleValue ( )

Get schedule value.

Returns
int|array

Reimplemented from ilCronJob.

Definition at line 41 of file class.ilLuceneIndexer.php.

{
return;
}
ilLuceneIndexer::getDescription ( )

Get description.

Returns
string

Reimplemented from ilCronJob.

Definition at line 29 of file class.ilLuceneIndexer.php.

References $lng.

{
global $lng;
return $lng->txt("cron_lucene_index_info");
}
ilLuceneIndexer::getId ( )

Get id.

Returns
string

Reimplemented from ilCronJob.

Definition at line 17 of file class.ilLuceneIndexer.php.

{
return "src_lucene_indexer";
}
ilLuceneIndexer::getTitle ( )

Get title.

Returns
string

Reimplemented from ilCronJob.

Definition at line 22 of file class.ilLuceneIndexer.php.

References $lng.

{
global $lng;
return $lng->txt("cron_lucene_index");
}
ilLuceneIndexer::hasAutoActivation ( )

Is to be activated on "installation".

Returns
boolean

Reimplemented from ilCronJob.

Definition at line 46 of file class.ilLuceneIndexer.php.

{
return false;
}
ilLuceneIndexer::hasFlexibleSchedule ( )

Can the schedule be configured?

Returns
boolean

Reimplemented from ilCronJob.

Definition at line 51 of file class.ilLuceneIndexer.php.

{
return true;
}
ilLuceneIndexer::run ( )

Run job.

Returns
ilCronJobResult

Reimplemented from ilCronJob.

Definition at line 56 of file class.ilLuceneIndexer.php.

References $ilSetting, $result, ilRpcClientFactory\factory(), ilCronJobResult\STATUS_FAIL, ilCronJobResult\STATUS_NO_ACTION, and ilCronJobResult\STATUS_OK.

{
global $ilSetting;
$error_message = null;
try
{
include_once './Services/WebServices/RPC/classes/class.ilRpcClientFactory.php';
ilRpcClientFactory::factory('RPCIndexHandler')->index(
CLIENT_ID.'_'.$ilSetting->get('inst_id',0),
true
);
}
{
$error_message = $e->getMessage();
}
catch(Exception $e)
{
$error_message = $e->getMessage();
}
if($error_message)
{
// #16035 - currently no way to discern the severity of the exception
$result->setMessage($error_message);
}
else
{
}
$result->setStatus($status);
return $result;
}

+ Here is the call graph for this function:

static ilLuceneIndexer::updateLuceneIndex (   $a_obj_ids)
static

Update lucene index.

Parameters
type$a_obj_ids

Definition at line 100 of file class.ilLuceneIndexer.php.

References $GLOBALS, $ilSetting, ilRpcClientFactory\factory(), and ilSearchSettings\getInstance().

Referenced by ilPersonalProfileGUI\saveProfile(), and ilPersonalProfileGUI\savePublicProfile().

{
global $ilSetting;
include_once './Services/Search/classes/class.ilSearchSettings.php';
if(!ilSearchSettings::getInstance()->isLuceneUserSearchEnabled())
{
return false;
}
try
{
include_once './Services/WebServices/RPC/classes/class.ilRpcClientFactory.php';
ilRpcClientFactory::factory('RPCIndexHandler')->indexObjects(
CLIENT_ID.'_'.$ilSetting->get('inst_id',0),
$a_obj_ids
);
}
{
$error_message = $e->getMessage();
$GLOBALS['ilLog']->write(__METHOD__.': '.$e->getMessage());
}
catch(Exception $e)
{
$error_message = $e->getMessage();
$GLOBALS['ilLog']->write(__METHOD__.': '.$e->getMessage());
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: