00001 <?php
00002
00016
00017
00018
00019
00020 define('ARTICLE_EMAIL_TYPE_DEFAULT', 0);
00021 define('ARTICLE_EMAIL_TYPE_AUTHOR', 0x01);
00022 define('ARTICLE_EMAIL_TYPE_EDITOR', 0x02);
00023 define('ARTICLE_EMAIL_TYPE_REVIEW', 0x03);
00024 define('ARTICLE_EMAIL_TYPE_COPYEDIT', 0x04);
00025 define('ARTICLE_EMAIL_TYPE_LAYOUT', 0x05);
00026 define('ARTICLE_EMAIL_TYPE_PROOFREAD', 0x06);
00027
00028
00029
00030
00031
00032
00033 define('ARTICLE_EMAIL_EDITOR_NOTIFY_AUTHOR', 0x30000001);
00034 define('ARTICLE_EMAIL_EDITOR_ASSIGN', 0x30000002);
00035 define('ARTICLE_EMAIL_EDITOR_NOTIFY_AUTHOR_UNSUITABLE', 0x30000003);
00036
00037
00038 define('ARTICLE_EMAIL_REVIEW_NOTIFY_REVIEWER', 0x40000001);
00039 define('ARTICLE_EMAIL_REVIEW_THANK_REVIEWER', 0x40000002);
00040 define('ARTICLE_EMAIL_REVIEW_CANCEL', 0x40000003);
00041 define('ARTICLE_EMAIL_REVIEW_REMIND', 0x40000004);
00042 define('ARTICLE_EMAIL_REVIEW_CONFIRM', 0x40000005);
00043 define('ARTICLE_EMAIL_REVIEW_DECLINE', 0x40000006);
00044 define('ARTICLE_EMAIL_REVIEW_COMPLETE', 0x40000007);
00045 define('ARTICLE_EMAIL_REVIEW_CONFIRM_ACK', 0x40000008);
00046
00047
00048 define('ARTICLE_EMAIL_COPYEDIT_NOTIFY_COPYEDITOR', 0x50000001);
00049 define('ARTICLE_EMAIL_COPYEDIT_NOTIFY_AUTHOR', 0x50000002);
00050 define('ARTICLE_EMAIL_COPYEDIT_NOTIFY_FINAL', 0x50000003);
00051 define('ARTICLE_EMAIL_COPYEDIT_NOTIFY_COMPLETE', 0x50000004);
00052 define('ARTICLE_EMAIL_COPYEDIT_NOTIFY_AUTHOR_COMPLETE', 0x50000005);
00053 define('ARTICLE_EMAIL_COPYEDIT_NOTIFY_FINAL_COMPLETE', 0x50000006);
00054 define('ARTICLE_EMAIL_COPYEDIT_NOTIFY_ACKNOWLEDGE', 0x50000007);
00055 define('ARTICLE_EMAIL_COPYEDIT_NOTIFY_AUTHOR_ACKNOWLEDGE', 0x50000008);
00056 define('ARTICLE_EMAIL_COPYEDIT_NOTIFY_FINAL_ACKNOWLEDGE', 0x50000009);
00057
00058
00059 define('ARTICLE_EMAIL_PROOFREAD_NOTIFY_AUTHOR', 0x60000001);
00060 define('ARTICLE_EMAIL_PROOFREAD_NOTIFY_AUTHOR_COMPLETE', 0x60000002);
00061 define('ARTICLE_EMAIL_PROOFREAD_THANK_AUTHOR', 0x60000003);
00062 define('ARTICLE_EMAIL_PROOFREAD_NOTIFY_PROOFREADER', 0x60000004);
00063 define('ARTICLE_EMAIL_PROOFREAD_NOTIFY_PROOFREADER_COMPLETE', 0x60000005);
00064 define('ARTICLE_EMAIL_PROOFREAD_THANK_PROOFREADER', 0x60000006);
00065 define('ARTICLE_EMAIL_PROOFREAD_NOTIFY_LAYOUTEDITOR', 0x60000007);
00066 define('ARTICLE_EMAIL_PROOFREAD_NOTIFY_LAYOUTEDITOR_COMPLETE', 0x60000008);
00067 define('ARTICLE_EMAIL_PROOFREAD_THANK_LAYOUTEDITOR', 0x60000009);
00068
00069
00070 define('ARTICLE_EMAIL_LAYOUT_NOTIFY_EDITOR', 0x70000001);
00071 define('ARTICLE_EMAIL_LAYOUT_THANK_EDITOR', 0x70000002);
00072 define('ARTICLE_EMAIL_LAYOUT_NOTIFY_COMPLETE', 0x70000003);
00073
00074 class ArticleEmailLogEntry extends DataObject {
00075
00079 function ArticleEmailLogEntry() {
00080 parent::DataObject();
00081 }
00082
00083
00084
00085
00086
00091 function getLogId() {
00092 return $this->getData('logId');
00093 }
00094
00099 function setLogId($logId) {
00100 return $this->setData('logId', $logId);
00101 }
00102
00107 function getArticleId() {
00108 return $this->getData('articleId');
00109 }
00110
00115 function setArticleId($articleId) {
00116 return $this->setData('articleId', $articleId);
00117 }
00118
00123 function getSenderId() {
00124 return $this->getData('senderId');
00125 }
00126
00131 function setSenderId($senderId) {
00132 return $this->setData('senderId', $senderId);
00133 }
00134
00139 function getDateSent() {
00140 return $this->getData('dateSent');
00141 }
00142
00147 function setDateSent($dateSent) {
00148 return $this->setData('dateSent', $dateSent);
00149 }
00150
00155 function getIPAddress() {
00156 return $this->getData('ipAddress');
00157 }
00158
00163 function setIPAddress($ipAddress) {
00164 return $this->setData('ipAddress', $ipAddress);
00165 }
00166
00171 function getEventType() {
00172 return $this->getData('eventType');
00173 }
00174
00179 function setEventType($eventType) {
00180 return $this->setData('eventType', $eventType);
00181 }
00182
00187 function getAssocType() {
00188 return $this->getData('assocType');
00189 }
00190
00195 function setAssocType($assocType) {
00196 return $this->setData('assocType', $assocType);
00197 }
00198
00203 function getAssocId() {
00204 return $this->getData('assocId');
00205 }
00206
00211 function setAssocId($assocId) {
00212 return $this->setData('assocId', $assocId);
00213 }
00214
00219 function getSenderFullName() {
00220 $senderFullName =& $this->getData('senderFullName');
00221
00222 if(!isset($senderFullName)) {
00223 $userDao = &DAORegistry::getDAO('UserDAO');
00224 $senderFullName = $userDao->getUserFullName($this->getSenderId(), true);
00225 }
00226
00227 return $senderFullName ? $senderFullName : '';
00228 }
00229
00234 function getSenderEmail() {
00235 $senderEmail =& $this->getData('senderEmail');
00236
00237 if(!isset($senderEmail)) {
00238 $userDao = &DAORegistry::getDAO('UserDAO');
00239 $senderEmail = $userDao->getUserEmail($this->getSenderId(), true);
00240 }
00241
00242 return $senderEmail ? $senderEmail : '';
00243 }
00244
00249 function getAssocTypeString() {
00250 switch ($this->getData('assocType')) {
00251 case ARTICLE_LOG_TYPE_AUTHOR:
00252 return 'AUT';
00253 case ARTICLE_LOG_TYPE_EDITOR:
00254 return 'EDR';
00255 case ARTICLE_LOG_TYPE_REVIEW:
00256 return 'REV';
00257 case ARTICLE_LOG_TYPE_COPYEDIT:
00258 return 'CPY';
00259 case ARTICLE_LOG_TYPE_LAYOUT:
00260 return 'LYT';
00261 case ARTICLE_LOG_TYPE_PROOFREAD:
00262 return 'PRF';
00263 default:
00264 return 'ART';
00265 }
00266 }
00267
00272 function getAssocTypeLongString() {
00273 switch ($this->getData('assocType')) {
00274 case ARTICLE_LOG_TYPE_AUTHOR:
00275 return 'submission.logType.author';
00276 case ARTICLE_LOG_TYPE_EDITOR:
00277 return 'submission.logType.editor';
00278 case ARTICLE_LOG_TYPE_REVIEW:
00279 return 'submission.logType.review';
00280 case ARTICLE_LOG_TYPE_COPYEDIT:
00281 return 'submission.logType.copyedit';
00282 case ARTICLE_LOG_TYPE_LAYOUT:
00283 return 'submission.logType.layout';
00284 case ARTICLE_LOG_TYPE_PROOFREAD:
00285 return 'submission.logType.proofread';
00286 default:
00287 return 'submission.logType.article';
00288 }
00289 }
00290
00291
00292
00293
00294
00295
00296 function getFrom() {
00297 return $this->getData('from');
00298 }
00299
00300 function setFrom($from) {
00301 return $this->setData('from', $from);
00302 }
00303
00304 function getRecipients() {
00305 return $this->getData('recipients');
00306 }
00307
00308 function setRecipients($recipients) {
00309 return $this->setData('recipients', $recipients);
00310 }
00311
00312 function getCcs() {
00313 return $this->getData('ccs');
00314 }
00315
00316 function setCcs($ccs) {
00317 return $this->setData('ccs', $ccs);
00318 }
00319
00320 function getBccs() {
00321 return $this->getData('bccs');
00322 }
00323
00324 function setBccs($bccs) {
00325 return $this->setData('bccs', $bccs);
00326 }
00327
00328 function getSubject() {
00329 return $this->getData('subject');
00330 }
00331
00332 function setSubject($subject) {
00333 return $this->setData('subject', $subject);
00334 }
00335
00336 function getBody() {
00337 return $this->getData('body');
00338 }
00339
00340 function setBody($body) {
00341 return $this->setData('body', $body);
00342 }
00343
00344 }
00345
00346 ?>