Exemple #1
0
 /**
  * Method for adding or updating the project to the MidCOM indexer service.
  *
  * @param &$dm Datamanager2 instance containing the object
  */
 public function _index_object(&$dm)
 {
     $indexer = new org_openpsa_projects_midcom_indexer($this->_topic);
     return $indexer->index($dm);
 }
Exemple #2
0
 /**
  * Method for adding or updating the task to the MidCOM indexer service.
  *
  * @param &$dm Datamanager2 instance containing the object
  */
 public function _index_object(&$dm)
 {
     //Ugly workaround to http://trac.openpsa2.org/ticket/31
     $this->_object->refresh_status();
     $indexer = new org_openpsa_projects_midcom_indexer($this->_topic);
     return $indexer->index($dm);
 }
Exemple #3
0
 /**
  * Prepare the indexer client
  */
 public function _on_reindex($topic, $config, &$indexer)
 {
     $qb_tasks = org_openpsa_projects_task_dba::new_query_builder();
     $schemadb_tasks = midcom_helper_datamanager2_schema::load_database($config->get('schemadb_task'));
     $qb_projects = org_openpsa_projects_project::new_query_builder();
     $schemadb_projects = midcom_helper_datamanager2_schema::load_database($config->get('schemadb_project'));
     $indexer = new org_openpsa_projects_midcom_indexer($topic, $indexer);
     $indexer->add_query('tasks', $qb_tasks, $schemadb_tasks);
     $indexer->add_query('projects', $qb_projects, $schemadb_projects);
     return $indexer;
 }