00001 <?php
00002
00016
00017
00018
00019 define('PAPER_EMAIL_TYPE_DEFAULT', 0);
00020 define('PAPER_EMAIL_TYPE_AUTHOR', 0x01);
00021 define('PAPER_EMAIL_TYPE_DIRECTOR', 0x02);
00022 define('PAPER_EMAIL_TYPE_REVIEW', 0x03);
00023
00024
00025
00026
00027
00028
00029 define('PAPER_EMAIL_DIRECTOR_NOTIFY_AUTHOR', 0x30000001);
00030 define('PAPER_EMAIL_DIRECTOR_ASSIGN', 0x30000002);
00031 define('PAPER_EMAIL_DIRECTOR_NOTIFY_AUTHOR_UNSUITABLE', 0x30000003);
00032 define('PAPER_EMAIL_DIRECTOR_NOTIFY_AUTHOR_EXPIRED', 0x30000004);
00033
00034
00035 define('PAPER_EMAIL_REVIEW_NOTIFY_REVIEWER', 0x40000001);
00036 define('PAPER_EMAIL_REVIEW_THANK_REVIEWER', 0x40000002);
00037 define('PAPER_EMAIL_REVIEW_CANCEL', 0x40000003);
00038 define('PAPER_EMAIL_REVIEW_REMIND', 0x40000004);
00039 define('PAPER_EMAIL_REVIEW_CONFIRM', 0x40000005);
00040 define('PAPER_EMAIL_REVIEW_DECLINE', 0x40000006);
00041 define('PAPER_EMAIL_REVIEW_COMPLETE', 0x40000007);
00042 define('PAPER_EMAIL_REVIEW_CONFIRM_ACK', 0x40000008);
00043
00044 class PaperEmailLogEntry extends DataObject {
00045
00049 function PaperEmailLogEntry() {
00050 parent::DataObject();
00051 }
00052
00053
00054
00055
00056
00061 function getLogId() {
00062 return $this->getData('logId');
00063 }
00064
00069 function setLogId($logId) {
00070 return $this->setData('logId', $logId);
00071 }
00072
00077 function getPaperId() {
00078 return $this->getData('paperId');
00079 }
00080
00085 function setPaperId($paperId) {
00086 return $this->setData('paperId', $paperId);
00087 }
00088
00093 function getSenderId() {
00094 return $this->getData('senderId');
00095 }
00096
00101 function setSenderId($senderId) {
00102 return $this->setData('senderId', $senderId);
00103 }
00104
00109 function getDateSent() {
00110 return $this->getData('dateSent');
00111 }
00112
00117 function setDateSent($dateSent) {
00118 return $this->setData('dateSent', $dateSent);
00119 }
00120
00125 function getIPAddress() {
00126 return $this->getData('ipAddress');
00127 }
00128
00133 function setIPAddress($ipAddress) {
00134 return $this->setData('ipAddress', $ipAddress);
00135 }
00136
00141 function getEventType() {
00142 return $this->getData('eventType');
00143 }
00144
00149 function setEventType($eventType) {
00150 return $this->setData('eventType', $eventType);
00151 }
00152
00157 function getAssocType() {
00158 return $this->getData('assocType');
00159 }
00160
00165 function setAssocType($assocType) {
00166 return $this->setData('assocType', $assocType);
00167 }
00168
00173 function getAssocId() {
00174 return $this->getData('assocId');
00175 }
00176
00181 function setAssocId($assocId) {
00182 return $this->setData('assocId', $assocId);
00183 }
00184
00189 function getSenderFullName() {
00190 static $senderFullName;
00191
00192 if(!isset($senderFullName)) {
00193 $userDao =& DAORegistry::getDAO('UserDAO');
00194 $senderFullName = $userDao->getUserFullName($this->getSenderId(), true);
00195 }
00196
00197 return $senderFullName ? $senderFullName : '';
00198 }
00199
00204 function getSenderEmail() {
00205 static $senderEmail;
00206
00207 if(!isset($senderEmail)) {
00208 $userDao =& DAORegistry::getDAO('UserDAO');
00209 $senderEmail = $userDao->getUserEmail($this->getSenderId(), true);
00210 }
00211
00212 return $senderEmail ? $senderEmail : '';
00213 }
00214
00219 function getAssocTypeString() {
00220 switch ($this->getData('assocType')) {
00221 case LOG_TYPE_AUTHOR:
00222 return 'AUT';
00223 case LOG_TYPE_DIRECTOR:
00224 return 'DIR';
00225 case LOG_TYPE_REVIEW:
00226 return 'REV';
00227 default:
00228 return 'ART';
00229 }
00230 }
00231
00236 function getAssocTypeLongString() {
00237 switch ($this->getData('assocType')) {
00238 case LOG_TYPE_AUTHOR:
00239 return 'event.logType.author';
00240 case LOG_TYPE_DIRECTOR:
00241 return 'event.logType.director';
00242 case LOG_TYPE_REVIEW:
00243 return 'event.logType.review';
00244 default:
00245 return 'event.logType.paper';
00246 }
00247 }
00248
00249
00250
00251
00252
00253
00254 function getFrom() {
00255 return $this->getData('from');
00256 }
00257
00258 function setFrom($from) {
00259 return $this->setData('from', $from);
00260 }
00261
00262 function getRecipients() {
00263 return $this->getData('recipients');
00264 }
00265
00266 function setRecipients($recipients) {
00267 return $this->setData('recipients', $recipients);
00268 }
00269
00270 function getCcs() {
00271 return $this->getData('ccs');
00272 }
00273
00274 function setCcs($ccs) {
00275 return $this->setData('ccs', $ccs);
00276 }
00277
00278 function getBccs() {
00279 return $this->getData('bccs');
00280 }
00281
00282 function setBccs($bccs) {
00283 return $this->setData('bccs', $bccs);
00284 }
00285
00286 function getSubject() {
00287 return $this->getData('subject');
00288 }
00289
00290 function setSubject($subject) {
00291 return $this->setData('subject', $subject);
00292 }
00293
00294 function getBody() {
00295 return $this->getData('body');
00296 }
00297
00298 function setBody($body) {
00299 return $this->setData('body', $body);
00300 }
00301
00302 }
00303
00304 ?>