00001 <?php
00002
00016
00017
00018 import('log.EventLogConstants');
00019
00020
00021 define('CONFERENCE_LOG_DEFAULT', 0);
00022
00023
00024 define('CONFERENCE_LOG_DEADLINE', 0x10000001);
00025 define('CONFERENCE_LOG_CONFIGURATION', 0x10000002);
00026
00027 class ConferenceEventLogEntry extends DataObject {
00028
00032 function ConferenceEventLogEntry() {
00033 parent::DataObject();
00034 }
00035
00041 function setLogMessage($key, $params = array()) {
00042 $this->setMessage($key);
00043 $this->setEntryParams($params);
00044 }
00045
00046
00047
00048
00049
00054 function getLogId() {
00055 return $this->getData('logId');
00056 }
00057
00062 function setLogId($logId) {
00063 return $this->setData('logId', $logId);
00064 }
00065
00070 function getConferenceId() {
00071 return $this->getData('conferenceId');
00072 }
00073
00078 function setConferenceId($conferenceId) {
00079 return $this->setData('conferenceId', $conferenceId);
00080 }
00081
00086 function getSchedConfId() {
00087 return $this->getData('schedConfId');
00088 }
00089
00094 function setSchedConfId($schedConfId) {
00095 return $this->setData('schedConfId', $schedConfId);
00096 }
00097
00102 function getConferenceTitle() {
00103 return $this->getData('conferenceTitle');
00104 }
00105
00110 function setConferenceTitle($conferenceTitle) {
00111 return $this->setData('conferenceTitle', $conferenceTitle);
00112 }
00113
00118 function getSchedConfTitle() {
00119 return $this->getData('schedConfTitle');
00120 }
00121
00126 function setSchedConfTitle($schedConfTitle) {
00127 return $this->setData('schedConfTitle', $schedConfTitle);
00128 }
00129
00134 function getUserId() {
00135 return $this->getData('userId');
00136 }
00137
00142 function setUserId($userId) {
00143 return $this->setData('userId', $userId);
00144 }
00145
00150 function getDateLogged() {
00151 return $this->getData('dateLogged');
00152 }
00153
00158 function setDateLogged($dateLogged) {
00159 return $this->setData('dateLogged', $dateLogged);
00160 }
00161
00166 function getIPAddress() {
00167 return $this->getData('ipAddress');
00168 }
00169
00174 function setIPAddress($ipAddress) {
00175 return $this->setData('ipAddress', $ipAddress);
00176 }
00177
00182 function getLogLevel() {
00183 return $this->getData('logLevel');
00184 }
00185
00190 function setLogLevel($logLevel) {
00191 return $this->setData('logLevel', $logLevel);
00192 }
00193
00198 function getEventType() {
00199 return $this->getData('eventType');
00200 }
00201
00206 function setEventType($eventType) {
00207 return $this->setData('eventType', $eventType);
00208 }
00209
00214 function getAssocType() {
00215 return $this->getData('assocType');
00216 }
00217
00222 function setAssocType($assocType) {
00223 return $this->setData('assocType', $assocType);
00224 }
00225
00230 function getAssocId() {
00231 return $this->getData('assocId');
00232 }
00233
00238 function setAssocId($assocId) {
00239 return $this->setData('assocId', $assocId);
00240 }
00241
00246 function getIsTranslated() {
00247 return $this->getData('isTranslated');
00248 }
00249
00257 function setIsTranslated($isTranslated) {
00258 return $this->setData('isTranslated', $isTranslated);
00259 }
00260
00265 function getEntryParams() {
00266 return $this->getData('entryParams');
00267 }
00268
00273 function getEntryParamsSerialized() {
00274 return serialize($this->getData('entryParams'));
00275 }
00276
00281 function setEntryParams($entryParams = array()) {
00282 return $this->setData('entryParams', $entryParams);
00283 }
00284
00289 function getMessage() {
00290 return $this->getData('message');
00291 }
00292
00297 function setMessage($message) {
00298 return $this->setData('message', $message);
00299 }
00300
00305 function getLogLevelString() {
00306 switch ($this->getData('logLevel')) {
00307 case LOG_LEVEL_INFO:
00308 return 'event.logLevel.info';
00309 case LOG_LEVEL_NOTICE:
00310 return 'event.logLevel.notice';
00311 case LOG_LEVEL_WARNING:
00312 return 'event.logLevel.warning';
00313 case LOG_LEVEL_ERROR:
00314 return 'event.logLevel.error';
00315 default:
00316 return 'event.logLevel.notice';
00317 }
00318 }
00319
00324 function getEventTitle() {
00325 switch ($this->getData('eventType')) {
00326
00327 case CONFERENCE_LOG_CONFIGURATION:
00328 return 'conference.event.general.configuration';
00329 case CONFERENCE_LOG_DEADALINE:
00330 return 'conference.event.general.deadline';
00331
00332 default:
00333 return 'event.general.defaultEvent';
00334 }
00335 }
00336
00341 function getUserFullName() {
00342 $userDao =& DAORegistry::getDAO('UserDAO');
00343 return $userDao->getUserFullName($this->getUserId(), true);
00344 }
00345
00350 function getUserEmail() {
00351 $userDao =& DAORegistry::getDAO('UserDAO');
00352 return $userDao->getUserEmail($this->getUserId(), true);
00353 }
00354
00359 function getAssocTypeString() {
00360 switch ($this->getData('assocType')) {
00361 default:
00362 return 'CON';
00363 }
00364 }
00365
00370 function getAssocTypeLongString() {
00371 switch ($this->getData('assocType')) {
00372 default:
00373 return 'event.logType.conference';
00374 }
00375 }
00376
00377 }
00378
00379 ?>