Open Journal Systems  3.3.0
PLNPlugin.inc.php
1 <?php
2 
14 import('lib.pkp.classes.plugins.GenericPlugin');
15 import('lib.pkp.classes.config.Config');
16 import('classes.publication.Publication');
17 import('classes.issue.Issue');
18 
19 define('PLN_PLUGIN_NAME', 'plnplugin');
20 
21 // defined here in case an upgrade doesn't pick up the default value.
22 define('PLN_DEFAULT_NETWORK', 'http://pkp-pln.lib.sfu.ca');
23 
24 define('PLN_DEFAULT_STATUS_SUFFIX', '/docs/status');
25 
26 define('PLN_PLUGIN_HTTP_STATUS_OK', 200);
27 define('PLN_PLUGIN_HTTP_STATUS_CREATED', 201);
28 
29 define('PLN_PLUGIN_XML_NAMESPACE', 'http://pkp.sfu.ca/SWORD');
30 
31 // base IRI for the SWORD server. IRIs are constructed by appending to
32 // this constant.
33 define('PLN_PLUGIN_BASE_IRI', '/api/sword/2.0');
34 // used to retrieve the service document
35 define('PLN_PLUGIN_SD_IRI', PLN_PLUGIN_BASE_IRI . '/sd-iri');
36 // used to submit a deposit
37 define('PLN_PLUGIN_COL_IRI', PLN_PLUGIN_BASE_IRI . '/col-iri');
38 // used to edit and query the state of a deposit
39 define('PLN_PLUGIN_CONT_IRI', PLN_PLUGIN_BASE_IRI . '/cont-iri');
40 
41 define('PLN_PLUGIN_ARCHIVE_FOLDER', 'pln');
42 
43 // local statuses
44 define('PLN_PLUGIN_DEPOSIT_STATUS_NEW', 0x00);
45 define('PLN_PLUGIN_DEPOSIT_STATUS_PACKAGED', 0x01);
46 define('PLN_PLUGIN_DEPOSIT_STATUS_TRANSFERRED', 0x02);
47 define('PLN_PLUGIN_DEPOSIT_STATUS_PACKAGING_FAILED', 0x200);
48 
49 // status on the processing server
50 define('PLN_PLUGIN_DEPOSIT_STATUS_RECEIVED', 0x04);
51 define('PLN_PLUGIN_DEPOSIT_STATUS_VALIDATED', 0x08); // was SYNCING
52 define('PLN_PLUGIN_DEPOSIT_STATUS_SENT', 0x10); // was SYNCED
53 
54 // status in the LOCKSS PLN
55 define('PLN_PLUGIN_DEPOSIT_STATUS_LOCKSS_RECEIVED', 0x20); // was REMOTE_FAILURE
56 define('PLN_PLUGIN_DEPOSIT_STATUS_LOCKSS_SYNCING', 0x40); // was LOCAL_FAILURE
57 define('PLN_PLUGIN_DEPOSIT_STATUS_LOCKSS_AGREEMENT', 0x80); // was UPDATE
58 
59 define('PLN_PLUGIN_DEPOSIT_STATUS_UPDATE', 0x100);
60 
61 define('PLN_PLUGIN_DEPOSIT_OBJECT_SUBMISSION', 'Submission');
62 define('PLN_PLUGIN_DEPOSIT_OBJECT_ISSUE', 'Issue');
63 
64 define('PLN_PLUGIN_NOTIFICATION_TYPE_PLUGIN_BASE', NOTIFICATION_TYPE_PLUGIN_BASE + 0x10000000);
65 define('PLN_PLUGIN_NOTIFICATION_TYPE_TERMS_UPDATED', PLN_PLUGIN_NOTIFICATION_TYPE_PLUGIN_BASE + 0x0000001);
66 define('PLN_PLUGIN_NOTIFICATION_TYPE_ISSN_MISSING', PLN_PLUGIN_NOTIFICATION_TYPE_PLUGIN_BASE + 0x0000002);
67 define('PLN_PLUGIN_NOTIFICATION_TYPE_HTTP_ERROR', PLN_PLUGIN_NOTIFICATION_TYPE_PLUGIN_BASE + 0x0000003);
68 // define('PLN_PLUGIN_NOTIFICATION_TYPE_CURL_MISSING', PLN_PLUGIN_NOTIFICATION_TYPE_PLUGIN_BASE + 0x0000004); DEPRECATED
69 define('PLN_PLUGIN_NOTIFICATION_TYPE_ZIP_MISSING', PLN_PLUGIN_NOTIFICATION_TYPE_PLUGIN_BASE + 0x0000005);
70 define('PLN_PLUGIN_NOTIFICATION_TYPE_TAR_MISSING', PLN_PLUGIN_NOTIFICATION_TYPE_PLUGIN_BASE + 0x0000006);
71 
72 class PLNPlugin extends GenericPlugin {
76  public function register($category, $path, $mainContextId = null) {
77  if (!parent::register($category, $path, $mainContextId)) return false;
78  if ($this->getEnabled()) {
79  $this->registerDAOs();
80  $this->import('classes.Deposit');
81  $this->import('classes.DepositObject');
82  $this->import('classes.DepositPackage');
83 
84  HookRegistry::register('PluginRegistry::loadCategory', array($this, 'callbackLoadCategory'));
85  HookRegistry::register('JournalDAO::deleteJournalById', array($this, 'callbackDeleteJournalById'));
86  HookRegistry::register('LoadHandler', array($this, 'callbackLoadHandler'));
87  HookRegistry::register('NotificationManager::getNotificationContents', array($this, 'callbackNotificationContents'));
88  HookRegistry::register('LoadComponentHandler', array($this, 'setupComponentHandlers'));
89  }
90 
91  HookRegistry::register('AcronPlugin::parseCronTab', array($this, 'callbackParseCronTab'));
92  return true;
93  }
94 
100  public function setupComponentHandlers($hookName, $params) {
101  $component = $params[0];
102  switch ($component) {
103  case 'plugins.generic.pln.controllers.grid.PLNStatusGridHandler':
104  // Allow the PLN status grid handler to get the plugin object
105  import($component);
106  $componentPieces = explode('.', $component);
107  $className = array_pop($componentPieces);
108  $className::setPlugin($this);
109  return true;
110  }
111  return false;
112  }
113 
117  public function getActions($request, $verb) {
118  $router = $request->getRouter();
119  import('lib.pkp.classes.linkAction.request.AjaxModal');
120  return array_merge(
121  $this->getEnabled()?array(
122  new LinkAction(
123  'settings',
124  new AjaxModal(
125  $router->url($request, null, null, 'manage', null, array('verb' => 'settings', 'plugin' => $this->getName(), 'category' => 'generic')),
126  $this->getDisplayName()
127  ),
128  __('manager.plugins.settings'),
129  null
130  ),
131  new LinkAction(
132  'status',
133  new AjaxModal(
134  $router->url($request, null, null, 'manage', null, array('verb' => 'status', 'plugin' => $this->getName(), 'category' => 'generic')),
135  $this->getDisplayName()
136  ),
137  __('common.status'),
138  null
139  )
140  ):array(),
141  parent::getActions($request, $verb)
142  );
143  }
144 
148  public function registerDAOs() {
149 
150  $this->import('classes.DepositDAO');
151  $this->import('classes.DepositObjectDAO');
152 
153  $depositDao = new DepositDAO();
154  DAORegistry::registerDAO('DepositDAO', $depositDao);
155 
156  $depositObjectDao = new DepositObjectDAO();
157  DAORegistry::registerDAO('DepositObjectDAO', $depositObjectDao);
158  }
159 
163  public function getDisplayName() {
164  return __('plugins.generic.pln');
165  }
166 
170  public function getDescription() {
171  return __('plugins.generic.pln.description');
172  }
173 
177  public function getInstallSchemaFile() {
178  return $this->getPluginPath() . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'schema.xml';
179  }
180 
184  function getInstallDataFile() {
185  return $this->getPluginPath() . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'data.xml';
186  }
187 
191  public function getHandlerPath() {
192  return $this->getPluginPath() . DIRECTORY_SEPARATOR . 'pages';
193  }
194 
199  return $this->getPluginPath() . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'settings.xml';
200  }
201 
207  public function getSetting($journalId, $settingName) {
208  // if there isn't a journal_uuid, make one
209  switch ($settingName) {
210  case 'journal_uuid':
211  $uuid = parent::getSetting($journalId, $settingName);
212  if (!is_null($uuid) && $uuid != '')
213  return $uuid;
214  $this->updateSetting($journalId, $settingName, $this->newUUID());
215  break;
216  case 'object_type':
217  $type = parent::getSetting($journalId, $settingName);
218  if( ! is_null($type))
219  return $type;
220  $this->updateSetting($journalId, $settingName, PLN_PLUGIN_DEPOSIT_OBJECT_ISSUE);
221  break;
222  case 'pln_network':
223  return Config::getVar('lockss', 'pln_url', PLN_DEFAULT_NETWORK);
224  case 'pln_status_docs':
225  return Config::getVar('lockss', 'pln_status_docs', Config::getVar('lockss', 'pln_url', PLN_DEFAULT_NETWORK) . PLN_DEFAULT_STATUS_SUFFIX);
226  }
227  return parent::getSetting($journalId, $settingName);
228  }
229 
235  public function callbackLoadCategory($hookName, $args) {
236  $category =& $args[0];
237  $plugins =& $args[1];
238  switch ($category) {
239  case 'gateways':
240  $this->import('PLNGatewayPlugin');
241  $gatewayPlugin = new PLNGatewayPlugin($this->getName());
242  $plugins[$gatewayPlugin->getSeq()][$gatewayPlugin->getPluginPath()] =& $gatewayPlugin;
243  break;
244  }
245 
246  return false;
247  }
248 
255  public function callbackDeleteJournalById($hookName, $params) {
256  $journalId = $params[1];
257  $depositDao = DAORegistry::getDAO('DepositDAO');
258  $depositDao->deleteByJournalId($journalId);
259  $depositObjectDao = DAORegistry::getDAO('DepositObjectDAO');
260  $depositObjectDao->deleteByJournalId($journalId);
261  return false;
262  }
263 
267  public function callbackParseCronTab($hookName, $args) {
268  $taskFilesPath =& $args[0];
269  $taskFilesPath[] = $this->getPluginPath() . '/xml/scheduledTasks.xml';
270  return false;
271  }
272 
279  public function callbackNotificationContents($hookName, $args) {
280  $notification = $args[0];
281  $message = $args[1];
282 
283  $type = $notification->getType();
284  assert(isset($type));
285  switch ($type) {
286  case PLN_PLUGIN_NOTIFICATION_TYPE_TERMS_UPDATED:
287  $message = __('plugins.generic.pln.notifications.terms_updated');
288  break;
289  case PLN_PLUGIN_NOTIFICATION_TYPE_ISSN_MISSING:
290  $message = __('plugins.generic.pln.notifications.issn_missing');
291  break;
292  case PLN_PLUGIN_NOTIFICATION_TYPE_HTTP_ERROR:
293  $message = __('plugins.generic.pln.notifications.http_error');
294  break;
295  }
296  }
297 
301  public function callbackLoadHandler($hookName, $args) {
302  $page =& $args[0];
303  if ($page == 'pln') {
304  $op = $args[1];
305  if ($op) {
306  if (in_array($op, array('deposits'))) {
307  define('HANDLER_CLASS', 'PLNHandler');
308  AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON);
309  $handlerFile =& $args[2];
310  $handlerFile = $this->getHandlerPath() . '/' . 'PLNHandler.inc.php';
311  }
312  }
313  }
314  }
315 
319  public function manage($args, $request) {
320  $journal = $request->getJournal();
321 
322  switch($request->getUserVar('verb')) {
323  case 'settings':
324  $context = $request->getContext();
325  AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_PKP_MANAGER);
326  $this->import('classes.form.PLNSettingsForm');
327  $form = new PLNSettingsForm($this, $context->getId());
328 
329  if ($request->getUserVar('refresh')) {
330  $this->getServiceDocument($context->getId(), $request);
331  } else {
332  if ($request->getUserVar('save')) {
333 
334  $form->readInputData();
335  if ($form->validate()) {
336  $form->execute();
337 
338  // Add notification: Changes saved
339  $notificationContent = __('plugins.generic.pln.settings.saved');
340  $currentUser = $request->getUser();
341  $notificationMgr = new NotificationManager();
342  $notificationMgr->createTrivialNotification($currentUser->getId(), NOTIFICATION_TYPE_SUCCESS, array('contents' => $notificationContent));
343 
344  return new JSONMessage(true);
345  }
346  }
347  }
348 
349  $form->initData();
350 
351  return new JSONMessage(true, $form->fetch($request));
352  case 'status':
353  $depositDao = DAORegistry::getDAO('DepositDAO');
354 
355  $context = $request->getContext();
356  AppLocale::requireComponents(LOCALE_COMPONENT_APP_COMMON, LOCALE_COMPONENT_PKP_MANAGER);
357  $this->import('classes.form.PLNStatusForm');
358  $form = new PLNStatusForm($this, $context->getId());
359 
360  if ($request->getUserVar('reset')) {
361  $deposit_ids = array_keys($request->getUserVar('reset'));
362  $depositDao = DAORegistry::getDAO('DepositDAO');
363  foreach ($deposit_ids as $deposit_id) {
364  $deposit = $depositDao->getById($deposit_id);
365  $deposit->setStatus(PLN_PLUGIN_DEPOSIT_STATUS_NEW);
366  $depositDao->updateObject($deposit);
367  }
368  }
369 
370  return new JSONMessage(true, $form->fetch($request));
371  case 'enable':
372  if(!@include_once('Archive/Tar.php')) {
373  $message = NOTIFICATION_TYPE_ERROR;
374  $messageParams = array('contents' => __('plugins.generic.pln.notifications.archive_tar_missing'));
375  break;
376  }
377 
378  if(!$this->zipInstalled()) {
379  $message = NOTIFICATION_TYPE_ERROR;
380  $messageParams = array('contents' => __('plugins.generic.pln.notifications.zip_missing'));
381  break;
382  }
383  if(!$this->tarInstalled()) {
384  $message = NOTIFICATION_TYPE_ERROR;
385  $messageParams = array('contents' => __('plugins.generic.pln.notifications.tar_missing'));
386  break;
387  }
388  $message = NOTIFICATION_TYPE_SUCCESS;
389  $messageParams = array('contents' => __('plugins.generic.pln.enabled'));
390  $this->updateSetting($journal->getId(), 'enabled', true);
391  break;
392  case 'disable':
393  $message = NOTIFICATION_TYPE_SUCCESS;
394  $messageParams = array('contents' => __('plugins.generic.pln.disabled'));
395  $this->updateSetting($journal->getId(), 'enabled', false);
396  break;
397  default:
398  return parent::manage($verb, $args, $message, $messageParams);
399  }
400 
401  }
402 
406  public function getManagementVerbs() {
407  $verbs = parent::getManagementVerbs();
408  if ($this->getEnabled()) {
409  $verbs[] = array('settings', __('plugins.generic.pln.settings'));
410  $verbs[] = array('status', __('plugins.generic.pln.status'));
411  }
412  return $verbs;
413  }
414 
421  public function termsAgreed($journalId) {
422 
423  $terms = unserialize($this->getSetting($journalId, 'terms_of_use'));
424  $termsAgreed = unserialize($this->getSetting($journalId, 'terms_of_use_agreement'));
425 
426  foreach (array_keys($terms) as $term) {
427  if (!isset($termsAgreed[$term]) || (!$termsAgreed[$term]))
428  return false;
429  }
430 
431  return true;
432  }
433 
439  public function getServiceDocument($contextId) {
441  $request = $application->getRequest();
442  $contextDao = Application::getContextDAO();
443  $context = $contextDao->getById($contextId);
444 
445  // get the journal and determine the language.
446  $locale = $context->getPrimaryLocale();
447  $language = strtolower(str_replace('_', '-', $locale));
448  $network = $this->getSetting($context->getId(), 'pln_network');
450  $dispatcher = $application->getDispatcher();
451 
452  // retrieve the service document
453  $result = $this->curlGet(
454  $network . PLN_PLUGIN_SD_IRI,
455  [
456  'On-Behalf-Of' => $this->getSetting($contextId, 'journal_uuid'),
457  'Journal-URL' => $dispatcher->url($request, ROUTE_PAGE, $context->getPath()),
458  'Accept-language' => $language,
459  ]
460  );
461 
462  // stop here if we didn't get an OK
463  if ($result['status'] != PLN_PLUGIN_HTTP_STATUS_OK) {
464  if($result['status'] === FALSE) {
465  error_log(__('plugins.generic.pln.error.network.servicedocument', array('error' => $result['error'])));
466  } else {
467  error_log(__('plugins.generic.pln.error.http.servicedocument', array('error' => $result['status'])));
468  }
469  return $result['status'];
470  }
471 
472  $serviceDocument = new DOMDocument();
473  $serviceDocument->preserveWhiteSpace = false;
474  $serviceDocument->loadXML($result['result']);
475 
476  // update the max upload size
477  $element = $serviceDocument->getElementsByTagName('maxUploadSize')->item(0);
478  $this->updateSetting($contextId, 'max_upload_size', $element->nodeValue);
479 
480  // update the checksum type
481  $element = $serviceDocument->getElementsByTagName('uploadChecksumType')->item(0);
482  $this->updateSetting($contextId, 'checksum_type', $element->nodeValue);
483 
484  // update the network status
485  $element = $serviceDocument->getElementsByTagName('pln_accepting')->item(0);
486  $this->updateSetting($contextId, 'pln_accepting', (($element->getAttribute('is_accepting') == 'Yes') ? true : false));
487  $this->updateSetting($contextId, 'pln_accepting_message', $element->nodeValue);
488 
489  // update the terms of use
490  $termElements = $serviceDocument->getElementsByTagName('terms_of_use')->item(0)->childNodes;
491  $terms = array();
492  foreach($termElements as $termElement) {
493  $terms[$termElement->tagName] = array('updated' => $termElement->getAttribute('updated'), 'term' => $termElement->nodeValue);
494  }
495 
496  $newTerms = serialize($terms);
497  $oldTerms = $this->getSetting($contextId,'terms_of_use');
498 
499  // if the new terms don't match the exiting ones we need to reset agreement
500  if ($newTerms != $oldTerms) {
501  $termAgreements = array();
502  foreach($terms as $termName => $termText) {
503  $termAgreements[$termName] = null;
504  }
505 
506  $this->updateSetting($contextId, 'terms_of_use', $newTerms, 'object');
507  $this->updateSetting($contextId, 'terms_of_use_agreement', serialize($termAgreements), 'object');
508  $this->createJournalManagerNotification($contextId, PLN_PLUGIN_NOTIFICATION_TYPE_TERMS_UPDATED);
509  }
510 
511  return $result['status'];
512  }
513 
519  public function createJournalManagerNotification($contextId, $notificationType) {
520  $roleDao = DAORegistry::getDAO('RoleDAO');
521  $journalManagers = $roleDao->getUsersByRoleId(ROLE_ID_MANAGER, $contextId);
522  import('classes.notification.NotificationManager');
523  $notificationManager = new NotificationManager();
524  // TODO: this currently gets sent to all journal managers - perhaps only limit to the technical contact's account?
525  while ($journalManager = $journalManagers->next()) {
526  $notificationManager->createTrivialNotification($journalManager->getId(), $notificationType);
527  unset($journalManager);
528  }
529  }
530 
535  public function zipInstalled() {
536  return class_exists('ZipArchive');
537  }
538 
545  public function tarInstalled() {
546  @include_once('Archive/Tar.php');
547  return class_exists('Archive_Tar');
548  }
549 
556  public function cronEnabled() {
558  $products = $application->getEnabledProducts('plugins.generic');
559  return isset($products['acron']) || Config::getVar('general', 'scheduled_tasks', false);
560  }
561 
568  public function curlGet($url, $headers=[]) {
569  $httpClient = Application::get()->getHttpClient();
570  try {
571  $response = $httpClient->request('GET', $url, [
572  'headers' => $headers,
573  ]);
574  } catch (GuzzleHttp\Exception\RequestException $e) {
575  return ['error' => $e->getMessage(), 'status' => null];
576  }
577  return array(
578  'status' => $response->getStatusCode(),
579  'result' => (string) $response->getBody(),
580  );
581  }
582 
589  public function curlPostFile($url, $filename) {
590  return $this->_sendFile('POST', $url, $filename);
591  }
592 
599  public function curlPutFile($url, $filename) {
600  return $this->_sendFile('PUT', $url, $filename);
601  }
602 
607  public function newUUID() {
608  return PKPString::generateUUID();
609  }
610 
618  protected function _sendFile($method, $url, $filename) {
619  $httpClient = Application::get()->getHttpClient();
620  try {
621  $response = $httpClient->request($method, $url, [
622  'headers' => array_merge($headers, [
623  'Content-Type' => mime_content_type($filename),
624  'Content-Length' => filesize($filename),
625  ]),
626  'body' => fopen($filename, 'r'),
627  ]);
628  } catch (GuzzleHttp\Exception\RequestException $e) {
629  return ['error' => $e->getMessage()];
630  }
631  return array(
632  'status' => $response->getStatusCode(),
633  'result' => (string) $response->getBody(),
634  );
635  }
636 }
PLNPlugin\getDisplayName
getDisplayName()
Definition: PLNPlugin.inc.php:163
GuzzleHttp
Definition: vendor/guzzlehttp/guzzle/src/Client.php:2
Application\getContextDAO
static getContextDAO()
Definition: Application.inc.php:137
$op
$op
Definition: lib/pkp/pages/help/index.php:18
AppLocale\requireComponents
static requireComponents()
Definition: env1/MockAppLocale.inc.php:56
Plugin\updateSetting
updateSetting($contextId, $name, $value, $type=null)
Definition: Plugin.inc.php:495
$application
$application
Definition: index.php:65
PLNPlugin\curlGet
curlGet($url, $headers=[])
Definition: PLNPlugin.inc.php:568
PLNStatusForm
Form for journal managers to check PLN plugin status.
Definition: PLNStatusForm.inc.php:16
DAORegistry\getDAO
static & getDAO($name, $dbconn=null)
Definition: DAORegistry.inc.php:57
PLNPlugin\tarInstalled
tarInstalled()
Definition: PLNPlugin.inc.php:545
PLNPlugin\callbackParseCronTab
callbackParseCronTab($hookName, $args)
Definition: PLNPlugin.inc.php:267
PLNSettingsForm
Form for journal managers to modify PLN plugin settings.
Definition: PLNSettingsForm.inc.php:15
PLNPlugin\getServiceDocument
getServiceDocument($contextId)
Definition: PLNPlugin.inc.php:439
PLNPlugin\manage
manage($args, $request)
Definition: PLNPlugin.inc.php:319
PLNPlugin\zipInstalled
zipInstalled()
Definition: PLNPlugin.inc.php:535
PLNPlugin\getHandlerPath
getHandlerPath()
Definition: PLNPlugin.inc.php:191
PLNPlugin\registerDAOs
registerDAOs()
Definition: PLNPlugin.inc.php:148
PLNPlugin\newUUID
newUUID()
Definition: PLNPlugin.inc.php:607
PLNPlugin\getInstallSchemaFile
getInstallSchemaFile()
Definition: PLNPlugin.inc.php:177
PLNPlugin\getSetting
getSetting($journalId, $settingName)
Definition: PLNPlugin.inc.php:207
PLNPlugin
PLN plugin class.
Definition: PLNPlugin.inc.php:72
DepositObjectDAO
Operations for adding a PLN deposit object.
Definition: DepositObjectDAO.inc.php:17
PLNPlugin\getInstallDataFile
getInstallDataFile()
Definition: PLNPlugin.inc.php:184
Plugin\getEnabled
getEnabled()
Definition: Plugin.inc.php:868
JSONMessage
Class to represent a JSON (Javascript Object Notation) message.
Definition: JSONMessage.inc.php:18
Config\getVar
static getVar($section, $key, $default=null)
Definition: Config.inc.php:35
DAORegistry\registerDAO
static registerDAO($name, $dao)
Definition: DAORegistry.inc.php:40
AjaxModal
A modal that retrieves its content from via AJAX.
Definition: AjaxModal.inc.php:18
LinkAction
Base class defining an action that can be performed by the user in the user interface.
Definition: LinkAction.inc.php:22
PLNPlugin\createJournalManagerNotification
createJournalManagerNotification($contextId, $notificationType)
Definition: PLNPlugin.inc.php:519
PLNPlugin\cronEnabled
cronEnabled()
Definition: PLNPlugin.inc.php:556
LazyLoadPlugin\getName
getName()
Definition: LazyLoadPlugin.inc.php:40
PKPApplication\getApplication
static getApplication()
Definition: PKPApplication.inc.php:227
PLNPlugin\curlPutFile
curlPutFile($url, $filename)
Definition: PLNPlugin.inc.php:599
PLNPlugin\callbackNotificationContents
callbackNotificationContents($hookName, $args)
Definition: PLNPlugin.inc.php:279
PLNPlugin\getDescription
getDescription()
Definition: PLNPlugin.inc.php:170
Plugin\getPluginPath
getPluginPath()
Definition: Plugin.inc.php:330
Plugin\$request
$request
Definition: Plugin.inc.php:68
PKPString\generateUUID
static generateUUID()
Definition: PKPString.inc.php:481
HookRegistry\register
static register($hookName, $callback, $hookSequence=HOOK_SEQUENCE_NORMAL)
Definition: HookRegistry.inc.php:70
PLNPlugin\setupComponentHandlers
setupComponentHandlers($hookName, $params)
Definition: PLNPlugin.inc.php:100
PLNPlugin\callbackLoadCategory
callbackLoadCategory($hookName, $args)
Definition: PLNPlugin.inc.php:235
NotificationManager
Definition: NotificationManager.inc.php:19
PLNPlugin\termsAgreed
termsAgreed($journalId)
Definition: PLNPlugin.inc.php:421
PKPApplication\get
static get()
Definition: PKPApplication.inc.php:235
PLNPlugin\callbackLoadHandler
callbackLoadHandler($hookName, $args)
Definition: PLNPlugin.inc.php:301
DepositDAO
Operations for adding a PLN deposit.
Definition: DepositDAO.inc.php:16
GenericPlugin
Abstract class for generic plugins.
Definition: GenericPlugin.inc.php:18
PLNPlugin\_sendFile
_sendFile($method, $url, $filename)
Definition: PLNPlugin.inc.php:618
PLNPlugin\callbackDeleteJournalById
callbackDeleteJournalById($hookName, $params)
Definition: PLNPlugin.inc.php:255
PLNPlugin\getActions
getActions($request, $verb)
Definition: PLNPlugin.inc.php:117
PLNPlugin\getContextSpecificPluginSettingsFile
getContextSpecificPluginSettingsFile()
Definition: PLNPlugin.inc.php:198
PLNPlugin\curlPostFile
curlPostFile($url, $filename)
Definition: PLNPlugin.inc.php:589
PLNGatewayPlugin
Gateway component of web PLN plugin.
Definition: PLNGatewayPlugin.inc.php:24
PLNPlugin\getManagementVerbs
getManagementVerbs()
Definition: PLNPlugin.inc.php:406