/**
  * @param integer $obj_id
  * @param string $title
  * @param string $description
  * @param ilDateTime $start_date
  * @param ilDateTime $end_date
  * @param string $instructions
  * @param string $contact_info
  * @param integer $permanent_room
  * @param string $access_level
  * @param integer $read_contents
  * @param integer $read_records
  * @param integer $folder_id
  * @throws ilException
  */
 public function publishCreationAC($obj_id, $title, $description, $start_date, $end_date, $instructions, $contact_info, $permanent_room, $access_level = self::ACCESS_LEVEL_PROTECTED, $read_contents, $read_records, $folder_id)
 {
     /**
      * @var $ilDB   ilDB
      * */
     global $ilDB;
     $owner_id = ilObject::_lookupOwner($obj_id);
     $ownerObj = new ilObjUser($owner_id);
     // receive breeze session
     $session = $this->xmlApi->getBreezeSession();
     if (!$session) {
         throw new ilException('xavc_connection_error');
     }
     // access check
     if (!$this->xmlApi->login($this->adminLogin, $this->adminPass, $session)) {
         throw new ilException('xavc_authentication_error');
     }
     // receive folder id
     $this->externalLogin = $this->checkExternalUser($ownerObj->getId());
     $folder_id = $this->getFolderIdByLogin($this->externalLogin);
     if (!$folder_id) {
         throw new ilException('xavc_folder_not_available');
     }
     $obj_title_suffix_enabled = ilAdobeConnectServer::getSetting('obj_title_suffix');
     if ($obj_title_suffix_enabled) {
         $title = $title . '_' . CLIENT_ID . '_' . $obj_id;
     }
     // create meeting room
     $arr_meeting = $this->xmlApi->addMeeting($title, $description, date('Y-m-d', $start_date->getUnixTime()), date('H:i', $start_date->getUnixTime()), date('Y-m-d', $end_date->getUnixTime()), date('H:i', $end_date->getUnixTime()), $folder_id, $session);
     $meeting_id = $arr_meeting['meeting_id'];
     $meeting_url = $arr_meeting['meeting_url'];
     if (!$meeting_id) {
         throw new ilException('xavc_meeting_creation_error');
     }
     if (ilAdobeConnectServer::getSetting('user_assignment_mode') != ilAdobeConnectServer::ASSIGN_USER_SWITCH) {
         //Normal Case (not SWITCH aai)
         if ($this->externalLogin == NULL) {
             throw new ilException('xavc_external_login_error');
         } else {
             $this->xmlApi->addUser($this->externalLogin, $ownerObj->getEmail(), $ownerObj->getPasswd(), $ownerObj->getFirstName(), $ownerObj->getLastName(), $session);
         }
         $this->xmlApi->updateMeetingParticipant($meeting_id, $this->externalLogin, $session, 'host');
     } else {
         //In the SWITCH aai case, every user already exists thanks to "cave"
         //Add ILIAS-user himself
         $this->xmlApi->addMeetingHost($meeting_id, $ownerObj->getEmail(), $session);
         //Add technical user
         $this->xmlApi->updateMeetingParticipant($meeting_id, ilAdobeConnectServer::getSetting('login'), $session, 'host');
     }
     $this->xmlApi->updatePermission($meeting_id, $session, $access_level);
     $ilDB->insert('rep_robj_xavc_data', array('id' => array('integer', $obj_id), 'sco_id' => array('integer', $meeting_id), 'start_date' => array('integer', $start_date->getUnixTime()), 'end_date' => array('integer', $end_date->getUnixTime()), 'instructions' => array('text', $instructions), 'contact_info' => array('text', $contact_info), 'permanent_room' => array('integer', (int) $permanent_room), 'perm_read_contents' => array('integer', (int) $this->getReadContents()), 'perm_read_records' => array('integer', (int) $this->getReadRecords()), 'folder_id' => array('integer', $folder_id), 'url_path' => array('text', $meeting_url)));
 }